Commit 94164775 authored by Helge Deller's avatar Helge Deller Committed by openeuler-sync-bot
Browse files

parisc: Fix flush_dcache_page() for usage from irq context

stable inclusion
from stable-v5.10.181
commit 518c39fc1ed6d34aa4a6d4a6f48101f88aeda60c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8GJZJ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=518c39fc1ed6d34aa4a6d4a6f48101f88aeda60c



--------------------------------

commit 61e150fb 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: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
(cherry picked from commit 7ec6a34b)
parent 49898b2b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment