All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ziheng Wei" <zihengw03@163.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/mlx4: Use the right list member in push_deleteing_req()
Date: Sun, 15 Nov 2026 08:05:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-215281@kernel.org> (raw)
In-Reply-To: <20261115080226.910258-1-zihengw03@163.com>

> push_deleteing_req() looks up the last pending request from
> group->func[slave].pending, but recovers the enclosing struct with the
> group_list member instead of func_list.
> 
> A struct mcast_req is queued on two lists at once by queue_req():
> group_list links it into group->pending_list and func_list links it
> into group->func[].pending. The two list_head members are adjacent but
> not at the same offset, so list_entry() on a node taken from
> func[].pending yields a pointer 16 bytes past the start of the object.
> 
> The following pend_req->clean then reads past the end of the
> allocation. On x86_64, sizeof(struct mcast_req) is 312 bytes and clean
> is at offset 304; the shifted pointer reads it at offset 320.
> 
> The entry stays on the list when clear_pending_reqs() fails to cancel
> group->timeout_work for the first request, which sets clear to 0 and
> leaves the request queued. push_deleteing_req() is then called right
> afterwards from clean_vf_mcast() and reads the bogus clean field, which
> decides whether the new delete request is dropped.
> 
> Use func_list to recover the request.
> 
> Found by LLM-assisted source review. Not tested on SR-IOV hardware.
> With a test module that calls clean_vf_mcast() on a fabricated group,
> push_deleteing_req() read a marker value placed right after the
> pending request and dropped the new delete request.
> 
> Fixes: b9c5d6a64358 ("IB/mlx4: Add multicast group (MCG) paravirtualization for SR-IOV")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ziheng Wei <zihengw03@163.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261115080226.910258-1-zihengw03@163.com?part=1


      reply	other threads:[~2026-11-15  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15  8:02 [PATCH] RDMA/mlx4: Use the right list member in push_deleteing_req() Ziheng Wei
2026-11-15  8:05 ` 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-215281@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zihengw03@163.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 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.