All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Guido Martínez" <guido@vanguardiasur.com.ar>
To: dri-devel@lists.freedesktop.org,
	linux-arm-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Cc: "Russell King" <linux@arm.linux.org.uk>,
	stable@vger.kernel.org, "Daniel Mack" <zonque@gmail.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Ezequiel García" <ezequiel@vanguardiasur.com.ar>
Subject: [PATCH 5/9] drm/tilcdc: panel: fix leak when unloading the module
Date: Sat,  7 Jun 2014 00:02:04 -0300	[thread overview]
Message-ID: <1402110128-30471-6-git-send-email-guido@vanguardiasur.com.ar> (raw)
In-Reply-To: <1402110128-30471-1-git-send-email-guido@vanguardiasur.com.ar>

The driver did not unregister the allocated framebuffer, which caused
memory leaks (and memory manager WARNs) when unloading. Also, the
framebuffer device under /dev still existed after unloading.

Add a call to drm_fbdev_cma_fini when unloading the module to prevent
both issues.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 171a820..de34657 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -122,6 +122,7 @@ static int tilcdc_unload(struct drm_device *dev)
 	struct tilcdc_drm_private *priv = dev->dev_private;
 	struct tilcdc_module *mod, *cur;
 
+	drm_fbdev_cma_fini(priv->fbdev);
 	drm_kms_helper_poll_fini(dev);
 	drm_mode_config_cleanup(dev);
 	drm_vblank_cleanup(dev);
-- 
2.0.0.rc2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2014-06-07  3:02 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-07  3:01 [PATCH 0/9] tilcdc driver fixes Guido Martínez
2014-06-07  3:02 ` [PATCH 1/9] drm/i2c: tda998x: move drm_i2c_encoder_destroy call Guido Martínez
2014-06-07  3:02 ` [PATCH 2/9] drm/tilcdc: panel: fix dangling sysfs connector node Guido Martínez
2014-06-07  3:02 ` [PATCH 3/9] drm/tilcdc: slave: " Guido Martínez
2014-06-07  3:02 ` [PATCH 4/9] drm/tilcdc: tfp410: " Guido Martínez
2014-06-07  3:02 ` Guido Martínez [this message]
2014-06-07  3:02 ` [PATCH 6/9] drm/tilcdc: fix release order on exit Guido Martínez
2014-06-07  3:02 ` [PATCH 7/9] drm/tilcdc: fix double kfree Guido Martínez
2014-06-07  3:02 ` [PATCH 8/9] drm/tilcdc: remove submodule destroy calls Guido Martínez
2014-06-07  3:02 ` [PATCH 9/9] drm/tilcdc: replace late_initcall with module_init Guido Martínez
2014-06-17 14:17 ` [PATCH/RESEND 0/9] drm: tilcdc driver fixes Guido Martínez
2014-06-17 14:17   ` Guido Martínez
2014-06-17 14:17   ` [PATCH/RESEND 1/9] drm/i2c: tda998x: move drm_i2c_encoder_destroy call Guido Martínez
2014-06-17 14:17     ` Guido Martínez
2014-06-24 16:38     ` Russell King - ARM Linux
2014-06-24 16:38       ` Russell King - ARM Linux
2014-06-25  3:55       ` Guido Martínez
2014-06-25  3:55         ` Guido Martínez
2014-06-17 14:17   ` [PATCH/RESEND 2/9] drm/tilcdc: panel: fix dangling sysfs connector node Guido Martínez
2014-06-17 14:17     ` Guido Martínez
2014-06-17 14:17   ` [PATCH/RESEND 3/9] drm/tilcdc: slave: " Guido Martínez
2014-06-17 14:17     ` Guido Martínez
2014-06-17 14:17   ` [PATCH/RESEND 4/9] drm/tilcdc: tfp410: " Guido Martínez
2014-06-17 14:17     ` Guido Martínez
2014-06-17 14:17   ` [PATCH/RESEND 5/9] drm/tilcdc: panel: fix leak when unloading the module Guido Martínez
2014-06-17 14:17     ` Guido Martínez
2014-06-17 14:17   ` [PATCH/RESEND 6/9] drm/tilcdc: fix release order on exit Guido Martínez
2014-06-17 14:17     ` Guido Martínez
2014-06-17 14:17   ` [PATCH/RESEND 7/9] drm/tilcdc: fix double kfree Guido Martínez
2014-06-17 14:17     ` Guido Martínez
2014-06-17 14:17   ` [PATCH/RESEND 8/9] drm/tilcdc: remove submodule destroy calls Guido Martínez
2014-06-17 14:17     ` Guido Martínez
2014-06-24 22:06     ` Darren Etheridge
2014-06-24 22:06       ` Darren Etheridge
2014-06-25  3:53       ` Guido Martínez
2014-06-25  3:53         ` Guido Martínez
2014-06-25 14:53       ` Ezequiel García
2014-06-25 14:53         ` Ezequiel García
2014-06-17 14:17   ` [PATCH/RESEND 9/9] drm/tilcdc: replace late_initcall with module_init Guido Martínez
2014-06-17 14:17     ` Guido Martínez
2014-06-24 22:04     ` Darren Etheridge
2014-06-24 22:04       ` Darren Etheridge
2014-06-25 13:00       ` Russell King - ARM Linux
2014-06-25 13:00         ` Russell King - ARM Linux
2014-06-25 13:13         ` Russell King - ARM Linux
2014-06-25 13:13           ` Russell King - ARM Linux
2014-06-25 14:32         ` Ezequiel García
2014-06-25 14:32           ` Ezequiel García
2014-06-25 14:46           ` Russell King - ARM Linux
2014-06-25 14:46             ` Russell King - ARM Linux
2014-06-25 15:48             ` Ezequiel García
2014-06-25 15:48               ` Ezequiel García
2014-06-19 13:41   ` [PATCH/RESEND 0/9] drm: tilcdc driver fixes Darren Etheridge
2014-06-19 13:41     ` Darren Etheridge
2014-06-19 16:25     ` Guido Martínez
2014-06-19 16:25       ` Guido Martínez
2014-06-24  0:26   ` Guido Martínez
2014-06-24  0:26     ` Guido Martínez
2014-06-27 22:08   ` Darren Etheridge
2014-06-27 22:08     ` Darren Etheridge
2014-06-28 10:51     ` Rob Clark
2014-06-28 10:51       ` Rob Clark
2014-07-08 10:03       ` Daniel Vetter
2014-07-08 10:03         ` Daniel Vetter
2014-07-01 23:39     ` Guido Martínez
2014-07-01 23:39       ` Guido Martínez
2014-07-02  2:31       ` Darren Etheridge
2014-07-02  2:31         ` Darren Etheridge
2014-07-02  4:08         ` Dave Airlie
2014-07-02  4:08           ` Dave Airlie
2014-07-02 20:38           ` Ezequiel García
2014-07-02 20:38             ` Ezequiel García
2014-07-08  1:32             ` Dave Airlie
2014-07-08  1:32               ` Dave Airlie
2014-07-01 23:52   ` Guido Martínez
2014-07-01 23:52     ` Guido Martínez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402110128-30471-6-git-send-email-guido@vanguardiasur.com.ar \
    --to=guido@vanguardiasur.com.ar \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=linux-arm-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=stable@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.