From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0734E14F70 for ; Tue, 7 Apr 2026 13:03:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775566998; cv=none; b=HW50oScer3M3X6s4GkGC/g02Z5dsLr+k5dFXTMgT0YJCIhRoJuYfVJeipO1ka0ORCZEjt0q7Djc3AqtsbCk60K1OSGg4b+hQGk5zpzrc8KjyckT4sE7j4cIbUBcyBctLKN4oPORpw+JQKMP61mhkY1NoGc9HO93U7KrfmVd6nyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775566998; c=relaxed/simple; bh=F1J4OADq0wUd+CFSiWdB9CfbFoV+7FIneu6rPiEpIdA=; h=Mime-Version:Content-Type:Date:Message-Id:From:Subject:To: References:In-Reply-To; b=hBlWOSlLZV4LkXUj9TGgMKXsrb1gbroG9xUp98cSTJnXUGUjl0MWsGfVTu9ISXB1l5I8ZGrLn1PF21PzKFPtxPg5XFGutiu1kOqEd+TCWhA+QYPta9luBQ/A/mOY5RjzDQPKozjZ/p/bevAgiDgZeT3vhpnHOTc5yAffcbFx39I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=i0FywnFm; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="i0FywnFm" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 6530E4E42935; Tue, 7 Apr 2026 13:03:14 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3867D603C7; Tue, 7 Apr 2026 13:03:14 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 35B8410450143; Tue, 7 Apr 2026 15:03:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1775566992; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=F1J4OADq0wUd+CFSiWdB9CfbFoV+7FIneu6rPiEpIdA=; b=i0FywnFm2eZ71AI1BHAmGZpkx+d2ERDXvi5PQ3o9CO83pdRvJkFgi1/3qc63HNajilnAoH VGMB3z1Y1+twFaHA2UZMiF7Gv9beoahe+X2iF/OgyozP0JXPFfCiuiUv3BmjtSyno/zOji BhA5phd/eho4FtSfhetL96nfCBkElWyemDxO2HuPzUZzGzyHX7EhFC3fd87wpbI69n4ZPB j0EzRrD2eT4Gf2VnM6V8QvB5+IYxk858B/wtbqq5Czc+8HQBeTn3nst1K6Nuz5ZvS4T66U PboI+uBfRGsjDMDOWWTqMgsJ02/3SSldwB5KpgZW0U5G3d6jm6hROiTFYp7BUw== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 07 Apr 2026 15:03:05 +0200 Message-Id: From: "Luca Ceresoli" Subject: Re: [PATCH v2] drm/bridge: dw-mipi-dsi: Fix bridge leak when host attach fails To: "Osama Abdelkader" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , =?utf-8?q?Andr=C3=A9_Almeida?= , "Douglas Anderson" , "Manikandan Muralidharan" , "Kees Cook" , "Heiko Stuebner" , "Andy Yan" , , X-Mailer: aerc 0.20.1 References: <20260403145208.15890-1-osama.abdelkader@gmail.com> In-Reply-To: <20260403145208.15890-1-osama.abdelkader@gmail.com> X-Last-TLS-Session-Version: TLSv1.3 On Fri Apr 3, 2026 at 4:52 PM CEST, Osama Abdelkader wrote: > dw_mipi_dsi_host_attach() and dw_mipi_dsi2_host_attach() call > drm_bridge_add() before pdata->host_ops->attach(). If attach fails, > the bridge stayed registered without drm_bridge_remove(), leaking the > bridge reference and leaving the device on the global bridge list. > > Fixes: 90910a651123 ("drm/bridge/synopsys: dsi: add ability to have glue-= specific attach and detach") > Fixes: 0d6d86253fef ("drm/bridge/synopsys: Add MIPI DSI2 host controller = bridge") > Signed-off-by: Osama Abdelkader Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com