io_uring: fix missing sigmask restore in io_cqring_wait()
authorXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Tue, 14 Sep 2021 14:38:52 +0000 (22:38 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 14 Sep 2021 14:47:00 +0000 (08:47 -0600)
commit44df58d441a94de40d52fca67dc60790daee4266
tree662056341938d161f51576009d690b3511553610
parent41d3a6bd1d37149b18331fc4bb789c5456a7aeb0
io_uring: fix missing sigmask restore in io_cqring_wait()

Move get_timespec() section in io_cqring_wait() before the sigmask
saving, otherwise we'll fail to restore sigmask once get_timespec()
returns error.

Fixes: c73ebb685fb6 ("io_uring: add timeout support for io_uring_enter()")
Signed-off-by: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Link: https://lore.kernel.org/r/20210914143852.9663-1-xiaoguang.wang@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c