summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0336-locking-rwsem-rt-Remove-might_sleep-in-__up_read.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:22:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:26:40 +0000
commit08f003891b84f52e49a5bdbc8a589fb052ac9a4e (patch)
treeb7e426b4a4eb48e9e71188a2812a4c71625c35ac /debian/patches-rt/0336-locking-rwsem-rt-Remove-might_sleep-in-__up_read.patch
parentMerging upstream version 4.19.260. (diff)
downloadlinux-08f003891b84f52e49a5bdbc8a589fb052ac9a4e.tar.xz
linux-08f003891b84f52e49a5bdbc8a589fb052ac9a4e.zip
Merging debian version 4.19.260-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0336-locking-rwsem-rt-Remove-might_sleep-in-__up_read.patch')
-rw-r--r--debian/patches-rt/0336-locking-rwsem-rt-Remove-might_sleep-in-__up_read.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches-rt/0336-locking-rwsem-rt-Remove-might_sleep-in-__up_read.patch b/debian/patches-rt/0336-locking-rwsem-rt-Remove-might_sleep-in-__up_read.patch
new file mode 100644
index 000000000..1055aed23
--- /dev/null
+++ b/debian/patches-rt/0336-locking-rwsem-rt-Remove-might_sleep-in-__up_read.patch
@@ -0,0 +1,29 @@
+From: Andrew Halaney <ahalaney@redhat.com>
+Date: Tue, 6 Apr 2021 17:19:52 -0500
+Subject: [PATCH 336/342] locking/rwsem-rt: Remove might_sleep() in __up_read()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f4cae546c87033b52ee5a80dc860427ebd02568e
+
+There's no chance of sleeping here, the reader is giving up the
+lock and possibly waking up the writer who is waiting on it.
+
+Reported-by: Chunyu Hu <chuhu@redhat.com>
+Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
+Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+(cherry picked from commit b2ed0a4302faf2bb09e97529dd274233c082689b)
+Signed-off-by: Clark Williams <williams@redhat.com>
+---
+ kernel/locking/rwsem-rt.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/kernel/locking/rwsem-rt.c b/kernel/locking/rwsem-rt.c
+index 19ea20be3fd7..966946454ced 100644
+--- a/kernel/locking/rwsem-rt.c
++++ b/kernel/locking/rwsem-rt.c
+@@ -200,7 +200,6 @@ void __up_read(struct rw_semaphore *sem)
+ if (!atomic_dec_and_test(&sem->readers))
+ return;
+
+- might_sleep();
+ raw_spin_lock_irq(&m->wait_lock);
+ /*
+ * Wake the writer, i.e. the rtmutex owner. It might release the