From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227R6VWmsd9Bc0Un/vEdUQRXDap1hGcoJfd1nOyfyfkO5eOHMTALUVooj2en4wNl9i2yhAhL ARC-Seal: i=1; a=rsa-sha256; t=1516611163; cv=none; d=google.com; s=arc-20160816; b=ZXXpLSjmWw3Vz9ivgONtRughMwtcjlGIwnP/3rUKBaYBMlZvqbDaOwSe49bWIE+w/u PUbPUC89j1hN9M2mt7ThwrDIaIJ/EhOdjhRFqbDuKT8qOJY9T3hkEPkg+pCjAz5CGrRj o8x79chXs7vEo2M7OnTuuNzTMYF6xTvabups1rLt5s/7w6taLO2C+y7A14u7sB+n7QYm fK/VLnp9fl2RpEh571cZOqnpUazSmmwkx77Rx4kqSAnBvWKjsOdireC3XMJs/iLwRy6F i/yv8S1whSe3JloqDqZO+s8M0R8M8A3CqnidqGzfvUnyXy1V9ujQONP+52aoJz+ZFV/j HUAA== 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=ktPO7yzU14oG+Ree+nUsV/BoVR2rv2hFZDKUs0BTlOw=; b=qAsLAptfZyyIpAN08b0EeZK3WToDmTqZ3jl4ZfXAi8im+cbY9rTGpuKprleeoa3f1Q 4nEHxW7fee4usu9h5nRhqz5sqvQVa68fdWUxxjqbpsx817p6CxHZ6g8vXICMTHfHL0Bb gr/ZGSdKv46iqbHxFqAHRIPmAMOMUCFYpY01dP1H0oVpdJc9AynonLPKzi14O0kB6zh0 3DX4u3RT0XqweyNllvqGyYu9zBUUQUKFwt12WBoic+ISaRpqLO01aFUm7xUtXwvRbH4Q wqWBvUMQt8g52EHmjRGIWHVjS7WSsxa8i96AqQ4y9Y8yDqJ752hLE4JJvjM0JKzp5hPM v8yQ== 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.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 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?1590282067486844833?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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; }