NACK/Cmnt: [SRU][Plucky][PATCH 1/1] mm/page_alloc: fix deadlock on cpu_hotplug_lock in __accept_page()

Hector Cao hector.cao at canonical.com
Tue Apr 29 08:05:47 UTC 2025


Hello Manuel
Thanks for the feedback,

On Tue, Apr 29, 2025 at 10:02 AM Manuel Diewald <
manuel.diewald at canonical.com> wrote:

> 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.
>
>
It is not really affecting Oracular yet because the commit the makes this
bug visible is
being backported to Oracular I believe (
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2109530)


> >
> > 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
>


-- 
Hector CAO
Software Engineer – Partner Engineering Team
hector.cao at canonical.com
https://launc <https://launchpad.net/~hectorcao>hpad.net/~hectorcao
<https://launchpad.net/~hectorcao>

<https://launchpad.net/~hectorcao>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20250429/197153ad/attachment.html>


More information about the kernel-team mailing list