Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3520456pxf; Mon, 15 Mar 2021 11:23:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgLBWVZCV2dI1gsKSqUbkZrFxPHiNqMDgz9YixmHo24YuSljYEzYBryMzi2QuDU5HjrQ55 X-Received: by 2002:a17:906:b286:: with SMTP id q6mr25398204ejz.422.1615832579989; Mon, 15 Mar 2021 11:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832579; cv=none; d=google.com; s=arc-20160816; b=Mj+4x7qVuKCzpds0gnnYEbP104ciI44ofNmJJceT1Dc/voQ4oDz/jc6ulGOjQbuId1 xkLWv9bDnpULSUSmL1bZ88TRkYQ9R0TsZ2jLQY6DHVI0QjC2peb59Wwod1zIz9dWirDI Qr3uSet6SRhcJSWoWrjsLomu8hnvTmeMNHIDK0CN2SbTOZqRrBiRBkiVKCTn65k13Aap +M+PQvnn8QRxjx7vOz5JtEoJlr+xCaX+rlUJjQv5d+5JlyCVcxXNAiISRbyazzyaXIJF Eg6KNSEKNgQrbJxRAP+kBwmNhCPnrfckAqPFObwQitL6W8v5YtkJ1ySUv6m+WRxA00vJ wQng== 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=KBJNF3n0UsSW8w2GxzMbYrJddGk10NVOfe+l/bUM14Sr0RRxpcDhyAnxmtHy1Uq0tv vg/A5x5lD4BXo0Ry35tN9Bq7LVhfrWEqu995RtdZlAVFKwyhDZjOPsHIarg3Hn5eiD2A HBGpEC1k2d5vyO1B9rk/pPuJDQHf1cXmxYUnrfSu5asl97NyMv3VZMjdzP+jaM7uBNyz YXwSrHcFqOi1zwtKMK7EBoHyJaUmy7SRrS5fKkfM3acfHtvb44ijCO0AbXzEH0wjcIP3 pgyFMa38QhYxXiX1k7d6hr8fLzHM0Ga+cruLKn5s8MlwSJzPW7Kr6hAJSzVvBPNomWle kN9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="J0Xmc/26"; 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 gb35si12588792ejc.351.2021.03.15.11.22.37; Mon, 15 Mar 2021 11:22:59 -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="J0Xmc/26"; 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 S237647AbhCOOTY (ORCPT + 99 others); Mon, 15 Mar 2021 10:19:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:35186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232460AbhCON7v (ORCPT ); Mon, 15 Mar 2021 09:59:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B499864EF5; Mon, 15 Mar 2021 13:59:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816770; bh=22Sy2O0/sNhIpTplUZi3RFzECWze9MCTHRDGpGRufjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J0Xmc/26oVGTy3lsh2zQ6LDVoU5Mpi2YYLC3W+ybZx1+2crlp3S/68MKB158oieCL p34SBAJx6wuY7MlTqCTmYFRzrRLeKQ8reu2qF9pweuz/0iWQCLiv++M5yh8Y/3BdAq Gc163DTmHQKTRCHYgincjHlzruwrtrjvM/Gggmko= 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.10 104/290] media: v4l: vsp1: Fix uif null pointer access Date: Mon, 15 Mar 2021 14:53:17 +0100 Message-Id: <20210315135545.428211935@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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); }