public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Fisher <bug-track@fisher-privat.net>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Kernel Testers List <kernel-testers@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [kmemleak] 60 wornings on sysfs_new_dirent+0x10c
Date: Sat, 18 Jul 2009 22:29:52 +0200	[thread overview]
Message-ID: <4A6230C0.6000509@fisher-privat.net> (raw)
In-Reply-To: <1247564356.28240.30.camel@pc1117.cambridge.arm.com>

I getting a lot of sysfs_new_dirent warnings with latest ARM git.
this message come if my usb-cardreader is attached.


this are first sysfs_new_dirent warnings:
======================================================
unreferenced object 0xffff880133c580a0 (size 8):
   comm "khubd", pid 218, jiffies 4294893605
   hex dump (first 8 bytes):
     31 2d 36 00 01 88 ff ff                          1-6.....
   backtrace:
     [<ffffffff814a3115>] kmemleak_alloc+0x25/0x60
     [<ffffffff810f36ab>] __kmalloc_track_caller+0x10b/0x200
     [<ffffffff810d4480>] kstrdup+0x40/0x70
     [<ffffffff8115ebdc>] sysfs_new_dirent+0x10c/0x120
     [<ffffffff8115f9fd>] create_dir+0x3d/0xb0
     [<ffffffff8115faa4>] sysfs_create_dir+0x34/0x50
     [<ffffffff8121ea37>] kobject_add_internal+0xb7/0x200
     [<ffffffff8121eca8>] kobject_add_varg+0x38/0x60
     [<ffffffff8121ed84>] kobject_add+0x44/0x70
     [<ffffffff812f8408>] device_add+0x118/0x5d0
     [<ffffffff8134914d>] usb_new_device+0x6d/0xe0
     [<ffffffff8134adf8>] hub_thread+0x878/0x1280
     [<ffffffff810644f6>] kthread+0x96/0xa0
     [<ffffffff8100c69a>] child_rip+0xa/0x20
     [<ffffffffffffffff>] 0xffffffffffffffff
unreferenced object 0xffff880133c653c0 (size 80):
   comm "khubd", pid 218, jiffies 4294893605
   hex dump (first 32 bytes):
     01 00 00 00 00 00 00 80 10 2e 1c 34 01 88 ff ff  ...........4....
     00 00 00 00 00 00 00 00 a0 80 c5 33 01 88 ff ff  ...........3....
   backtrace:
     [<ffffffff814a3115>] kmemleak_alloc+0x25/0x60
     [<ffffffff810f2aeb>] kmem_cache_alloc+0xfb/0x180
     [<ffffffff8115eb0c>] sysfs_new_dirent+0x3c/0x120
     [<ffffffff8115f9fd>] create_dir+0x3d/0xb0
     [<ffffffff8115faa4>] sysfs_create_dir+0x34/0x50
     [<ffffffff8121ea37>] kobject_add_internal+0xb7/0x200
     [<ffffffff8121eca8>] kobject_add_varg+0x38/0x60
     [<ffffffff8121ed84>] kobject_add+0x44/0x70
     [<ffffffff812f8408>] device_add+0x118/0x5d0
     [<ffffffff8134914d>] usb_new_device+0x6d/0xe0
     [<ffffffff8134adf8>] hub_thread+0x878/0x1280
     [<ffffffff810644f6>] kthread+0x96/0xa0
     [<ffffffff8100c69a>] child_rip+0xa/0x20
     [<ffffffffffffffff>] 0xffffffffffffffff
unreferenced object 0xffff880133c580e8 (size 8):
   comm "khubd", pid 218, jiffies 4294893605
   hex dump (first 8 bytes):
     31 2d 36 3a 31 2e 30 00                          1-6:1.0.
   backtrace:
     [<ffffffff814a3115>] kmemleak_alloc+0x25/0x60
     [<ffffffff810f36ab>] __kmalloc_track_caller+0x10b/0x200
     [<ffffffff810d4480>] kstrdup+0x40/0x70
     [<ffffffff8115ebdc>] sysfs_new_dirent+0x10c/0x120
     [<ffffffff8115f9fd>] create_dir+0x3d/0xb0
     [<ffffffff8115faa4>] sysfs_create_dir+0x34/0x50
     [<ffffffff8121ea37>] kobject_add_internal+0xb7/0x200
     [<ffffffff8121eca8>] kobject_add_varg+0x38/0x60
     [<ffffffff8121ed84>] kobject_add+0x44/0x70
     [<ffffffff812f8408>] device_add+0x118/0x5d0
     [<ffffffff81351054>] usb_set_configuration+0x444/0x740
     [<ffffffff8135aba2>] generic_probe+0x32/0xb0
     [<ffffffff81351425>] usb_probe_device+0x25/0x30
     [<ffffffff812faec6>] driver_probe_device+0x86/0x180
     [<ffffffff812fb0ab>] __device_attach+0x4b/0x50
     [<ffffffff812fa048>] bus_for_each_drv+0x68/0x90
