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
F162968019: D54131.diff
Sat, Jul 18, 7:13 PM
F162957716: D54131.diff
Sat, Jul 18, 4:57 PM
Unknown Object (File)
Fri, Jul 17, 6:25 PM
Unknown Object (File)
Wed, Jul 15, 6:58 AM
Unknown Object (File)
Wed, Jul 15, 6:58 AM
Unknown Object (File)
Jun 15 2026, 2:46 PM
Unknown Object (File)
Jun 15 2026, 2:31 PM
Unknown Object (File)
Jun 15 2026, 2:24 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