The following issues were found

drivers/infiniband/hw/qib/qib_file_ops.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 2363 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

              
static int qib_user_add(struct qib_devdata *dd)
{
	char name[10];
	int ret;

	if (atomic_inc_return(&user_count) == 1) {
		ret = qib_cdev_init(0, "ipath", &qib_file_ops,
				    &wildcard_cdev, &wildcard_device);

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
1 issues
Uninitialized variable: map
Error

Line: 316 CWE codes: 908

              	struct nv50_instobj *iobj = nv50_instobj(memory);
	struct nvkm_instmem *imem = &iobj->imem->base;
	struct nvkm_vma *bar;
	void *map = map;

	mutex_lock(&imem->mutex);
	if (likely(iobj->lru.next))
		list_del(&iobj->lru);
	map = iobj->map;

            

Reported by Cppcheck.

drivers/gpu/drm/i915/gt/gen6_ppgtt.c
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 370 Column: 42 CWE codes: 362

              	struct gen6_ppgtt *ppgtt = to_gen6_ppgtt(base);
	int err;

	GEM_BUG_ON(!atomic_read(&ppgtt->base.vm.open));

	/*
	 * Workaround the limited maximum vma->pin_count and the aliasing_ppgtt
	 * which will be pinned into every active context.
	 * (When vma->pin_count becomes atomic, I expect we will naturally

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 19 Column: 8 CWE codes: 120 20

              
struct nvkm_iccsense_rail {
	struct list_head head;
	int (*read)(struct nvkm_iccsense *, struct nvkm_iccsense_rail *);
	struct nvkm_iccsense_sensor *sensor;
	u8 idx;
	u8 mohm;
};


            

Reported by FlawFinder.

drivers/infiniband/hw/qib/qib_init.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 584 Column: 4 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

              	for (pidx = 0; pidx < dd->num_pports; ++pidx) {
		ppd = dd->pport + pidx;
		if (!ppd->qib_wq) {
			char wq_name[8]; /* 3 + 2 + 1 + 1 + 1 */

			snprintf(wq_name, sizeof(wq_name), "qib%d_%d",
				dd->unit, pidx);
			ppd->qib_wq = alloc_ordered_workqueue(wq_name,
							      WQ_MEM_RECLAIM);

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/nvkm/subdev/fuse/priv.h
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 8 Column: 8 CWE codes: 120 20

              #include <subdev/fuse.h>

struct nvkm_fuse_func {
	u32 (*read)(struct nvkm_fuse *, u32 addr);
};

int nvkm_fuse_new_(const struct nvkm_fuse_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
		   struct nvkm_fuse **);
#endif

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/nvkm/subdev/fuse/base.c
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 29 Column: 21 CWE codes: 120 20

              u32
nvkm_fuse_read(struct nvkm_fuse *fuse, u32 addr)
{
	return fuse->func->read(fuse, addr);
}

static void *
nvkm_fuse_dtor(struct nvkm_subdev *subdev)
{

            

Reported by FlawFinder.

drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 238 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 resource *res;
	void __iomem *base;
	struct clk *pix_clk_in;
	char pix_clk_name[32];
	const char *pix_clk_in_name;
	const struct of_device_id *id;
	int ret;
	u8 div_ratio_shift = 0;


            

Reported by FlawFinder.

drivers/infiniband/hw/qib/qib_rc.c
1 issues
The address of local variable 'hdr' might be accessed at non-zero index.
Error

Line: 694 CWE codes: 758

              		qib_flush_wc();
		qib_pio_copy(piobuf + 2, hdrp, hwords - 1);
		qib_flush_wc();
		__raw_writel(hdrp[hwords - 1], piobuf + hwords + 1);
	} else
		qib_pio_copy(piobuf + 2, (u32 *) &hdr, hwords);

	if (dd->flags & QIB_USE_SPCL_TRIG) {
		u32 spcl_off = (pbufn >= dd->piobcnt2k) ? 2047 : 1023;

            

Reported by Cppcheck.

drivers/infiniband/hw/qib/qib_sd7220.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 886 Column: 11 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

              			       const u8 *img, int len, int offset)
{
	int cnt, sofar, req, idx, errors;
	unsigned char readback[VFY_CHUNK];

	errors = 0;
	sofar = 0;
	while (sofar < len) {
		req = len - sofar;

            

Reported by FlawFinder.