Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp327273pxk; Fri, 11 Sep 2020 08:02:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymeNoHQmqM4piZh9TU40diAjPC1dUolc/48Q/yHqUtN8IyRQi7XaOuDUTDURMYpsr9OFbB X-Received: by 2002:a50:fd19:: with SMTP id i25mr2502680eds.142.1599836529335; Fri, 11 Sep 2020 08:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599836529; cv=none; d=google.com; s=arc-20160816; b=ZEcwbg3HHLImX1D75v0ScjWNdui0yOYDTdOpSRr7Epkax1KS99McS60VhFbPXqtpTP ZHhKhrksO2mWraP8OENp8444D3H8z4Mq1aeNN+4E4HYT+tnxojVOaMj5KLvQcNyrIVoI a1+8XethKep6cquzHQ5XcQaqIaofJ6lygPwyVIcUKG3rO5b63kyei+o+4c4s5fl9QCz+ +u4x0yZJ5yNq5IuhMVaVujhnWzfMu3B5pyQpZgSKIsWfI04q7qMDjVDtT0BF8lvwJ7Ly 5XyJkeEOvZgrJ6xLA7L+cAI77VMthRJhQzWLqWIP3eaP+vERc8MnZ7PLHr6Y6q8gs4O6 SjJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vbCIUSNE2ofEMekiMcOetf8YCW9+Bj0mXxAcSGc1wZQ=; b=maj53S/lmC9FIRKSKjSeVcxvRZXPHvtN2V8zwBWrFtkPXt2oMLzWuQ9wEBERgTTnYq Rb5Fb9SLdlgJucf2KIBG11XF8dlX6jowQbKZ4ZTcbeMRpnDhbAIerSCwpa+A0ONmJ/Fa bRziaj90XPtWQQtHJUt1cm+ZxpV4keYDG4P0a8kH7Hf3/QUdgUFNhq85ftSJQfxfGagY 5WiKf/VTl6NuP83EcSDnF3oai7kzBmdTIkELL3cDgVvmEsXaRXumBVFJpGg/DnQsKzQF 9V29yWmf+BhRRFam07IJBM70Pwhmr3BTy7G75U+hImfEqA+Zvh7wGUSebFJofCFydR0J bLzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MVeDAuWk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si1486806edi.78.2020.09.11.08.01.21; Fri, 11 Sep 2020 08:02:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MVeDAuWk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbgIKO7o (ORCPT + 99 others); Fri, 11 Sep 2020 10:59:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:54386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbgIKNCU (ORCPT ); Fri, 11 Sep 2020 09:02:20 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B2C1222B8; Fri, 11 Sep 2020 12:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599829035; bh=ClG/J2D28CSekcsEzvDrVhqfY9dWzpT8JjtNaDePcb8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MVeDAuWkiA7o1MJosvUYy92ZX3ltQWkyWtE1ngLOI8Q6BefPwyC7GOFOXT+PhKtTZ r4b0GZCAU7vXjsRdLWVoBv6Aa0Zm1dQluBuVD6n+DX65+mlgiJvdpkV52eF2tgVxue UZE1YbQrvTIvuxfpSD47NKXwe1Q+to3ozNpver1A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+23b22dc2e0b81cbfcc95@syzkaller.appspotmail.com, Takashi Iwai Subject: [PATCH 4.9 41/71] ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check Date: Fri, 11 Sep 2020 14:46:25 +0200 Message-Id: <20200911122506.974371137@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911122504.928931589@linuxfoundation.org> References: <20200911122504.928931589@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 949a1ebe8cea7b342085cb6a4946b498306b9493 upstream. The PCM OSS mulaw plugin has a check of the format of the counter part whether it's a linear format. The check is with snd_BUG_ON() that emits WARN_ON() when the debug config is set, and it confuses syzkaller as if it were a serious issue. Let's drop snd_BUG_ON() for avoiding that. While we're at it, correct the error code to a more suitable, EINVAL. Reported-by: syzbot+23b22dc2e0b81cbfcc95@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20200901131802.18157-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/core/oss/mulaw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/sound/core/oss/mulaw.c +++ b/sound/core/oss/mulaw.c @@ -329,8 +329,8 @@ int snd_pcm_plugin_build_mulaw(struct sn snd_BUG(); return -EINVAL; } - if (snd_BUG_ON(!snd_pcm_format_linear(format->format))) - return -ENXIO; + if (!snd_pcm_format_linear(format->format)) + return -EINVAL; err = snd_pcm_plugin_build(plug, "Mu-Law<->linear conversion", src_format, dst_format,