mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [PATCH] signal, procfs: lock_task_sighand() do not need rcu_read_lock()
Date: Fri, 3 Oct 2008 20:29:15 +0400	[thread overview]
Message-ID: <20081003162915.GA624@tv-sign.ru> (raw)
In-Reply-To: <48E5ED4D.4030102@cn.fujitsu.com>

On 10/03, Lai Jiangshan wrote:
>
> lock_task_sighand() make sure task->sighand is being protected,
> so we do not need rcu_read_lock().
> [ exec() will get task->sighand->siglock before change task->sighand! ]
>
> But code using rcu_read_lock() _just_ to protect lock_task_sighand()
> only appear in procfs. (and some code in procfs use lock_task_sighand()
> without such redundant protection.)

Yes, the patch looks correct.

The initial implementaion of lock_task_sighand() did not take RCU lock,
that is why we still have the callers which call rcu_read_lock().
See 1406f2d321bae5ac5ff729dcb773336d9c05ec74.

Thanks!

Oleg.


  reply	other threads:[~2008-10-03 16:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03 10:00 Lai Jiangshan
2008-10-03 16:29 ` Oleg Nesterov [this message]
2008-10-04 20:55   ` Alexey Dobriyan

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=20081003162915.GA624@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®