Received: by 10.223.176.5 with SMTP id f5csp3428077wra; Mon, 29 Jan 2018 13:02:32 -0800 (PST) X-Google-Smtp-Source: AH8x226Pn3gmPArByeFHYczUFzL6oxx48+2JEkBfvjJdSkrXpapz7sDdQP0MLKvsis1Zesbdrff9 X-Received: by 10.98.58.194 with SMTP id v63mr28153815pfj.36.1517259752846; Mon, 29 Jan 2018 13:02:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517259752; cv=none; d=google.com; s=arc-20160816; b=Sk/hxsz4YWKrhM/brER7vv0lNHxqaevrCu7+k7E9ksAExXboFNETpapRSaa+6FZnYy ezc9RtmK2BUCM2qjO40lhK4cy/T7GMUnaClB3GHNP11MmrlviaDaSu4u64ragTi0GDnJ nVDNC7KxHkoyI1SOYw0MVHSiIAtSSMomcQyzzME9yxnAqaxDzrcySyy5/z/UEQrsZ1jP CB2R0a33bKdKt2E9W0LEtAbBm8GImiYkvvhcMnW7fogP8Z7E0H1x5V+x0TMTLOKpgtCo lavxL6QoiUf1NdSh5BTie96acQvN+lId9B2ng4eSnrtJmd/iPn91LmMhF5+0WtMxbYLb lmRA== 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=/XRTfyqFzGiZC//EiElXAEYYI3145srzmCbWjd+qbcw=; b=pnJDcnyGb5jrUVDsW3Pmm67VH8O9NjrRWrpB9pLgkNN1/Vpxx2cSqTVg+b/+tgTMgq szVaM3FVnAiGU5PxbjaOlNaC5MIDPG+VcGOMytMaxriTCBZIWotFh5USXPE7YZNjovKc tAkZPRywkIfo0xSmQR898d6nCdnNKpEk7zjlsy7eB4P//qo8ZJFrTdKZF0MnBYqhimpx uU6CEg3nILb1SKj2n2kdr3Tj9kWYE3zb3fKUI/TvtRGEMEP5vFSJd0wmeUcRegnvKmYy RchQcg9rxXz9yw7JBCoieTCXnEPnAsRFf8tWZ4G2FdwmmCxTJEN2nGfPFqibzYykMmSi wrmw== 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 j11si7988941pgs.614.2018.01.29.13.02.18; Mon, 29 Jan 2018 13:02:32 -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 S1753032AbeA2UIM (ORCPT + 99 others); Mon, 29 Jan 2018 15:08:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51872 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752982AbeA2UIE (ORCPT ); Mon, 29 Jan 2018 15:08:04 -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 779A62E86; Mon, 29 Jan 2018 12:58:06 +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 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; }