]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "fsnotify: fix oops in fsnotify_clear_marks_by_group_flags()"
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Jul 2015 23:06:53 +0000 (16:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Jul 2015 23:06:53 +0000 (16:06 -0700)
commitcbb351d0f04c3b45536cb2a17147b22f8614ab28
tree7d071492f1ab656913be0c892497d3204928ce0a
parent051b3684b9ec30ce6b1e632454e5fe784e69b19f
Revert "fsnotify: fix oops in fsnotify_clear_marks_by_group_flags()"

This reverts commit 654f867e2c702a7818decfe7838ee718e2bef75e.

Kinglong Mee reports a memory leak with that patch, and Jan Kara confirms:

 "Thanks for report! You are right that my patch introduces a race
  between fsnotify kthread and fsnotify_destroy_group() which can result
  in leaking inotify event on group destruction.

  I haven't yet decided whether the right fix is not to queue events for
  dying notification group (as that is pointless anyway) or whether we
  should just fix the original problem differently...  Whenever I look
  at fsnotify code mark handling I get lost in the maze of locks, lists,
  and subtle differences between how different notification systems
  handle notification marks :( I'll think about it over night"

and after thinking about it, Jan says:

 "OK, I have looked into the code some more and I found another
  relatively simple way of fixing the original oops.  It will be IMHO
  better than trying to fixup this issue which has more potential for
  breakage.  I'll ask Linus to revert the fsnotify fix he already merged
  and send a new fix"

Reported-by: Kinglong Mee <kinglongmee@gmail.com>
Requested-by: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/notify/mark.c