Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756693Ab3GYPsk (ORCPT ); Thu, 25 Jul 2013 11:48:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28899 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756402Ab3GYPsb (ORCPT ); Thu, 25 Jul 2013 11:48:31 -0400 Date: Thu, 25 Jul 2013 11:47:46 -0400 From: Peter Jones To: Catalin Marinas Cc: "Alexandra N. Kossovsky" , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org, Linux Kernel Mailing List Subject: Re: kmemleak warning in efifb_probe Message-ID: <20130725154745.GB25717@fenchurch.internal.datastacks.com> References: <20130721151151.GK24717@sanechka.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2178 Lines: 45 On Thu, Jul 25, 2013 at 01:18:31PM +0100, Catalin Marinas wrote: > On 21 July 2013 16:11, Alexandra N. Kossovsky > wrote: > > I am running linux-3.10.0 with kmemleak and see following warnings > > in /sys/kernel/debug/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 > > Does the efifb driver has any way to deallocate the cmap? I don't see > any explicit call to fb_dealloc_cmap() apart from the error handling. > My theory is that the efifb driver gets deregistered via > do_remove_conflicting_framebuffers(). I'm not familiar with this code, > just commenting from a kmemleak perspective. You're right, that's the typical deregister path. I'll follow up with a patch to test. -- Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/