Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c60b52df authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sound: rawmidi: Move spinlock under realloc_mutex"

parents 27a53253 0377c063
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -976,9 +976,9 @@ static long snd_rawmidi_kernel_read1(struct snd_rawmidi_substream *substream,
	struct snd_rawmidi_runtime *runtime = substream->runtime;
	unsigned long appl_ptr;

	spin_lock_irqsave(&runtime->lock, flags);
	if (userbuf)
		mutex_lock(&runtime->realloc_mutex);
	spin_lock_irqsave(&runtime->lock, flags);
	while (count > 0 && runtime->avail) {
		count1 = runtime->buffer_size - runtime->appl_ptr;
		if (count1 > count)