The following issues were found
drivers/md/bcache/util.h
1 issues
Line: 346
Column: 2
CWE codes:
134
Suggestion:
Use a constant for the format specification
})
#define snprint(buf, size, var) \
snprintf(buf, size, \
__builtin_types_compatible_p(typeof(var), int) \
? "%i\n" : \
__builtin_types_compatible_p(typeof(var), unsigned int) \
? "%u\n" : \
__builtin_types_compatible_p(typeof(var), long) \
Reported by FlawFinder.
drivers/infiniband/ulp/iser/iser_verbs.c
1 issues
Line: 778
Column: 2
CWE codes:
120
Suggestion:
Use sprintf_s, snprintf, or vsnprintf
mutex_lock(&iser_conn->state_mutex);
sprintf(iser_conn->name, "%pISp", dst_addr);
iser_info("connecting to: %s\n", iser_conn->name);
/* the device is known only --after-- address resolution */
ib_conn->device = NULL;
Reported by FlawFinder.
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c
1 issues
Line: 1451
/* NV_PGRAPH_FE_PWR_MODE_FORCE_ON. */
nvkm_wr32(device, 0x404170, 0x00000012);
nvkm_msec(device, 2000,
if (!(nvkm_rd32(device, 0x404170) & 0x00000010))
break;
);
if (grctx->unkn88c)
Reported by Cppcheck.
drivers/infiniband/ulp/isert/ib_isert.h
1 issues
Line: 89
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
};
struct iser_rx_desc {
char buf[ISER_RX_SIZE];
u64 dma_addr;
struct ib_sge rx_sg;
struct ib_cqe rx_cqe;
bool in_use;
};
Reported by FlawFinder.
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c
1 issues
Line: 51
nvkm_wr32(device, 0x002634, cgrp->id | 0x01000000);
else
nvkm_wr32(device, 0x002634, chan->base.chid);
if (nvkm_msec(device, 2000,
if (!(nvkm_rd32(device, 0x002634) & 0x00100000))
break;
) < 0) {
nvkm_error(subdev, "%s %d [%s] kick timeout\n",
cgrp ? "tsg" : "channel",
Reported by Cppcheck.
drivers/leds/leds-max77693.c
1 issues
Line: 46
Column: 8
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
};
struct max77693_led_config_data {
const char *label[2];
u32 iout_torch_max[2];
u32 iout_flash_max[2];
u32 flash_timeout_max[2];
u32 num_leds;
u32 boost_mode;
Reported by FlawFinder.
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c
1 issues
Line: 90
mutex_lock(&chan->fifo->base.mutex);
nvkm_wr32(device, 0x002634, chan->base.chid);
if (nvkm_msec(device, 2000,
if (nvkm_rd32(device, 0x002634) == chan->base.chid)
break;
) < 0) {
nvkm_error(subdev, "channel %d [%s] kick timeout\n",
chan->base.chid, chan->base.object.client->name);
Reported by Cppcheck.
drivers/gpu/drm/i915/gem/i915_gem_internal.c
1 issues
Line: 172
CWE codes:
908
GEM_BUG_ON(!size);
GEM_BUG_ON(!IS_ALIGNED(size, PAGE_SIZE));
if (overflows_type(size, obj->base.size))
return ERR_PTR(-E2BIG);
obj = i915_gem_object_alloc();
if (!obj)
return ERR_PTR(-ENOMEM);
Reported by Cppcheck.
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
1 issues
Line: 60
Column: 27
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
} *pbdma;
struct {
const struct nvkm_enum *access;
const struct nvkm_enum *engine;
const struct nvkm_enum *reason;
const struct nvkm_enum *hubclient;
const struct nvkm_enum *gpcclient;
} fault;
Reported by FlawFinder.
drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c
1 issues
Line: 424
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
int rtrs_clt_create_sess_files(struct rtrs_clt_sess *sess)
{
struct rtrs_clt *clt = sess->clt;
char str[NAME_MAX];
int err;
struct rtrs_addr path = {
.src = &sess->s.src_addr,
.dst = &sess->s.dst_addr,
};
Reported by FlawFinder.