diff options
| author | Jack Wang <jinpu.wang@cloud.ionos.com> | 2020-10-23 09:43:44 +0200 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-28 13:17:39 -0300 |
| commit | fcf2959da6a74e71a85ab666e732fa1ed4da2c9a (patch) | |
| tree | d5cab1815b66691f84d91c54931c4ed6d9a933d8 /tools/perf/scripts/python | |
| parent | RDMA/rtrs-clt: Remove outdated comment in create_con_cq_qp (diff) | |
| download | linux-fcf2959da6a74e71a85ab666e732fa1ed4da2c9a.tar.gz linux-fcf2959da6a74e71a85ab666e732fa1ed4da2c9a.zip | |
RDMA/rtrs-clt: Avoid run destroy_con_cq_qp/create_con_cq_qp in parallel
It could happen two kworkers race with each other:
CPU0 CPU1
addr_resolver kworker reconnect kworker
rtrs_clt_rdma_cm_handler
rtrs_rdma_addr_resolved
create_con_cq_qp: s.dev_ref++
"s.dev_ref is 1"
wait in create_cm fails with TIMEOUT
destroy_con_cq_qp: --s.dev_ref
"s.dev_ref is 0"
destroy_con_cq_qp: sess->s.dev = NULL
rtrs_cq_qp_create -> create_qp(con, sess->dev->ib_pd...)
sess->dev is NULL, panic.
To fix the problem using mutex to serialize create_con_cq_qp and
destroy_con_cq_qp.
Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
Link: https://lore.kernel.org/r/20201023074353.21946-4-jinpu.wang@cloud.ionos.com
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Reviewed-by: Gioh Kim <gi-oh.kim@cloud.ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
