From: Larry Finger <Larry.Finger@lwfinger.net>
To: Greg Kroah-Hartman <gregkh@suse.de>, Kay Sievers <kay.sievers@vrfy.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
Date: Fri, 26 Oct 2007 12:05:51 -0500 [thread overview]
Message-ID: <47221E6F.1090607@lwfinger.net> (raw)
On my openSUSE 10.3 x86_64 system running v2.6.24-rc1-281-g22d2aa1, I get the sysfs rename messages.
Using Greg's patch, nothing changed. The log results are:
sysfs: duplicate filename 'eth1' can not be created
WARNING: at fs/sysfs/dir.c:424 sysfs_add_one()
Call Trace:
[<ffffffff802d1180>] sysfs_add_one+0x5c/0xc9
[<ffffffff802d20e1>] sysfs_create_link+0xd3/0x12e
[<ffffffff80363855>] device_rename+0x17a/0x1db
[<ffffffff80393a5d>] dev_change_name+0x101/0x1fe
[<ffffffff80393d5e>] dev_ifsioc+0x204/0x2bf
[<ffffffff80394352>] dev_ioctl+0x539/0x644
[<ffffffff80252e12>] __lock_acquire+0xd26/0xd47
[<ffffffff8028fab9>] fd_install+0x30/0x68
[<ffffffff80386ca2>] sock_ioctl+0x204/0x212
[<ffffffff8029d666>] do_ioctl+0x2a/0x77
[<ffffffff8029d904>] vfs_ioctl+0x251/0x26e
[<ffffffff803eff8b>] trace_hardirqs_on_thunk+0x35/0x3a
[<ffffffff8029d963>] sys_ioctl+0x42/0x67
[<ffffffff8020c15e>] system_call+0x7e/0x83
net eth1: device_rename: sysfs_create_symlink failed (-17)
udev: renamed network interface wlan0 to eth1
===========================================================
Kay's patch shows the following BUG, as well as the rename message:
BUG: sleeping function called from invalid context at kernel/mutex.c:207
in_atomic():1, irqs_disabled():0
2 locks held by udevd/1965:
#0: (rtnl_mutex){--..}, at: [<ffffffff8039c6f4>] rtnl_lock+0x12/0x14
#1: (&dev_base_lock){-.--}, at: [<ffffffff80393a1b>] dev_change_name+0xff/0x1f0
Call Trace:
[<ffffffff80250854>] debug_show_held_locks+0x22/0x24
[<ffffffff8022d10c>] __might_sleep+0x10a/0x10c
[<ffffffff803ef006>] mutex_lock_nested+0x28/0x2e1
[<ffffffff802f387d>] kobject_rename+0x6b/0xea
[<ffffffff802d19b9>] sysfs_rename_dir+0x2d/0x178
[<ffffffff802f387d>] kobject_rename+0x6b/0xea
[<ffffffff802f38b0>] kobject_rename+0x9e/0xea
[<ffffffff80363760>] device_rename+0xc5/0x1db
[<ffffffff80393a26>] dev_change_name+0x10a/0x1f0
[<ffffffff80393d10>] dev_ifsioc+0x204/0x2bf
[<ffffffff80394304>] dev_ioctl+0x539/0x644
[<ffffffff80252e12>] __lock_acquire+0xd26/0xd47
[<ffffffff8028fab9>] fd_install+0x30/0x68
[<ffffffff80386c62>] sock_ioctl+0x204/0x212
[<ffffffff8029d666>] do_ioctl+0x2a/0x77
[<ffffffff8029d904>] vfs_ioctl+0x251/0x26e
[<ffffffff803eff3b>] trace_hardirqs_on_thunk+0x35/0x3a
[<ffffffff8029d963>] sys_ioctl+0x42/0x67
[<ffffffff8020c15e>] system_call+0x7e/0x83
WARNING: at kernel/mutex.c:135 __mutex_lock_common()
Call Trace:
[<ffffffff8022d10c>] __might_sleep+0x10a/0x10c
[<ffffffff803ef062>] mutex_lock_nested+0x84/0x2e1
[<ffffffff802f387d>] kobject_rename+0x6b/0xea
[<ffffffff802d19b9>] sysfs_rename_dir+0x2d/0x178
[<ffffffff802f387d>] kobject_rename+0x6b/0xea
[<ffffffff802f38b0>] kobject_rename+0x9e/0xea
[<ffffffff80363760>] device_rename+0xc5/0x1db
[<ffffffff80393a26>] dev_change_name+0x10a/0x1f0
[<ffffffff80393d10>] dev_ifsioc+0x204/0x2bf
[<ffffffff80394304>] dev_ioctl+0x539/0x644
[<ffffffff80252e12>] __lock_acquire+0xd26/0xd47
[<ffffffff8028fab9>] fd_install+0x30/0x68
[<ffffffff80386c62>] sock_ioctl+0x204/0x212
[<ffffffff8029d666>] do_ioctl+0x2a/0x77
[<ffffffff8029d904>] vfs_ioctl+0x251/0x26e
[<ffffffff803eff3b>] trace_hardirqs_on_thunk+0x35/0x3a
[<ffffffff8029d963>] sys_ioctl+0x42/0x67
[<ffffffff8020c15e>] system_call+0x7e/0x83
sysfs: duplicate filename 'eth1' can not be created
WARNING: at fs/sysfs/dir.c:424 sysfs_add_one()
Call Trace:
[<ffffffff802d1180>] sysfs_add_one+0x5c/0xc9
[<ffffffff802d20e1>] sysfs_create_link+0xd3/0x12e
[<ffffffff80363815>] device_rename+0x17a/0x1db
[<ffffffff80393a26>] dev_change_name+0x10a/0x1f0
[<ffffffff80393d10>] dev_ifsioc+0x204/0x2bf
[<ffffffff80394304>] dev_ioctl+0x539/0x644
[<ffffffff80252e12>] __lock_acquire+0xd26/0xd47
[<ffffffff8028fab9>] fd_install+0x30/0x68
[<ffffffff80386c62>] sock_ioctl+0x204/0x212
[<ffffffff8029d666>] do_ioctl+0x2a/0x77
[<ffffffff8029d904>] vfs_ioctl+0x251/0x26e
[<ffffffff803eff3b>] trace_hardirqs_on_thunk+0x35/0x3a
[<ffffffff8029d963>] sys_ioctl+0x42/0x67
[<ffffffff8020c15e>] system_call+0x7e/0x83
net eth1: device_rename: sysfs_create_symlink failed (-17)
=============================================================
The following patch logs the problem with a minimum of log output.
Index: linux-2.6/fs/sysfs/dir.c
===================================================================
--- linux-2.6.orig/fs/sysfs/dir.c
+++ linux-2.6/fs/sysfs/dir.c
@@ -418,12 +418,8 @@ void sysfs_addrm_start(struct sysfs_addr
*/
int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
{
- if (sysfs_find_dirent(acxt->parent_sd, sd->s_name)) {
- printk(KERN_WARNING "sysfs: duplicate filename '%s' "
- "can not be created\n", sd->s_name);
- WARN_ON(1);
+ if (sysfs_find_dirent(acxt->parent_sd, sd->s_name))
return -EEXIST;
- }
sd->s_parent = sysfs_get(acxt->parent_sd);
Larry
next reply other threads:[~2007-10-26 17:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 17:05 Larry Finger [this message]
2007-10-26 18:07 ` linux-2.6.23-git3: Many sysfs-related warnings in dmesg Kay Sievers
2007-10-26 18:20 ` Larry Finger
2007-10-27 2:36 ` Greg KH
2007-10-27 6:08 ` Kay Sievers
2007-10-27 6:32 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2007-10-13 19:26 Rafael J. Wysocki
2007-10-16 4:50 ` Greg KH
2007-10-16 20:04 ` Rafael J. Wysocki
2007-10-16 20:42 ` Greg KH
2007-10-16 20:50 ` Jens Axboe
2007-10-16 21:13 ` Rafael J. Wysocki
2007-10-16 21:36 ` Greg KH
2007-10-16 23:58 ` Rafael J. Wysocki
2007-10-17 10:17 ` Kay Sievers
2007-10-17 17:35 ` Rafael J. Wysocki
2007-10-16 21:37 ` Greg KH
2007-10-16 22:32 ` David Miller
2007-10-16 23:23 ` Greg KH
2007-10-17 10:16 ` Kay Sievers
2007-10-24 23:43 ` Greg KH
2007-10-24 23:52 ` Greg KH
2007-10-25 16:58 ` Kay Sievers
2007-10-17 10:22 ` Kay Sievers
2007-10-17 10:33 ` Jens Axboe
2007-10-17 10:44 ` Jens Axboe
2007-10-16 20:49 ` Jens Axboe
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=47221E6F.1090607@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.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