From 94ae0407f8f486237b721c5daf25ee23f60d0e74 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 29 Mar 2021 07:32:02 +0200 Subject: [PATCH] 4.14-stable patches added patches: locking-mutex-fix-non-debug-version-of-mutex_lock_io_nested.patch --- ...ebug-version-of-mutex_lock_io_nested.patch | 37 +++++++++++++++++++ queue-4.14/series | 1 + 2 files changed, 38 insertions(+) create mode 100644 queue-4.14/locking-mutex-fix-non-debug-version-of-mutex_lock_io_nested.patch diff --git a/queue-4.14/locking-mutex-fix-non-debug-version-of-mutex_lock_io_nested.patch b/queue-4.14/locking-mutex-fix-non-debug-version-of-mutex_lock_io_nested.patch new file mode 100644 index 00000000000..5dd4f0a9325 --- /dev/null +++ b/queue-4.14/locking-mutex-fix-non-debug-version-of-mutex_lock_io_nested.patch @@ -0,0 +1,37 @@ +From 291da9d4a9eb3a1cb0610b7f4480f5b52b1825e7 Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Mon, 22 Mar 2021 09:46:13 +0100 +Subject: locking/mutex: Fix non debug version of mutex_lock_io_nested() + +From: Thomas Gleixner + +commit 291da9d4a9eb3a1cb0610b7f4480f5b52b1825e7 upstream. + +If CONFIG_DEBUG_LOCK_ALLOC=n then mutex_lock_io_nested() maps to +mutex_lock() which is clearly wrong because mutex_lock() lacks the +io_schedule_prepare()/finish() invocations. + +Map it to mutex_lock_io(). + +Fixes: f21860bac05b ("locking/mutex, sched/wait: Fix the mutex_lock_io_nested() define") +Signed-off-by: Thomas Gleixner +Signed-off-by: Peter Zijlstra (Intel) +Signed-off-by: Ingo Molnar +Cc: stable@vger.kernel.org +Link: https://lkml.kernel.org/r/878s6fshii.fsf@nanos.tec.linutronix.de +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/mutex.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/mutex.h ++++ b/include/linux/mutex.h +@@ -183,7 +183,7 @@ extern void mutex_lock_io(struct mutex * + # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) + # define mutex_lock_killable_nested(lock, subclass) mutex_lock_killable(lock) + # define mutex_lock_nest_lock(lock, nest_lock) mutex_lock(lock) +-# define mutex_lock_io_nested(lock, subclass) mutex_lock(lock) ++# define mutex_lock_io_nested(lock, subclass) mutex_lock_io(lock) + #endif + + /* diff --git a/queue-4.14/series b/queue-4.14/series index 7fd1eef0ddc..62456424f99 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -50,3 +50,4 @@ acpi-scan-use-unique-number-for-instance_no.patch perf-auxtrace-fix-auxtrace-queue-conflict.patch scsi-qedi-fix-error-return-code-of-qedi_alloc_global.patch scsi-mpt3sas-fix-error-return-code-of-mpt3sas_base_a.patch +locking-mutex-fix-non-debug-version-of-mutex_lock_io_nested.patch -- 2.47.3