Skip to contentSkip to conversation

ALSA: seq: Don't re-bounce the error event

PATCH New Takashi Iwai 1 participant 1 message Jun 12 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: seq: Don't re-bounce the error event

The error bouncing may fail again, and we have no check for re-bouncing. For avoiding the loop, add the event type check at bouncing, and stop re-bouncing if it's already a bounce error.

---
 sound/core/seq/seq_clientmgr.c | 4 ++++
 1 file changed, 4 insertions(+)
sound/core/seq/seq_clientmgr.c +4 -0
index 0ac6d92058d9..28782e1776fa 100644
@@ -536,6 +536,10 @@ static int bounce_error_event(struct snd_seq_client *client,
 	    ! client->accept_input)
 		return 0; /* ignored */
 
+	if (event->type == SNDRV_SEQ_EVENT_BOUNCE ||
+	    event->type == SNDRV_SEQ_EVENT_KERNEL_ERROR)
+		return err; /* avoid re-bouncing */
+
 	/* set up quoted error */
 	memset(&bounce_ev, 0, sizeof(bounce_ev));
 
Signature · 1 line
2.54.0