public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: add missing sigmask restore in io_cqring_wait()
@ 2021-09-14  8:41 Xiaoguang Wang
  2021-09-14 13:42 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Xiaoguang Wang @ 2021-09-14  8:41 UTC (permalink / raw)
  To: io-uring; +Cc: axboe, asml.silence, Xiaoguang Wang

Found this by learning codes.

Signed-off-by: Xiaoguang Wang <[email protected]>
---
 fs/io_uring.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 30d959416eba..d7b0aeda1d84 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -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);
 	}
 
-- 
2.14.4.44.g2045bb6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-14 14:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-14  8:41 [PATCH] io_uring: add missing sigmask restore in io_cqring_wait() Xiaoguang Wang
2021-09-14 13:42 ` Jens Axboe
2021-09-14 14:28   ` Xiaoguang Wang
2021-09-14 14:29     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox