notify: unused event private race
authorEric Paris <eparis@redhat.com>
Mon, 17 Aug 2009 01:51:44 +0000 (21:51 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 17 Aug 2009 20:37:37 +0000 (13:37 -0700)
inotify decides if private data it passed to get added to an event was
used by checking list_empty().  But it's possible that the event may
have been dequeued and the private event removed so it would look empty.

The fix is to use the return code from fsnotify_add_notify_event rather
than looking at the list.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No differences found