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

Commit 3680e351 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sound: rawmidi: Move spinlock under realloc_mutex"

parents 86e74d8e 397cbe4b
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)