Commit bf0f91c0 authored by Zhao Hongjiang's avatar Zhao Hongjiang Committed by Ben Hutchings

aio: fix possible invalid memory access when DEBUG is enabled

commit 91d80a84 upstream.

dprintk() shouldn't access @ring after it's unmapped.
Signed-off-by: default avatarZhao Hongjiang <zhaohongjiang@huawei.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2: keep the second argument to kunmap_atomic()]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 419f4ba0
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment