linux/debian/patches/debian/alsa-avoid-abi-change-for-c...

34 lines
1.2 KiB
Diff

From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 29 Jun 2014 02:05:57 +0100
Subject: ALSA: Avoid ABI change for CVE-2014-4652 fix
Forwarded: not-needed
Move the new member snd_card::user_ctl_lock to the end of the structure
and hide it from genksyms. struct snd_card is always allocated by
snd_card_create() in sound/core/init.c and user_ctl_lock is used in
sound/core/control.c, and these are part of the same module so they
are sure to be consistent.
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -121,8 +121,6 @@ struct snd_card {
int user_ctl_count; /* count of all user controls */
struct list_head controls; /* all controls for this card */
struct list_head ctl_files; /* active control files */
- struct mutex user_ctl_lock; /* protects user controls against
- concurrent access */
struct snd_info_entry *proc_root; /* root for soundcard specific files */
struct snd_info_entry *proc_id; /* the card id */
@@ -149,6 +147,10 @@ struct snd_card {
struct snd_mixer_oss *mixer_oss;
int mixer_oss_change_count;
#endif
+#ifndef __GENKSYMS__
+ struct mutex user_ctl_lock; /* protects user controls against
+ concurrent access */
+#endif
};
#ifdef CONFIG_PM