ACK: [SRU][J/N:linux-bluefield][PATCH v1 0/1] ipmb_host: lock warning in ipmb_slave_cb

Kuba Pawlak kuba.pawlak at canonical.com
Mon Oct 20 07:31:30 UTC 2025


On 10/11/25 00:35, David Thompson wrote:
> BugLink: https://bugs.launchpad.net/bugs/2127673
>
> SRU Justification:
>
> [Impact]
> Booting BF3 with kernel that has lock-related debug enabled
> will result in the following warning:
>
> [ 21.758110] 1 lock held by swapper/0/0:
> [ 21.761931] #0: ffff00008be2d8c0 (&master->lock){-...}-{2:2}, at: ipmb_slave_cb+0x70/0x208 [ipmb_host]
> [ 21.771320]
>                 stack backtrace:
> [ 21.775664] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.8.12+ #1
> [ 21.781656] Hardware name: https://www.mellanox.com BlueField-3 DPU/BlueField-3 DPU, BIOS 4.13.0.13780 Sep 30 2025
> [ 21.791986] Call trace:
> [ 21.794419] dump_backtrace+0xa0/0x128
> [ 21.798154] show_stack+0x20/0x38
> [ 21.801455] dump_stack_lvl+0xec/0x150
> [ 21.805192] dump_stack+0x18/0x28
> [ 21.808494] print_usage_bug.part.0+0x2a4/0x3c0
> [ 21.813012] mark_lock+0x4d4/0x710
> [ 21.816401] __lock_acquire+0x938/0x1ae8
> [ 21.820311] lock_acquire+0x118/0x300
> [ 21.823961] fs_reclaim_acquire+0xd8/0xf8
> [ 21.827957] kmalloc_trace+0x60/0x2f0
> [ 21.831607] ipmb_slave_cb+0x140/0x208 [ipmb_host]
> [ 21.836384] i2c_slave_event+0x34/0x160
> [ 21.840207] mlxbf_i2c_irq_recv.isra.0+0x258/0x2b0 [i2c_mlxbf]
> [ 21.846028] mlxbf_i2c_irq+0x12c/0x1f0 [i2c_mlxbf]
> [ 21.850804] __handle_irq_event_percpu+0xb0/0x328
> [ 21.855495] handle_irq_event+0x54/0xe0
>
> [Fix]
> The lockdep warning shows an inconsistent lock state problem
> with the following critical issues:
> 1) Memory allocation in IRQ context: The ipmb_slave_cb() function
>     (called from IRQ handler mlxbf_i2c_irq) is calling kmalloc() with
>     GFP_KERNEL flag, which can trigger memory reclaim and sleep.
>     This is not allowed in interrupt context.
> 2) Incorrect spinlock usage: The ipmb_slave_cb() function uses
>     spin_lock() instead of spin_lock_irqsave(). Since this function is
>     called from interrupt context, it needs to use the IRQ-safe version.
>
> [Test Case]
> Build a custom kernel with the following two settings:
>    CONFIG_PROVE_LOCKING=y
>    CONFIG_LOCK_STAT=y
> Boot this kernel on BF3
> Verify that 'dmesg' output shows no lock-related warnings
>
> [Regression Potential]
> Low
>
> David Thompson (1):
>    UBUNTU: SAUCE: ipmb_host: resolve lockdep warnings
>
>   drivers/char/ipmi/ipmb_host.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
Acked-by: Kuba Pawlak <kuba.pawlak at canonical.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x216A9D7E3B63DCB4.asc
Type: application/pgp-keys
Size: 3139 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20251020/79110c32/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20251020/79110c32/attachment-0001.sig>


More information about the kernel-team mailing list