From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Subject: [PATCH] appletalk: prevent unregister_sysctl_table() with a NULL argument
Date: Tue, 24 Oct 2006 17:53:57 +0900 [thread overview]
Message-ID: <20061024085357.GB7703@localhost> (raw)
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);
}
next reply other threads:[~2006-10-24 8:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 8:53 Akinobu Mita [this message]
2006-10-24 9:38 ` [PATCH] appletalk: prevent unregister_sysctl_table() with a NULL argument David Rientjes
2006-10-24 10:19 ` Akinobu Mita
2006-10-24 20:18 ` David Rientjes
2006-10-24 10:27 ` Alexey Dobriyan
2006-10-25 2:39 ` [PATCH] appletalk: handle errors during module_init Akinobu Mita
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=20061024085357.GB7703@localhost \
--to=akinobu.mita@gmail.com \
--cc=acme@conectiva.com.br \
--cc=akpm@osdl.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox