Blob Blame History Raw
From: Takashi Iwai <tiwai@suse.de>
Subject: ALSA: kABI workaround for snd_pcm_runtime changes
Patch-mainline: Never, kABI workaround
References: CVE-2022-1048 bsc#1197331

The patch
  patches.suse/ALSA-pcm-Fix-races-among-concurrent-hw_params-and-hw.patch
introduced a new field to struct snd_pcm_runtime.
Move it to the tail for kABI workaround as usual.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 include/sound/pcm.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -404,8 +404,6 @@ struct snd_pcm_runtime {
 	wait_queue_head_t sleep;	/* poll sleep */
 	wait_queue_head_t tsleep;	/* transfer sleep */
 	struct fasync_struct *fasync;
-	struct mutex buffer_mutex;	/* protect for buffer changes */
-	atomic_t buffer_accessing;	/* >0: in r/w operation, <0: blocked */
 
 	/* -- private section -- */
 	void *private_data;
@@ -435,6 +433,10 @@ struct snd_pcm_runtime {
 	/* -- OSS things -- */
 	struct snd_pcm_oss_runtime oss;
 #endif
+#ifndef __GENKSYMS__
+	struct mutex buffer_mutex;	/* protect for buffer changes */
+	atomic_t buffer_accessing;	/* >0: in r/w operation, <0: blocked */
+#endif
 };
 
 struct snd_pcm_group {		/* keep linked substreams */