public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Ian Kent <raven@themaw.net>
Cc: Jiri Kosina <jkosina@suse.cz>, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] autofs: fix error code path in autofs_fill_sb()
Date: Thu, 30 Nov 2006 14:39:59 -0800	[thread overview]
Message-ID: <20061130143959.ca82ef57.akpm@osdl.org> (raw)
In-Reply-To: <1164863675.3127.4.camel@localhost>

On Thu, 30 Nov 2006 13:14:35 +0800
Ian Kent <raven@themaw.net> wrote:

> > The problem: autofs_fill_super() returns EINVAL to get_sb_nodev(), but before
> > that, it calls kill_anon_super() to destroy the superblock which won't be 
> > needed. This is however way too soon to call kill_anon_super(), because 
> > get_sb_nodev() has to perform its own cleanup of the superblock first
> > (deactivate_super(), etc.). The correct time to call kill_anon_super() is in
> > the autofs_kill_sb() callback, which is called by deactivate_super() at proper
> > time, when the superblock is ready to be killed.
> > 
> > I can see the same faulty codepath also in autofs4. This patch solves issues in
> > both filesystems in a same way - it postpones the kill_anon_super() until the 
> > proper time is signalized by deactivate_super() calling the kill_sb() callback.
> > 
> > Patch against 2.6.19-rc6-mm2.
> > 
> > Signed-off-by: Jiri Kosina <jkosina@suse.cz>
> Acked-by: Ian Kent <raven@themaw.net>
> 
> It looks so obvious now.
> Updating the comment above would be a good idea also, see attached.


Thanks, Ian.

I've tagged these for 2.6.19.x also.  Please let me know if you think that's
inappropriate, unnecessary or too risky.

      parent reply	other threads:[~2006-11-30 22:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-30  0:26 [PATCH] autofs: fix error code path in autofs_fill_sb() Jiri Kosina
2006-11-30  5:14 ` Ian Kent
2006-11-30  9:14   ` Jiri Kosina
2006-11-30 22:39   ` Andrew Morton [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=20061130143959.ca82ef57.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=hpa@zytor.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raven@themaw.net \
    /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