Skip to content

Inotify cleanup and idr race

Eric Paris lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3inotify: seperate new watch creation updating existing watchesfs/notify/inotify/inotify_user.c+103 -690 replies
2/3inotify: do not BUG on idr entries at inotify destructionfs/notify/inotify/inotify_fsnotify.c+10 -09 replies
3/3inotify: fix locking around inotify watching in the idrfs/notify/inotify/inotify_user.c+41 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Inotify cleanup and idr race

The following series cleans up the code around the addition of new watches and the modification of old watches, thus making it easier to verify they are correct. It should make machines less likely to panic if an object is found in the inotify idr which should have been removed (it's a memory leak, not an unrecoverable situation) and it should fix a race in idr removal which could leak to a use after free situation.

If anyone is able to reproduce inotify or fsnotify problems with -rc7 + these 3 patches please please let me know!

---

Eric Paris (3):
inotify: fix locking around inotify watching in the idr
inotify: do not BUG on idr entries at inotify destruction
inotify: seperate new watch creation updating existing watches

 fs/notify/inotify/inotify_fsnotify.c |   10 ++
 fs/notify/inotify/inotify_user.c     |  217 ++++++++++++++++++++++------------
 2 files changed, 151 insertions(+), 76 deletions(-)