* Re: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c
[not found] <aaab98560707082024v106a61c1r501ef9817e029410@mail.gmail.com>
@ 2007-07-09 3:25 ` Jeff Garzik
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-07-09 3:25 UTC (permalink / raw)
To: Micah Gruber; +Cc: linux-kernel, netdev, akpm
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
> <mailto:micah.gruber@gmail.com>>
any chance you can resend in an email format other than format=flowed?
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] [2.6.22] Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c
@ 2007-07-09 3:29 Micah Gruber
2007-07-16 21:56 ` Jeff Garzik
0 siblings, 1 reply; 3+ messages in thread
From: Micah Gruber @ 2007-07-09 3:29 UTC (permalink / raw)
To: linux-kernel, netdev, akpm, jgarzik
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;
+
mac_control = &nic->mac_control;
config = &nic->config;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c
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
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-07-16 21:56 UTC (permalink / raw)
To: Micah Gruber; +Cc: linux-kernel, netdev, akpm
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 :/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-16 21:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[not found] <aaab98560707082024v106a61c1r501ef9817e029410@mail.gmail.com>
2007-07-09 3:25 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).