From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:47180 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbcKIISe (ORCPT ); Wed, 9 Nov 2016 03:18:34 -0500 Subject: Patch "drm/fb-helper: Fix connector ref leak on error" has been added to the 4.8-stable tree To: ville.syrjala@linux.intel.com, carlos.santa@intel.com, chris@chris-wilson.co.uk, daniel.vetter@ffwll.ch, gregkh@linuxfoundation.org, kirill@shutemov.name Cc: , From: Date: Wed, 09 Nov 2016 09:18:37 +0100 Message-ID: <14786795177478@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 7dfcb36a1f17e4c7c7c12b9d8a6902037c7d98dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= 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ä 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() Cc: Carlos Santa Cc: Kirill A. Shutemov Tested-by: Carlos Santa Tested-by: Kirill A. Shutemov Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1477472755-15288-2-git-send-email-ville.syrjala@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/drm_fb_helper.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -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 ville.syrjala@linux.intel.com 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