diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:06:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:06:00 +0000 |
commit | b15a952c52a6825376d3e7f6c1bf5c886c6d8b74 (patch) | |
tree | 1500f2f8f276908a36d8126cb632c0d6b1276764 /debian/patches-rt/0305-locking-Drop-might_resched-from-might_sleep_no_state.patch | |
parent | Adding upstream version 5.10.209. (diff) | |
download | linux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.tar.xz linux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.zip |
Adding debian version 5.10.209-2.debian/5.10.209-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0305-locking-Drop-might_resched-from-might_sleep_no_state.patch')
-rw-r--r-- | debian/patches-rt/0305-locking-Drop-might_resched-from-might_sleep_no_state.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches-rt/0305-locking-Drop-might_resched-from-might_sleep_no_state.patch b/debian/patches-rt/0305-locking-Drop-might_resched-from-might_sleep_no_state.patch new file mode 100644 index 000000000..f424e077f --- /dev/null +++ b/debian/patches-rt/0305-locking-Drop-might_resched-from-might_sleep_no_state.patch @@ -0,0 +1,40 @@ +From 8eddd2dc82853a3df908061f6ddf71bde523917b Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Mon, 6 Sep 2021 18:19:16 +0200 +Subject: [PATCH 305/323] locking: Drop might_resched() from + might_sleep_no_state_check() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz + +might_sleep_no_state_check() serves the same purpose as might_sleep() +except it is used before sleeping locks are acquired and therefore does +not check task_struct::state because the state is preserved. + +That state is preserved in the locking slow path so we must not schedule +at the begin of the locking function because the state will be lost and +not preserved at that time. + +Remove might_resched() from might_sleep_no_state_check() to avoid losing the +state before it is preserved. + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> +--- + include/linux/kernel.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/linux/kernel.h b/include/linux/kernel.h +index 7b4fdd5b2f7b..4e88ae0b2578 100644 +--- a/include/linux/kernel.h ++++ b/include/linux/kernel.h +@@ -225,7 +225,7 @@ extern void __cant_migrate(const char *file, int line); + do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) + + # define might_sleep_no_state_check() \ +- do { ___might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) ++ do { ___might_sleep(__FILE__, __LINE__, 0); } while (0) + + /** + * cant_sleep - annotation for functions that cannot sleep +-- +2.43.0 + |