From b15a952c52a6825376d3e7f6c1bf5c886c6d8b74 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:06:00 +0200 Subject: Adding debian version 5.10.209-2. Signed-off-by: Daniel Baumann --- ...utex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 debian/patches-rt/0171-locking-rtmutex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch (limited to 'debian/patches-rt/0171-locking-rtmutex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch') diff --git a/debian/patches-rt/0171-locking-rtmutex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch b/debian/patches-rt/0171-locking-rtmutex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch new file mode 100644 index 000000000..4c2c1b803 --- /dev/null +++ b/debian/patches-rt/0171-locking-rtmutex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch @@ -0,0 +1,37 @@ +From bcc9f5e2b7eb56660512649787ab651fc138d9e4 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Wed, 2 Dec 2015 11:34:07 +0100 +Subject: [PATCH 171/323] locking/rtmutex: Allow rt_mutex_trylock() on + PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz + +Non PREEMPT_RT kernel can deadlock on rt_mutex_trylock() in softirq +context. +On PREEMPT_RT the softirq context is handled in thread context. This +avoids the deadlock in the slow path and PI-boosting will be done on the +correct thread. + +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/locking/rtmutex.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c +index 35cdbbb5daa9..1bf7a04688c5 100644 +--- a/kernel/locking/rtmutex.c ++++ b/kernel/locking/rtmutex.c +@@ -1884,7 +1884,11 @@ int __sched __rt_mutex_futex_trylock(struct rt_mutex *lock) + + int __sched __rt_mutex_trylock(struct rt_mutex *lock) + { ++#ifdef CONFIG_PREEMPT_RT ++ if (WARN_ON_ONCE(in_irq() || in_nmi())) ++#else + if (WARN_ON_ONCE(in_irq() || in_nmi() || in_serving_softirq())) ++#endif + return 0; + + return rt_mutex_fasttrylock(lock, rt_mutex_slowtrylock); +-- +2.43.0 + -- cgit v1.2.3