Race inotify_rm_watch vs umount

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

 



Hi,

I'm looking the race inotify_rm_watch() vs umount(). This race become the
cause of Oops. You can see the oops at

https://bugzilla.kernel.org/show_bug.cgi?id=22602

So, what race?

umount                               inotify_rm_watch
  ...                                  fsnotify_destroy_mark()
                                         fsnotify_destroy_inode_mark()
                                           /* removed from i_fsnotify_marks */
    generic_shutdown_super()
      fsnotify_unmount_inodes()
        put_super()
                                           iput()
                                             iput_final()
                                               /* this is after put_super() */

Like above, inotify doesn't guarantee to call final iput() before
put_super(). With this violation, FS driver can oops.

Well, so, what are requested for inotify?  We can't simply take
sb->s_umount in inotify_rm_watch()?

Any ideas?

Thanks.
-- 
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux