summaryrefslogtreecommitdiffstats
path: root/fs/freevxfs
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2007-02-12 00:51:59 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 09:48:28 -0800
commitf9e4acf3befd3b2903e01b3ef1bd344f03299826 (patch)
tree26eb1f9e71adfd4bd5678861c8f13fd655adfa60 /fs/freevxfs
parentd003fb70fd356d0684ee0cd37a785e058c8678de (diff)
downloadop-kernel-dev-f9e4acf3befd3b2903e01b3ef1bd344f03299826.zip
op-kernel-dev-f9e4acf3befd3b2903e01b3ef1bd344f03299826.tar.gz
[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 <wolf0403@hotmail.com>, and feedback from John McCutchan <john@johnmccutchan.com>. 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 <npiggin@suse.de> Acked-by: "John McCutchan" <john@johnmccutchan.com> Cc: Ryan <wolf0403@hotmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/freevxfs')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud