All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: ananth@in.ibm.com, x86@kernel.org, linux-kernel@vger.kernel.org,
	oleg@redhat.com
Subject: Re: [PATCH] uprobes: don't put NULL pointer in uprobe_register()
Date: Wed, 12 Sep 2012 18:13:57 +0530	[thread overview]
Message-ID: <20120912124357.GE9582@linux.vnet.ibm.com> (raw)
In-Reply-To: <1346347582-20945-1-git-send-email-bigeasy@linutronix.de>

* Sebastian Andrzej Siewior <bigeasy@linutronix.de> [2012-08-30 19:26:22]:

> alloc_uprobe() might return a NULL pointer, put_uprobe() can't deal with
> this.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>

> ---
>  kernel/events/uprobes.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
> index 7b3112c..30f3e23 100644
> --- a/kernel/events/uprobes.c
> +++ b/kernel/events/uprobes.c
> @@ -897,7 +897,8 @@ int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *
>  	}
> 
>  	mutex_unlock(uprobes_hash(inode));
> -	put_uprobe(uprobe);
> +	if (uprobe)
> +		put_uprobe(uprobe);
> 
>  	return ret;
>  }
> -- 
> 1.7.10.4
> 


      parent reply	other threads:[~2012-09-12 12:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 17:26 [PATCH] uprobes: don't put NULL pointer in uprobe_register() Sebastian Andrzej Siewior
2012-08-31 14:05 ` Oleg Nesterov
2012-09-12 12:43 ` Srikar Dronamraju [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=20120912124357.GE9582@linux.vnet.ibm.com \
    --to=srikar@linux.vnet.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=x86@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 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.