lkml.org 
[lkml]   [2006]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] appletalk: prevent unregister_sysctl_table() with a NULL argument
If register_sysctl_table() fails during module initalization,
NULL pointer dereference will happen in the module cleanup.

Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

net/appletalk/sysctl_net_atalk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: work-fault-inject/net/appletalk/sysctl_net_atalk.c
===================================================================
--- work-fault-inject.orig/net/appletalk/sysctl_net_atalk.c
+++ work-fault-inject/net/appletalk/sysctl_net_atalk.c
@@ -78,5 +78,6 @@ void atalk_register_sysctl(void)

void atalk_unregister_sysctl(void)
{
- unregister_sysctl_table(atalk_table_header);
+ if (atalk_table_header)
+ unregister_sysctl_table(atalk_table_header);
}
-
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: 2006-10-24 10:57    [from the cache]
©2003-2011 Jasper Spaans