From: Dawson Engler <engler@csl.Stanford.EDU>
To: kasperd@daimi.au.dk (Kasper Dupont)
Cc: linux-kernel@vger.kernel.org (Linux-Kernel)
Subject: Re: [CHECKER] 54 missing null pointer checks in 2.4.17
Date: Sun, 9 Jun 2002 22:56:56 -0700 (PDT) [thread overview]
Message-ID: <200206100556.WAA17248@csl.Stanford.EDU> (raw)
In-Reply-To: <3D04379B.1DE4CF8C@daimi.au.dk> from "Kasper Dupont" at Jun 10, 2002 07:22:35 AM
> > [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...
next prev parent reply other threads:[~2002-06-10 5:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-10 3:55 Dawson Engler
2002-06-10 5:22 ` Kasper Dupont
2002-06-10 5:56 ` Dawson Engler [this message]
2002-06-10 5:28 ` Andreas Dilger
2002-06-10 6:07 ` Dawson Engler
2002-06-10 6:35 ` Andreas Dilger
2002-06-10 7:05 ` Dawson Engler
2002-06-10 7:19 ` Giuliano Pochini
2002-06-10 12:40 ` john slee
2002-06-10 7:03 ` Brad Hards
2002-06-10 7:08 ` Dawson Engler
2002-06-11 0:30 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200206100556.WAA17248@csl.Stanford.EDU \
--to=engler@csl.stanford.edu \
--cc=kasperd@daimi.au.dk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®