From: Ralf Baechle <ralf@linux-mips.org>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: linux-kernel@vger.kernel.org, Frederic Rible <frible@teaser.fr>,
Jean-Paul Roubelat <jpr@f6fbb.org>,
linux-hams@vger.kernel.org
Subject: Re: [PATCH] fix potential NULL pointer dereference in yam
Date: Sun, 14 May 2006 18:08:27 +0100 [thread overview]
Message-ID: <20060514170827.GA24169@linux-mips.org> (raw)
In-Reply-To: <200605141512.50923.jesper.juhl@gmail.com>
On Sun, May 14, 2006 at 03:12:50PM +0200, Jesper Juhl wrote:
> Testing a pointer for NULL after it has already been dereferenced is not
> very safe.
> Patch below to rework yam_open() so that `dev' is not dereferenced until
> after it has been tested for NULL.
It may not obvious and that itself is some sort of bug bug netdev_priv()
assumes that the private part of struct netdev has been allocated
immediately following struct netdev, so the macro will compile into just
pointer arithmetic. So no possible NULL pointer dereference here.
Ralf
prev parent reply other threads:[~2006-05-14 17:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-14 13:12 [PATCH] fix potential NULL pointer dereference in yam Jesper Juhl
2006-05-14 14:09 ` Alexey Dobriyan
2006-05-15 20:19 ` Jesper Juhl
2006-05-16 9:57 ` Ralf Baechle
2006-05-14 17:08 ` Ralf Baechle [this message]
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=20060514170827.GA24169@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=frible@teaser.fr \
--cc=jesper.juhl@gmail.com \
--cc=jpr@f6fbb.org \
--cc=linux-hams@vger.kernel.org \
--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