Patchwork [3.5.y.z,extended,stable] Patch "aio: fix possible invalid memory access when DEBUG is enabled" has been added to staging queue

mail settings
Submitter Luis Henriques
Date May 1, 2013, 11:33 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/240831/
State New
Headers show


Luis Henriques - May 1, 2013, 11:33 p.m.
This is a note to let you know that I have just added a patch titled

    aio: fix possible invalid memory access when DEBUG is enabled

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 22a36a26075647f65d427cb4b2dbc551bd714c2d Mon Sep 17 00:00:00 2001
From: Zhao Hongjiang <>
Date: Fri, 26 Apr 2013 11:03:53 +0800
Subject: [PATCH] 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 <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Luis Henriques <>
 fs/aio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/fs/aio.c b/fs/aio.c
index 55c4c76..cf8e5a7 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)

-	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;