HomeFreeBSD

sound: Honor CHN_F_NBIO

Description

sound: Honor CHN_F_NBIO

If the device is opened with O_NONBLOCK, even though we check for it in
order to set CHN_F_NBIO, the subsequent chn_reset() calls will clear all
flags, except those set in CHN_F_RESET, which does not include
CHN_F_NBIO.

Add CHN_F_NBIO to CHN_F_RESET. Additionally, because primary channels
can be reused, make sure we do not unintentionally keep CHN_F_NBIO set
if the channel is re-opened, but without O_NONBLOCK.

PR: 289441
MFC after: 2 days
Reviewed by: christos, markj
Differential Revision: https://reviews.freebsd.org/D52493

(cherry picked from commit e8b5025c3880b04c1c2139fe73b65fbd6deb41d4)

Details

Provenance
damjan.jov_gmail.comAuthored on Sep 15 2025, 5:42 PM
christosCommitted on Sep 17 2025, 9:27 AM
Reviewer
christos
Differential Revision
D52493: sound: Honor CHN_F_NBIO
Parents
rG44d7a8298eae: ifconfig: also fix removing IPv6 addresses without netlink
Branches
Unknown
Tags
Unknown