sound: oss: dmasound: kill SLEEP() macro to avoid race
The use of interruptible_sleep_on_timeout in the dmasound driver is questionable and we want to kill off all sleep_on variants. This replaces the calls with wait_event_interruptible_timeout where possible, to wait for a particular event instead of blocking in a racy way. In the sq_write function, the easiest solution is an open-coded prepare_to_wait loop. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cette révision appartient à :

révisé par
Takashi Iwai

Parent
76439c2ac6
révision
1a1e0a80ce
@@ -239,7 +239,6 @@ struct sound_queue {
|
||||
int busy, syncing, xruns, died;
|
||||
};
|
||||
|
||||
#define SLEEP(queue) interruptible_sleep_on_timeout(&queue, HZ)
|
||||
#define WAKE_UP(queue) (wake_up_interruptible(&queue))
|
||||
|
||||
extern struct sound_queue dmasound_write_sq;
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur