Patch "ALSA: seq: Enable 'use' locking in all configurations" has been added to the 3.18-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
ALSA: seq: Enable 'use' locking in all configurations
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
alsa-seq-enable-use-locking-in-all-configurations.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
8009d506a1dd00cf436b0c4cca0dcec130580a21Mon Sep 17 00:00:00 2001
From: Ben Hutchings <[email protected]>
Date: Wed, 18 Oct 2017 00:45:49 +0100
Subject: ALSA: seq: Enable 'use' locking in all configurations
From: Ben Hutchings <[email protected]>
commit 8009d506a1dd00cf436b0c4cca0dcec130580a21 upstream.
The 'use' locking macros are no-ops if neither SMP or SND_DEBUG is enabled. This might once have been OK in non-preemptible configurations, but even in that case snd_seq_read() may sleep while relying on a 'use' lock. So always use the proper implementations.
--- sound/core/seq/seq_lock.c | 4 ---- sound/core/seq/seq_lock.h | 12 ------------ 2 files changed, 16 deletions(-)
sound/core/seq/seq_lock.c +0 -4
@@ -23,8 +23,6 @@#include <sound/core.h> #include "seq_lock.h" -#if defined(CONFIG_SMP ) || defined(CONFIG_SND_DEBUG ) -/* wait until all locks are released */ void snd_use_lock_sync_helper (snd_use_lock_t *lockp,const char *file,int line) {
@@ -42,5 +40,3 @@ void snd_use_lock_sync_helper(snd_use_lo }EXPORT_SYMBOL (snd_use_lock_sync_helper); - -#endif
sound/core/seq/seq_lock.h +0 -12
@@ -3,8 +3,6 @@#include <linux/sched.h> -#if defined(CONFIG_SMP ) || defined(CONFIG_SND_DEBUG ) -typedef atomic_t snd_use_lock_t ;/* initialize lock */
@@ -20,14 +18,4 @@ typedef atomic_t snd_use_lock_t;void snd_use_lock_sync_helper (snd_use_lock_t *lock,const char *file,int line);#define snd_use_lock_sync (lockp) snd_use_lock_sync_helper(lockp, __BASE_FILE__, __LINE__) -#else /* SMP || CONFIG_SND_DEBUG */ - -typedef spinlock_t snd_use_lock_t ;/* dummy */ -#define snd_use_lock_init (lockp)/**/ -#define snd_use_lock_use (lockp)/**/ -#define snd_use_lock_free (lockp)/**/ -#define snd_use_lock_sync (lockp)/**/ - -#endif /* SMP || CONFIG_SND_DEBUG */ -#endif /* __SND_SEQ_LOCK_H */
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/alsa-seq-enable-use-locking-in-all-configurations.patch