OSDN Git Service

io_uring: Fix use of XArray in __io_uring_files_cancel
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 9 Oct 2020 12:49:51 +0000 (13:49 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 9 Oct 2020 14:52:26 +0000 (08:52 -0600)
commitce765372bc443573d1d339a2bf4995de385dea3a
treeae4b4eb1580c14976b6eda468029edcd0919b2e2
parented6930c9201cd1e00f74474da2f095796a0d82f6
io_uring: Fix use of XArray in __io_uring_files_cancel

We have to drop the lock during each iteration, so there's no advantage
to using the advanced API.  Convert this to a standard xa_for_each() loop.

Reported-by: syzbot+27c12725d8ff0bfe1a13@syzkaller.appspotmail.com
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c