diff options
Diffstat (limited to 'debian/patches-rt/0146-rtmutex-rwlock-preserve-state-like-a-sleeping-lock.patch')
-rw-r--r-- | debian/patches-rt/0146-rtmutex-rwlock-preserve-state-like-a-sleeping-lock.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches-rt/0146-rtmutex-rwlock-preserve-state-like-a-sleeping-lock.patch b/debian/patches-rt/0146-rtmutex-rwlock-preserve-state-like-a-sleeping-lock.patch new file mode 100644 index 000000000..44b53bba1 --- /dev/null +++ b/debian/patches-rt/0146-rtmutex-rwlock-preserve-state-like-a-sleeping-lock.patch @@ -0,0 +1,33 @@ +From 0e2b5eb41fc6820a80428de4a73ede6f47d74cf0 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 11 Jan 2019 21:16:31 +0100 +Subject: [PATCH 146/347] rtmutex/rwlock: preserve state like a sleeping lock +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz + +The rwlock is spinning while acquiring a lock. Therefore it must become +a sleeping lock on RT and preserve its task state while sleeping and +waiting for the lock to become available. + +Reported-by: Joe Korty <Joe.Korty@concurrent-rt.com> +Cc: stable-rt@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/locking/rwlock-rt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kernel/locking/rwlock-rt.c b/kernel/locking/rwlock-rt.c +index aebb7ce25bc6..8f90afe111ce 100644 +--- a/kernel/locking/rwlock-rt.c ++++ b/kernel/locking/rwlock-rt.c +@@ -128,7 +128,7 @@ void __sched __read_rt_lock(struct rt_rw_lock *lock) + * That would put Reader1 behind the writer waiting on + * Reader2 to call read_unlock() which might be unbound. + */ +- rt_mutex_init_waiter(&waiter, false); ++ rt_mutex_init_waiter(&waiter, true); + rt_spin_lock_slowlock_locked(m, &waiter, flags); + /* + * The slowlock() above is guaranteed to return with the rtmutex is +-- +2.36.1 + |