Skip to content

Commit 026bcf9

Browse files
kkdwvdAlexei Starovoitov
authored andcommitted
bpf: Adjust return value for queue destruction in rqspinlock
Return -ETIMEDOUT whenever non-head waiters are signalled by head, and fix oversight in commit 7bd6e5c ("rqspinlock: Disable queue destruction for deadlocks"). We no longer signal on deadlocks. Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent f8c67d8 commit 026bcf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/rqspinlock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ int __lockfunc resilient_queued_spin_lock_slowpath(rqspinlock_t *lock, u32 val)
537537

538538
val = arch_mcs_spin_lock_contended(&node->locked);
539539
if (val == RES_TIMEOUT_VAL) {
540-
ret = -EDEADLK;
540+
ret = -ETIMEDOUT;
541541
goto waitq_timeout;
542542
}
543543

0 commit comments

Comments
 (0)