mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menage <menage@google.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Li Zefan <lizf@cn.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [PATCH] cgroups: fix possible use after free
Date: Tue, 10 Feb 2009 17:54:07 -0800	[thread overview]
Message-ID: <6599ad830902101754w50a64b0ds126510360fdef28e@mail.gmail.com> (raw)
In-Reply-To: <20090211011933.GB28946@ZenIV.linux.org.uk>

On Tue, Feb 10, 2009 at 5:19 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> So you can't wrap sget() into a mutex that might be grabbed at some
> point of ->kill_sb() or it'll wait forever in that scenario.

Good point.

>
> So no exclusion is needed there at all.  If you don't want later remount
> of the first mount to affect these flags of second one you shouldn't share
> the superblock at all, obviously...

I have plans for some slightly more complex state in that structure -
I'll probably just add a spinlock around accesses to those fields so
that we can avoid exposing any inconsistent state.

Paul

  reply	other threads:[~2009-02-11  1:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10  9:31 Li Zefan
2009-02-10 10:15 ` Paul Menage
2009-02-10 12:45   ` Al Viro
2009-02-11  0:01     ` Paul Menage
2009-02-11  1:19       ` Al Viro
2009-02-11  1:54         ` Paul Menage [this message]
2009-02-11  0:01 ` Paul Menage

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=6599ad830902101754w50a64b0ds126510360fdef28e@mail.gmail.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=viro@zeniv.linux.org.uk \
    /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®