[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB8PR04MB70513CD4C2C41B1E6865A5DC98F9A@DB8PR04MB7051.eurprd04.prod.outlook.com>
Date: Wed, 20 Sep 2023 09:30:02 +0000
From: Ying Liu <victor.liu@....com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
"andrzej.hajda@...el.com" <andrzej.hajda@...el.com>
CC: "neil.armstrong@...aro.org" <neil.armstrong@...aro.org>,
"rfoss@...nel.org" <rfoss@...nel.org>,
"Laurent.pinchart@...asonboard.com"
<Laurent.pinchart@...asonboard.com>,
"jonas@...boo.se" <jonas@...boo.se>,
"jernej.skrabec@...il.com" <jernej.skrabec@...il.com>,
"airlied@...il.com" <airlied@...il.com>,
"daniel@...ll.ch" <daniel@...ll.ch>,
"ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel@...labora.com" <kernel@...labora.com>,
"ehristev@...labora.com" <ehristev@...labora.com>,
"wenst@...omium.org" <wenst@...omium.org>
Subject: RE: [PATCH v2] drm/bridge: panel: Fix device link for
DRM_BRIDGE_ATTACH_NO_CONNECTOR
On Wednesday, September 20, 2023 4:27 PM AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com> wrote:
> When external bridges are attached with
> DRM_BRIDGE_ATTACH_NO_CONNECTOR,
> the panel bridge may also get the same flag, but in the .attach()
> callback for the panel bridge a device link is added only when this
> flag is not present; To make things worse, the .detach() callback
> tries to delete the device link unconditionally and without checking
> if it was created in the first place, crashing the kernel with a NULL
> pointer kernel panic upon calling panel_bridge_detach().
>
> Fix that by moving the device_link_add() call before checking if the
> DRM_BRIDGE_ATTACH_NO_CONNECTOR flag is present.
>
> Fixes: 199cf07ebd2b ("drm/bridge: panel: Add a device link between drm
> device and panel device")
> Signed-off-by: AngeloGioacchino Del Regno
> <angelogioacchino.delregno@...labora.com>
> ---
>
> Changes in v2:
> - Added device_link_del() for (!bridge->encoder) error condition
>
> drivers/gpu/drm/bridge/panel.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
Reviewed-by: Liu Ying <victor.liu@....com>
Powered by blists - more mailing lists