These sections do not call malloc(9) with a lock held.
Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Differential D46845
sound: Use M_WAITOK where possible christos on Sep 29 2024, 1:23 PM. Authored by Tags None Referenced Files
Details These sections do not call malloc(9) with a lock held. Sponsored by: The FreeBSD Foundation
Diff Detail
Event TimelineComment Actions I accidentally posted a draft patch, which contained some errors. Will re-submit the correct one soon. Comment Actions The justification in your commit log is a bit incomplete: not holding a lock is not sufficient to sleep (e.g., interrupt threads cannot sleep in general, even when they're not holding locks). The thread context matters too. It's ok to sleep in SYSINITs or in driver attach routines. Comment Actions
Good point - the change allows the code to be simplified, and you can just state that the calls are in contexts where sleeping is permitted. |