Skip to contentSkip to conversation

Patch "drm/fb-helper: Fix connector ref leak on error" has been added to the 4.8-stable tree

PATCH [email protected] 1 participant 1 message Nov 9, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/fb-helper: Fix connector ref leak on error

to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-fb-helper-fix-connector-ref-leak-on-error.patch
and it can be found in the queue-4.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 7dfcb36a1f17e4c7c7c12b9d8a6902037c7d98dc Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Wed, 26 Oct 2016 12:05:52 +0300
Subject: drm/fb-helper: Fix connector ref leak on error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Ville Syrjälä <[email protected]>

commit 7dfcb36a1f17e4c7c7c12b9d8a6902037c7d98dc upstream.

We need to drop the connector references already taken when we abort in the middle of drm_fb_helper_single_add_all_connectors()

---
 drivers/gpu/drm/drm_fb_helper.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +6 -1
@@ -129,7 +129,12 @@ int drm_fb_helper_single_add_all_connect
 	return 0;
 fail:
 	for (i = 0; i < fb_helper->connector_count; i++) {
-		kfree(fb_helper->connector_info[i]);
+		struct drm_fb_helper_connector *fb_helper_connector =
+			fb_helper->connector_info[i];
+
+		drm_connector_unreference(fb_helper_connector->connector);
+
+		kfree(fb_helper_connector);
 		fb_helper->connector_info[i] = NULL;
 	}
 	fb_helper->connector_count = 0;

Patches currently in stable-queue which might be from [email protected] are

queue-4.8/x86-smpboot-init-apic-mapping-before-usage.patch queue-4.8/drm-fb-helper-don-t-call-dirty-callback-for-untouched-clips.patch queue-4.8/usb-gadget-function-u_ether-don-t-starve-tx-request-queue.patch queue-4.8/drm-fb-helper-keep-references-for-the-current-set-of-used-connectors.patch queue-4.8/drm-dp-mst-clear-port-pdt-when-tearing-down-the-i2c-adapter.patch queue-4.8/drm-fb-helper-fix-connector-ref-leak-on-error.patch