unreferenced object 0xffff880133cf2b40 (size 80):
   comm "khubd", pid 218, jiffies 4294893605
   hex dump (first 32 bytes):
     01 00 00 00 00 00 00 80 c0 53 c6 33 01 88 ff ff  .........S.3....
     00 00 00 00 00 00 00 00 e8 80 c5 33 01 88 ff ff  ...........3....
   backtrace:
     [<ffffffff814a3115>] kmemleak_alloc+0x25/0x60
     [<ffffffff810f2aeb>] kmem_cache_alloc+0xfb/0x180
     [<ffffffff8115eb0c>] sysfs_new_dirent+0x3c/0x120
     [<ffffffff8115f9fd>] create_dir+0x3d/0xb0
     [<ffffffff8115faa4>] sysfs_create_dir+0x34/0x50
     [<ffffffff8121ea37>] kobject_add_internal+0xb7/0x200
     [<ffffffff8121eca8>] kobject_add_varg+0x38/0x60
     [<ffffffff8121ed84>] kobject_add+0x44/0x70
     [<ffffffff812f8408>] device_add+0x118/0x5d0
     [<ffffffff81351054>] usb_set_configuration+0x444/0x740
     [<ffffffff8135aba2>] generic_probe+0x32/0xb0
     [<ffffffff81351425>] usb_probe_device+0x25/0x30
     [<ffffffff812faec6>] driver_probe_device+0x86/0x180
     [<ffffffff812fb0ab>] __device_attach+0x4b/0x50
     [<ffffffff812fa048>] bus_for_each_drv+0x68/0x90
     [<ffffffff812fb166>] device_attach+0x86/0x90
===================================================================


dump:
==================================================================
[  604.393175] kmemleak: Object 0xffff880133c580a0 (size 8):
[  604.393179] kmemleak:   comm "khubd", pid 218, jiffies 4294893605
[  604.393180] kmemleak:   min_count = 1
[  604.393182] kmemleak:   count = 0
[  604.393183] kmemleak:   flags = 0x3
[  604.393184] kmemleak:   backtrace:
[  604.393186]      [<ffffffff814a3115>] kmemleak_alloc+0x25/0x60
[  604.393193]      [<ffffffff810f36ab>] __kmalloc_track_caller+0x10b/0x200
[  604.393198]      [<ffffffff810d4480>] kstrdup+0x40/0x70
[  604.393201]      [<ffffffff8115ebdc>] sysfs_new_dirent+0x10c/0x120
[  604.393206]      [<ffffffff8115f9fd>] create_dir+0x3d/0xb0
[  604.393209]      [<ffffffff8115faa4>] sysfs_create_dir+0x34/0x50
[  604.393212]      [<ffffffff8121ea37>] kobject_add_internal+0xb7/0x200
[  604.393217]      [<ffffffff8121eca8>] kobject_add_varg+0x38/0x60
[  604.393220]      [<ffffffff8121ed84>] kobject_add+0x44/0x70
[  604.393223]      [<ffffffff812f8408>] device_add+0x118/0x5d0
[  604.393227]      [<ffffffff8134914d>] usb_new_device+0x6d/0xe0
[  604.393232]      [<ffffffff8134adf8>] hub_thread+0x878/0x1280
[  604.393235]      [<ffffffff810644f6>] kthread+0x96/0xa0
[  604.393240]      [<ffffffff8100c69a>] child_rip+0xa/0x20
[  604.393243]      [<ffffffffffffffff>] 0xffffffffffffffff
===========================================================================

gdb:
==========================================================
(gdb) l *(sysfs_new_dirent+0x10c)
0xffffffff8115ebdc is in sysfs_new_dirent (fs/sysfs/dir.c:315).
310	{
311		char *dup_name = NULL;
312		struct sysfs_dirent *sd;
313	
314		if (type & SYSFS_COPY_NAME) {
315			name = dup_name = kstrdup(name, GFP_KERNEL);
316			if (!name)
317				return NULL;
318		}
319	
=======================================================





      parent reply	other threads:[~2009-07-18 20:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14  6:08 60 memory leaks.. or is it some thing wrong with kmemleak? Alexey Fisher
2009-07-14  7:19 ` Pekka Enberg
2009-07-14  8:28   ` Alexey Fisher
2009-07-14  9:39     ` Catalin Marinas
2009-07-14  9:52       ` [PATCH] x86: _edata should include all .data.* sections on X86_64 Catalin Marinas
2009-07-14 10:13         ` Alexey Fisher
2009-07-14 10:31           ` Catalin Marinas
2009-07-14 10:37             ` Alexey Fisher
2009-07-14 12:26               ` ext4 memory leak (was Re: [PATCH] x86: _edata should include all .data.* sections on X86_64) Catalin Marinas
2009-07-15  8:03                 ` Aneesh Kumar K.V
2009-07-15  8:54                   ` Alexey Fisher
2009-07-18 11:55                     ` Ingo Molnar
2009-07-18 13:30                       ` Alexey Fisher
2009-07-18 22:44                         ` Catalin Marinas
2009-07-18 22:33                       ` Catalin Marinas
2009-07-15 10:33                   ` Catalin Marinas
2009-07-14 12:42               ` [PATCH] x86: _edata should include all .data.* sections on X86_64 Catalin Marinas
2009-07-16 20:23         ` Sam Ravnborg
2009-07-18 12:06         ` [tip:x86/urgent] x86: Include all of .data.* sections in _edata on 64-bit tip-bot for Catalin Marinas
2009-07-18 20:29       ` Alexey Fisher [this message]

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=4A6230C0.6000509@fisher-privat.net \
    --to=bug-track@fisher-privat.net \
    --cc=catalin.marinas@arm.com \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox