Commit 91d80a84 authored by Zhao Hongjiang's avatar Zhao Hongjiang Committed by Linus Torvalds

aio: fix possible invalid memory access when DEBUG is enabled

dprintk() shouldn't access @ring after it's unmapped.
Signed-off-by: default avatarZhao Hongjiang <zhaohongjiang@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 697dfd88
...@@ -1029,9 +1029,9 @@ static int aio_read_evt(struct kioctx *ioctx, struct io_event *ent) ...@@ -1029,9 +1029,9 @@ static int aio_read_evt(struct kioctx *ioctx, struct io_event *ent)
spin_unlock(&info->ring_lock); spin_unlock(&info->ring_lock);
out: out:
kunmap_atomic(ring);
dprintk("leaving aio_read_evt: %d h%lu t%lu\n", ret, dprintk("leaving aio_read_evt: %d h%lu t%lu\n", ret,
(unsigned long)ring->head, (unsigned long)ring->tail); (unsigned long)ring->head, (unsigned long)ring->tail);
kunmap_atomic(ring);
return ret; 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