Skip to content
Commit b9c55d29 authored by John McCutchan's avatar John McCutchan Committed by Linus Torvalds
Browse files

[PATCH] inotify: fix race between the kernel and user space



When you rm a watch, an IN_IGNORED event is sent down the event queue
with the watch descriptor that you just rm'd.

If you then add a watch you could get the ignored watch's wd and if you
haven't read the entire event queue, user space will think that it's
newly created watch was just ignored.

To avoid this problem we just use idr_get_new_above instead of
idr_get_new.

Signed-off-by: default avatarJohn McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: default avatarRobert Love <rml@novell.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 75449536
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment