Bug 257388 - MMCCAM : sdhci : uma_zalloc_debug called with lock held
Summary: MMCCAM : sdhci : uma_zalloc_debug called with lock held
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 257385
  Show dependency treegraph
 
Reported: 2021-07-24 17:50 UTC by Emmanuel Vadot
Modified: 2021-07-24 17:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emmanuel Vadot freebsd_committer freebsd_triage 2021-07-24 17:50:31 UTC
Using sdhci on an MMCCAM enabled kernel will have this logs :
(noperiph:sdhci_slot0:0:-1:ffffffff): (noperiph:sdhci_slot0:0:-1:ffffffff): sdhci_fdt0-slot0: Card inserted                    
XPT_SCAN_{BUS,TGT,LUN}                                                                                                         
xpt_async(AC_PATH_REGISTERED)                                                                                                  
uma_zalloc_debug: zone "malloc-2048" with the following non-sleepable locks held:                                              
exclusive sleep mutex SD slot mtx (sdhci) r = 0 (0xffff0000e545e030) locked @ /usr/home/manu/Work/freebsd/src/wipbsd/sys/dev/sd
hci/sdhci.c:617                                                                                                                
stack backtrace:                                                                                                               
#0 0xffff00000042261c at witness_debugger+0x64                                                                                 
#1 0xffff0000004237b0 at witness_warn+0x400                                                                                    
#2 0xffff0000006462d0 at uma_zalloc_debug+0x2c                                                                                 
#3 0xffff000000645cd8 at uma_zalloc_arg+0x2c                                                                                   
#4 0xffff00000038a628 at malloc+0x94                                                                                           
#5 0xffff00000000f54c at xpt_alloc_ccb+0x1c                                                                                    
#6 0xffff0000000350bc at mmccam_start_discovery+0x18                                                                           
#7 0xffff0000e525e1ac at sdhci_card_task+0x118                                                                                 
#8 0xffff0000e5237d40 at sdhci_fdt_attach+0x5b8                                                                                
#9 0xffff0000003ee29c at device_attach+0x400                                                                                   
#10 0xffff0000003ede04 at device_probe_and_attach+0x7c                                                                         
#11 0xffff0000003efec4 at bus_generic_driver_added+0x74                                                                        
#12 0xffff0000003eb6f0 at devclass_driver_added+0x44                                                                           
#13 0xffff0000003eb78c at devclass_driver_added+0xe0                                                                           
#14 0xffff0000003eb5ec at devclass_add_driver+0x140                                                                            
#15 0xffff00000039015c at module_register_init+0xc4                                                                            
#16 0xffff00000037f9bc at linker_load_module+0xb2c                                                                             
#17 0xffff000000381450 at kern_kldload+0x15c

All the discovery is done with one of the CAM locks held and so malloc complain.