]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.10
authorSasha Levin <sashal@kernel.org>
Fri, 23 Aug 2024 00:12:55 +0000 (20:12 -0400)
committerSasha Levin <sashal@kernel.org>
Fri, 23 Aug 2024 00:12:55 +0000 (20:12 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.10/dm-suspend-return-erestartsys-instead-of-eintr.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/dm-suspend-return-erestartsys-instead-of-eintr.patch b/queue-5.10/dm-suspend-return-erestartsys-instead-of-eintr.patch
new file mode 100644 (file)
index 0000000..8036b53
--- /dev/null
@@ -0,0 +1,48 @@
+From a2c5f5755e7b168b3abff9676a708ccc2b48a940 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 13 Aug 2024 12:38:51 +0200
+Subject: dm suspend: return -ERESTARTSYS instead of -EINTR
+
+From: Mikulas Patocka <mpatocka@redhat.com>
+
+[ Upstream commit 1e1fd567d32fcf7544c6e09e0e5bc6c650da6e23 ]
+
+This commit changes device mapper, so that it returns -ERESTARTSYS
+instead of -EINTR when it is interrupted by a signal (so that the ioctl
+can be restarted).
+
+The manpage signal(7) says that the ioctl function should be restarted if
+the signal was handled with SA_RESTART.
+
+Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/md/dm.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/md/dm.c b/drivers/md/dm.c
+index dc8498b4b5c13..b56ea42ab7d2b 100644
+--- a/drivers/md/dm.c
++++ b/drivers/md/dm.c
+@@ -2343,7 +2343,7 @@ static int dm_wait_for_bios_completion(struct mapped_device *md, long task_state
+                       break;
+               if (signal_pending_state(task_state, current)) {
+-                      r = -EINTR;
++                      r = -ERESTARTSYS;
+                       break;
+               }
+@@ -2368,7 +2368,7 @@ static int dm_wait_for_completion(struct mapped_device *md, long task_state)
+                       break;
+               if (signal_pending_state(task_state, current)) {
+-                      r = -EINTR;
++                      r = -ERESTARTSYS;
+                       break;
+               }
+-- 
+2.43.0
+
index 7f7df7c379d61c250f87ea1e7755965d64ae07ae..d90c35eac4b0d0ffcc5947241840c1fe82d3fd73 100644 (file)
@@ -85,3 +85,4 @@ hrtimer-prevent-queuing-of-hrtimer-without-a-functio.patch
 gtp-pull-network-headers-in-gtp_dev_xmit.patch
 block-use-unsigned-long-for-blk_validate_block_size.patch
 media-solo6x10-replace-max-a-min-b-c-by-clamp-b-a-c.patch
+dm-suspend-return-erestartsys-instead-of-eintr.patch