Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3513482pxf; Mon, 15 Mar 2021 11:12:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8TgZQHD9OgopDsg4/NKUrJWqPsCVNEl7rNhyR9Z08SBZ/cdhNpeYw5W+Ai8BeyRq2c/I/ X-Received: by 2002:a17:906:d71:: with SMTP id s17mr25776641ejh.126.1615831960784; Mon, 15 Mar 2021 11:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831960; cv=none; d=google.com; s=arc-20160816; b=vj7wqmuC7ZiLCMCvsKn43+1RZ5UtNq+sQtP7UiW4b9yQpNliacrOYt6eXWM4tXGHFy pTArNeO0XZ71rG9yWCg5xSTUxMd+oA88Qs45v2894wJNnZ6gIBuG9SBZX2r1Kp/0woTK tu3Sl1rGoHyXEaq4R/apLaYfHL9nr9rMT+3G690YXXNZ7SG0T4kpieRx9MKxoclzBTuf fCanKTqsEzolb0vUw/ktltQWPaSN+WJKFEtIFrD4bwLGr/9EHhm1zM7zKU7PevSxqzoS YFeVWJtB4g6vp7KmNkKWFPyoSam1yhUIJzIM+TMHBnAPCG3Cg5evckYrB9d7c/NSAx8i JJcQ== 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=5smu/um6c3dPrEcbAhIUo5tZD9KXofsvwjisoaSvyOk=; b=L5PdFOAKzx0E6q7odcIC0rmze5xEWmELuIBgEE8GjPu2JzW8+rw3q4XpiR+qsuSq4p E4fghNxVUCSQPviYYe6OuBm3SZhZwxYjcHDHSWp4UZMPjMwaKNutHthIBcOR44NBrtn2 nIz98SjFdU1zjA4PzQoX1GTfHIiiUPgCaVw211F7bv/G3jpdRG+nJS2vcypInycf+BMu +PVYTrgXBoTir3R7lpM5JVnVbgKUeQlK5LBz8g0srgWheSnnIrgcCqqF9D/3pg+C0E0a pbo2l5S/do6rMtOfmtoL2J1kPfmUiceZVdBzew4GF0OVeB0ZmIEll/5lbbm8pvUhZYaU wx9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SBC1KxeL; 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 t15si12155998ejx.751.2021.03.15.11.12.18; Mon, 15 Mar 2021 11:12:40 -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=SBC1KxeL; 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 S231233AbhCOOLl (ORCPT + 99 others); Mon, 15 Mar 2021 10:11:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:35446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232311AbhCON6X (ORCPT ); Mon, 15 Mar 2021 09:58:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9784764F33; Mon, 15 Mar 2021 13:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816701; bh=22Sy2O0/sNhIpTplUZi3RFzECWze9MCTHRDGpGRufjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SBC1KxeLhLBPGiGXQEtl8KlJEUE1bqA+MvfmzxlZZAQLmGgXLO7l3v/qybf5eWDuj udjY53sZjX1y3BHKnMbvjeRGg1HXGvSZwA7x/3xXVO9poHNiFmY8dKcjQ/OWt5JxBQ e2M1ZnXy1zspWBk8z1fJPpXJrAngFPF+7a4HP1eg= 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.4 056/168] media: v4l: vsp1: Fix uif null pointer access Date: Mon, 15 Mar 2021 14:54:48 +0100 Message-Id: <20210315135552.200217160@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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 6732f313938027a910e1f7351951ff52c0329e70 upstream. RZ/G2L SoC has no UIF. This patch fixes null pointer access, when UIF module is not used. Fixes: 5e824f989e6e8("media: v4l: vsp1: Integrate DISCOM in display pipeline") 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/media/platform/vsp1/vsp1_drm.c +++ b/drivers/media/platform/vsp1/vsp1_drm.c @@ -462,9 +462,9 @@ static int vsp1_du_pipeline_setup_inputs * make sure it is present in the pipeline's list of entities if it * wasn't already. */ - if (!use_uif) { + if (drm_pipe->uif && !use_uif) { drm_pipe->uif->pipe = NULL; - } else if (!drm_pipe->uif->pipe) { + } else if (drm_pipe->uif && !drm_pipe->uif->pipe) { drm_pipe->uif->pipe = pipe; list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities); }