Messages in this thread | | | From | Dawson Engler <> | Subject | Re: [CHECKER] 54 missing null pointer checks in 2.4.17 | Date | Sun, 9 Jun 2002 22:56:56 -0700 (PDT) |
| |
> > [BUG] (synonums aren't working) > > /u2/engler/mc/oses/linux/2.4.17/drivers/net/eexpress.c:1088:eexp_hw_probe: > > ERROR:NULL:1083:1088:Using ptr "lp" illegally! set by 'kmalloc':1083 > > [COUNTER=kmalloc:1083] [fit=1] [fit_fn=5] [fn_ex=0] [fn_counter=1] > > [ex=1399] [counter=26] [z = 5.50002098543802] [fn-z = -4.35889894354067] > > } > > > > buswidth = !((setupval & 0x400) >> 10); > > } > > > > Start ---> > > dev->priv = lp = kmalloc(sizeof(struct net_local), GFP_KERNEL); > > if (!dev->priv) > > return -ENOMEM; > > > > memset(dev->priv, 0, sizeof(struct net_local)); > > Error ---> > > spin_lock_init(&lp->lock); > > This one isn't a bug. The pointer to allocated memory is stored in two > variables. Only one of them is verified against NULL, that is enough.
Yuck. Sorry about that --- I mislabeled the message. It's a BUG, but in our system rather than in 2.4.17. Bug finding still tends to be unfortunately symetrical... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |