[PATCH] powerpc/64s: Fix native_hpte_remove() to be irq-safe
Michael Ellerman
patch-notifications at ellerman.id.au
Mon Jul 17 10:29:38 AEST 2023
On Wed, 17 May 2023 22:30:33 +1000, Michael Ellerman wrote:
> Lockdep warns that the use of the hpte_lock in native_hpte_remove() is
> not safe against an IRQ coming in:
>
> ================================
> WARNING: inconsistent lock state
> 6.4.0-rc2-g0c54f4d30ecc #1 Not tainted
> --------------------------------
> inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
> qemu-system-ppc/93865 [HC0[0]:SC0[0]:HE1:SE1] takes:
> c0000000021f5180 (hpte_lock){+.?.}-{0:0}, at: native_lock_hpte+0x8/0xd0
> {IN-SOFTIRQ-W} state was registered at:
> lock_acquire+0x134/0x3f0
> native_lock_hpte+0x44/0xd0
> native_hpte_insert+0xd4/0x2a0
> __hash_page_64K+0x218/0x4f0
> hash_page_mm+0x464/0x840
> do_hash_fault+0x11c/0x260
> data_access_common_virt+0x210/0x220
> __ip_select_ident+0x140/0x150
> ...
> net_rx_action+0x3bc/0x440
> __do_softirq+0x180/0x534
> ...
> sys_sendmmsg+0x34/0x50
> system_call_exception+0x128/0x320
> system_call_common+0x160/0x2e4
> ...
> Possible unsafe locking scenario:
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/64s: Fix native_hpte_remove() to be irq-safe
https://git.kernel.org/powerpc/c/8bbe9fee5848371d4af101be445303cac8d880c5
cheers
More information about the Linuxppc-dev
mailing list