linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Race inotify_rm_watch vs umount
@ 2011-06-10 11:20 OGAWA Hirofumi
  2011-06-10 13:46 ` Eric Paris
  0 siblings, 1 reply; 4+ messages in thread
From: OGAWA Hirofumi @ 2011-06-10 11:20 UTC (permalink / raw)
  To: John McCutchan, Robert Love, Eric Paris; +Cc: linux-kernel, linux-fsdevel

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@mail.parknet.co.jp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-06 21:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10 11:20 Race inotify_rm_watch vs umount OGAWA Hirofumi
2011-06-10 13:46 ` Eric Paris
2011-06-10 14:35   ` Al Viro
     [not found]     ` <CAGHUO11rNGU9VMAPQNdXtpQeAixFX6zxJc-tWur1McqbpYpYpQ@mail.gmail.com>
2012-03-06 21:09       ` Joseph Salisbury

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).