rqspinlock: Adjust return value for queue destruction
Kumar Kartikeya Dwivedi
maintainerPATCH 1/1 rqspinlock: Adjust return value for queue destruction
Return -ETIMEDOUT whenever non-head waiters are signalled by head, and fix oversight in commit 7bd6e5ce5be6 ("rqspinlock: Disable queue destruction for deadlocks"). We no longer signal on deadlocks.
Signed-off-by Kumar Kartikeya Dwivedi <[email protected]>
--- kernel/bpf/rqspinlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/rqspinlock.c +1 -1
@@ -537,7 +537,7 @@ int __lockfunc resilient_queued_spin_lock_slowpath(rqspinlock_t *lock, u32 val) val =arch_mcs_spin_lock_contended (&node->locked);if (val ==RES_TIMEOUT_VAL ) { - ret = -EDEADLK ; + ret = -ETIMEDOUT ; goto waitq_timeout; }
--
2.51.0
Quoted 15 lines · Kumar Kartikeya Dwivedi
Return
-ETIMEDOUTwhenever non-head waiters are signalled by head, and fix oversight in commit7bd6e5ce5be6("rqspinlock: Disable queue destruction for deadlocks"). We no longer signal on deadlocks.Signed-off-by Kumar Kartikeya Dwivedi <[email protected]>--- kernel/bpf/rqspinlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/bpf/rqspinlock.c +0
-0
kernel/bpf/rqspinlock.c int __lockfunc resilient_queued_spin_lock_slowpath(rqspinlock_t *lock, u32 val) · line 540
Quoted 5 lines
kernel/bpf/rqspinlock.c +1
-1@@ -537,7 +537,7 @@ int __lockfunc resilient_queued_spin_lock_slowpath(rqspinlock_t *lock, u32 val) val =arch_mcs_spin_lock_contended (&node->locked);if (val ==RES_TIMEOUT_VAL ) { - ret = -EDEADLK ; + ret = -ETIMEDOUT ;
Make sense.
Reviewed-by Amery Hung <[email protected]>
Quoted 7 lines
kernel/bpf/rqspinlock.c +0
-1goto waitq_timeout; } --2.51.0