tech-kern archive

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

Re: smbfs umount kernel panic fixes for review



On Wed Jul 01 2009 at 16:58:27 +0200, Nicolas Joly wrote:
> 
> Hi,
> 
> While playing with SMBFS/CIFS shares from a NetApp FAS6080C filer; i
> encountered some kernel panics, mostly when trying to umount the
> filesystem after use.
> 
> Looking into the code most problems seems to come from the
> smbfs_unmount() function ...
> 
> The root vnode is unconditionnaly destroyed, preventing any further
> use. If the filesystem is in use, the umount will fail, but any access
> to the root vnode will make the kernel panic. Likewise, the mount
> structure blindly loose its reference to the specific smbmount
> structure. Same result ... panic.
> 
> The attached patch, should fix them.
> 
> Could someone with more FS knowledge check that this is correct ?

Generally, IIRC, vflush() with a non-null special node always leads to
some kind of trouble.  What happens now if you have someone with cwd in
the mountpoint root?

If the root vnode being unconditionally destroyed is in fact the problem,
the solution is to make VFS_ROOT() do the right thing.

... but, it's been a few years since I had the rules cached in my head.
And I don't know what the root vnode actually signifies for smbfs.


Home | Main Index | Thread Index | Old Index