From: Jeff Garzik <jgarzik@pobox.com>
To: Micah Gruber <micah.gruber@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c
Date: Mon, 16 Jul 2007 17:56:24 -0400 [thread overview]
Message-ID: <469BE988.6090907@pobox.com> (raw)
In-Reply-To: <aaab98560707082029u52ffce5eia32cfb57a29db78f@mail.gmail.com>
Micah Gruber wrote:
> This patch fixes a potential null dereference bug where we dereference
> nic before a null check. This patch simply moves the dereferencing
> after the null check.
>
> Signed-off-by: Micah Gruber < micah.gruber@gmail.com>
>
> --- a/drivers/net/s2io.c
> +++ b/drivers/net/s2io.c
> @@ -789,12 +789,14 @@
> struct mac_info *mac_control;
> struct config_param *config;
> int lst_size, lst_per_page;
> - struct net_device *dev = nic->dev;
> + struct net_device *dev;
> int page_num = 0;
>
> if (!nic)
> return;
>
> + dev = nic->dev;
> +
applied manually -- all of your patch attempts produced corrupted patches :/
next prev parent reply other threads:[~2007-07-16 21:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-09 3:29 [PATCH] [2.6.22] Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c Micah Gruber
2007-07-16 21:56 ` Jeff Garzik [this message]
[not found] <aaab98560707082024v106a61c1r501ef9817e029410@mail.gmail.com>
2007-07-09 3:25 ` Jeff Garzik
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=469BE988.6090907@pobox.com \
--to=jgarzik@pobox.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=micah.gruber@gmail.com \
--cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.