summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorZhao Hongjiang <zhaohongjiang@huawei.com>2013-04-26 11:03:53 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-01 09:41:03 -0700
commit6bcd3002a29b597e2774a733b74c204c1b344026 (patch)
treedcc922057f94881f9deaa8339b068a8e4499bb44 /fs
parenta5a9e7c9c19b03b471d3ec148698e90a1958bfcb (diff)
aio: fix possible invalid memory access when DEBUG is enabled
commit 91d80a84bbc8f28375cca7e65ec666577b4209ad upstream. dprintk() shouldn't access @ring after it's unmapped. Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/aio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/aio.c b/fs/aio.c
index e7f2fad7b4ce..cdc8dc493ed9 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1094,9 +1094,9 @@ static int aio_read_evt(struct kioctx *ioctx, struct io_event *ent)
spin_unlock(&info->ring_lock);
out:
- kunmap_atomic(ring);
dprintk("leaving aio_read_evt: %d h%lu t%lu\n", ret,
(unsigned long)ring->head, (unsigned long)ring->tail);
+ kunmap_atomic(ring);
return ret;
}