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
Unknown Object (File)
Wed, Feb 18, 11:35 AM
Unknown Object (File)
Tue, Feb 17, 12:05 AM
Unknown Object (File)
Thu, Feb 12, 2:44 AM
Unknown Object (File)
Tue, Feb 10, 7:44 AM
Unknown Object (File)
Jan 10 2026, 11:48 PM
Unknown Object (File)
Dec 28 2025, 5:55 AM
Unknown Object (File)
Dec 25 2025, 8:46 PM
Unknown Object (File)
Dec 23 2025, 1:36 AM
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