summaryrefslogtreecommitdiffstats
path: root/include/crypto/sm3.h
diff options
context:
space:
mode:
authorJens Axboe2019-04-15 18:49:38 +0200
committerJens Axboe2019-04-15 18:49:38 +0200
commitb19062a567266ee1f10f6709325f766bbcc07d1c (patch)
treea2b5175f8121ff6efc7e3a26eb075711263dfede /include/crypto/sm3.h
parentio_uring: drop io_file_put() 'file' argument (diff)
downloadkernel-qcow2-linux-b19062a567266ee1f10f6709325f766bbcc07d1c.tar.gz
kernel-qcow2-linux-b19062a567266ee1f10f6709325f766bbcc07d1c.tar.xz
kernel-qcow2-linux-b19062a567266ee1f10f6709325f766bbcc07d1c.zip
io_uring: fix possible deadlock between io_uring_{enter,register}
If we have multiple threads, one doing io_uring_enter() while the other is doing io_uring_register(), we can run into a deadlock between the two. io_uring_register() must wait for existing users of the io_uring instance to exit. But it does so while holding the io_uring mutex. Callers of io_uring_enter() may need this mutex to make progress (and eventually exit). If we wait for users to exit in io_uring_register(), we can't do so with the io_uring mutex held without potentially risking a deadlock. Drop the io_uring mutex while waiting for existing callers to exit. This is safe and guaranteed to make forward progress, since we already killed the percpu ref before doing so. Hence later callers of io_uring_enter() will be rejected. Reported-by: syzbot+16dc03452dee970a0c3e@syzkaller.appspotmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/crypto/sm3.h')
0 files changed, 0 insertions, 0 deletions