summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2014-07-14 15:20:17 +0200
committerJiri Slaby <jslaby@suse.cz>2014-07-14 15:21:39 +0200
commit48e8cad86bb1241c08bdaa80db022c25068ff8e0 (patch)
tree3d14e6d1bf8ec4e0569e7bb78cb04fa644b00d71
parent8097be3bc58315b14498000585299e3c06fb13ce (diff)
downloadlwn-48e8cad86bb1241c08bdaa80db022c25068ff8e0.tar.gz
lwn-48e8cad86bb1241c08bdaa80db022c25068ff8e0.zip
Revert "aio: fix kernel memory disclosure in io_getevents() introduced in v3.10"
This reverts commit 0e2e24e5dc6eb6f0698e9dc97e652f132b885624, which was applied twice mistakenly. The first one is bee3f7b8188d4b2a5dfaeb2eb4a68d99f67daecf. Reported-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Benjamin LaHaise <bcrl@kvack.org> Cc: Mateusz Guzik <mguzik@redhat.com> Cc: Petr Matousek <pmatouse@redhat.com> Cc: Kent Overstreet <kmo@daterainc.com> Cc: Jeff Moyer <jmoyer@redhat.com>
-rw-r--r--fs/aio.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 0abde33de70e..e609e15f36b9 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1066,9 +1066,6 @@ static long aio_read_events_ring(struct kioctx *ctx,
head %= ctx->nr_events;
tail %= ctx->nr_events;
- head %= ctx->nr_events;
- tail %= ctx->nr_events;
-
while (ret < nr) {
long avail;
struct io_event *ev;