From: Andrew Morton <akpm@osdl.org>
To: Ian Kent <raven@themaw.net>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [2.4.19-rc4 and 2.4.19-rc4-mm2] super block list corruption following fill_super returns fail
Date: Fri, 10 Nov 2006 16:55:44 -0800 [thread overview]
Message-ID: <20061110165544.a63aea51.akpm@osdl.org> (raw)
In-Reply-To: <1163162022.10725.13.camel@localhost>
On Fri, 10 Nov 2006 20:33:42 +0800
Ian Kent <raven@themaw.net> wrote:
> I'm seeing an oops after returning a fail status from the autofs and
> autofs4 fill_super methods. The scenario is a little contrived but does
> demonstrate the mount fail case.
>
> get_super+0x78 corresponds to:
>
> down_read(&sb->s_umount);
> ----> if (sb->s_root)
> return sb;
> up_read(&sb->s_umount);
>
> So I believe that, following the fill_super call in get_sb_nodev the
> super block is freed during the call to deactivate_super but not removed
> from the supers list.
>
> As far as I can tell I've done the appropriate housekeeping in the
> autofs[4] fill_super function. In particular, sb->s_root is not set upon
> mount fail.
>
Yup, sget() adds the superblock to super_blocks and deactivate_super()
doesn't take it off.
> Does anyone have any suggestions as to what I might not be doing that I
> should be doing that is preventing this removal?
Well afacit the only piece of code which knows how to remove a superblock
from the global list is generic_shutdown_super(). So perhaps your
->fill_super() implementation is supposed to run generic_shutdown_super()
if it's about to return an error.
Seems like an odd API though.
next prev parent reply other threads:[~2006-11-11 0:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-10 12:33 [2.4.19-rc4 and 2.4.19-rc4-mm2] super block list corruption following fill_super returns fail Ian Kent
2006-11-11 0:55 ` Andrew Morton [this message]
2006-11-11 1:33 ` Ian Kent
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=20061110165544.a63aea51.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raven@themaw.net \
--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