From 907355a97f06af8d23c62fcb482cd91b8576972d Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 25 Jul 2013 11:48:11 -0400 Subject: Release efifb's colormap in efifb_destroy() This was found by Alexandra Kossovsky, who noted this traceback from kmemleak: > unreferenced object 0xffff880216fcfe00 (size 512): > comm "swapper/0", pid 1, jiffies 4294895429 (age 1415.320s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 aa aa aa aa aa aa aa aa ................ > 55 55 55 55 55 55 55 55 ff ff ff ff ff ff ff ff UUUUUUUU........ > backtrace: > [] kmemleak_alloc+0x21/0x3e > [] > kmemleak_alloc_recursive.constprop.57+0x16/0x18 > [] __kmalloc+0xf9/0x144 > [] fb_alloc_cmap_gfp+0x47/0xe1 > [] fb_alloc_cmap+0xe/0x10 > [] efifb_probe+0x3e9/0x48f > [] platform_drv_probe+0x34/0x5e > [] driver_probe_device+0x98/0x1b4 > [] __driver_attach+0x4e/0x6f > [] bus_for_each_dev+0x57/0x8a > [] driver_attach+0x19/0x1b > [] bus_add_driver+0xde/0x201 > [] driver_register+0x8c/0x110 > [] platform_driver_register+0x41/0x43 > [] platform_driver_probe+0x18/0x8a > [] efifb_init+0x276/0x295 Signed-off-by: Peter Jones Reviewed-by: David Herrmann Signed-off-by: Tomi Valkeinen diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index 50fe668..1c7dd5e 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c @@ -288,6 +288,7 @@ static void efifb_destroy(struct fb_info *info) if (request_mem_succeeded) release_mem_region(info->apertures->ranges[0].base, info->apertures->ranges[0].size); + fb_dealloc_cmap(&info->cmap); framebuffer_release(info); } -- cgit v0.10.2