Re: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c

2007-07-16 Thread Jeff Garzik

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 < [EMAIL PROTECTED]>

--- 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 :/


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [2.6.22] Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c

2007-07-08 Thread Micah Gruber

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 < [EMAIL PROTECTED]>

--- 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;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c

2007-07-08 Thread Jeff Garzik

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 < [EMAIL PROTECTED] 
>


any chance you can resend in an email format other than format=flowed?

Jeff



-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html