From: Akinobu Mita <akinobu.mita@gmail.com>
To: David Rientjes <rientjes@cs.washington.edu>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org,
Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Subject: Re: [PATCH] appletalk: prevent unregister_sysctl_table() with a NULL argument
Date: Tue, 24 Oct 2006 19:19:40 +0900 [thread overview]
Message-ID: <20061024101940.GA10575@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64N.0610240229140.10760@attu4.cs.washington.edu>
On Tue, Oct 24, 2006 at 02:38:24AM -0700, David Rientjes wrote:
> The only way this would happen at atalk_unregister_sysctl is if the
> kmalloc failed on register_sysctl_table during init. In that case there
> is no need to unregister atalk in the first place since it never came up,
Yes. this patch doesn't cause failure if sysctl registration failed.
It aims to avoid that minor possible NULL pointer dereference.
> so this doesn't appear to be the correct fix. Even if it were possible,
> this check should be done at atalk_exit instead of
> atalk_unregister_sysctl.
Are there any difference?
Because atalk_unregister_sysctl() is only called from atalk_exit(). And
atalk_table_header is static variable. So there is no way to know
whether sysclt registration was succeeded or not. Or is it better to
export atalk_table_header for that check from atalk_exit()?
next prev parent reply other threads:[~2006-10-24 10:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 8:53 [PATCH] appletalk: prevent unregister_sysctl_table() with a NULL argument Akinobu Mita
2006-10-24 9:38 ` David Rientjes
2006-10-24 10:19 ` Akinobu Mita [this message]
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=20061024101940.GA10575@localhost \
--to=akinobu.mita@gmail.com \
--cc=acme@conectiva.com.br \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@cs.washington.edu \
/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