Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3518221pxf; Mon, 15 Mar 2021 11:19:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC5nyI9Yzj4wKpl0dtd/sYLImeuFaCXU9PYEspV6Ff055UANjj/koYW6BUm6ETx0lJ2089 X-Received: by 2002:a17:906:3488:: with SMTP id g8mr24533775ejb.282.1615832372152; Mon, 15 Mar 2021 11:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832372; cv=none; d=google.com; s=arc-20160816; b=LZTATHzGn0nqK1sMhi1k0Rih6SUguDDPBg6DJTuo75kusSIGBJ/YQEbYuGtEp3MfbW J8o18zNsyPGjwFaBJIwi2FxRUAlLEKs9WKfmSqmfikm6OgRDGx8xjgkwEVh0A4zJO8V8 VRZ8mObTlruTJumS7P1PqdLpC7YPNUSr36OrCvI9yztUUt5f0Kw9jSmX5SqzFPPXei4x nxix/iUKK5eeL7bi3mm6M8oAtk3kNrs1ticP86X/WMsZITrvsN79kSeMVk+AOuyhJjsf 6xCFylYmfLRLQZKdwqpX5THCREftDEJO0uQiVvtZTi8wDtjRWjEu4Psp9f6kYq15ayZr KWZw== 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=8mtq1my1NHgOi7IFs8ekuvwwKx9tw/f92aOV8Bwti6M=; b=0W8QeXt9saMA8MAOpkiLXjSGovDPojDzvZpGBv5PAireIdPQDjzALn9ezpIiG09jdD IeDGW9v2IKXtc6bjRJtSzm8GawjmUnHNI3XWVhYHQ2h+sf9tkOJGtAo1ET2t//BYNXhn 8QdoOzgnUO1WpRM85JdAV5OR1dNie/XGFiAMexLvdX2VeyhEp0tzqESPnyCef0TGL9pm q0HB17RB9cc0jhmn7M45GjETV3jXQ6TP+JXNrxw5N6h0dZi6a4yhmyyHQyy34oUk2+vK 2Rpsw30zMizL0dkWj+IaFp5uUNtDflcadowhsUrVcOLXTKNCq+pF+V78XIxQuTNxAgUi N25A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Jk/XBHGg"; 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 z23si12306286ejw.362.2021.03.15.11.19.09; Mon, 15 Mar 2021 11:19:32 -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="Jk/XBHGg"; 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 S236932AbhCOOQz (ORCPT + 99 others); Mon, 15 Mar 2021 10:16:55 -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 S232661AbhCON71 (ORCPT ); Mon, 15 Mar 2021 09:59:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E0D6664F12; Mon, 15 Mar 2021 13:59:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816743; bh=BVQ6D2sJX+t8OYjd8r/XIXTKu0QBMuCKunDN/BZL3uw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jk/XBHGgzRJ7D2CFXmu18BfV9Dl93YXvp71LPV+0uDPttu7MK9rbrl/I8SlGUcVpN VCyPt4Xd/RuuqX4mj5no7R//cPY4vYwLwuIGj+RIS4myPZ+5nJ0sH/3roovsCzGJCI 1ECLOJzwMqXQ6vthWsUTiPiq14CR1IWDtYhZamdQ= 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 4.19 040/120] media: v4l: vsp1: Fix bru null pointer access Date: Mon, 15 Mar 2021 14:56:31 +0100 Message-Id: <20210315135721.306299342@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@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 @@ -243,7 +243,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;