diff options
author | Jason Gunthorpe <[email protected]> | 2020-03-10 11:25:45 +0200 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2020-03-17 17:05:54 -0300 |
commit | 67b3c8dceac6644322d5707687449f6dcbdff417 (patch) | |
tree | f13c6b7eefcbfa3eae6e83e56500fdd23505a968 /tools/perf/scripts/python/syscall-counts.py | |
parent | 6a8824a74bc9dccb2cae5caa993d2ec09f4694f2 (diff) |
RDMA/cm: Make sure the cm_id is in the IB_CM_IDLE state in destroy
The first switch statement in cm_destroy_id() tries to move the ID to
either IB_CM_IDLE or IB_CM_TIMEWAIT. Both states will block concurrent
MAD handlers from progressing.
Previous patches removed the unreliably lock/unlock sequences in this
flow, this patch removes the extra locking steps and adds the missing
parts to guarantee that destroy reaches IB_CM_IDLE. There is no point in
leaving the ID in the IB_CM_TIMEWAIT state the memory about to be kfreed.
Rework things to hold the lock across all the state transitions and
directly assert when done that it ended up in IB_CM_IDLE as expected.
This was accompanied by a careful audit of all the state transitions here,
which generally did end up in IDLE on their success and non-racy paths.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions