All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Binbin Deng" <18983559317@163.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v1] RDMA/iwpm: Fix use-after-free in mapping info dump
Date: Mon, 02 Nov 2026 08:23:56 +0000	[thread overview]
Message-ID: <sashiko-outbox-193102@kernel.org> (raw)
In-Reply-To: <20261102081813.37754-1-18983559317@163.com>

> iwpm_send_mapinfo() walks the mapinfo hash table while holding
> iwpm_mapinfo_lock, but when the current skb is full it temporarily drops
> that lock to send the skb and allocate another one.  The hlist iterator is
> not protected across that window:
> 
> CPU0                                                CPU1
> iwpm_send_mapinfo()
> spin_lock_irqsave(&iwpm_mapinfo_lock, flags)
> hlist_for_each_entry(..., map_info, ...)
>   map_info points at map_info A
>   fill the current skb
>   spin_unlock_irqrestore(&iwpm_mapinfo_lock,flags)
>   send the skb / allocate the next skb
>                                                     iwpm_remove_mapinfo()
>                                                     spin_lock_irqsave(&iwpm_mapinfo_lock,flags)
> [ ... ]
> infrastructure, the issue was not observed at runtime.
> 
> Fixes: 30dc5e63d6a5 ("RDMA/core: Add support for iWARP Port Mapper user space service")
> Assisted-by: Coccinelle
> Signed-off-by: Binbin Deng <18983559317@163.com>

Sashiko has reviewed this patch and found no issues.

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


  reply	other threads:[~2026-11-02  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02  8:18 [PATCH v1] RDMA/iwpm: Fix use-after-free in mapping info dump Binbin Deng
2026-11-02  8:23 ` sashiko-bot [this message]
2026-11-03 15:31 ` Leon Romanovsky

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-193102@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=18983559317@163.com \
    --cc=linux-rdma@vger.kernel.org \
    --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.