Re: [PATCH rdma-next] RDMA/mlx5: Read the CQ consumer index under cq->lock when arming
From: Mahanta Jambigi
Date: Fri Nov 27 2026 - 02:49:11 EST
On 27/11/26 12:29 am, Leon Romanovsky wrote:
> On Wed, Nov 25, 2026 at 09:40:54AM +0100, Mahanta Jambigi wrote:
>> mlx5_ib_arm_cq() reads cq->mcq.cons_index after dropping cq->lock, while
>> the poll path advances the index under that lock. A ULP that arms the CQ
>> from process context while the completion tasklet polls races on the
>> index, as SMC-R does from smc_wr_tx_send():
>>
>> BUG: KCSAN: data-race in mlx5_ib_arm_cq [mlx5_ib] / mlx5_poll_one
>> [mlx5_ib]
>
> Please add full non-trimmed dmesg stack trace to the commit message and
> resend.
Hi Leon,
v3 adds the full untrimmed report to the commit message: both access
stacks, the locks held, and the value transition (0x63d -> 0x63e). It
is from the unpatched kernel.
The code is unchanged from v2; only the message differs.