aio: fix possible invalid memory access when DEBUG is enabled
dprintk() shouldn't access @ring after it's unmapped. Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
697dfd8844
commit
91d80a84bb
2
fs/aio.c
2
fs/aio.c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue