Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp505508pxy; Wed, 21 Apr 2021 08:07:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOSTwpv32yvbPKNK8ladeNx9xsg9Pa/nG+ikJGIf+Xd8ehN5uto1JyRbEOEhG0ZPl/heR5 X-Received: by 2002:a17:90a:6be2:: with SMTP id w89mr11518999pjj.130.1619017651802; Wed, 21 Apr 2021 08:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619017651; cv=none; d=google.com; s=arc-20160816; b=hc+N5Y5+G8erH+8Q5bLOkUcCe23c8ZvYtERpf2HBrdKfoz3+T4eBr8TYicEXdJnbzc nL4oyWTwRAc7OH21aVC1xtKLHw/qnEq+PoMTzkxnYhnZWHvcT7jq5fv8vstCrzDwkdDu Gur6I+zJekBsVwVG/k3lMeuBuj9oZhBt50u3u25n66Cduok1uwVVMGcrH5PPl1rLTAfJ M8BIXRvfTuyt15Zcb6G3wMHr/17LLWG4BoY3wiAw9h2CAsPbG7+BbPP24RQ1JD/UC8Md /P6OGC0Q9LTHLjInL1QtBvx2Kv0zvD1vEcZHPzTCIdz8zN/AekucTePgfAc0Or2usMVq JnDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qUSIqzicPsLGIwPo9GJzSuSJO81iRcKRQycM/mYnsr0=; b=tdh/16bebR0J8UI1hT6YHvZ+Kek8JzFtlfbhrZChURbs1WbFhX+22nkwNNBC4S+LjV y/gVvIy+W42XILfYuOj25U3QdIRbXwdGfbZDOGxpo21CsQHL3i/7Qex8pEKcPjdyOm41 Z/xdft8DquF4fvM/0UmI4WbgpGaeRjpfK+vgyxZpMlrVstegQ4+fQ4A8ZC6uD/9g76l9 Sc/sjF8O1ePFjjul+cR4vTxjK9QoGPDaW52cUxZ6penWf5l8Upb7mdv0VwBrXvINsfzc u/CAzU2L5IlCvcT1bVuFYNkVEItkNuylZRuyB6iRfOhqP6V2E2IbOXr2QM9hrWJUe5l7 V+VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="SUN6rHM/"; 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=pass (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 t25si3007805pgu.261.2021.04.21.08.07.19; Wed, 21 Apr 2021 08:07:31 -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=@linuxfoundation.org header.s=korg header.b="SUN6rHM/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239587AbhDUNFJ (ORCPT + 99 others); Wed, 21 Apr 2021 09:05:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:43838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240724AbhDUNER (ORCPT ); Wed, 21 Apr 2021 09:04:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3288A61456; Wed, 21 Apr 2021 13:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619010224; bh=WiaT5Zae82YRFi67K4EqsuhyZXKsltlFHRzd5GC+MBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SUN6rHM/rKBdm89pQ2hlnDgKh90oiaHlNW/1DrSHKnN/apGihvrpjUP8awvv2jR/T EX2aXAcfVOoMYHY6aA+d0opwRBMxwZiAJA9vk45SZTxPTOJtxQU2drZNo7ldHuDcJ9 0MxemuoJkpAGTcj+7Ng2AbUTfeOm+qGjASv1RfWo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Aditya Pakki , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 057/190] Revert "media: saa7146: Avoid using BUG_ON as an assertion" Date: Wed, 21 Apr 2021 14:58:52 +0200 Message-Id: <20210421130105.1226686-58-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210421130105.1226686-1-gregkh@linuxfoundation.org> References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 1ec4c6efe23154b4ab44c1a34dbc0eb121eb614a. Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota). Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase. Cc: Aditya Pakki Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/common/saa7146/saa7146_video.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/common/saa7146/saa7146_video.c b/drivers/media/common/saa7146/saa7146_video.c index 7b8795eca589..d9d7d82ca451 100644 --- a/drivers/media/common/saa7146/saa7146_video.c +++ b/drivers/media/common/saa7146/saa7146_video.c @@ -345,8 +345,7 @@ static int video_begin(struct saa7146_fh *fh) fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat); /* we need to have a valid format set here */ - if (!fmt) - return -EINVAL; + BUG_ON(NULL == fmt); if (0 != (fmt->flags & FORMAT_IS_PLANAR)) { resource = RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP|RESOURCE_DMA3_BRS; @@ -399,8 +398,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file) fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat); /* we need to have a valid format set here */ - if (!fmt) - return -EINVAL; + BUG_ON(NULL == fmt); if (0 != (fmt->flags & FORMAT_IS_PLANAR)) { resource = RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP|RESOURCE_DMA3_BRS; -- 2.31.1