lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 11 Nov 2006 09:33:28 +0800
From:	Ian Kent <raven@...maw.net>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [2.4.19-rc4 and 2.4.19-rc4-mm2] super block list corruption
	following fill_super returns fail

On Fri, 2006-11-10 at 16:55 -0800, Andrew Morton wrote:
> On Fri, 10 Nov 2006 20:33:42 +0800
> Ian Kent <raven@...maw.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.

I came to the same conclusion.

There are a couple of ways I could do it but I was hoping to get a
recommendation from someone that is familiar with the way it's supposed
to be done.

I'll have a look at some of the other file systems.

Ian


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