From: viro@parcelfarce.linux.theplanet.co.uk
To: Andrew Morton <akpm@osdl.org>
Cc: arekm@pld-linux.org, linux-kernel@vger.kernel.org,
jmorris@redhat.com, sds@epoch.ncsc.mil, manfred@colorfullife.com
Subject: Re: 2.6.0-test9 and sleeping function called from invalid context
Date: Sun, 26 Oct 2003 09:41:57 +0000 [thread overview]
Message-ID: <20031026094157.GV7665@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20031026014153.0fdbd50a.akpm@osdl.org>
On Sun, Oct 26, 2003 at 01:41:53AM -0700, Andrew Morton wrote:
> > AFAICS, we can move d_add() right before taking the spinlock. It's there
> > to protect the ->proc_dentry assignment.
>
> In which case we don't need to take the lock at all. Two instances.
Yes, we do. At least we used to - the other side of that code assumes
that holding the spinlock is enough to keep ->proc_dentry unchanged.
And no, I hadn't done the analysis of changes that had come with the
"task" ugliness.
> What protects against concurrent execution of proc_pid_lookup() and
> proc_task_lookup()? I think nothing, because one is at /proc/42 and the
> other is at /proc/41/42; the parent dir inodes are different. hmm.
>
> > *However*, I would like to point out that we are holding ->i_sem on the
> > procfs root at that point, so any blocking code in d_instantiate() would
> > better be careful to avoid deadlocks if it wants to play with procfs itself -
> > we are not in a locking-neutral situation here, spinlock or not.
>
> "procfs root", or parent dir??
For proc_pid_lookup() they are the same.
next prev parent reply other threads:[~2003-10-26 9:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-25 22:45 2.6.0-test9 and sleeping function called from invalid context Arkadiusz Miskiewicz
2003-10-26 1:50 ` Andrew Morton
2003-10-26 5:49 ` Andrew Morton
2003-10-26 8:26 ` viro
2003-10-26 8:41 ` Andrew Morton
2003-10-26 9:41 ` viro [this message]
2003-10-26 11:03 ` Manfred Spraul
2003-10-26 17:26 ` Manfred Spraul
2003-10-27 13:52 ` Stephen Smalley
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=20031026094157.GV7665@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=akpm@osdl.org \
--cc=arekm@pld-linux.org \
--cc=jmorris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=sds@epoch.ncsc.mil \
/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