From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x225nbfYkjQ7meJn6Ls+UclAQURCQp7ffoXOz84GZ88k5JrC8gtu12UNBUGjaTW+IdiAB8C25 ARC-Seal: i=1; a=rsa-sha256; t=1516610902; cv=none; d=google.com; s=arc-20160816; b=1KbAX9zw71+Rz2XW6YVS2daFm0fS07OgL982rxNOUDJQ7em7r4kfvAbXBbypWeseTI QctnhBSpVNZyv2z4xKdbpXGr2njjiOoEAu8Auisj8uQ9FxZmMRFRRSNsk700Bj6LTAFH DH8mW8jHDJsdMLli1hAPXd6cZsAS3p+nr+QcVqsUeJ/RYgyjmL6+7KqlX9l9BdRhcwzF YcWKjMBsQ7Hv9O37pFeS+Dj9c+RXylK7OIiZWjGDghJREzgZnt2qhUHQTkcxTraAbs39 9IlRzqq+GyqzSgbyZPHx1B5OvTltq0JPzyCzzqhEwnz/VYSkn1WflsJdN1aCnsbVDxIZ EQ5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Ry0bFuKcnkabZYxyZr5QKiIEyv0bufK/q8uVqThDKv4=; b=TtdwAVWe7OHfxE05HKMfpbv9WS2feqKjQi970eTxZUF1dF3XZ07wfIyc2lNpqSeXQ8 SRWxjqSbNKPRztxtCAdl06skKb6zsEi+Wz3kZlOMnx8f9ZzQ7l5UnpK9fmlfGQRCuedo rQhVDesS/C8SELiu3zkiqysrwTCQmBrXu2evjSy7tc6Zq/Stjnf17BINvVLBE/RIYUKA l1+XD0bZ+M6BtIfJXZrPM7aZaWDfB7/c2X4zzHJWZ92YGtS+ZGgvaWa1CEktw3sDGss4 LT0REakSJ3f/vz3PzaTEDDsCx/PSu99f0C4ldm8xdUyIrhC7PZTPeitjqLtgaRQ2Zq0F uIEw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+7e6ee55011deeebce15d@syzkaller.appspotmail.com, Takashi Iwai Subject: [PATCH 4.9 05/47] ALSA: pcm: Remove yet superfluous WARN_ON() Date: Mon, 22 Jan 2018 09:45:16 +0100 Message-Id: <20180122083925.978583732@linuxfoundation.org> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180122083925.568134913@linuxfoundation.org> References: <20180122083925.568134913@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1590281368393371608?= X-GMAIL-MSGID: =?utf-8?q?1590281793213713472?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit 23b19b7b50fe1867da8d431eea9cd3e4b6328c2c upstream. muldiv32() contains a snd_BUG_ON() (which is morphed as WARN_ON() with debug option) for checking the case of 0 / 0. This would be helpful if this happens only as a logical error; however, since the hw refine is performed with any data set provided by user, the inconsistent values that can trigger such a condition might be passed easily. Actually, syzbot caught this by passing some zero'ed old hw_params ioctl. So, having snd_BUG_ON() there is simply superfluous and rather harmful to give unnecessary confusions. Let's get rid of it. Reported-by: syzbot+7e6ee55011deeebce15d@syzkaller.appspotmail.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/core/pcm_lib.c | 1 - 1 file changed, 1 deletion(-) --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -578,7 +578,6 @@ static inline unsigned int muldiv32(unsi { u_int64_t n = (u_int64_t) a * b; if (c == 0) { - snd_BUG_ON(!n); *r = 0; return UINT_MAX; }