Commit 21a0d4fe authored by Chengchang Tang's avatar Chengchang Tang Committed by Zheng Zengkai
Browse files

RDMA/hns: Fixes concurrent ressetting and post_recv in DCA mode

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU



----------------------------------------------------------

read_poll_timeout() in MBX may cause sleep, especially at reset, the
probability becomes higher. In other words, it is not safe to use MBX
in an atomic context.

In order to ensure the atomicity of QPC setup, DCA will use locks to
protect the QPC setup operation in DCA ATTACH_MEM phase(i.e.
post_send/post_recv). This results in the above-mentioned problem at
reset.

Replace read_poll_timeout() with read_poll_timeout_atomic() to avoid
MBX operation sleep in an atomic context().

Fixes: 306b8c76 ("RDMA/hns: Do not destroy QP resources in the hw resetting phase")
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
Reviewed-by: default avatarYangyang Li <liyangyang20@huawei.com>
Reviewed-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent d3caaebd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment