]> git.itanic.dy.fi Git - linux-stable/commit
parisc: Fix flush_dcache_page() for usage from irq context
authorHelge Deller <deller@gmx.de>
Wed, 24 May 2023 15:07:07 +0000 (17:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 13:17:22 +0000 (14:17 +0100)
commit52e9b2ffa323faa02023061b59570d48291286e9
treeae695c147ad1b6cd7704f3a7d40f7ddbbb13bbe8
parent046cba99890559f247fd5d4b4085022ee4c4b27c
parisc: Fix flush_dcache_page() for usage from irq context

commit 61e150fb310729c98227a5edf6e4a3619edc3702 upstream.

Since at least kernel 6.1, flush_dcache_page() is called with IRQs
disabled, e.g. from aio_complete().

But the current implementation for flush_dcache_page() on parisc
unintentionally re-enables IRQs, which may lead to deadlocks.

Fix it by using xa_lock_irqsave() and xa_unlock_irqrestore()
for the flush_dcache_mmap_*lock() macros instead.

Cc: linux-parisc@vger.kernel.org
Cc: stable@kernel.org # 5.18+
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/include/asm/cacheflush.h
arch/parisc/kernel/cache.c