summaryrefslogtreecommitdiffstats
path: root/tools/iio
diff options
context:
space:
mode:
authorThomas Schoebel-Theuer <tst@1und1.de>2021-03-07 08:23:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-11 13:46:35 +0100
commitad83307d1e625704cbf8e88de2c66dc8b175899e (patch)
tree8524bb6d7eb1539b2da7555bce9abc755b4b2bef /tools/iio
parentd68eefc0f6050e64dc57aefc0638eac7bb441050 (diff)
downloadlinux-stable-ad83307d1e625704cbf8e88de2c66dc8b175899e.tar.gz
linux-stable-ad83307d1e625704cbf8e88de2c66dc8b175899e.tar.bz2
linux-stable-ad83307d1e625704cbf8e88de2c66dc8b175899e.zip
futex: fix spin_lock() / spin_unlock_irq() imbalance
This patch and problem analysis is specific for 4.4 LTS, due to incomplete backporting of other fixes. Later LTS series have different backports. The following is obviously incorrect: static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this, struct futex_hash_bucket *hb) { [...] raw_spin_lock(&pi_state->pi_mutex.wait_lock); [...] raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); [...] } The 4.4-specific fix should probably go in the direction of b4abf91047c, making everything irq-safe. Probably, backporting of b4abf91047c to 4.4 LTS could thus be another good idea. However, this might involve some more 4.4-specific work and require thorough testing: > git log --oneline v4.4..b4abf91047c -- kernel/futex.c kernel/locking/rtmutex.c | wc -l 10 So this patch is just an obvious quickfix for now. Hint: the lock order is documented in 4.9.y and later. A similar documenting is missing in 4.4.y. Please somebody either backport also, or write a new description, if there would be some differences I cannot easily see at the moment. Without reliable docs, inspection of the locking correctness may become a pain. Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Lee Jones <lee.jones@linaro.org> Fixes: 394fc4981426 ("futex: Rework inconsistent rt_mutex/futex_q state") Fixes: 6510e4a2d04f ("futex,rt_mutex: Provide futex specific rt_mutex API") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/iio')
0 files changed, 0 insertions, 0 deletions