Skip to content

spin_unlock_wait borkage

Peter Zijlstra lkml netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6locking: Replace smp_cond_acquire with smp_cond_load_acquireinclude/linux/compiler.h kernel/locking/qspinlock.c kernel/sched/core.c +2 more+31 -180 replies
2/6locking: Introduce cmpwait()include/linux/compiler.h+18 -10 replies
3/6locking: Introduce smp_acquire__after_ctrl_depinclude/linux/compiler.h ipc/sem.c+12 -170 replies
4/6locking, arch: Update spin_unlock_wait()arch/alpha/include/asm/spinlock.h arch/arc/include/asm/spinlock.h arch/arm/include/asm/spinlock.h +18 more+117 -376 replies
5/6locking: Update spin_unlock_wait usersipc/sem.c kernel/exit.c kernel/task_work.c+6 -40 replies
6/6locking,netfilter: Fix nf_conntrack_lock()net/netfilter/nf_conntrack_core.c+17 -10 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchWill DeaconChris Metcalf
1/6Requested-by
2/6
3/6
4/6A-b
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH -v2 0/6] spin_unlock_wait borkage

This version rewrites all spin_unlock_wait() implementations to provide the acquire order against the spin_unlock() release we wait on, ensuring we can fully observe the critical section we waited on.

It pulls in the smp_cond_acquire() rewrite because it introduces a lot more users of it. All simple spin_unlock_wait implementations end up being an smp_cond_load_acquire().

And while this still introduces smp_acquire__after_ctrl_dep() it keeps its usage contained to a few sites.

Please consider.. carefully.