io_uring: add missing sigmask restore in io_cqring_wait()
PATCH 1/1 io_uring: add missing sigmask restore in io_cqring_wait()
Found this by learning codes.
Signed-off-by Xiaoguang Wang <[email protected]>
--- fs/io_uring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/io_uring.c +3 -1
@@ -7326,8 +7326,10 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,if (uts) {struct timespec64 ts; -if (get_timespec64 (&ts, uts)) +if (get_timespec64 (&ts, uts)) { +restore_saved_sigmask_unless (false);return -EFAULT ; + } timeout =timespec64_to_jiffies (&ts); }
Signature · 1 line
2.14.4.44.g2045bb6
Jens Axboe
maintainerQuoted 1 line · Xiaoguang Wang
Found this by learning codes.
Does look like a real bug. But how about we move the get_timespec() section before the sigmask saving?
Signature · 1 line
Jens Axboe
hi,
Quoted 4 lines · Xiaoguang Wang
Quoted 1 line
Found this by learning codes.
Does look like a real bug. But how about we move the
get_timespec()section before the sigmask saving?
Ok, I thought about this method before :)
Regards,
Xiaoguang Wang
Quoted 1 line
Jens Axboe
maintainerQuoted 9 lines · Xiaoguang Wang
hi,
Quoted 4 lines · Xiaoguang Wang
Quoted 1 line
Found this by learning codes.
Does look like a real bug. But how about we move the
get_timespec()section before the sigmask saving?Ok, I thought about this method before :)
When you send a v2 with that, please do also write a proper commit message. It should explain why the change is needed. Thanks!
Signature · 1 line
Jens Axboe