diff options
| author | Bob Pearson <[email protected]> | 2021-01-25 15:16:36 -0600 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2021-01-28 15:29:55 -0400 |
| commit | c4369575b2bc2993edf8223a8f5c9f510ee629d0 (patch) | |
| tree | c8a6a103fc2f47d9fd9bde345e52920173ed881f /tools/perf/scripts/python | |
| parent | def4cd43f522253645b72c97181399c241b54536 (diff) | |
RDMA/rxe: Fix bug in rxe_alloc()
A recent patch which added an 'unlocked' version of rxe_alloc introduced a
bug causing kzalloc(..., GFP_KERNEL) to be called while holding a spin
lock. This patch corrects that error.
rxe_alloc_nl() should always be called while holding the pool->pool_lock
so the 2nd argument to kzalloc there should be GFP_ATOMIC.
rxe_alloc() prior to the change only locked the code around checking that
pool->state is RXE_POOL_STATE_VALID to avoid races between working threads
and a thread shutting down the rxe driver. This patch reverts rxe_alloc()
to this behavior so the lock is not held when kzalloc() is called.
Link: https://lore.kernel.org/r/[email protected]
Reported-by: [email protected]
Fixes: 3853c35e243d ("RDMA/rxe: Add unlocked versions of pool APIs")
Signed-off-by: Bob Pearson <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions