public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Roland McGrath <roland@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ptrace: annotate siglock acquisition
Date: Sun, 26 Sep 2010 19:51:50 +0200	[thread overview]
Message-ID: <20100926175150.GA26579@redhat.com> (raw)
In-Reply-To: <1285415621-28548-1-git-send-email-namhyung@gmail.com>

On 09/25, Namhyung Kim wrote:
>
> --- a/kernel/ptrace.c
> +++ b/kernel/ptrace.c
> @@ -435,7 +435,8 @@ static int ptrace_getsiginfo(struct task_struct *child, siginfo_t *info)
>  	unsigned long flags;
>  	int error = -ESRCH;
>
> -	if (lock_task_sighand(child, &flags)) {
> +	if (__cond_lock(&child->sighand->siglock,
> +			lock_task_sighand(child, &flags))) {

Well, this looks fine, but if we are going to make sparse happy
then we have more callers to fix.

Perhaps we should just renam lock_task_sighand to __lock_task_sighand
and add

	#define lock_task_sighand(tsk, flagsp)	\
		__cond_lock((tsk)->sighand->siglock, __lock_task_sighand((tsk), (flagsp)))

?

Oleg.


      reply	other threads:[~2010-09-26 17:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-25 11:53 [PATCH v2] ptrace: annotate siglock acquisition Namhyung Kim
2010-09-26 17:51 ` Oleg Nesterov [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=20100926175150.GA26579@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@gmail.com \
    --cc=roland@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox