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>
Mon, 12 Oct 2020 21:03:11 +0000 (15:03 -0600)
commit68798e6df7ae32afddc3a3a5971620b92ff192c9
tree040ebf2877ae6cfba4f157a377b335891ec6ee9a
parentb2275a21e9218c8de937169cb1260a4e37e4c07e
io_uring: Fix use of XArray in __io_uring_files_cancel

commit ce765372bc443573d1d339a2bf4995de385dea3a upstream.

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