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

    drm/tilcdc: fix double kfree

to the 3.16-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-tilcdc-fix-double-kfree.patch
and it can be found in the queue-3.16 subdirectory.

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


>From c9a3ad25eddfdb898114a9d73cdb4c3472d9dfca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= <[email protected]>
Date: Tue, 17 Jun 2014 11:17:09 -0300
Subject: drm/tilcdc: fix double kfree
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= <[email protected]>

commit c9a3ad25eddfdb898114a9d73cdb4c3472d9dfca upstream.

display_timings_release calls kfree on the display_timings object passed
to it. Calling kfree after it is wrong. SLUB debug showed the following
warning:

    
=============================================================================
    BUG kmalloc-64 (Tainted: G        W    ): Object already free
    
-----------------------------------------------------------------------------

    Disabling lock debugging due to kernel taint
    INFO: Allocated in of_get_display_timings+0x2c/0x214 age=601 cpu=0
    pid=884
     __slab_alloc.constprop.79+0x2e0/0x33c
     kmem_cache_alloc+0xac/0xdc
     of_get_display_timings+0x2c/0x214
     panel_probe+0x7c/0x314 [tilcdc]
     platform_drv_probe+0x18/0x48
     [..snip..]
    INFO: Freed in panel_destroy+0x18/0x3c [tilcdc] age=0 cpu=0 pid=907
     __slab_free+0x34/0x330
     panel_destroy+0x18/0x3c [tilcdc]
     tilcdc_unload+0xd0/0x118 [tilcdc]
     drm_dev_unregister+0x24/0x98
     [..snip..]

Signed-off-by: Guido Martínez <[email protected]>
Tested-by: Darren Etheridge <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/gpu/drm/tilcdc/tilcdc_panel.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -286,10 +286,8 @@ static void panel_destroy(struct tilcdc_
 {
        struct panel_module *panel_mod = to_panel_module(mod);
 
-       if (panel_mod->timings) {
+       if (panel_mod->timings)
                display_timings_release(panel_mod->timings);
-               kfree(panel_mod->timings);
-       }
 
        tilcdc_module_cleanup(mod);
        kfree(panel_mod->info);


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

queue-3.16/drm-tilcdc-panel-fix-dangling-sysfs-connector-node.patch
queue-3.16/drm-tilcdc-fix-release-order-on-exit.patch
queue-3.16/drm-tilcdc-fix-double-kfree.patch
queue-3.16/drm-tilcdc-panel-fix-leak-when-unloading-the-module.patch
queue-3.16/drm-tilcdc-tfp410-fix-dangling-sysfs-connector-node.patch
queue-3.16/drm-tilcdc-slave-fix-dangling-sysfs-connector-node.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to