Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3519567pxf; Mon, 15 Mar 2021 11:21:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ6Hd39Z4Qwp9s49lCxRvlq4a5Z9vdk+2htgeFYUs5uN2MP7tEkJD7Bzw4ckYopSBeGutG X-Received: by 2002:a05:6402:181a:: with SMTP id g26mr31423731edy.225.1615832496612; Mon, 15 Mar 2021 11:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832496; cv=none; d=google.com; s=arc-20160816; b=K6S5x4m3wdx68GZOFIoOBwIybSJK8uVFQUiWKnddhNNLfp2YI00PyxCnryCpndWD1B LAO4LutZdNRIST6YxI1y87fH824PTX5mrw8TCNJN93BKR4vencz/4QLxPf+BOlRBTXjT QAeEGOxtwTWUzGaXE6FPcS+tH5TrRITYm57ZtJzySJJbLcDszhyfGevWUWdMWAOWbJft QTWUtObdC/q14MbhNT5elTYSjnusFRnpG1KVJ2JOGmOFkHVtlB+Brp5PF3bpsvuBc0CI 2Pb7EKy5ZZnGcDO/XoNXq5Q0AYqPdDyjunv6p0abLXmnJk+uaKrMVFOjVMWHl45IAxso I0Iw== 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=ByUcRQGtpH0c/BPVk5Xma6noQM2BlmIu4VJEXFxlkpwolDz5vmw/kyYquNTwJSRvkS dNX9cgynx71xt1uinkDyq7AKOYE8W7WYSIFABOcsggxOMXpPSNxGltrS4UWDyUes8c0D rnQwC1oJxUh+WEqXexqS2UOOF5gCrPF4KH3l5/La1gWYRghvSFM3/QFzzbBkY3d1z2Pn VujEpK0t4hkpgSY626vZJdPI8IwxfphKq40lSEdCenLshHv6frEy60IGHrFk291G5DvR sY7+bfIVQZ2+7VMrKrH6sRsM2wE6VqIBFawG2T/w4vuKOELy+LXZZxJQiPCZwhPyh0eb QGxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UNM4XyxP; 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 ss17si11654538ejb.678.2021.03.15.11.21.14; Mon, 15 Mar 2021 11:21:36 -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=UNM4XyxP; 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 S230327AbhCOOUU (ORCPT + 99 others); Mon, 15 Mar 2021 10:20: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 S232779AbhCON74 (ORCPT ); Mon, 15 Mar 2021 09:59:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C52A164EF2; Mon, 15 Mar 2021 13:59:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816775; bh=22Sy2O0/sNhIpTplUZi3RFzECWze9MCTHRDGpGRufjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UNM4XyxPluSrpHODt/bKkQrL69N8iUvt7/ikhhJPX+Wsmxt2OGaGo2jGjTw7VkQe1 VLFWvV+ACF2DoxSAhTsa1TDFiTAYX5L2xr7Ui/50k2H9mFnHVsrXsHCemZkGhAr5UF 8kUGQCCJCjlb0PqGFGkHO7Mpjr9Bw+OtIVoEYzS0= 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 118/306] media: v4l: vsp1: Fix uif null pointer access Date: Mon, 15 Mar 2021 14:53:01 +0100 Message-Id: <20210315135511.650411979@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 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); }