Skip to contentSkip to conversation

drm/nouveau: Fix memory leak in nv50_mstm_del()

PATCH In review Lyude Paul 2 participants 3 messages Dec 11, 2018 – Dec 12, 2018 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

Lyude Paul

author maintainer
#0 lore raw

PATCH 1/1 drm/nouveau: Fix memory leak in nv50_mstm_del()

Noticed this while working on redoing the reference counting scheme in the DP MST helpers. Nouveau doesn't attempt to call drm_dp_mst_topology_mgr_destroy() at all, which leaves it leaking all of the resources for drm_dp_mst_topology_mgr and it's children mstbs+ports.

Fixes f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream")
Cc <[email protected]> # v4.10+
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/dispnv50/disp.c +1 -0
index d153ea2a08ac..a634b3d0b6a1 100644
@@ -1254,6 +1254,7 @@ nv50_mstm_del(struct nv50_mstm **pmstm)
 {
 	struct nv50_mstm *mstm = *pmstm;
 	if (mstm) {
+		drm_dp_mst_topology_mgr_destroy(&mstm->mgr);
 		kfree(*pmstm);
 		*pmstm = NULL;
 	}
Signature · 1 line
2.19.2

A message that is not in the archive (sent off-list or not yet received): 20181211235622.22859-1-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#2 lore raw

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: f479c0ba4a17 drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream.

The bot has tested the following trees: v4.19.8, v4.14.87,

v4.19.8: Build OK!
v4.14.87: Failed to apply! Possible dependencies:
Unable to calculate

How should we proceed with this patch?

--
Thanks,
Sasha
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

author maintainer
#3 lore raw

v4.19.8, it's ok to skip v4.14 for this

Quoted 20 lines · Sasha Levin

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag, fixing commit: f479c0ba4a17 drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream.

The bot has tested the following trees: v4.19.8, v4.14.87,

v4.19.8: Build OK!
v4.14.87: Failed to apply! Possible dependencies:
Unable to calculate

How should we proceed with this patch?

--
Thanks,
Sasha

Signature · 2 lines
Cheers,
	Lyude Paul