aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorZhao Hongjiang <zhaohongjiang@huawei.com>2013-04-26 11:03:53 +0800
committerBen Hutchings <ben@decadent.org.uk>2013-05-13 15:02:09 +0100
commitbf0f91c05b5abf5fafa0b1118db4c33fc011fcd1 (patch)
tree216cdb8259ca19182851e1f3325971aa7d09c2e3 /fs
parent419f4ba0f032c8d906153d24e017f4bee6df26f5 (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> [bwh: Backported to 3.2: keep the second argument to kunmap_atomic()] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
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 3b65ee767ce..8cdd8ea0f44 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1112,9 +1112,9 @@ static int aio_read_evt(struct kioctx *ioctx, struct io_event *ent)
spin_unlock(&info->ring_lock);
out:
- kunmap_atomic(ring, KM_USER0);
dprintk("leaving aio_read_evt: %d h%lu t%lu\n", ret,
(unsigned long)ring->head, (unsigned long)ring->tail);
+ kunmap_atomic(ring, KM_USER0);
return ret;
}