Re: [PATCH v4] libcxgb: use raw_cpu_ptr() in ppm_get_cpu_entries()

From: sashiko-bot

Date: Wed Nov 11 2026 - 04:21:08 EST


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 5481811981b3771bf6244d1b3e3e8e9871700ea8
Author: Haoran Wang <haoranwangsec@xxxxxxxxx>

> libcxgb: use raw_cpu_ptr() in ppm_get_cpu_entries()
>
> ppm_get_cpu_entries() must not acquire a sleeping lock while preemption
> is disabled: get_cpu() raises preempt_count and spin_lock_bh() may sleep
> on PREEMPT_RT kernels. Read the current CPU with raw_cpu_ptr() instead,
> which keeps the per-CPU accessor stable without disabling preemption.
>
> Using the pool of a CPU the thread has since migrated away from is
> harmless: the per-CPU pools are shards of the global ppod index space,
> and the free path ppm_unmark_entries() derives the owning pool from the
> index instead of from the running CPU, so any thread can service any
> shard. Derive the global index base from pool->base so it always
> matches the pool that was locked.
>
> Signed-off-by: Haoran Wang <haoranwangsec@xxxxxxxxx>

[Severity: Low]
Since this fixes a sleeping-while-atomic bug on PREEMPT_RT in
ppm_get_cpu_entries(), should it include a Fixes: tag?

Fixes: 47da7e62b391 ("cxgb4: add iSCSI DDP page pod manager")

--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110165742.1204-1-haoranwangsec@xxxxxxxxx?part=1