diff options
author | Waiman Long <[email protected]> | 2020-01-15 10:43:36 -0500 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2020-01-17 10:19:27 +0100 |
commit | 39e7234f00bc93613c086ae42d852d5f4147120a (patch) | |
tree | 35f22309a78dc484ba8efa5602c58ee468955a9d /lib/mpi/mpiutil.c | |
parent | 51bfb1d11d6daf095addf9fe8471c20992caae0b (diff) |
locking/rwsem: Fix kernel crash when spinning on RWSEM_OWNER_UNKNOWN
The commit 91d2a812dfb9 ("locking/rwsem: Make handoff writer
optimistically spin on owner") will allow a recently woken up waiting
writer to spin on the owner. Unfortunately, if the owner happens to be
RWSEM_OWNER_UNKNOWN, the code will incorrectly spin on it leading to a
kernel crash. This is fixed by passing the proper non-spinnable bits
to rwsem_spin_on_owner() so that RWSEM_OWNER_UNKNOWN will be treated
as a non-spinnable target.
Fixes: 91d2a812dfb9 ("locking/rwsem: Make handoff writer optimistically spin on owner")
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Waiman Long <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: Christoph Hellwig <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions