lkml.org 
[lkml]   [2007]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c
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 :/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-16 23:59    [W:0.343 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site