Received: by 10.223.176.46 with SMTP id f43csp2689354wra; Mon, 22 Jan 2018 01:38:59 -0800 (PST) X-Google-Smtp-Source: AH8x224TGEYYLEcAv8BoD+3eq/TM3YMomBiXMk95dIGZJ1wDaBcMbooBg/+uxT8DMAe2DThaCwOR X-Received: by 10.98.246.8 with SMTP id x8mr7873504pfh.234.1516613939736; Mon, 22 Jan 2018 01:38:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516613939; cv=none; d=google.com; s=arc-20160816; b=jmMw2Q31wLPg1sEu6qoseDY6uBzRGjgGzDClAxspdQ4G/zza9NsN4AfQzAHi0G2pyN Coduk8KX1psLr71WTBVI3lZzrHs4Q6/1C5RKoB5aNwbDrC8kr2h6DakDlJrLGYCgWLwV 18ywxoVuUq3nuDCYH7nJkXGEfaJgUB5+e8oiqXYuotUcOIBvdCCrX+GcBUoULraXttEf fxy9bugKlr6249W9sV68Z/auUSUb9pDSpAM25qYVw0eC8XaCyw1vpzuEugbqah0vhEzK EIe3IOWzsL57OMRcbtRgakDEK/eHOuZ9fZMolud4ouC2zx9V37qY0GTCLKlBrAAfUElr tsRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Ry0bFuKcnkabZYxyZr5QKiIEyv0bufK/q8uVqThDKv4=; b=CUh26+bZb4vza+THQx7Dtd55gnMSazs8X2nh9Bj7+fQqxWyLhKeIHZusHcq449Vjru 42ugNfVyBPunAQk8IJsUZTM79j12bD70YdUkVROnaRKx4RlQusOxVb/x3uSvaYacBDS1 U2BPUKevy6LJgwfkk76dQXAy3r8R/9CXe9E1f8fUCZlWxrWPM9MzKtpqfpaMbofAM54j kgEHu96MaJyMA0ZgzFw6EDmGrJMOQFZmxw0C44DFec+PWN5RfnFW1yo8wxiOQvVghiTU 5Ee3ZsRAoJx2ia9m+g5RzlC7Rk5JZInW8MxvMJ1U0dwjTdSV3iHiVomrVvfqmGk4f1d4 lDrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p71si15210836pfl.404.2018.01.22.01.38.45; Mon, 22 Jan 2018 01:38:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751945AbeAVJho (ORCPT + 99 others); Mon, 22 Jan 2018 04:37:44 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60348 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752226AbeAVIsV (ORCPT ); Mon, 22 Jan 2018 03:48:21 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7FFD8E50; Mon, 22 Jan 2018 08:48:20 +0000 (UTC) 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; }