lkml.org 
[lkml]   [2002]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [CHECKER] 54 missing null pointer checks in 2.4.17
Date
> > [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/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.080 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site