From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:39790 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbdFZHAg (ORCPT ); Mon, 26 Jun 2017 03:00:36 -0400 Subject: Patch "ALSA: pcm: Don't treat NULL chmap as a fatal error" has been added to the 4.9-stable tree To: tiwai@suse.de, gregkh@linuxfoundation.org Cc: , From: Date: Mon, 26 Jun 2017 08:15:49 +0200 Message-ID: <1498457749124219@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled ALSA: pcm: Don't treat NULL chmap as a fatal error to the 4.9-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-pcm-don-t-treat-null-chmap-as-a-fatal-error.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 2deaeaf102d692cb6f764123b1df7aa118a8e97c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 14 Jun 2017 16:20:32 +0200 Subject: ALSA: pcm: Don't treat NULL chmap as a fatal error From: Takashi Iwai commit 2deaeaf102d692cb6f764123b1df7aa118a8e97c upstream. The standard PCM chmap helper callbacks treat the NULL info->chmap as a fatal error and spews the kernel warning with stack trace when CONFIG_SND_DEBUG is on. This was OK, originally it was supposed to be always static and non-NULL. But, as the recent addition of Intel LPE audio driver shows, the chmap content may vary dynamically, and it can be even NULL when disconnected. The user still sees the kernel warning unnecessarily. For clearing such a confusion, this patch simply removes the snd_BUG_ON() in each place, just returns an error without warning. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/core/pcm_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -2491,7 +2491,7 @@ static int pcm_chmap_ctl_get(struct snd_ struct snd_pcm_substream *substream; const struct snd_pcm_chmap_elem *map; - if (snd_BUG_ON(!info->chmap)) + if (!info->chmap) return -EINVAL; substream = snd_pcm_chmap_substream(info, idx); if (!substream) @@ -2523,7 +2523,7 @@ static int pcm_chmap_ctl_tlv(struct snd_ unsigned int __user *dst; int c, count = 0; - if (snd_BUG_ON(!info->chmap)) + if (!info->chmap) return -EINVAL; if (size < 8) return -ENOMEM; Patches currently in stable-queue which might be from tiwai@suse.de are queue-4.9/alsa-pcm-don-t-treat-null-chmap-as-a-fatal-error.patch queue-4.9/alsa-firewire-lib-fix-stall-of-process-context-at-packet-error.patch