From: Hao Ge <hao.ge@linux.dev>
To: Luiz Capitulino <luizcap@redhat.com>
Cc: akpm@linux-foundation.org, mathias.nyman@intel.com,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [USB] WARNING: mm/page_alloc.c:5345 at __alloc_frozen_pages_noprof+0x39a/0x3d0, CPU#41: swapper/0/1
Date: Tue, 22 Sep 2026 11:13:25 +0800 [thread overview]
Message-ID: <f151fb61-6e9d-4f42-8a3e-89cf5f4fcaea@linux.dev> (raw)
In-Reply-To: <8b77688e-3219-4133-af0f-395e342acb25@redhat.com>
Hi Luiz
On 2026/9/22 10:28, Luiz Capitulino wrote:
> Hello,
>
> When booting the latest Andrew Morton's mm-new tree[1] commit 498ee28e5ec4
> ("mm/swap, PM: hibernate: atomically replace hibernation pin") on a KVM guest,
> I'm getting the following MM warning being triggered:
>
> """
> [ 1.667197] [ T1] WARNING: mm/page_alloc.c:5345 at __alloc_frozen_pages_noprof+0x39a/0x3d0, CPU#41: swapper/0/1
> [ 1.691217] [ T1] CPU: 41 UID: 0 PID: 1 Comm: swapper/0 Tainted: G W 7.3.0-rc1+ #12 PREEMPT(full)
> [ 1.692073] [ T1] Tainted: [W]=WARN
> [ 1.692378] [ T1] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20260812-8.fc44 08/12/2026
> [ 1.693158] [ T1] RIP: 0010:__alloc_frozen_pages_noprof+0x39a/0x3d0
> [ 1.693685] [ T1] Code: e2 04 e8 49 85 ff ff 45 31 c9 e9 14 fe ff ff 0f 0b e9 e7 fe ff ff 80 3d 6d 3a f2 05 00 0f 85 2b fe ff ff c6 05 60 3a f2 05 01 <0f> 0b e9 1d fe ff ff 48 89 5c 24 40 48 89 6c 24 48 4c 89 64 24 50
> [ 1.695238] [ T1] RSP: 0000:ff46f50b801538d8 EFLAGS: 00010246
> [ 1.695723] [ T1] RAX: 0000000000000000 RBX: 0000000000000cc0 RCX: 0000000000000000
> [ 1.696356] [ T1] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000cc0
> [ 1.696981] [ T1] RBP: 0000000000000034 R08: 0000000000000000 R09: 0000000000000cc0
> [ 1.697605] [ T1] R10: 0000000000000034 R11: 0000000000000100 R12: 0000000000000034
> [ 1.698231] [ T1] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
> [ 1.698872] [ T1] FS: 0000000000000000(0000) GS:ff2b932745209000(0000) knlGS:0000000000000000
> [ 1.699592] [ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [ 1.700119] [ T1] CR2: 0000000000000000 CR3: 00000006ede4a001 CR4: 0000000000773ef0
> [ 1.700745] [ T1] PKRU: 55555554
> [ 1.701023] [ T1] Call Trace:
> [ 1.701283] [ T1] <TASK>
> [ 1.701512] [ T1] alloc_pages_node_noprof+0x4c/0xc0
> [ 1.701919] [ T1] __dma_direct_alloc_pages.isra.0+0x164/0x1f0
> [ 1.702402] [ T1] dma_direct_alloc+0x19f/0x2b0
> [ 1.702767] [ T1] dma_alloc_attrs+0x8d/0x200
> [ 1.703133] [ T1] xhci_alloc_interrupter+0xc9/0x190
> [ 1.703543] [ T1] xhci_mem_init+0x283/0x340
> [ 1.703902] [ T1] ? __pfx_xhci_pci_quirks+0x10/0x10
> [ 1.704317] [ T1] xhci_gen_setup+0x35e/0x4f0
> [ 1.704684] [ T1] xhci_pci_setup+0x52/0x1c0
> [ 1.705038] [ T1] usb_add_hcd.cold+0x241/0x5d8
> [ 1.705413] [ T1] usb_hcd_pci_probe+0x188/0x480
> [ 1.705803] [ T1] xhci_pci_common_probe+0x6b/0x2f0
> [ 1.706218] [ T1] local_pci_probe+0x4a/0x90
> [ 1.706582] [ T1] ? cpu_hotplug_disable+0x15/0x30
> [ 1.706986] [ T1] pci_call_probe+0x55/0x150
> [ 1.707357] [ T1] pci_device_probe+0xae/0x150
> [ 1.707734] [ T1] ? kernfs_create_link+0x61/0xb0
> [ 1.708139] [ T1] ? sysfs_do_create_link_sd+0x81/0xf0
> [ 1.708562] [ T1] call_driver_probe+0x23/0x100
> [ 1.708949] [ T1] ? driver_sysfs_add+0x55/0xc0
> [ 1.709334] [ T1] really_probe+0xd7/0x2d0
> [ 1.709681] [ T1] ? _raw_spin_unlock_irq+0xe/0x30
> [ 1.710098] [ T1] __driver_probe_device+0x9c/0x1b0
> [ 1.710503] [ T1] driver_probe_device+0x1f/0x80
> [ 1.710892] [ T1] ? __pfx___driver_attach+0x10/0x10
> [ 1.711323] [ T1] __driver_attach+0x10a/0x210
> [ 1.711706] [ T1] ? __pfx___driver_attach+0x10/0x10
> [ 1.712125] [ T1] bus_for_each_dev+0x86/0xf0
> [ 1.712488] [ T1] bus_add_driver+0x13e/0x230
> [ 1.712858] [ T1] ? __pfx_xhci_pci_init+0x10/0x10
> [ 1.713273] [ T1] ? __pfx_xhci_pci_init+0x10/0x10
> [ 1.713681] [ T1] driver_register+0x75/0xe0
> [ 1.714049] [ T1] do_one_initcall+0x7a/0x1c0
> [ 1.714429] [ T1] do_initcalls+0xe1/0x100
> [ 1.714780] [ T1] kernel_init_freeable+0x152/0x1c0
> [ 1.715199] [ T1] ? __pfx_kernel_init+0x10/0x10
> [ 1.715592] [ T1] kernel_init+0x1f/0x140
> [ 1.715928] [ T1] ret_from_fork+0x19e/0x270
> [ 1.716296] [ T1] ? __pfx_kernel_init+0x10/0x10
> [ 1.716680] [ T1] ? __pfx_kernel_init+0x10/0x10
> [ 1.717071] [ T1] ret_from_fork_asm+0x1a/0x30
> [ 1.717438] [ T1] </TASK>
> [ 1.717663] [ T1] ---[ end trace 0000000000000000 ]---
> """
>
> This does not happen with latest Linus tree 40288c9206c1 ("Merge tag
> 'drm-fixes-2026-09-19' of https://gitlab.freedesktop.org/drm/kernel").
>
> What I could determine is:
>
> - In xhci_alloc_interrupter() max_segs=0, which leds to seg=0
>
> - This eventually leads to passing size=0 to get_order() in
> __dma_direct_alloc_pages() (call sequenece below). Passing size=0 to
> get_order() is undefined and returns order=52 on my guest, whch leads
> to the warning since 52 > MAX_PAGE_ORDER
>
> xhci_alloc_erst()
> dma_alloc_coherent()
> dma_alloc_attrs()
> dma_direct_alloc()
> __dma_direct_alloc_pages()
> get_order()
> alloc_pages_node()
>
> [1] git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm origin/mm-new
>
Thanks for the report. From my understanding, it is already
fixed in mainline by 045b5bef916d ("usb: xhci: Fix HCS_ERST_MAX conversion").
Thanks
Best Regards
Hao
next prev parent reply other threads:[~2026-09-22 3:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 2:28 Luiz Capitulino
2026-09-22 3:13 ` Hao Ge [this message]
2026-09-22 12:39 ` Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f151fb61-6e9d-4f42-8a3e-89cf5f4fcaea@linux.dev \
--to=hao.ge@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-usb@vger.kernel.org \
--cc=luizcap@redhat.com \
--cc=mathias.nyman@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®