From: viro@parcelfarce.linux.theplanet.co.uk
To: Linus Torvalds <torvalds@osdl.org>
Cc: BlaisorBlade <blaisorblade_spam@yahoo.it>,
Andrew Morton <akpm@osdl.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Missing BKL in sys_chroot() for 2.6
Date: Mon, 7 Jun 2004 23:53:47 +0100 [thread overview]
Message-ID: <20040607225347.GK12308@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.58.0406071150560.1637@ppc970.osdl.org>
On Mon, Jun 07, 2004 at 11:56:37AM -0700, Linus Torvalds wrote:
>
>
> On Sun, 6 Jun 2004, BlaisorBlade wrote:
> >
> > (PLEASE cc me on replies as I'm not subscribed).
> >
> > Set_fs_root *claims* it wants the BKL held:
>
> I think the set_fs_root() comment is just wrong.
>
> We properly lock the accesses to root/rootmnt with "fs->lock", and in fact
> no other users will have the BKL when accessing them anyway, so I don't
> see what the BKL would help in this case.
>
> However, from a quick grep of users, it does look like some other users
> aren't real careful with "fs->lock" (ie chroot_fs_refs() looks like it
> could have problems - probably purely theoretical).
>
> Al, do your eagle-eyes see something I missed?
chroot_fs_refs() is OK - it's a part of pivot_root(2) and it's just as
"if process looks like the have root and/or cwd in old root, we assume
they want to have those flipped to new one; if they are not, assume
that they know what they are doing and wouldn't like us to pull anything
on them". IOW, here we don't really care.
selinux open_devnull(), OTOH, is bogus - they already have an fs of their
own that is not going away; so why not put the damn device node on it and
be done with that?
In any case, BKL is irrelevant - that comment should've been dropped a long
time ago.
prev parent reply other threads:[~2004-06-07 22:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-06 17:58 BlaisorBlade
2004-06-07 18:56 ` Linus Torvalds
2004-06-07 19:13 ` Phy Prabab
2004-06-07 19:18 ` Linus Torvalds
2004-06-07 19:33 ` Phy Prabab
2004-06-07 22:53 ` viro [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=20040607225347.GK12308@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=akpm@osdl.org \
--cc=blaisorblade_spam@yahoo.it \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 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®