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, May 20, 10:56 PM
Unknown Object (File)
Wed, May 20, 11:39 AM
Unknown Object (File)
Tue, May 19, 7:04 AM
Unknown Object (File)
Sun, May 17, 7:01 PM
Unknown Object (File)
Apr 15 2026, 3:54 AM
Unknown Object (File)
Apr 7 2026, 3:24 PM
Unknown Object (File)
Apr 4 2026, 3:24 AM
Unknown Object (File)
Mar 24 2026, 4:22 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