Coverity-updates archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New Defects reported by Coverity Scan for NetBSD-amd64-kernel



Hi,

Please find the latest report on new defect(s) introduced to NetBSD-amd64-kernel found with Coverity Scan.

3 new defect(s) introduced to NetBSD-amd64-kernel found with Coverity Scan.
5 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)


** CID 1308957:  Incorrect expression  (SIZEOF_MISMATCH)
/sys/miscfs/specfs/spec_vnops.c: 1100 in spec_reclaim()


________________________________________________________________________________________________________
*** CID 1308957:  Incorrect expression  (SIZEOF_MISMATCH)
/sys/miscfs/specfs/spec_vnops.c: 1100 in spec_reclaim()
1094     	struct vop_reclaim_args /* {
1095     		struct vnode *a_vp;
1096     	} */ *ap = v;
1097     	struct vnode *vp = ap->a_vp;
1098     
1099     	KASSERT(vp->v_mount == dead_rootmount);
>>>     CID 1308957:  Incorrect expression  (SIZEOF_MISMATCH)
>>>     Passing argument "vp" of type "struct vnode *" and argument "8UL /* sizeof (vp) */" to function "vcache_remove" is suspicious.
1100     	vcache_remove(vp->v_mount, vp, sizeof(vp));
1101     	return 0;
1102     }
1103     
1104     /*
1105      * This is a noop, simply returning what one has been given.

** CID 1308958:  Uninitialized variables  (UNINIT)
/sys/kern/sys_mqueue.c: 622 in sys_mq_open()


________________________________________________________________________________________________________
*** CID 1308958:  Uninitialized variables  (UNINIT)
/sys/kern/sys_mqueue.c: 622 in sys_mq_open()
616     		syscallarg(struct mq_attr) attr;
617     	} */
618     	struct mq_attr *attr = NULL, a;
619     	int error;
620     
621     	if ((SCARG(uap, oflag) & O_CREAT) && (SCARG(uap,attr) != NULL)) {
>>>     CID 1308958:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "a". Field "a.mq_flags" is uninitialized when calling "copyin".
622     		error = copyin(&a, SCARG(uap,attr), sizeof(a));
623     		if (error)
624     			return error;
625     		attr = &a;
626     	}
627     

** CID 1308980:  Uninitialized variables  (UNINIT)
/sys/compat/netbsd32/netbsd32_mqueue.c: 65 in netbsd32_mq_open()


________________________________________________________________________________________________________
*** CID 1308980:  Uninitialized variables  (UNINIT)
/sys/compat/netbsd32/netbsd32_mqueue.c: 65 in netbsd32_mq_open()
59     	} */
60     	struct netbsd32_mq_attr attr32;
61     	struct mq_attr *attr = NULL, a;
62     	int error;
63     
64     	if ((SCARG(uap, oflag) & O_CREAT) && (SCARG_P32(uap,attr) != NULL)) {
>>>     CID 1308980:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "attr32". Field "attr32.mq_flags" is uninitialized when calling "copyin".
65     		error = copyin(&attr32, SCARG_P32(uap,attr), sizeof(attr32));
66     		if (error)
67     			return error;
68     		netbsd32_to_mq_attr(&attr32, &a);
69     		attr = &a;
70     	}


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/1447?tab=overview

To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click https://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782



Home | Main Index | Thread Index | Old Index