Received: by 10.223.176.46 with SMTP id f43csp2661644wra; Mon, 22 Jan 2018 01:06:22 -0800 (PST) X-Google-Smtp-Source: AH8x2271/+6RfYwGUiLxoJWbyGy+LnpgF86cZ85BBeweJJjlat9owqfLnU7r6IB46JjxC9x16ex8 X-Received: by 2002:a17:902:8b82:: with SMTP id ay2-v6mr3087900plb.17.1516611982619; Mon, 22 Jan 2018 01:06:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516611982; cv=none; d=google.com; s=arc-20160816; b=nyBKDC4mUwQyn0jzG41eq/lIVy8wCld3udenx4KqNJu6VdJU0CKmTPnAaSmarUM3+T i/vgJdeC/+uOYNZsnSizjFfxaJgEVXePhpBWdu3zxgmk8clxxOzZ0+vjZTzHbvphIHzs xpJs6h431mavpuPgGBfNtk3JtEIf+Oc/96G4fuZ7f8cT2kJE3DCHPii208oV81mmcWvV dSVFH31FyBtX7eKHCutCXtLsrI1WhmvsCYP69O0kH34JxuzSEGjg+zEG7N18tFAGDIH2 Io/fo2/skWw79hsKEjwBgZN/hE11lD3tFYf6qBRhJeTLemQ8R4aOJVALVmZr551ELUSW u1PQ== 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=ktPO7yzU14oG+Ree+nUsV/BoVR2rv2hFZDKUs0BTlOw=; b=TStZaViucip9a3bbIHzd/RWbPk2PGpvHg0Ow3OmtmWAU0KRPK06zdvMB3AxeoeUW/7 NGmOCzoVtFOFG7bQEsTqpBqrPz2k1yEpEPIN1pyYVxC2Hp4b+rO2Ziod7sVbeuNArK31 wSu/wLPnP/5uYUcblNTHXYKV48rjtTKz3zDiQQyJP/mCP0wOgZnNsgjIPp60laVV6B1Z SERg7kwhuqxwHXJ87cc8mBKjP/sjr3gvwZyuWJp1yN0+nNZh08g2n1k+iGdwWLkN0QQz ux31ubX45nxz1Z+Hs0LRnl7gzWuISPEO64yJxdtHnDkYePzSTsRUGtoK5JsB9iAKmVA2 TSUw== 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 q127si13484900pgq.711.2018.01.22.01.06.08; Mon, 22 Jan 2018 01:06:22 -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 S1753393AbeAVIwp (ORCPT + 99 others); Mon, 22 Jan 2018 03:52:45 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:33742 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753375AbeAVIwm (ORCPT ); Mon, 22 Jan 2018 03:52:42 -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 8CC5CE5F; Mon, 22 Jan 2018 08:52:41 +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.14 19/89] ALSA: pcm: Remove yet superfluous WARN_ON() Date: Mon, 22 Jan 2018 09:44:59 +0100 Message-Id: <20180122083956.587551471@linuxfoundation.org> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180122083954.683903493@linuxfoundation.org> References: <20180122083954.683903493@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.14-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 @@ -560,7 +560,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; }