From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
To: Adrian Bunk <bunk@kernel.org>
Cc: prasanna@in.ibm.com, anil.s.keshavamurthy@intel.com,
davem@davemloft.net, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] kprobe_exceptions_notify(): fix NULL dereference
Date: Mon, 29 Oct 2007 10:56:35 +0530 [thread overview]
Message-ID: <20071029052635.GA8063@in.ibm.com> (raw)
In-Reply-To: <20071027141914.GW30533@stusta.de>
On Sat, Oct 27, 2007 at 04:19:14PM +0200, Adrian Bunk wrote:
> This patch fixes later NULL dereferences spotted by the Coverity
> checker.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
NACK... see below
> ---
>
> BTW: The avr32 and s390 versions of kprobe_exceptions_notify() are
> not touched since they don't contain this check.
>
> arch/ia64/kernel/kprobes.c | 2 +-
> arch/powerpc/kernel/kprobes.c | 2 +-
> arch/sparc64/kernel/kprobes.c | 2 +-
> arch/x86/kernel/kprobes_32.c | 2 +-
> arch/x86/kernel/kprobes_64.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
>
> b6f1241ee20dd22210f48b4100bc5055315f3808
> diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
> index 5fd65d8..3663dfb 100644
> --- a/arch/ia64/kernel/kprobes.c
> +++ b/arch/ia64/kernel/kprobes.c
> @@ -886,11 +886,11 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
> unsigned long val, void *data)
> {
> struct die_args *args = (struct die_args *)data;
> int ret = NOTIFY_DONE;
>
> - if (args->regs && user_mode(args->regs))
> + if (args->regs || user_mode(args->regs))
This change is incorrect as you return if args->regs != NULL leading to
a sure system crash.
Ananth
prev parent reply other threads:[~2007-10-29 5:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-27 14:19 [2.6 patch] kprobe_exceptions_notify(): fix NULL dereference Adrian Bunk
2007-10-29 5:26 ` Ananth N Mavinakayanahalli [this message]
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=20071029052635.GA8063@in.ibm.com \
--to=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=bunk@kernel.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=prasanna@in.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.