Page MenuHomeFreeBSD

sdhci: Fix crash caused by M_WAITOK in sdhci dumps
ClosedPublic

Authored by bag_semihalf.com on Sep 23 2021, 8:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 2:39 AM
Unknown Object (File)
Sun, Apr 7, 4:44 PM
Unknown Object (File)
Jan 14 2024, 1:45 AM
Unknown Object (File)
Dec 24 2023, 8:26 PM
Unknown Object (File)
Dec 20 2023, 4:06 AM
Unknown Object (File)
Dec 14 2023, 11:46 PM
Unknown Object (File)
Nov 9 2023, 9:58 PM
Unknown Object (File)
Nov 6 2023, 6:20 PM

Details

Summary

In some contexts it is illegal to wait for memory allocation, causing
kernel panic. By default sbuf_new passes M_WAITOK to malloc,
which caused crashes when sdhci_dumpcaps or sdhci_dumpregs was callend in
non sutiable context.

Add SBUF_NOWAIT flag to sbuf_new to fix this.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bag_semihalf.com created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.Oct 5 2021, 4:24 AM
This revision was automatically updated to reflect the committed changes.