[Bug 297121] LinuxKPI: uma_zalloc_debug: zone "malloc-16" with the following non-sleepable locks held (alloc_bounce_zone)
[email protected] Tue, 28 Jul 2026 15:01:57 +0000
| Newsgroups | gmane.os.freebsd.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D297121
Bug ID: 297121
Summary: LinuxKPI: uma_zalloc_debug: zone "malloc-16" with the
following non-sleepable locks held (alloc_bounce_zone)
Product: Base System
Version: CURRENT
Hardware: amd64
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
I got a problem report on testing a wireless driver (unrelated as the probl=
em
is in general LinuxKPI code).
Filing the PR as I currently cannot debug it to the end and do not want to =
lose
it.
I cannot remember this reported in the last years.
amd64, 16GB memory, but in general it seems this is LinuxKPI holding the lo=
ck
and running into the alloc_bounce_zone() case which adds sysctls which will
malloc with M_WAITOK (compared to everything else in the path).
Cc: jhb, markj as you've done some the bounce buffer paths for this. I won=
der
how to best avoid that problem.
Multiple of these with different malloc-XXx zones:
uma_zalloc_debug: zone "malloc-16" with the following non-sleepable locks h=
eld:
exclusive sleep mutex lkpi-priv-dma (lkpi-priv-dma) r =3D 0 (0xfffff8001152=
63a0)
locked @ /usr/src/sys/compat/linuxkpi/common/src/linux_pci.c:1746
stack backtrace:
#0 0xffffffff80c8f27c at witness_debugger+0x6c
#1 0xffffffff80c90b7c at witness_warn+0x4bc
#2 0xffffffff8100596f at uma_zalloc_debug+0x3f
#3 0xffffffff810054b7 at uma_zalloc_arg+0x27
#4 0xffffffff80be07dd at malloc+0x7d
#5 0xffffffff80c20ffb at sysctl_add_oid+0x6b
#6 0xffffffff81155d3f at alloc_bounce_zone+0x19f
#7 0xffffffff81154ca0 at bounce_bus_dmamap_create+0x180
#8 0xffffffff80ef467f at linux_dma_map_phys_common+0x9f
#9 0xffffffff80ef4514 at lkpi_dma_map_phys+0x24
...
lock order reversal: (sleepable after non-sleepable)
1st 0xfffff800115263a0 lkpi-priv-dma (lkpi-priv-dma, sleep mutex) @
/usr/src/sys/compat/linuxkpi/common/src/linux_pci.c:1746
2nd 0xffffffff81de6ce8 sysctl lock (sysctl lock, sleepable rm) @
/usr/src/sys/kern/kern_sysctl.c:886
lock order lkpi-priv-dma -> sysctl lock attempted at:
#0 0xffffffff80c8ee3b at witness_checkorder+0xd3b
#1 0xffffffff80c09a14 at _rm_wlock_debug+0x64
#2 0xffffffff80c21070 at sysctl_add_oid+0xe0
#3 0xffffffff81155d3f at alloc_bounce_zone+0x19f
#4 0xffffffff81154ca0 at bounce_bus_dmamap_create+0x180
#5 0xffffffff80ef467f at linux_dma_map_phys_common+0x9f
#6 0xffffffff80ef4514 at lkpi_dma_map_phys+0x24
...
--=20
You are receiving this mail because:
You are the assignee for the bug.=