Received: by 10.223.185.116 with SMTP id b49csp6371343wrg; Wed, 28 Feb 2018 08:19:19 -0800 (PST) X-Google-Smtp-Source: AH8x2268/6psSgnfxCz5MK2kIX/bw473Vl6A+bK4lZimPd6Z31B+uQ7H3F5LJOwcZ4qI3Ci40L+U X-Received: by 2002:a17:902:123:: with SMTP id 32-v6mr18859747plb.278.1519834758922; Wed, 28 Feb 2018 08:19:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519834758; cv=none; d=google.com; s=arc-20160816; b=kp4IQXAVwlVJQ/yB1zQeTR3f0ss8ges59dtGnKg1WCnEejp0hQr4AF+IZtHo9sXR2b b4PrFyiFRu00rDnKqGyTsvxWriaEDLV2XTn8pxSJkdhQ1PpfQ6E3rpNJnhkySgytcD/V 4ucCvwi+oc5VIuZQUGqYuE1+E8s1tyRzBgwNo94jnmoDMEv6KXVxa3geO6014qKNNzwL 7Qf6lOFQjQxDUcvRURgw5Cr+gs58PbgwZAKPmbM73zL+2g4QhFBdpPtij4/yzlFtqPrN GCSmtGVq5djmbTJcVNOrslE/cQzZ8wZ5cNn+k5m7d375jifdV6JKo2WTD1EBjL0g87Ex N1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=8LYD2TqJnDcsSJp22Rs0EecBQCYaliTsKiUaJlFN9u8=; b=jDLr3LIO9bPxsKnwibXopNUVwJ4cgUl8BGPWsvHt5z0tSUSVlwnrj6nv2u2YfeB435 L35RVogrtmvNECwDWpFLrMjtVL5t96kCVWhvqQFBd8CkAHbEuDZwuNjgvU2yUhPzSc7a 0SjdvJa/paWQEgwk334tfRnPhFptOaRiCWpkR62S8mq03Ch6k3jTV+iWpF+Et0B1Yzii dUsE64VsLrPDcn2dzT7jLyoxabIRB/gjEPr4+2mRHISuId0bLIrTGnwZg5qfbzYxB2Aq YUEU5k9Q/KYvsc8KtYqh0ps/g5GCT2aFJAIEFEoAEmExKuk8o1S2CP4dN3ijuOQ5pTXm UibQ== 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 a188si1170702pgc.183.2018.02.28.08.19.03; Wed, 28 Feb 2018 08:19:18 -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 S934937AbeB1QQJ (ORCPT + 99 others); Wed, 28 Feb 2018 11:16:09 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35217 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934923AbeB1QQG (ORCPT ); Wed, 28 Feb 2018 11:16:06 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yp-0006XT-Vv; Wed, 28 Feb 2018 15:22:28 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yj-0000Fw-Ow; Wed, 28 Feb 2018 15:22:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Takashi Iwai" , syzbot+7e6ee55011deeebce15d@syzkaller.appspotmail.com Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 201/254] ALSA: pcm: Remove yet superfluous WARN_ON() In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 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: Ben Hutchings --- 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; }