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
Hi,
Please find the latest report on new defect(s) introduced to NetBSD
(NetBSD-amd64-kernel) found with Coverity Scan
Defect(s) Reported-by: Coverity Scan
Showing 7 of 44 defects
** CID 1125959: Uninitialized scalar variable (UNINIT)
/sys/arch/amd64/amd64/gdt.c: 104
** CID 1125865: Uninitialized scalar variable (UNINIT)
/sys/uvm/uvm_stat.c: 74
** CID 1125864: Uninitialized scalar variable (UNINIT)
/sys/uvm/uvm_meter.c: 126
** CID 1125863: Uninitialized scalar variable (UNINIT)
/sys/miscfs/procfs/procfs_linux.c: 286
** CID 1125862: Uninitialized scalar variable (UNINIT)
/sys/kern/sys_sched.c: 366
** CID 1125861: Uninitialized scalar variable (UNINIT)
/sys/kern/sys_pset.c: 328
** CID 1125860: Uninitialized scalar variable (UNINIT)
/sys/kern/sys_pset.c: 224
________________________________________________________________________
CID 1125959: Uninitialized scalar variable (UNINIT)
/sys/arch/amd64/amd64/gdt.c: 98 ( var_decl)
95 struct sys_segment_descriptor sd;
96 uint64_t bits[2];
97 } d;
>>> Declaring variable "cii" without initializer.
98 CPU_INFO_ITERATOR cii;
99 struct cpu_info *ci;
100 int idx;
101
102 set_sys_segment(&d.sd, base, limit, type, dpl, gran);
/sys/arch/amd64/amd64/gdt.c: 104 ( uninit_use)
101
102 set_sys_segment(&d.sd, base, limit, type, dpl, gran);
103 idx = IDXSEL(GDYNSEL(slot, SEL_KPL));
>>> CID 1125959: Uninitialized scalar variable (UNINIT)
>>> Using uninitialized value "cii".
104 for (CPU_INFO_FOREACH(cii, ci)) {
105 KASSERT(ci->ci_gdt != NULL);
106 update_descriptor(&ci->ci_gdt[idx + 0], &d.bits[0]);
107 update_descriptor(&ci->ci_gdt[idx + 1], &d.bits[1]);
108 }
________________________________________________________________________
CID 1125865: Uninitialized scalar variable (UNINIT)
/sys/uvm/uvm_stat.c: 57 ( var_decl)
54 __attribute__((__format__(__printf__,1,2))))
55 {
56 int active, inactive;
>>> Declaring variable "cii" without initializer.
57 CPU_INFO_ITERATOR cii;
58 struct cpu_info *ci;
59
60 uvm_estimatepageable(&active, &inactive);
61
/sys/uvm/uvm_stat.c: 74 ( uninit_use)
71 (*pr)(" freemin=%d, free-target=%d, wired-max=%d\n",
72 uvmexp.freemin, uvmexp.freetarg, uvmexp.wiredmax);
73
>>> CID 1125865: Uninitialized scalar variable (UNINIT)
>>> Using uninitialized value "cii".
74 for (CPU_INFO_FOREACH(cii, ci)) {
75 (*pr)(" cpu%u:\n", cpu_index(ci));
76 (*pr)(" faults=%" PRIu64 ", traps=%" PRIu64 ", "
77 "intrs=%" PRIu64 ", ctxswitch=%" PRIu64 "\n",
78 ci->ci_data.cpu_nfault, ci->ci_data.cpu_ntrap,
________________________________________________________________________
CID 1125864: Uninitialized scalar variable (UNINIT)
/sys/uvm/uvm_meter.c: 97 ( var_decl)
94 struct sysctlnode node;
95 struct uvmexp_sysctl u;
96 int active, inactive;
>>> Declaring variable "cii" without initializer.
97 CPU_INFO_ITERATOR cii;
98 struct cpu_info *ci;
99
100 uvm_estimatepageable(&active, &inactive);
101
/sys/uvm/uvm_meter.c: 126 ( uninit_use)
123 u.swpginuse = uvmexp.swpginuse;
124 u.swpgonly = uvmexp.swpgonly;
125 u.nswget = uvmexp.nswget;
>>> CID 1125864: Uninitialized scalar variable (UNINIT)
>>> Using uninitialized value "cii".
126 for (CPU_INFO_FOREACH(cii, ci)) {
127 u.faults += ci->ci_data.cpu_nfault;
128 u.traps += ci->ci_data.cpu_ntrap;
129 u.intrs += ci->ci_data.cpu_nintr;
130 u.swtch += ci->ci_data.cpu_nswtch;
________________________________________________________________________
CID 1125863: Uninitialized scalar variable (UNINIT)
/sys/miscfs/procfs/procfs_linux.c: 257 ( var_decl)
254 int len;
255 #if defined(MULTIPROCESSOR)
256 struct cpu_info *ci;
>>> Declaring variable "cii" without initializer.
257 CPU_INFO_ITERATOR cii;
258 #endif
259 int i;
260 uint64_t nintr;
261 uint64_t nswtch;
/sys/miscfs/procfs/procfs_linux.c: 286 ( uninit_use)
283 i = 0;
284 nintr = 0;
285 nswtch = 0;
>>> CID 1125863: Uninitialized scalar variable (UNINIT)
>>> Using uninitialized value "cii".
286 for (ALLCPUS) {
287 len += snprintf(&bf[len], LBFSZ - len,
288 "cpu%d %" PRIu64 " %" PRIu64 " %" PRIu64 " %"
PRIu64
289 "\n", i,
290 CPUNAME->ci_schedstate.spc_cp_time[CP_USER],
________________________________________________________________________
CID 1125862: Uninitialized scalar variable (UNINIT)
/sys/kern/sys_sched.c: 344 ( var_decl)
341 struct cpu_info *ici, *ci;
342 struct proc *p;
343 struct lwp *t;
>>> Declaring variable "cii" without initializer.
344 CPU_INFO_ITERATOR cii;
345 bool alloff;
346 lwpid_t lid;
347 u_int lcnt;
348 int error;
/sys/kern/sys_sched.c: 366 ( uninit_use)
363 ci = NULL;
364 alloff = false;
365 mutex_enter(&cpu_lock);
>>> CID 1125862: Uninitialized scalar variable (UNINIT)
>>> Using uninitialized value "cii".
366 for (CPU_INFO_FOREACH(cii, ici)) {
367 struct schedstate_percpu *ispc;
368
369 if (!kcpuset_isset(kcset, cpu_index(ici))) {
370 continue;
________________________________________________________________________
CID 1125861: Uninitialized scalar variable (UNINIT)
/sys/kern/sys_pset.c: 317 ( var_decl)
314 struct schedstate_percpu *spc = NULL;
315 struct lwp *t;
316 psetid_t psid = SCARG(uap, psid), opsid = 0;
>>> Declaring variable "cii" without initializer.
317 CPU_INFO_ITERATOR cii;
318 int error = 0, nnone = 0;
319
320 /* Available only for super-user, except the case of PS_QUERY */
321 if (kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_PSET,
/sys/kern/sys_pset.c: 328 ( uninit_use)
325
326 /* Find the target CPU */
327 mutex_enter(&cpu_lock);
>>> CID 1125861: Uninitialized scalar variable (UNINIT)
>>> Using uninitialized value "cii".
328 for (CPU_INFO_FOREACH(cii, ici)) {
329 struct schedstate_percpu *ispc;
330 ispc = &ici->ci_schedstate;
331 if (cpu_index(ici) == SCARG(uap, cpuid)) {
332 ci = ici;
________________________________________________________________________
CID 1125860: Uninitialized scalar variable (UNINIT)
/sys/kern/sys_pset.c: 209 ( var_decl)
206 struct cpu_info *ci;
207 pset_info_t *pi;
208 struct lwp *l;
>>> Declaring variable "cii" without initializer.
209 CPU_INFO_ITERATOR cii;
210 int error;
211
212 mutex_enter(&cpu_lock);
213 if (psid == PS_MYID) {
/sys/kern/sys_pset.c: 224 ( uninit_use)
221 }
222
223 /* Release the processor-set from all CPUs */
>>> CID 1125860: Uninitialized scalar variable (UNINIT)
>>> Using uninitialized value "cii".
224 for (CPU_INFO_FOREACH(cii, ci)) {
225 struct schedstate_percpu *spc;
226
227 spc = &ci->ci_schedstate;
228 if (spc->spc_psid != psid)
________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com
To unsubscribe from the email notification for new defects,
http://scan5.coverity.com/cgi-bin/unsubscribe.py
Home |
Main Index |
Thread Index |
Old Index