16 Nov
2014
16 Nov
'14
10:21 p.m.
Takashi Sakamoto wrote:
+++ b/sound/firewire/oxfw/oxfw-stream.c +int snd_oxfw_stream_start_simplex(struct snd_oxfw *oxfw,
struct amdtp_stream *stream,
unsigned int rate, unsigned int pcm_channels)
+{ ...
- if (atomic_read(substreams) == 0)
goto end;
- mutex_lock(&oxfw->mutex);
What happens if hw_free is called between the calls to atomic_read() and mutex_lock()?
And why are the substreams counters atomic? Can't they just be normal variables accessed from inside the mutex?
Regards, Clemens