Re: [RFC][PATCH] vfs: In mntput run deactivate_super on a shallow stack.

2014-04-13 Thread Al Viro
On Sun, Apr 13, 2014 at 12:51:56AM -0700, Eric W. Biederman wrote: > btrfs_init_test_fs, and of course I was silly when I thought the module > ref count would be useful for something before init_module succeeds. > > Still I suspect I was on the right track. We do have the get_fs_type, > get_file

Re: [RFC][PATCH] vfs: In mntput run deactivate_super on a shallow stack.

2014-04-13 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > Al Viro writes: > >> On Sat, Apr 12, 2014 at 03:15:39PM -0700, Eric W. Biederman wrote: >> >>> Can you explain which scenario you are thinking about with respect to a >>> failed modprobe? >> >> Again, it's not impossible to audit (there's not a

Re: [RFC][PATCH] vfs: In mntput run deactivate_super on a shallow stack.

2014-04-13 Thread Eric W. Biederman
Al Viro writes: > On Sat, Apr 12, 2014 at 03:15:39PM -0700, Eric W. Biederman wrote: > >> Can you explain which scenario you are thinking about with respect to a >> failed modprobe? > > Completely made up example: > > static struct file_system_type foofs = { > .mount = mount_foo, > .k

Re: [RFC][PATCH] vfs: In mntput run deactivate_super on a shallow stack.

2014-04-12 Thread Al Viro
On Sun, Apr 13, 2014 at 06:39:56AM +0100, Al Viro wrote: > type = get_fs_type("proc"); > ns = kmalloc(...); > /* fill *ns */ > mnt = kern_mount_data(type, p); s/p/ns/ > ... > if (error) { > kern_unmount(mnt); > kfree(p); ditto. >

Re: [RFC][PATCH] vfs: In mntput run deactivate_super on a shallow stack.

2014-04-12 Thread Al Viro
On Sat, Apr 12, 2014 at 03:15:39PM -0700, Eric W. Biederman wrote: > Can you explain which scenario you are thinking about with respect to a > failed modprobe? Completely made up example: static struct file_system_type foofs = { .mount = mount_foo, .kill_sb = kill_foo, }; static

Re: [RFC][PATCH] vfs: In mntput run deactivate_super on a shallow stack.

2014-04-12 Thread Eric W. Biederman
Al Viro writes: > On Wed, Apr 09, 2014 at 03:58:25PM -0700, Eric W. Biederman wrote: >> >> mntput as part of pathput is called from all over the vfs sometimes as >> in the case of symlink chasing from some rather deep call chains. >> During filesystem unmount with the right set of races those in

Re: [RFC][PATCH] vfs: In mntput run deactivate_super on a shallow stack.

2014-04-09 Thread Eric W. Biederman
Al Viro writes: > On Wed, Apr 09, 2014 at 03:58:25PM -0700, Eric W. Biederman wrote: >> >> mntput as part of pathput is called from all over the vfs sometimes as >> in the case of symlink chasing from some rather deep call chains. >> During filesystem unmount with the right set of races those in

Re: [RFC][PATCH] vfs: In mntput run deactivate_super on a shallow stack.

2014-04-09 Thread Al Viro
On Wed, Apr 09, 2014 at 03:58:25PM -0700, Eric W. Biederman wrote: > > mntput as part of pathput is called from all over the vfs sometimes as > in the case of symlink chasing from some rather deep call chains. > During filesystem unmount with the right set of races those innocuous > little mntput

[RFC][PATCH] vfs: In mntput run deactivate_super on a shallow stack.

2014-04-09 Thread Eric W. Biederman
mntput as part of pathput is called from all over the vfs sometimes as in the case of symlink chasing from some rather deep call chains. During filesystem unmount with the right set of races those innocuous little mntput calls that take very little stack space can become calls become mosters calli