Re: [PATCH] autofs: fix error code path in autofs_fill_sb()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 30 Nov 2006 13:14:35 +0800
Ian Kent <[email protected]> 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 <[email protected]>
> Acked-by: Ian Kent <[email protected]>
> 
> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux