Skip to content

Commit

Permalink
aio: fix possible invalid memory access when DEBUG is enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhao Hongjiang authored and Linus Torvalds committed Apr 26, 2013
1 parent 697dfd8 commit 91d80a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1029,9 +1029,9 @@ static int aio_read_evt(struct kioctx *ioctx, struct io_event *ent)
spin_unlock(&info->ring_lock);

out:
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;
}

Expand Down

0 comments on commit 91d80a8

Please sign in to comment.