Re: [PATCH] ALSA: pcm: oss: annotate data-races around runtime->state
From: Cen Zhang
Date: Mon Mar 16 2026 - 05:08:04 EST
> I believe it's better not to go with barriers but rather taking the
> proper spinlock, as it's only for this OSS layer, and other places are
> already doing so.
>
> That said,
>
> - Export snd_pcm_set_state() in pcm_native.c
> - Introduce snd_pcm_get_state() helper just to call like
> ...
> Care to revise the patch and resubmit?
Thank you for the review. That makes sense — using the proper stream
lock is indeed cleaner than barriers for this layer.
I've sent the v2 following your suggestions. Please take a look.
Best regards,
Cen Zhang