NACK/Cmnt: [SRU][Plucky][PATCH 1/1] mm/page_alloc: fix deadlock on cpu_hotplug_lock in __accept_page()
Manuel Diewald
manuel.diewald at canonical.com
Tue Apr 29 08:02:07 UTC 2025
On Tue, Apr 29, 2025 at 06:53:25AM +0200, Hector Cao wrote:
> From: "Kirill A. Shutemov" <kirill.shutemov at linux.intel.com>
>
> BugLink: https://bugs.launchpad.net/bugs/2109543
Your description says that plucky and oracular are affected, please
target the respective series in the LP bug. You mention oracular 6.8,
however oracular is 6.11.
>
> When the last page in the zone is accepted, __accept_page() calls
> static_branch_dec(). This function takes cpu_hotplug_lock, which can lead
> to a deadlock if the allocation occurs during CPU bringup path as
> _cpu_up() also takes the lock.
>
> To prevent this deadlock, defer static_branch_dec() to a workqueue.
>
> Call static_branch_dec() only when the workqueue is not yet initialized.
> Workqueues are initialized before CPU bring up, so this will not conflict
> with the first scenario.
>
> Link: https://lkml.kernel.org/r/20250329171030.3942298-1-kirill.shutemov@linux.intel.com
> Fixes: 55ad43e8ba0f ("mm: add a helper to accept page")
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov at linux.intel.com>
> Reported-by: Srikanth Aithal <sraithal at amd.com>
> Tested-by: Srikanth Aithal <sraithal at amd.com>
> Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
The patch is missing provenance, please include it in another
submission. Since this is coming from mainline, provenance should look
like this if the patch was a clean cherry pick:
(cherry picked from commit 4067196a52278156d18d8d6fa7f43970611b1b49)
> Signed-off-by: Hector Cao <hector.cao at canonical.com>
Thank you!
--
Manuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20250429/afcd2d4a/attachment.sig>
More information about the kernel-team
mailing list