This is a note to let you know that I've just added the patch titled ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures to the 4.4-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-compress-disable-get_codec_caps-ioctl-for-some-architectures.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 462b3f161beb62eeb290f4ec52f5ead29a2f8ac7 Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@xxxxxxx> Date: Mon, 25 Jan 2016 13:59:21 +0100 Subject: ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures From: Takashi Iwai <tiwai@xxxxxxx> commit 462b3f161beb62eeb290f4ec52f5ead29a2f8ac7 upstream. Some architectures like PowerPC can handle the maximum struct size in an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit. This problem was revealed recently by a powerpc change, as it's now treated as a fatal build error. This patch is a stop-gap for that: for architectures with less than 14 bit ioctl struct size, get rid of the handling of the relevant ioctl. We should provide an alternative equivalent ioctl code later, but for now just paper over it. Luckily, the compress API hasn't been used on such architectures, so the impact must be effectively zero. Reviewed-by: Mark Brown <broonie@xxxxxxxxxx> Acked-by: Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx> Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/core/compress_offload.c | 11 +++++++++++ 1 file changed, 11 insertions(+) --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -44,6 +44,13 @@ #include <sound/compress_offload.h> #include <sound/compress_driver.h> +/* struct snd_compr_codec_caps overflows the ioctl bit size for some + * architectures, so we need to disable the relevant ioctls. + */ +#if _IOC_SIZEBITS < 14 +#define COMPR_CODEC_CAPS_OVERFLOW +#endif + /* TODO: * - add substream support for multiple devices in case of * SND_DYNAMIC_MINORS is not used @@ -438,6 +445,7 @@ out: return retval; } +#ifndef COMPR_CODEC_CAPS_OVERFLOW static int snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg) { @@ -461,6 +469,7 @@ out: kfree(caps); return retval; } +#endif /* !COMPR_CODEC_CAPS_OVERFLOW */ /* revisit this with snd_pcm_preallocate_xxx */ static int snd_compr_allocate_buffer(struct snd_compr_stream *stream, @@ -799,9 +808,11 @@ static long snd_compr_ioctl(struct file case _IOC_NR(SNDRV_COMPRESS_GET_CAPS): retval = snd_compr_get_caps(stream, arg); break; +#ifndef COMPR_CODEC_CAPS_OVERFLOW case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS): retval = snd_compr_get_codec_caps(stream, arg); break; +#endif case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS): retval = snd_compr_set_params(stream, arg); break; Patches currently in stable-queue which might be from tiwai@xxxxxxx are queue-4.4/alsa-seq-fix-race-at-closing-in-virmidi-driver.patch queue-4.4/alsa-hda-fix-bad-dereference-of-jack-object.patch queue-4.4/alsa-usb-audio-add-quirk-for-microsoft-lifecam-hd-6000.patch queue-4.4/alsa-rawmidi-remove-kernel-warning-for-null-user-space-buffer-check.patch queue-4.4/alsa-usb-audio-fix-oppo-ha-1-vendor-id.patch queue-4.4/alsa-timer-fix-race-at-concurrent-reads.patch queue-4.4/alsa-hda-realtek-support-dell-headset-mode-for-alc225.patch queue-4.4/alsa-hda-fix-static-checker-warning-in-patch_hdmi.c.patch queue-4.4/alsa-seq-fix-lockdep-warnings-due-to-double-mutex-locks.patch queue-4.4/alsa-usb-audio-fix-teac-ud-501-ud-503-nt-503-usb-delay.patch queue-4.4/alsa-timer-fix-wrong-instance-passed-to-slave-callbacks.patch queue-4.4/alsa-hda-disable-dynamic-clock-gating-on-broxton-before-reset.patch queue-4.4/alsa-hda-realtek-support-headset-mode-for-alc225.patch queue-4.4/alsa-hda-implement-loopback-control-switch-for-realtek-and-other-codecs.patch queue-4.4/alsa-hda-realtek-new-codec-support-of-alc225.patch queue-4.4/alsa-seq-degrade-the-error-message-for-too-many-opens.patch queue-4.4/alsa-compress-disable-get_codec_caps-ioctl-for-some-architectures.patch queue-4.4/alsa-rawmidi-make-snd_rawmidi_transmit-race-free.patch queue-4.4/alsa-hda-fix-speaker-output-from-vaio-aio-machines.patch queue-4.4/alsa-bebob-use-a-signed-return-type-for-get_formation_index.patch queue-4.4/alsa-add-missing-dependency-on-config_snd_timer.patch queue-4.4/alsa-dummy-implement-timer-backend-switching-more-safely.patch queue-4.4/alsa-dummy-disable-switching-timer-backend-via-sysfs.patch queue-4.4/alsa-seq-fix-incorrect-sanity-check-at-snd_seq_oss_synth_cleanup.patch queue-4.4/alsa-seq-fix-yet-another-races-among-alsa-timer-accesses.patch queue-4.4/alsa-usb-audio-avoid-freeing-umidi-object-twice.patch queue-4.4/revert-alsa-hda-fix-noise-on-gigabyte-z170x-mobo.patch queue-4.4/alsa-hda-add-fixup-for-mac-mini-7-1-model.patch queue-4.4/alsa-usb-audio-add-native-dsd-support-for-ps-audio-nuwave-dac.patch queue-4.4/alsa-timer-fix-leftover-link-at-closing.patch queue-4.4/alsa-rawmidi-fix-race-at-copying-updating-the-position.patch queue-4.4/alsa-pcm-fix-potential-deadlock-in-oss-emulation.patch queue-4.4/alsa-timer-fix-link-corruption-due-to-double-start-or-stop.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html