diff options
| author | Peter Zijlstra <[email protected]> | 2024-07-31 10:43:21 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2024-07-31 10:57:39 +0000 |
| commit | 224fa3552029a3d14bec7acf72ded8171d551b88 (patch) | |
| tree | b841485555f36065017bb998f0e2629d3447289f /lib/crypto/mpi/mpi-mul.c | |
| parent | locking/pvqspinlock: Correct the type of "old" variable in pv_kick_node() (diff) | |
| download | kernel-224fa3552029a3d14bec7acf72ded8171d551b88.tar.gz kernel-224fa3552029a3d14bec7acf72ded8171d551b88.zip | |
jump_label: Fix the fix, brown paper bags galore
Per the example of:
!atomic_cmpxchg(&key->enabled, 0, 1)
the inverse was written as:
atomic_cmpxchg(&key->enabled, 1, 0)
except of course, that while !old is only true for old == 0, old is
true for everything except old == 0.
Fix it to read:
atomic_cmpxchg(&key->enabled, 1, 0) == 1
such that only the 1->0 transition returns true and goes on to disable
the keys.
Fixes: 83ab38ef0a0b ("jump_label: Fix concurrency issues in static_key_slow_dec()")
Reported-by: Darrick J. Wong <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: Darrick J. Wong <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions
