Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3520104pxf; Mon, 15 Mar 2021 11:22:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJhnuQRoDatS/srrGW+jib/sHu84QG6fFuoiuXfminsdikYXSw3O4mOHYMRcoHSvN9JUQ1 X-Received: by 2002:a50:fd8b:: with SMTP id o11mr31322799edt.346.1615832548811; Mon, 15 Mar 2021 11:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832548; cv=none; d=google.com; s=arc-20160816; b=mYfdcTq7vI8qnJ7L2q9fobJmnT8B5imSY4Pgef/ROfQtxKy33AJ+o0X0ijEs/jrCBB MV0BwriEHiJpelaVWp+T/Hj7d9cl5FOqIcWLqAgqhhDxTG2QmH1TVlIV83hdAKeXJAVO n5fO9saMiRawpQNUYpi3PXLhRs9JmTXm6dTY2Tty/4WgrCnLTl6go8jl7+eEz9XZnM5D RM2Q6SZ2/otxNlEsYiRz+UuBN0/syH0zRrAMm4C4AWGZIAKXJ8WG/ilpH+fNKvB3P3GD 9GIUmFWQndsOtMpzN5/jpG4WlgHHqo+N48F+Vo0Z+xjyKxieQeJnQwcyOBr1XqYKv7E/ uaIA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AZozpD8d5BCk0jynwUywSPRlHKLitGDf2J6HHLMe0q8=; b=GG1qUIHNFg99g0oW/amyChpfNAdVYn5OmnJqCiRvkBRDH5ZfSYdz026QDff4JoyiEI C3IQaNr8A3Cy2JtvINhK90cAfEyCbP463s5n4Pl6G10Ht0o93GAwRbNbQvUPgO1/gBTA nBFRO/OUNp4d3oe/SdkimItMMRC3QPUCv395ByeLjCVZyWJp82D/c9mWYGbAYic/VJa0 PIOhEzW0HFxs0G9WRKCbB3B8uPUBl5uebAxcYs94ptaAjdL3lwOR/HCs4TbYh+M/ORt/ rnUYh7y2Fyt0j+7xydMwkisAbXNh9JdWU5Ds7LffjTVExTMXpuEeAVZGmZeFR86sLwTL u+tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hm+JDQDM; 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 y12si1753697eda.74.2021.03.15.11.22.06; Mon, 15 Mar 2021 11:22:28 -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=Hm+JDQDM; 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 S232315AbhCOOUa (ORCPT + 99 others); Mon, 15 Mar 2021 10:20:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:37612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232788AbhCON74 (ORCPT ); Mon, 15 Mar 2021 09:59:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5820F64F06; Mon, 15 Mar 2021 13:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816777; bh=crdHReBj3aMqOM/98vwY7tguD+5UrMxdp/QNat72IUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hm+JDQDMuBdDaHDjdCLrBJeOSg4VhZTJhfz/Ng3HWs8Q0LJzmD27FDo2HSbZFKJvW IxCrK/1XcHth6LScbKgo7hDtc3Xvi/G9SpU+3VznTZa1ybLeFDqVf7qfR70ci9fSBm FJaiCxvtZMJ0eRZYRD9T9jynPdmb0ZjpkhhKEccI= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Biju Das , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 5.11 119/306] media: v4l: vsp1: Fix bru null pointer access Date: Mon, 15 Mar 2021 14:53:02 +0100 Message-Id: <20210315135511.682464855@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Biju Das commit ac8d82f586c8692b501cb974604a71ef0e22a04c upstream. RZ/G2L SoC has only BRS. This patch fixes null pointer access,when only BRS is enabled. Fixes: cbb7fa49c7466("media: v4l: vsp1: Rename BRU to BRx") Signed-off-by: Biju Das Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/vsp1/vsp1_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/platform/vsp1/vsp1_drm.c +++ b/drivers/media/platform/vsp1/vsp1_drm.c @@ -245,7 +245,7 @@ static int vsp1_du_pipeline_setup_brx(st brx = &vsp1->bru->entity; else if (pipe->brx && !drm_pipe->force_brx_release) brx = pipe->brx; - else if (!vsp1->bru->entity.pipe) + else if (vsp1_feature(vsp1, VSP1_HAS_BRU) && !vsp1->bru->entity.pipe) brx = &vsp1->bru->entity; else brx = &vsp1->brs->entity;