io_uring: use bottom half safe lock for fixed file data
authorJens Axboe <axboe@kernel.dk>
Mon, 23 Nov 2020 16:37:51 +0000 (09:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Jan 2021 13:56:50 +0000 (14:56 +0100)
commit25a2de679b5d55ead2f99881c7d3e9b745325f39
treefb6cf8838cbe0529f1df4ff8b5c1594e6c674a1c
parent7247bc60e8e1458d89ea53179fce02d2307aac7f
io_uring: use bottom half safe lock for fixed file data

commit ac0648a56c1ff66c1cbf735075ad33a26cbc50de upstream.

io_file_data_ref_zero() can be invoked from soft-irq from the RCU core,
hence we need to ensure that the file_data lock is bottom half safe. Use
the _bh() variants when grabbing this lock.

Reported-by: syzbot+1f4ba1e5520762c523c6@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c