All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Praneeth Balasubramanian" <praneethb2002@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/srp: Reserve send queue and CQ space for ib_drain_qp()
Date: Wed, 11 Nov 2026 01:56:57 +0000	[thread overview]
Message-ID: <sashiko-outbox-208059@kernel.org> (raw)
In-Reply-To: <20261110222421.205573-1-praneeth@ucsb.edu>

> srp_destroy_qp() calls ib_drain_qp(), which also drains the send queue.
> ib_drain_sq() requires the caller to "ensure there is room in the CQ and
> SQ for the drain work request and completion".
> 
> SRP reserves that room on the receive side, where the queue and CQ have
> queue_size + 1 entries. Commit 9294000d6d89 ("IB/srp: Drain the send
> queue before destroying a QP") switched from ib_drain_rq() to
> ib_drain_qp() but did not grow the send side. The send queue and send
> CQ hold exactly m * queue_size entries, which is the most work requests
> SRP can have outstanding. If the channel is torn down while the send
> queue is full, for example during error handling after a target stops
> responding, posting the drain work request can fail with "failed to
> drain send queue", or its completion can find the CQ full. The QP is
> then destroyed without the guarantee that ib_drain_qp() is meant to
> provide.
> 
> Add one entry to the send queue and the send CQ, as nvme-rdma and iser
> already do.
> 
> The missing reservation was found with an LLM-based tool that checks
> callers against the rules stated in kernel comments.
> 
> Fixes: 9294000d6d89 ("IB/srp: Drain the send queue before destroying a QP")
> Signed-off-by: Praneeth Balasubramanian <praneeth@ucsb.edu>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110222421.205573-1-praneeth@ucsb.edu?part=1


      parent reply	other threads:[~2026-11-11  1:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 22:24 [PATCH] RDMA/srp: Reserve send queue and CQ space for ib_drain_qp() Praneeth Balasubramanian
2026-11-11  0:44 ` Bart Van Assche
2026-11-11  1:56 ` sashiko-bot [this message]

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-208059@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=praneethb2002@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.