Files
erofs-linux/fs
Nick Piggin f9e4acf3be [PATCH] inotify: read return val fix
Fix for inotify read bug (bugzilla.kernel.org #6999)

Problem Description:
When reading from an inotify device with an insufficient sized buffer, read(2)
will return 0 with no errno set. This is because of an logically incorrect
action from the user program thus should return an more logical value. My
suggestion is return -EINVAL as for bind(2).

This patch is based on the proposal from Ryan <[email protected]>, and
feedback from John McCutchan <[email protected]>.

Return -EINVAL if we have not passed in enough buffer space to read a single
inotify event, rather than 0 which indicates that there is nothing to read.

Signed-off-by: Nick Piggin <[email protected]>
Acked-by: "John McCutchan" <[email protected]>
Cc: Ryan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2007-02-12 09:48:28 -08:00
..
2007-01-05 23:55:22 -08:00
2007-02-06 20:43:30 +00:00
2007-02-11 10:51:34 -08:00
2006-12-08 08:28:45 -08:00
2007-01-30 08:26:44 -08:00
2006-12-08 08:28:45 -08:00
2006-12-08 08:28:45 -08:00
…
2007-01-26 10:14:36 -06:00
2006-12-08 08:28:47 -08:00
…
2006-12-08 08:28:48 -08:00
2006-12-08 08:28:49 -08:00
2006-12-08 08:28:50 -08:00
…
…
2007-02-12 09:48:27 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2006-12-13 09:05:47 -08:00
2006-12-22 08:55:48 -08:00
…
…
…
…