From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Delvare Subject: Re: linux-3.7.[1,4]: kmemleak in i801_probe Date: Wed, 23 Jan 2013 17:42:04 +0100 Message-ID: <20130123174204.00463f98@endymion.delvare> References: <50FFC659.1090402@fold.natur.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50FFC659.1090402-08dBlVkRsZWoiTQjSSYKZesEoJ4y9sgM@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Martin Mokrejs Cc: Linux I2C , LKML List-Id: linux-i2c@vger.kernel.org Hi Martin, On Wed, 23 Jan 2013 12:15:37 +0100, Martin Mokrejs wrote: > Hi, > I already reported this to lkml recently with linux-3.7.1 but this is to let you know > that with 3.7.4 I am still getting this kmemleak reported by the kernel. I don't read LKML. > unreferenced object 0xffff88040b614690 (size 256): > comm "swapper/0", pid 1, jiffies 4294937573 (age 133834.550s) > hex dump (first 32 bytes): > 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... > ff ff ff ff ff ff ff ff 08 7f 5d 82 ff ff ff ff ..........]..... > backtrace: > [] kmemleak_alloc+0x21/0x3e > [] slab_post_alloc_hook+0x28/0x2a > [] __kmalloc+0xf2/0x104 > [] kzalloc.constprop.14+0xe/0x10 > [] device_private_init+0x14/0x63 > [] dev_set_drvdata+0x19/0x2f > [] i801_probe+0x5e/0x451 > [] local_pci_probe+0x39/0x61 > [] pci_device_probe+0xc6/0xf3 > [] driver_probe_device+0xa9/0x1c1 > [] __driver_attach+0x5a/0x7e > [] bus_for_each_dev+0x57/0x83 > [] driver_attach+0x19/0x1b > [] bus_add_driver+0xa8/0x1fa > [] driver_register+0x8c/0x106 > [] __pci_register_driver+0x59/0x5d I am using the i2c-i801 driver, enabled kmemleak, but I don't get this leak. Did you have to do anything special to get it? Didn't you get a similar leak with older kernels? Do you get a similar leak (with reference to dev_set_drvdata)? I can see that dev_set_drvdata may allocate memory (which I didn't know) and I admit I don't see where it gets released, however this is all happening in the driver core and isn't specific to the i2c-i801 driver, so if there really is a leak there, you should see it in all drivers. -- Jean Delvare