Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3518643pxf; Mon, 15 Mar 2021 11:20:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7r2zNGhIP1AIgpj73G0JoGbmf51GRB6QWJiHiX77IwmQLuWszu35TWPfVv707G6YoIncD X-Received: by 2002:a17:906:7f84:: with SMTP id f4mr24446252ejr.525.1615832415825; Mon, 15 Mar 2021 11:20:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832415; cv=none; d=google.com; s=arc-20160816; b=ANxzD6vNE/SGwj6MS+7RvGR2PWBKtcl1YzZUue6Xhyrd8x/YVYNLWA7lK0fOCQ/Alp 2cFCkGt3Ou/j2SHziOfkZgf1ntfNVc3n9ki1WjsW22lmv6/CbEp3Sds7Pn9OmAg02SqA 0HW+Vf3Fjc8f83P2hTro5eZJhJKXywxELazZ06V7K/o5ipsC7XCcE1owWklaAtbIChC+ pZFZUlFyeYj85SAPrFeXO5aMmT98EZ/ynsW3FVwN8dIuXm9HH57StaRmHnFEmKhdt11W S9oybptJIaGrSssYNZAVUxGim5TIFUVy3Jgu5ML5zEFxCdMgN8svt4J/3ogd9v7Uv477 /rNg== 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=4XyGVMbfZ6n4sgz9eGA8rdtdiySxlAnplxGDJzWJYVc=; b=kVU0VBOex5WFIclT0XSXDV1tcKANpy7yQhhCYUMTAb0vXSwIJvJmlVIRB6h/4EUpju oVGUoegFewRgInxesIBE9IwHy7ij0peYk9fq+dbKUcUvRBoo7fOgQ4ByIqixeDmbSU/I Hy58JgeJ18YCa2xsT6sxKLIksOADP2dpEbr0M65+5hsVK3f1SWoWZuBjD62l8E+EgI8P njEbia/gP77F3fVKeVa/mcjLKPBAZQCzuF7Ow064jMy6tkzclF2NWBIa8iaDbCpvuy/e Y4tdEx9fsOFiDiw3zt/Rvmizd9Ht0iVPBVlvTk7YtqhflkQirplITWpbexZGX3omeNyV NPRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="xGNR/Pou"; 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 t22si4219972ejj.746.2021.03.15.11.19.53; Mon, 15 Mar 2021 11:20:15 -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="xGNR/Pou"; 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 S237121AbhCOORU (ORCPT + 99 others); Mon, 15 Mar 2021 10:17:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:37476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231566AbhCON7d (ORCPT ); Mon, 15 Mar 2021 09:59:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4C56B64F4B; Mon, 15 Mar 2021 13:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816741; bh=WKC0+8Eb6unEngs3+mtaTYTy4SIvzA36mNKqixMKBWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xGNR/PouB3NEs8roX0xZ5C0SlFe/7nUAl4X1Q+cIN6yIvBmdQa1byid8TFbnVGeWi 1IYte/YLNHDjgBeVCw2+Rp1gYu5pBeqpzkwT9xN84x6ayEU4bRFExI102T3unn5YpV EjfPEPKFpOP80RqcH0kaPtEwrgNQgnkyhoBVi6GE= 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 039/120] media: v4l: vsp1: Fix uif null pointer access Date: Mon, 15 Mar 2021 14:56:30 +0100 Message-Id: <20210315135721.276643264@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 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 @@ -460,9 +460,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); }