[PATCH] io_uring: add missing sigmask restore in io_cqring_wait()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Found this by learning codes.

Signed-off-by: Xiaoguang Wang <xiaoguang.wang@xxxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux