From: sashiko-bot@kernel.org
To: "Haoran Wang" <haoranwangsec@gmail.com>
Cc: linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] libcxgb: use raw_cpu_ptr() in ppm_get_cpu_entries()
Date: Tue, 10 Nov 2026 10:08:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-206835@kernel.org> (raw)
In-Reply-To: <20261109180748.33682-1-haoranwangsec@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] libcxgb: missing Fixes: trailer on bug-fix commit for
ppm_get_cpu_entries()
--
commit f26f870fe2fc150e7c6210fe2807b65ce57e879d
Author: Haoran Wang <haoranwangsec@gmail.com>
> libcxgb: use raw_cpu_ptr() in ppm_get_cpu_entries()
>
> ppm_get_cpu_entries() disables preemption with get_cpu(), reads the
> current CPU's pool with per_cpu_ptr(), then acquires the pool's
> spin_lock_bh() while preemption is still disabled, and finally put_cpu().
>
> On PREEMPT_RT kernels spin_lock_bh() becomes a sleeping lock
> (rt_spin_lock), so the task may sleep with preempt_count elevated:
> scheduling while atomic, reported as a BUG by CONFIG_DEBUG_ATOMIC_SLEEP
> and a deadlock once the lock is contended. Any iSCSI offload I/O
> through a Chelsio NIC that reaches ppm_get_cpu_entries() triggers it.
>
> Read the current CPU with raw_cpu_ptr() without raising preempt_count,
> and derive the global index base from pool->base (initialised when the
> pools are allocated) instead of cpu * pool_index_max, so the base
> always matches the pool that was locked. The owning CPU remains in the
> debug output, now derived from pool->base.
>
> Signed-off-by: Haoran Wang <haoranwangsec@gmail.com>
[Severity: Low]
Since this fixes a sleeping-while-atomic bug in ppm_get_cpu_entries() on
PREEMPT_RT kernels, should this include a Fixes: tag?
Fixes: 47da7e62b391 ("cxgb4: add iSCSI DDP page pod manager")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261109180748.33682-1-haoranwangsec@gmail.com?part=1
prev parent reply other threads:[~2026-11-10 10:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 13:22 [PATCH] " Haoran Wang
2026-10-19 13:29 ` netdev-bot+sinfo
2026-10-19 13:29 ` Sebastian Andrzej Siewior
2026-10-20 13:22 ` sashiko-bot
2026-10-22 7:25 ` netdev-bot+sashiko
[not found] ` <CANZ3JQQrrntu0TefPZC79pKSmsOfwAngRJyuaVm81DYaJNFHFQ@mail.gmail.com>
2026-11-09 10:07 ` [PATCH v3] " Haoran Wang
2026-11-09 10:11 ` netdev-bot+sinfo
2026-11-09 20:03 ` David Laight
2026-11-10 8:57 ` [PATCH v4] " Haoran Wang
2026-11-10 9:02 ` netdev-bot+sinfo
2026-11-10 10:08 ` 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-206835@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=haoranwangsec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®