Page MenuHomeFreeBSD

sound: Improve snd_midi->{in,out}q allocation
ClosedPublic

Authored by christos on Dec 8 2025, 5:13 PM.
Tags
None
Referenced Files
F175937146: D54131.diff
Wed, Oct 14, 3:38 PM
Unknown Object (File)
Thu, Oct 1, 6:16 PM
Unknown Object (File)
Sep 14 2026, 2:35 PM
Unknown Object (File)
Sep 14 2026, 2:29 PM
Unknown Object (File)
Sep 14 2026, 2:24 PM
Unknown Object (File)
Sep 11 2026, 4:44 AM
Unknown Object (File)
Sep 10 2026, 2:28 PM
Unknown Object (File)
Sep 8 2026, 1:45 PM
Subscribers

Details

Summary

Currently we lock and allocate the buffers with M_NOWAIT, without
checking if the return value of malloc(). This is not necessary as
subsequent check below will eventually check that. However, for
correctness, allocate the buffers with M_WAITOK (there is no reason not
to) and lock afterwards.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

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