From: Mikulas Patocka Date: Tue, 13 Aug 2024 10:38:51 +0000 (+0200) Subject: dm suspend: return -ERESTARTSYS instead of -EINTR X-Git-Tag: v6.10.7~130 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=525b6f47d2a0c6f8b1eeb885b18dcce391553c38;p=thirdparty%2Fkernel%2Fstable.git dm suspend: return -ERESTARTSYS instead of -EINTR [ 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 Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin --- diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 13037d6a6f62a..6e15ac4e0845c 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2594,7 +2594,7 @@ static int dm_wait_for_bios_completion(struct mapped_device *md, unsigned int ta break; if (signal_pending_state(task_state, current)) { - r = -EINTR; + r = -ERESTARTSYS; break; } @@ -2619,7 +2619,7 @@ static int dm_wait_for_completion(struct mapped_device *md, unsigned int task_st break; if (signal_pending_state(task_state, current)) { - r = -EINTR; + r = -ERESTARTSYS; break; }