From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x225KcMhxNgyLH+clmoJraYkVN1tY3Oj+Wt6ar2dlRsb0LiyrIDf05T6vsanWAPRtVQxRoX4e ARC-Seal: i=1; a=rsa-sha256; t=1516610496; cv=none; d=google.com; s=arc-20160816; b=kyHy6XCKkFCxzqrmgbwjSaTSkp4D1kGIsTAK7h5bGuA1H5ZWKb/s1jHKYR71ImY8ay RUmzo4+j+Gs0YPAdSnCDsNv++drmIYAVxoPu1zYT4pXp2dSNg4EkzpkyYYw763csq0xX aBh0jJbw36rD3IeVFKEOOcXaDiqA7EtWxQRjwQiJQKSTpdYnOwuEeojWO8cBtr1alEdP ImiHeC8rhGoi8qYCEy+gIcl9Dl4McFSfEFOyLA89+cSHaf7iqsNqafixg9pdrY+HNmub HpyzLbziKarpC9Y4PKTecaRJX2lKScNk7S78AtHs4604W8QyDrSBfskOAYQR+AsBHfOW 5AsA== 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=F8qLxpVgm45JJuMvnAlF/D+qoAgLtCi/Xk7ZwHkKRbU=; b=DnmCaX1L828sbLrf77GQfNCv6dqGcGrOXwN5tQJijntvI+NLj4cXhsutwAni3o4P7T yc+NozF0O/+OHXiUF/5C3XgprujJPXMU3IabaD6G4vKEbnUwfyxDwXHF1TdI1VrZ47fh fjLNP3PmSs98a+fH7nvOf56sj/wwadVxOMlkCuI4zeVSBr4PNjXY7ixxFExOiYSfgPws hMzqaxkAHNE7j2En76TTYMBO1Chmv68qjORKXZ8meRMd56ZoxrqC5V24gfWopnJhZTH/ 1lDJcPdUHU5uWOD2fobM9ZCpssGoPO5xxdkekp6aut6PZFLfyLhVWPQq94z43xSh+RkJ tN7g== 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.4 23/53] ALSA: pcm: Remove yet superfluous WARN_ON() Date: Mon, 22 Jan 2018 09:40:15 +0100 Message-Id: <20180122083911.295039699@linuxfoundation.org> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180122083910.299610926@linuxfoundation.org> References: <20180122083910.299610926@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?1590281368393371608?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.4-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; }