From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x224LEwY5+UmMBdTBUYh/fJzqoJPwtp1xEMgBZN2A74GUDi9L7+CjDV6LF7Z86MvG17U8hsyO ARC-Seal: i=1; a=rsa-sha256; t=1517256485; cv=none; d=google.com; s=arc-20160816; b=hRcAlD+UbHi5JqI1uhhd2hxsqgjUiTvOQL3TB2LWTd8t1SY6G6lIpctGrpfRKbHi80 NLUw9eWbmcbeQe+ymEER+TqNgdJCWqlmCN5dbsrrcD9k1GHSi4wVSO6mzeKNDdE92B3d fZD6eBDya5gqGIEPsTPTMRiMg2Mvku9QnekpJIh4lO/ZA2HScRZAViF+0x9KCoKvlGWJ kfdKc1k9IXE9WGpTyU/UI+RbuTerSgLQ8JI2r0Xfyy/EYFzm1kdt2MJxpNATOx6luMoC 0GrpPnl4POvjyQWyCgFE9iL1b4AePPbrQXP6F2WSpUTE9AbN5Q3ShKjnRUe5Mc8pUhNW 4BZg== 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=/XRTfyqFzGiZC//EiElXAEYYI3145srzmCbWjd+qbcw=; b=q1vNHLLDB6XzzMZWmGYujX1DAntL7yWtuOxaeKRgjY4gVvHlvbW0usIy4r9g7fy0XQ mFgyeTixVef+Kp+Sj1F/OYfNjlGqIRiHaZaJM4lBAdkmtbKn2SNIRl4Vt/ChmwRm2625 SJtlTFw4djj8y0tNLvFgmCE5/UZu4onkIZLArwic4CL2NvDpQo6PHjgjjhI+Bh394Ims EEecrQERyy22r0Kmh77Lz/TIRF1s4popxGyBNREWsoWwhGJLbKuazD4DNvgEub7IsAVm poMMH8jxUd7Jib3KwwA0BzkUhxzko7ujV/dCDNnB9sY5v+Kfeca3AbrStX/JbLRhxEwU 8ctA== 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 3.18 04/52] ALSA: pcm: Remove yet superfluous WARN_ON() Date: Mon, 29 Jan 2018 13:56:22 +0100 Message-Id: <20180129123628.379224554@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180129123628.168904217@linuxfoundation.org> References: <20180129123628.168904217@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?1590958736043879597?= X-GMAIL-MSGID: =?utf-8?q?1590958736043879597?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 3.18-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 @@ -644,7 +644,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; }