linux/include/asm-generic
Kumar Kartikeya Dwivedi 82f3b142c9 rqspinlock: Fix TAS fallback lock entry creation
The TAS fallback can be invoked directly when queued spin locks are
disabled, and through the slow path when paravirt is enabled for queued
spin locks. In the latter case, the res_spin_lock macro will attempt the
fast path and already hold the entry when entering the slow path. This
will lead to creation of extraneous entries that are not released, which
may cause false positives for deadlock detection.

Fix this by always preceding invocation of the TAS fallback in every
case with the grabbing of the held lock entry, and add a comment to make
note of this.

Fixes: c9102a68c0 ("rqspinlock: Add a test-and-set fallback")
Reported-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Tested-by: Amery Hung <ameryhung@gmail.com>
Link: https://lore.kernel.org/r/20260122115911.3668985-1-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-01-23 10:03:49 -08:00
..
bitops bitops: Add __attribute_const__ to generic ffs()-family implementations 2025-09-08 14:58:50 -07:00
vdso vdso: Drop Kconfig GENERIC_VDSO_DATA_STORE 2025-09-04 11:23:50 +02:00
Kbuild unwind_user: Add user space unwinding API with frame pointer support 2025-07-29 14:46:07 -04:00
access_ok.h
agp.h
archrandom.h
asm-offsets.h
asm-prototypes.h
atomic.h
atomic64.h
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
barrier.h
bitops.h
bitsperlong.h
bug.h x86/bug: Implement WARN_ONCE() 2025-11-24 20:23:25 +01:00
cache.h
cacheflush.h
cfi.h
checksum.h
cmpxchg-local.h
cmpxchg.h
codetag.lds.h codetag: avoid unused alloc_tags sections/symbols 2025-07-09 22:42:14 -07:00
compat.h
current.h
delay.h
device.h
div64.h
dma-mapping.h
dma.h
early_ioremap.h
emergency-restart.h
error-injection.h
exec.h
extable.h
fixmap.h
flat.h
fprobe.h
ftrace.h
futex.h
getorder.h
hardirq.h
hugetlb.h mm: correctly handle UFFD PTE markers 2025-11-24 15:08:50 -08:00
hw_irq.h
int-ll64.h
io.h asm-generic/io.h: Skip trace helpers if rwmmio events are disabled 2025-09-24 16:21:13 +02:00
ioctl.h
iomap.h
irq.h
irq_regs.h
irq_work.h
irqflags.h
kdebug.h
kmap_size.h
kprobes.h
kvm_para.h
kvm_types.h
linkage.h
local.h
local64.h
logic_io.h
mcs_spinlock.h
memory_model.h mm: convert page_to_section() to memdesc_section() 2025-09-13 16:55:07 -07:00
mm_hooks.h
mmiowb.h
mmiowb_types.h
mmu.h
mmu_context.h
mmzone.h
module.h
module.lds.h
mshyperv.h arch/x86: mshyperv: Trap on access for some synthetic MSRs 2025-11-15 06:18:14 +00:00
msi.h irqchip/gic-v5: Add GICv5 IWB support 2025-07-08 18:35:52 +01:00
nommu_context.h
numa.h
param.h alpha: regularize the situation with asm/param.h 2025-06-24 22:02:05 -04:00
parport.h
pci.h
pci_iomap.h
percpu.h asm-generic: percpu: Add assembly guard 2025-10-27 16:41:53 +01:00
pgalloc.h mm: remove unnecessary __GFP_HIGHMEM in __p*d_alloc_one_*() 2025-11-20 13:43:59 -08:00
pgtable-nop4d.h
pgtable-nopmd.h
pgtable-nopud.h
pgtable_uffd.h mm: userfaultfd: add pgtable_supports_uffd_wp() 2025-11-24 15:08:54 -08:00
preempt.h
qrwlock.h
qrwlock_types.h
qspinlock.h
qspinlock_types.h
resource.h
rqspinlock.h rqspinlock: Fix TAS fallback lock entry creation 2026-01-23 10:03:49 -08:00
runtime-const.h
rwonce.h
seccomp.h
sections.h
serial.h
set_memory.h
shmparam.h
signal.h
simd.h asm-generic: Add sched.h inclusion in simd.h 2025-05-30 20:56:48 +08:00
softirq_stack.h
spinlock.h
spinlock_types.h
statfs.h
string.h
switch_to.h
syscall.h
syscalls.h
text-patching.h
thread_info_tif.h rseq: Switch to TIF_RSEQ if supported 2025-11-04 08:35:37 +01:00
ticket_spinlock.h
timex.h
tlb.h mmu_gather: move tlb flush for VM_PFNMAP/VM_MIXEDMAP vmas into free_pgtables() 2025-05-31 22:46:12 -07:00
tlbflush.h
topology.h
trace_clock.h
uaccess.h
unwind_user.h unwind_user: Add user space unwinding API with frame pointer support 2025-07-29 14:46:07 -04:00
user.h
vermagic.h
vga.h
video.h
vmlinux.lds.h Detect unused tracepoints for v6.19: 2025-12-05 09:37:41 -08:00
word-at-a-time.h
xor.h