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)
Fri, Aug 21, 10:09 PM
Unknown Object (File)
Wed, Aug 19, 5:12 PM
Unknown Object (File)
Sun, Aug 16, 3:55 PM
Unknown Object (File)
Thu, Aug 13, 9:08 PM
Unknown Object (File)
Thu, Aug 13, 9:05 PM
Unknown Object (File)
Thu, Aug 13, 12:44 PM
Unknown Object (File)
Wed, Aug 12, 2:51 PM
Unknown Object (File)
Tue, Aug 11, 11:23 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