From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 77959C83F01 for ; Thu, 31 Aug 2023 12:26:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xMNsVAtBO04ie1p0/oGsyYI2tHhtTz5GvnSV00dG6wY=; b=Xe0SNgdajfLynY Mq0fx4vT1b+oRc0uodnVSN37kCGtyBKzubFs7LFVjZCB1DsyYuXHJoOCWwBGfMLFfJHP4yUkSRnFq XN20aePLyy20p042+tM4fvUK8vQFadVoi/Z7RKC2/tkvCYJzBqnKfqOU3lxcL3CShO7W4AxlZQ2TL uBfjDA9PrhfP2v6WWy+QascA5I1dZeHs9pLe52+YtpVEaaiM/ezDc6jLyP5RxOks/V15LnzB+HvrZ Dyf/ikFpulfM7XKISJ5Isns3bZ5D/v9XNdpYPCNgnDaZ4PjjS60xdRlT0GFLe81HqVJoicVAaGbzA rgS30rlvBrtsAc7DjAVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qbgkE-00FHIG-35; Thu, 31 Aug 2023 12:25:54 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qbgkB-00FHHa-2c for linux-arm-kernel@lists.infradead.org; Thu, 31 Aug 2023 12:25:53 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 37VCPW2e090521; Thu, 31 Aug 2023 07:25:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1693484732; bh=htMuZc/z2V9h3y6JbF95s32HLoZQm0TE7Foq7+M46rM=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=ANIyNH4CzVY9MVRen8utxmt7j3zKBzPl9d7/rj7kvwNRf6c/Cv4iWUTMjprxQNHe+ UJN60JbSb14JBWvBFLobcLmEUVfi0c7L+5b6tfVg4iollyJ92ZzfpYtpYid3ZJwnGM wgfB9CnZcqDckGa6GEJezONU1A9OUaOH0/mg12D4= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 37VCPWHs017489 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 31 Aug 2023 07:25:32 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 31 Aug 2023 07:25:32 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 31 Aug 2023 07:25:32 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 37VCPV1e018149; Thu, 31 Aug 2023 07:25:31 -0500 Date: Thu, 31 Aug 2023 07:25:31 -0500 From: Nishanth Menon To: Helen Mae Koike Fornazier CC: Jai Luthra , Phong LE , Neil Armstrong , Andrzej Hajda , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Nicolas Belin , "Andy.Hsieh" , Aradhya Bhatia , , , , Subject: Re: [PATCH] drm: bridge: it66121: Fix invalid connector dereference Message-ID: <20230831122531.smmqt7ycupvum3gg@stereo> References: <20230825-it66121_edid-v1-1-3ab54923e472@ti.com> <6fd4-64ecbf00-7-213b7840@157890373> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6fd4-64ecbf00-7-213b7840@157890373> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230831_052552_014323_D08A0871 X-CRM114-Status: GOOD ( 21.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 16:35-20230828, Helen Mae Koike Fornazier wrote: > On Friday, August 25, 2023 08:02 -03, Jai Luthra wrote: > > > Fix the NULL pointer dereference when no monitor is connected, and the > > sound card is opened from userspace. > > > > Instead return an error as EDID information cannot be provided to > > the sound framework if there is no connector attached. > > > > Fixes: e0fd83dbe924 ("drm: bridge: it66121: Add audio support") > > Reported-by: Nishanth Menon > > Closes: https://lore.kernel.org/all/20230825105849.crhon42qndxqif4i@gondola/ > > Signed-off-by: Jai Luthra > > Reviewed-by: Helen Koike Occurs on today's master: v6.5-8894-gb97d64c72259 https://gist.github.com/nmenon/6c7166171729342ee0be7de90b65c5c6#file-v6-5-8894-gb97d64c72259-L821 My only complaint with the patch is - yes, it does'nt crash, but I see this spam on my console: https://gist.github.com/nmenon/6c7166171729342ee0be7de90b65c5c6#file-with-patch-on-top-L236 > > > --- > > drivers/gpu/drm/bridge/ite-it66121.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c > > index 466641c77fe9..d6fa00dea464 100644 > > --- a/drivers/gpu/drm/bridge/ite-it66121.c > > +++ b/drivers/gpu/drm/bridge/ite-it66121.c > > @@ -1446,6 +1446,11 @@ static int it66121_audio_get_eld(struct device *dev, void *data, > > { > > struct it66121_ctx *ctx = dev_get_drvdata(dev); > > > > + if (!ctx->connector) { > > + dev_dbg(dev, "No connector present, cannot provide EDID data"); > > + return -EINVAL; > > + } > > + > > mutex_lock(&ctx->lock); > > > > memcpy(buf, ctx->connector->eld, > > > > --- > > base-commit: 6269320850097903b30be8f07a5c61d9f7592393 > > change-id: 20230825-it66121_edid-6ee98517808b > > > > Best regards, > > -- > > Jai Luthra > > > -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel