Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Selvin Xavier" <selvin.xavier@broadcom.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-rc 1/7] RDMA/bnxt_re: Clear stale RCFW resp pointer when wait ends
Date: Wed, 28 Oct 2026 06:18:06 +0000	[thread overview]
Message-ID: <sashiko-outbox-187553@kernel.org> (raw)
In-Reply-To: <20261028113404.33289-2-selvin.xavier@broadcom.com>

> If the wait ends with ERR_DEVICE_DETACHED, bnxt_qplib_map_rc() returns 0
> for destroy-type opcodes, so the caller sees a synthetic success without
> a CREQ. is_waiter_alive and resp are left set, resp keeps pointing at
> the caller's stack, and a late CREQ is copied into a dead frame.
> 
> After the wait, take hwq->lock and, if the slot still holds this
> command's response buffer, clear is_waiter_alive and resp. This also
> covers the timeout case, where it is only defensive since is_waiter_alive
> was already cleared there. Return success without checking evnt->status
> when the slot still holds the buffer, since no completion was processed.
> 
> Also reset the slot in the completion handler, in the same critical
> section that clears is_in_used, so that a second CREQ for the same cookie
> cannot be copied into the caller's buffer. With this, resp == evnt under
> the lock means no completion was processed.
> 
> Clear crsqe->resp when __send_message_no_waiter() takes a slot as well, so
> a stale waiter can never match an internal command's slot by its own
> response buffer pointer.
> 
> Fixes: 3022cc151197 ("RDMA/bnxt_re: Avoid the command wait if firmware is inactive")
> Fixes: 691eb7c6110f ("RDMA/bnxt_re: handle command completions after driver detect a timedout")
> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261028113404.33289-1-selvin.xavier@broadcom.com?part=1


  reply	other threads:[~2026-10-28  6:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 11:33 [PATCH for-rc 0/7] RDMA/bnxt_re: Bug fixes for RCFW completion handling and verbs Selvin Xavier
2026-10-28 11:33 ` [PATCH for-rc 1/7] RDMA/bnxt_re: Clear stale RCFW resp pointer when wait ends Selvin Xavier
2026-10-28  6:18   ` sashiko-bot [this message]
2026-10-28 11:33 ` [PATCH for-rc 2/7] RDMA/bnxt_re: Honor a completion that races with a wait timeout Selvin Xavier
2026-10-28  6:20   ` sashiko-bot
2026-10-28 11:34 ` [PATCH for-rc 3/7] RDMA/bnxt_re: Do not treat CQ error notification as a command completion Selvin Xavier
2026-10-28  6:19   ` sashiko-bot
2026-10-28 11:34 ` [PATCH for-rc 4/7] RDMA/bnxt_re: Drop RCFW completions for cookies with no outstanding command Selvin Xavier
2026-10-28  6:17   ` sashiko-bot
2026-10-28 11:34 ` [PATCH for-rc 5/7] RDMA/bnxt_re: Reset cqe pointer each poll_cq iteration Selvin Xavier
2026-10-28  6:25   ` sashiko-bot
2026-10-28 11:34 ` [PATCH for-rc 6/7] RDMA/bnxt_re: Remove shared page mmap entry on alloc_ucontext failure Selvin Xavier
2026-10-28  6:17   ` sashiko-bot
2026-10-28 11:34 ` [PATCH for-rc 7/7] RDMA/bnxt_re: Bound FRMR page list by max_num_sg Selvin Xavier
2026-10-28  6:18   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-187553@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=selvin.xavier@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox