public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-2.6.23-git3: Many sysfs-related warnings in dmesg
@ 2007-10-13 19:26 Rafael J. Wysocki
  2007-10-16  4:50 ` Greg KH
  0 siblings, 1 reply; 27+ messages in thread
From: Rafael J. Wysocki @ 2007-10-13 19:26 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, Greg KH, Tejun Heo, LKML

Hi,

There are many traces like this in my dmesg from 2.6.23-git3 (they don't
appear for vanilla 2.6.23):

<4>sysfs: duplicate filename 'ethxx1' can not be created
WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()

Call Trace:
 [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
 [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
 [<ffffffff803756da>] device_rename+0x17a/0x1db
 [<ffffffff803c903d>] dev_change_name+0x114/0x20c
 [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
 [<ffffffff803c9925>] dev_ioctl+0x520/0x633
 [<ffffffff803bf445>] sk_alloc+0x37/0x10c
 [<ffffffff8024b977>] up_read+0x9/0xb
 [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
 [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
 [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
 [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
 [<ffffffff8020bd4e>] system_call+0x7e/0x83

net ethxx1: device_rename: sysfs_create_symlink failed (-17)
sysfs: duplicate filename 'eth1' can not be created

Everything seems to work, but this just looks fishy.

I reported it for at least one -mm of the recent -mm kernels, but no one
responded.

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-13 19:26 linux-2.6.23-git3: Many sysfs-related warnings in dmesg Rafael J. Wysocki
@ 2007-10-16  4:50 ` Greg KH
  2007-10-16 20:04   ` Rafael J. Wysocki
  0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2007-10-16  4:50 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Linus Torvalds, Andrew Morton, Tejun Heo, LKML

On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> Hi,
> 
> There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> appear for vanilla 2.6.23):
> 
> <4>sysfs: duplicate filename 'ethxx1' can not be created
> WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> 
> Call Trace:
>  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
>  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
>  [<ffffffff803756da>] device_rename+0x17a/0x1db
>  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
>  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
>  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
>  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
>  [<ffffffff8024b977>] up_read+0x9/0xb
>  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
>  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
>  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
>  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
>  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> 
> net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> sysfs: duplicate filename 'eth1' can not be created
> 
> Everything seems to work, but this just looks fishy.

This is a userspace program renaming your network device to a name that
is already in use.  What distro and release is this?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  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:49     ` Jens Axboe
  0 siblings, 2 replies; 27+ messages in thread
From: Rafael J. Wysocki @ 2007-10-16 20:04 UTC (permalink / raw)
  To: Greg KH; +Cc: Linus Torvalds, Andrew Morton, Tejun Heo, LKML

On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > Hi,
> > 
> > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > appear for vanilla 2.6.23):
> > 
> > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > 
> > Call Trace:
> >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> >  [<ffffffff8024b977>] up_read+0x9/0xb
> >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > 
> > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > sysfs: duplicate filename 'eth1' can not be created
> > 
> > Everything seems to work, but this just looks fishy.
> 
> This is a userspace program renaming your network device to a name that
> is already in use.  What distro and release is this?

openSUSE 10.2, with some updates (not the most recent, though).

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  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 20:49     ` Jens Axboe
  1 sibling, 1 reply; 27+ messages in thread
From: Greg KH @ 2007-10-16 20:42 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Linus Torvalds, Andrew Morton, Tejun Heo, LKML

On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > Hi,
> > > 
> > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > appear for vanilla 2.6.23):
> > > 
> > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > 
> > > Call Trace:
> > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > 
> > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > sysfs: duplicate filename 'eth1' can not be created
> > > 
> > > Everything seems to work, but this just looks fishy.
> > 
> > This is a userspace program renaming your network device to a name that
> > is already in use.  What distro and release is this?
> 
> openSUSE 10.2, with some updates (not the most recent, though).

Can you try 10.3?  I think we fixed this issue there.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 20:04   ` Rafael J. Wysocki
  2007-10-16 20:42     ` Greg KH
@ 2007-10-16 20:49     ` Jens Axboe
  1 sibling, 0 replies; 27+ messages in thread
From: Jens Axboe @ 2007-10-16 20:49 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Greg KH, Linus Torvalds, Andrew Morton, Tejun Heo, LKML

On Tue, Oct 16 2007, Rafael J. Wysocki wrote:
> On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > Hi,
> > > 
> > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > appear for vanilla 2.6.23):
> > > 
> > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > 
> > > Call Trace:
> > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > 
> > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > sysfs: duplicate filename 'eth1' can not be created
> > > 
> > > Everything seems to work, but this just looks fishy.
> > 
> > This is a userspace program renaming your network device to a name that
> > is already in use.  What distro and release is this?
> 
> openSUSE 10.2, with some updates (not the most recent, though).

Same thing happens in 10.3, rendering current git unusable for me with
iwl3945.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 20:42     ` Greg KH
@ 2007-10-16 20:50       ` Jens Axboe
  2007-10-16 21:13         ` Rafael J. Wysocki
                           ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Jens Axboe @ 2007-10-16 20:50 UTC (permalink / raw)
  To: Greg KH; +Cc: Rafael J. Wysocki, Linus Torvalds, Andrew Morton, Tejun Heo, LKML

On Tue, Oct 16 2007, Greg KH wrote:
> On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > Hi,
> > > > 
> > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > appear for vanilla 2.6.23):
> > > > 
> > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > 
> > > > Call Trace:
> > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > 
> > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > sysfs: duplicate filename 'eth1' can not be created
> > > > 
> > > > Everything seems to work, but this just looks fishy.
> > > 
> > > This is a userspace program renaming your network device to a name that
> > > is already in use.  What distro and release is this?
> > 
> > openSUSE 10.2, with some updates (not the most recent, though).
> 
> Can you try 10.3?  I think we fixed this issue there.

Ehm nope:

Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
can not be created
Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
eth1
Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
sysfs_add_one()
Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
Oct 16 19:36:27 carl kernel:  [<c01a1938>]
inotify_d_instantiate+0x18/0x80
Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
Oct 16 19:36:27 carl kernel:  =======================
Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
sysfs_create_symlink failed (-17)

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  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 21:37         ` Greg KH
  2007-10-17 10:22         ` Kay Sievers
  2 siblings, 1 reply; 27+ messages in thread
From: Rafael J. Wysocki @ 2007-10-16 21:13 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Greg KH, Linus Torvalds, Andrew Morton, Tejun Heo, LKML

On Tuesday, 16 October 2007 22:50, Jens Axboe wrote:
> On Tue, Oct 16 2007, Greg KH wrote:
> > On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > > Hi,
> > > > > 
> > > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > > appear for vanilla 2.6.23):
> > > > > 
> > > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > > 
> > > > > Call Trace:
> > > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > > 
> > > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > > sysfs: duplicate filename 'eth1' can not be created
> > > > > 
> > > > > Everything seems to work, but this just looks fishy.
> > > > 
> > > > This is a userspace program renaming your network device to a name that
> > > > is already in use.  What distro and release is this?
> > > 
> > > openSUSE 10.2, with some updates (not the most recent, though).
> > 
> > Can you try 10.3?  I think we fixed this issue there.
> 
> Ehm nope:
> 
> Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
> can not be created
> Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
> eth1
> Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
> sysfs_add_one()
> Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
> Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
> Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
> Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
> Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
> Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
> Oct 16 19:36:27 carl kernel:  [<c01a1938>]
> inotify_d_instantiate+0x18/0x80
> Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
> Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
> Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
> Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
> Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
> Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
> Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
> Oct 16 19:36:27 carl kernel:  =======================
> Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
> sysfs_create_symlink failed (-17)

Plus it doesn't happen on 2.6.23 on my system, so I count it as a regression.

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 21:13         ` Rafael J. Wysocki
@ 2007-10-16 21:36           ` Greg KH
  2007-10-16 23:58             ` Rafael J. Wysocki
  0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2007-10-16 21:36 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Jens Axboe, Linus Torvalds, Andrew Morton, Tejun Heo, LKML

On Tue, Oct 16, 2007 at 11:13:19PM +0200, Rafael J. Wysocki wrote:
> On Tuesday, 16 October 2007 22:50, Jens Axboe wrote:
> > On Tue, Oct 16 2007, Greg KH wrote:
> > > On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > > > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > > > Hi,
> > > > > > 
> > > > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > > > appear for vanilla 2.6.23):
> > > > > > 
> > > > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > > > 
> > > > > > Call Trace:
> > > > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > > > 
> > > > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > > > sysfs: duplicate filename 'eth1' can not be created
> > > > > > 
> > > > > > Everything seems to work, but this just looks fishy.
> > > > > 
> > > > > This is a userspace program renaming your network device to a name that
> > > > > is already in use.  What distro and release is this?
> > > > 
> > > > openSUSE 10.2, with some updates (not the most recent, though).
> > > 
> > > Can you try 10.3?  I think we fixed this issue there.
> > 
> > Ehm nope:
> > 
> > Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
> > can not be created
> > Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
> > eth1
> > Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
> > sysfs_add_one()
> > Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
> > Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
> > Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
> > Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
> > Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
> > Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
> > Oct 16 19:36:27 carl kernel:  [<c01a1938>]
> > inotify_d_instantiate+0x18/0x80
> > Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
> > Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
> > Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
> > Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
> > Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
> > Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
> > Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
> > Oct 16 19:36:27 carl kernel:  =======================
> > Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
> > sysfs_create_symlink failed (-17)
> 
> Plus it doesn't happen on 2.6.23 on my system, so I count it as a regression.

It's a new warning I've added to the kernel to catch stupid userspace
and kernel code that is quietly failing when they are doing things
incorrectly with kobjects and sysfs.

So it's not really a "regression" in that we never notified anyone of
this kind of thing before, think of it as a new feature :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 20:50       ` Jens Axboe
  2007-10-16 21:13         ` Rafael J. Wysocki
@ 2007-10-16 21:37         ` Greg KH
  2007-10-16 22:32           ` David Miller
  2007-10-17 10:22         ` Kay Sievers
  2 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2007-10-16 21:37 UTC (permalink / raw)
  To: Jens Axboe, Kay Sievers
  Cc: Rafael J. Wysocki, Linus Torvalds, Andrew Morton, Tejun Heo, LKML

On Tue, Oct 16, 2007 at 10:50:54PM +0200, Jens Axboe wrote:
> On Tue, Oct 16 2007, Greg KH wrote:
> > On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > > Hi,
> > > > > 
> > > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > > appear for vanilla 2.6.23):
> > > > > 
> > > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > > 
> > > > > Call Trace:
> > > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > > 
> > > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > > sysfs: duplicate filename 'eth1' can not be created
> > > > > 
> > > > > Everything seems to work, but this just looks fishy.
> > > > 
> > > > This is a userspace program renaming your network device to a name that
> > > > is already in use.  What distro and release is this?
> > > 
> > > openSUSE 10.2, with some updates (not the most recent, though).
> > 
> > Can you try 10.3?  I think we fixed this issue there.
> 
> Ehm nope:
> 
> Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
> can not be created
> Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
> eth1
> Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
> sysfs_add_one()
> Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
> Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
> Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
> Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
> Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
> Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
> Oct 16 19:36:27 carl kernel:  [<c01a1938>]
> inotify_d_instantiate+0x18/0x80
> Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
> Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
> Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
> Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
> Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
> Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
> Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
> Oct 16 19:36:27 carl kernel:  =======================
> Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
> sysfs_create_symlink failed (-17)

Ugh, not good, I'll poke Kay...

{poke}

Kay, are we doing something wrong in userspace when renaming wireless
devices such that we can overlap names?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 21:37         ` Greg KH
@ 2007-10-16 22:32           ` David Miller
  2007-10-16 23:23             ` Greg KH
  0 siblings, 1 reply; 27+ messages in thread
From: David Miller @ 2007-10-16 22:32 UTC (permalink / raw)
  To: greg; +Cc: jens.axboe, kay.sievers, rjw, torvalds, akpm, htejun,
	linux-kernel

From: Greg KH <greg@kroah.com>
Date: Tue, 16 Oct 2007 14:37:30 -0700

> Kay, are we doing something wrong in userspace when renaming wireless
> devices such that we can overlap names?

It does it for all network devices, I see this ugly message on every
single system I have from Fedora foo to RHEL foo to ubuntu foo to
debian foo.

udev simply applies the MAC address to device name rules blindly, it
doesn't check if the device already has the desired name already

It's been like this forever, and since userland has been doing it for
so long, you can't warn on this there is too much established
practice.  Expecting people to install "fixed" udev is not an
acceptable answer, the warning is a regression and therefore you'll
have to remove the kernel warning for this case and live with this
issue essentially forever.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 22:32           ` David Miller
@ 2007-10-16 23:23             ` Greg KH
  2007-10-17 10:16               ` Kay Sievers
  0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2007-10-16 23:23 UTC (permalink / raw)
  To: David Miller
  Cc: jens.axboe, kay.sievers, rjw, torvalds, akpm, htejun,
	linux-kernel

On Tue, Oct 16, 2007 at 03:32:48PM -0700, David Miller wrote:
> From: Greg KH <greg@kroah.com>
> Date: Tue, 16 Oct 2007 14:37:30 -0700
> 
> > Kay, are we doing something wrong in userspace when renaming wireless
> > devices such that we can overlap names?
> 
> It does it for all network devices, I see this ugly message on every
> single system I have from Fedora foo to RHEL foo to ubuntu foo to
> debian foo.
> 
> udev simply applies the MAC address to device name rules blindly, it
> doesn't check if the device already has the desired name already

Ugh :(

> It's been like this forever, and since userland has been doing it for
> so long, you can't warn on this there is too much established
> practice.  Expecting people to install "fixed" udev is not an
> acceptable answer, the warning is a regression and therefore you'll
> have to remove the kernel warning for this case and live with this
> issue essentially forever.

Nope, I guess we will have to take out the check (or put it under the
kobject debugging flag), unless Kay has any other ideas...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 21:36           ` Greg KH
@ 2007-10-16 23:58             ` Rafael J. Wysocki
  2007-10-17 10:17               ` Kay Sievers
  0 siblings, 1 reply; 27+ messages in thread
From: Rafael J. Wysocki @ 2007-10-16 23:58 UTC (permalink / raw)
  To: Greg KH; +Cc: Jens Axboe, Linus Torvalds, Andrew Morton, Tejun Heo, LKML

On Tuesday, 16 October 2007 23:36, Greg KH wrote:
> On Tue, Oct 16, 2007 at 11:13:19PM +0200, Rafael J. Wysocki wrote:
> > On Tuesday, 16 October 2007 22:50, Jens Axboe wrote:
> > > On Tue, Oct 16 2007, Greg KH wrote:
> > > > On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > > > > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > > > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > > > > Hi,
> > > > > > > 
> > > > > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > > > > appear for vanilla 2.6.23):
> > > > > > > 
> > > > > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > > > > 
> > > > > > > Call Trace:
> > > > > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > > > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > > > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > > > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > > > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > > > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > > > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > > > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > > > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > > > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > > > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > > > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > > > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > > > > 
> > > > > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > > > > sysfs: duplicate filename 'eth1' can not be created
> > > > > > > 
> > > > > > > Everything seems to work, but this just looks fishy.
> > > > > > 
> > > > > > This is a userspace program renaming your network device to a name that
> > > > > > is already in use.  What distro and release is this?
> > > > > 
> > > > > openSUSE 10.2, with some updates (not the most recent, though).
> > > > 
> > > > Can you try 10.3?  I think we fixed this issue there.
> > > 
> > > Ehm nope:
> > > 
> > > Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
> > > can not be created
> > > Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
> > > eth1
> > > Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
> > > sysfs_add_one()
> > > Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
> > > Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
> > > Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
> > > Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
> > > Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
> > > Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
> > > Oct 16 19:36:27 carl kernel:  [<c01a1938>]
> > > inotify_d_instantiate+0x18/0x80
> > > Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
> > > Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
> > > Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
> > > Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
> > > Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
> > > Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
> > > Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
> > > Oct 16 19:36:27 carl kernel:  =======================
> > > Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
> > > sysfs_create_symlink failed (-17)
> > 
> > Plus it doesn't happen on 2.6.23 on my system, so I count it as a regression.
> 
> It's a new warning I've added to the kernel to catch stupid userspace
> and kernel code that is quietly failing when they are doing things
> incorrectly with kobjects and sysfs.
> 
> So it's not really a "regression" in that we never notified anyone of
> this kind of thing before, think of it as a new feature :)

Well, it seems to be a little bit over the top, then. ;-)

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 23:23             ` Greg KH
@ 2007-10-17 10:16               ` Kay Sievers
  2007-10-24 23:43                 ` Greg KH
  0 siblings, 1 reply; 27+ messages in thread
From: Kay Sievers @ 2007-10-17 10:16 UTC (permalink / raw)
  To: Greg KH; +Cc: David Miller, jens.axboe, rjw, torvalds, akpm, htejun,
	linux-kernel

On Tue, 2007-10-16 at 16:23 -0700, Greg KH wrote:
> On Tue, Oct 16, 2007 at 03:32:48PM -0700, David Miller wrote:
> > From: Greg KH <greg@kroah.com>
> > Date: Tue, 16 Oct 2007 14:37:30 -0700
> > 
> > > Kay, are we doing something wrong in userspace when renaming wireless
> > > devices such that we can overlap names?

Not udev, but SUSE 10.2's network renaming. It uses udev and calls
ifrename in the same code path. 10.3 uses the unified version from the
udev tree.

> > It does it for all network devices, I see this ugly message on every
> > single system I have from Fedora foo to RHEL foo to ubuntu foo to
> > debian foo.
> >
> > udev simply applies the MAC address to device name rules blindly, it
> > doesn't check if the device already has the desired name already

There is a check for the same name in udev for long.

> Ugh :(
> 
> > It's been like this forever, and since userland has been doing it for
> > so long, you can't warn on this there is too much established
> > practice.  Expecting people to install "fixed" udev is not an
> > acceptable answer, the warning is a regression and therefore you'll
> > have to remove the kernel warning for this case and live with this
> > issue essentially forever.

We should probably just add the check to kobject_rename() and print a
simple warning and then do nothing. Or just do the check in the network
ioctl, if we really don't want to see this.

> Nope, I guess we will have to take out the check (or put it under the
> kobject debugging flag), unless Kay has any other ideas...

We should really keep it, it already exposed a lot of serious bugs in
the kernel and users, we never spotted before.

Kay


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 23:58             ` Rafael J. Wysocki
@ 2007-10-17 10:17               ` Kay Sievers
  2007-10-17 17:35                 ` Rafael J. Wysocki
  0 siblings, 1 reply; 27+ messages in thread
From: Kay Sievers @ 2007-10-17 10:17 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Greg KH, Jens Axboe, Linus Torvalds, Andrew Morton, Tejun Heo,
	LKML

On 10/17/07, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Tuesday, 16 October 2007 23:36, Greg KH wrote:
> > On Tue, Oct 16, 2007 at 11:13:19PM +0200, Rafael J. Wysocki wrote:
> > > On Tuesday, 16 October 2007 22:50, Jens Axboe wrote:
> > > > On Tue, Oct 16 2007, Greg KH wrote:
> > > > > On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > > > > > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > > > > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > > > > > appear for vanilla 2.6.23):
> > > > > > > >
> > > > > > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > > > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > > > > >
> > > > > > > > Call Trace:
> > > > > > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > > > > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > > > > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > > > > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > > > > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > > > > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > > > > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > > > > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > > > > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > > > > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > > > > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > > > > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > > > > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > > > > >
> > > > > > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > > > > > sysfs: duplicate filename 'eth1' can not be created
> > > > > > > >
> > > > > > > > Everything seems to work, but this just looks fishy.
> > > > > > >
> > > > > > > This is a userspace program renaming your network device to a name that
> > > > > > > is already in use.  What distro and release is this?
> > > > > >
> > > > > > openSUSE 10.2, with some updates (not the most recent, though).
> > > > >
> > > > > Can you try 10.3?  I think we fixed this issue there.
> > > >
> > > > Ehm nope:
> > > >
> > > > Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
> > > > can not be created
> > > > Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
> > > > eth1
> > > > Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
> > > > sysfs_add_one()
> > > > Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
> > > > Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
> > > > Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
> > > > Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
> > > > Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
> > > > Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
> > > > Oct 16 19:36:27 carl kernel:  [<c01a1938>]
> > > > inotify_d_instantiate+0x18/0x80
> > > > Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
> > > > Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
> > > > Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
> > > > Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
> > > > Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
> > > > Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
> > > > Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
> > > > Oct 16 19:36:27 carl kernel:  =======================
> > > > Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
> > > > sysfs_create_symlink failed (-17)
> > >
> > > Plus it doesn't happen on 2.6.23 on my system, so I count it as a regression.
> >
> > It's a new warning I've added to the kernel to catch stupid userspace
> > and kernel code that is quietly failing when they are doing things
> > incorrectly with kobjects and sysfs.
> >
> > So it's not really a "regression" in that we never notified anyone of
> > this kind of thing before, think of it as a new feature :)
>
> Well, it seems to be a little bit over the top, then. ;-)

In the network renaming it's a bit noisy, yes, but for other users
which we discovered by this, it already exposed real bugs.

Kay

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-16 20:50       ` Jens Axboe
  2007-10-16 21:13         ` Rafael J. Wysocki
  2007-10-16 21:37         ` Greg KH
@ 2007-10-17 10:22         ` Kay Sievers
  2007-10-17 10:33           ` Jens Axboe
  2 siblings, 1 reply; 27+ messages in thread
From: Kay Sievers @ 2007-10-17 10:22 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Greg KH, Rafael J. Wysocki, Linus Torvalds, Andrew Morton,
	Tejun Heo, LKML

On 10/16/07, Jens Axboe <jens.axboe@oracle.com> wrote:
> On Tue, Oct 16 2007, Greg KH wrote:
> > On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > > Hi,
> > > > >
> > > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > > appear for vanilla 2.6.23):
> > > > >
> > > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > >
> > > > > Call Trace:
> > > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > >
> > > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > > sysfs: duplicate filename 'eth1' can not be created
> > > > >
> > > > > Everything seems to work, but this just looks fishy.
> > > >
> > > > This is a userspace program renaming your network device to a name that
> > > > is already in use.  What distro and release is this?
> > >
> > > openSUSE 10.2, with some updates (not the most recent, though).
> >
> > Can you try 10.3?  I think we fixed this issue there.
>
> Ehm nope:
>
> Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
> can not be created
> Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
> eth1
> Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
> sysfs_add_one()
> Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
> Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
> Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
> Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
> Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
> Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
> Oct 16 19:36:27 carl kernel:  [<c01a1938>]
> inotify_d_instantiate+0x18/0x80
> Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
> Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
> Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
> Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
> Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
> Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
> Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
> Oct 16 19:36:27 carl kernel:  =======================
> Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
> sysfs_create_symlink failed (-17)

Are you switching from the ipw to the iwl driver?
Care to delete (or remove the entries):
  /etc/udev/rules.d/70-persistent-net.rules
and try with iwl only? It should work then, even when going back to ipw.

A fix for this didn't make it into the 10.3 release, but is in the
upstream udev tree.

Thanks,
Kay

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-17 10:22         ` Kay Sievers
@ 2007-10-17 10:33           ` Jens Axboe
  2007-10-17 10:44             ` Jens Axboe
  0 siblings, 1 reply; 27+ messages in thread
From: Jens Axboe @ 2007-10-17 10:33 UTC (permalink / raw)
  To: Kay Sievers
  Cc: Greg KH, Rafael J. Wysocki, Linus Torvalds, Andrew Morton,
	Tejun Heo, LKML

On Wed, Oct 17 2007, Kay Sievers wrote:
> On 10/16/07, Jens Axboe <jens.axboe@oracle.com> wrote:
> > On Tue, Oct 16 2007, Greg KH wrote:
> > > On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > > > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > > > Hi,
> > > > > >
> > > > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > > > appear for vanilla 2.6.23):
> > > > > >
> > > > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > > >
> > > > > > Call Trace:
> > > > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > > >
> > > > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > > > sysfs: duplicate filename 'eth1' can not be created
> > > > > >
> > > > > > Everything seems to work, but this just looks fishy.
> > > > >
> > > > > This is a userspace program renaming your network device to a name that
> > > > > is already in use.  What distro and release is this?
> > > >
> > > > openSUSE 10.2, with some updates (not the most recent, though).
> > >
> > > Can you try 10.3?  I think we fixed this issue there.
> >
> > Ehm nope:
> >
> > Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
> > can not be created
> > Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
> > eth1
> > Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
> > sysfs_add_one()
> > Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
> > Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
> > Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
> > Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
> > Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
> > Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
> > Oct 16 19:36:27 carl kernel:  [<c01a1938>]
> > inotify_d_instantiate+0x18/0x80
> > Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
> > Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
> > Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
> > Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
> > Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
> > Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
> > Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
> > Oct 16 19:36:27 carl kernel:  =======================
> > Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
> > sysfs_create_symlink failed (-17)
> 
> Are you switching from the ipw to the iwl driver?
> Care to delete (or remove the entries):
>   /etc/udev/rules.d/70-persistent-net.rules
> and try with iwl only? It should work then, even when going back to ipw.

Yep, that's exactly what I'm doing. I'll try and kill that udev entry.

> A fix for this didn't make it into the 10.3 release, but is in the
> upstream udev tree.

OK

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-17 10:33           ` Jens Axboe
@ 2007-10-17 10:44             ` Jens Axboe
  0 siblings, 0 replies; 27+ messages in thread
From: Jens Axboe @ 2007-10-17 10:44 UTC (permalink / raw)
  To: Kay Sievers
  Cc: Greg KH, Rafael J. Wysocki, Linus Torvalds, Andrew Morton,
	Tejun Heo, LKML

On Wed, Oct 17 2007, Jens Axboe wrote:
> On Wed, Oct 17 2007, Kay Sievers wrote:
> > On 10/16/07, Jens Axboe <jens.axboe@oracle.com> wrote:
> > > On Tue, Oct 16 2007, Greg KH wrote:
> > > > On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > > > > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > > > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > > > > appear for vanilla 2.6.23):
> > > > > > >
> > > > > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > > > >
> > > > > > > Call Trace:
> > > > > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > > > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > > > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > > > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > > > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > > > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > > > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > > > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > > > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > > > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > > > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > > > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > > > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > > > >
> > > > > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > > > > sysfs: duplicate filename 'eth1' can not be created
> > > > > > >
> > > > > > > Everything seems to work, but this just looks fishy.
> > > > > >
> > > > > > This is a userspace program renaming your network device to a name that
> > > > > > is already in use.  What distro and release is this?
> > > > >
> > > > > openSUSE 10.2, with some updates (not the most recent, though).
> > > >
> > > > Can you try 10.3?  I think we fixed this issue there.
> > >
> > > Ehm nope:
> > >
> > > Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
> > > can not be created
> > > Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
> > > eth1
> > > Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
> > > sysfs_add_one()
> > > Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
> > > Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
> > > Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
> > > Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
> > > Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
> > > Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
> > > Oct 16 19:36:27 carl kernel:  [<c01a1938>]
> > > inotify_d_instantiate+0x18/0x80
> > > Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
> > > Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
> > > Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
> > > Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
> > > Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
> > > Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
> > > Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
> > > Oct 16 19:36:27 carl kernel:  =======================
> > > Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
> > > sysfs_create_symlink failed (-17)
> > 
> > Are you switching from the ipw to the iwl driver?
> > Care to delete (or remove the entries):
> >   /etc/udev/rules.d/70-persistent-net.rules
> > and try with iwl only? It should work then, even when going back to ipw.
> 
> Yep, that's exactly what I'm doing. I'll try and kill that udev entry.

Removing that udev rule file got rid of the warning here. Now I just
have to figure out why iwl3945 doesn't work for me in the vanilla
kernel, when it does in the SUSE kernel...


-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-17 10:17               ` Kay Sievers
@ 2007-10-17 17:35                 ` Rafael J. Wysocki
  0 siblings, 0 replies; 27+ messages in thread
From: Rafael J. Wysocki @ 2007-10-17 17:35 UTC (permalink / raw)
  To: Kay Sievers
  Cc: Greg KH, Jens Axboe, Linus Torvalds, Andrew Morton, Tejun Heo,
	LKML

On Wednesday, 17 October 2007 12:17, Kay Sievers wrote:
> On 10/17/07, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Tuesday, 16 October 2007 23:36, Greg KH wrote:
> > > On Tue, Oct 16, 2007 at 11:13:19PM +0200, Rafael J. Wysocki wrote:
> > > > On Tuesday, 16 October 2007 22:50, Jens Axboe wrote:
> > > > > On Tue, Oct 16 2007, Greg KH wrote:
> > > > > > On Tue, Oct 16, 2007 at 10:04:51PM +0200, Rafael J. Wysocki wrote:
> > > > > > > On Tuesday, 16 October 2007 06:50, Greg KH wrote:
> > > > > > > > On Sat, Oct 13, 2007 at 09:26:32PM +0200, Rafael J. Wysocki wrote:
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > There are many traces like this in my dmesg from 2.6.23-git3 (they don't
> > > > > > > > > appear for vanilla 2.6.23):
> > > > > > > > >
> > > > > > > > > <4>sysfs: duplicate filename 'ethxx1' can not be created
> > > > > > > > > WARNING: at /home/rafael/src/linux-2.6/fs/sysfs/dir.c:425 sysfs_add_one()
> > > > > > > > >
> > > > > > > > > Call Trace:
> > > > > > > > >  [<ffffffff802d1532>] sysfs_add_one+0x5c/0xc9
> > > > > > > > >  [<ffffffff802d2411>] sysfs_create_link+0xd1/0x12c
> > > > > > > > >  [<ffffffff803756da>] device_rename+0x17a/0x1db
> > > > > > > > >  [<ffffffff803c903d>] dev_change_name+0x114/0x20c
> > > > > > > > >  [<ffffffff803c9339>] dev_ifsioc+0x204/0x2d0
> > > > > > > > >  [<ffffffff803c9925>] dev_ioctl+0x520/0x633
> > > > > > > > >  [<ffffffff803bf445>] sk_alloc+0x37/0x10c
> > > > > > > > >  [<ffffffff8024b977>] up_read+0x9/0xb
> > > > > > > > >  [<ffffffff803bc65e>] sock_ioctl+0x1fe/0x20c
> > > > > > > > >  [<ffffffff8029b34a>] do_ioctl+0x2a/0x77
> > > > > > > > >  [<ffffffff8029b5e8>] vfs_ioctl+0x251/0x26e
> > > > > > > > >  [<ffffffff8029b664>] sys_ioctl+0x5f/0x83
> > > > > > > > >  [<ffffffff8020bd4e>] system_call+0x7e/0x83
> > > > > > > > >
> > > > > > > > > net ethxx1: device_rename: sysfs_create_symlink failed (-17)
> > > > > > > > > sysfs: duplicate filename 'eth1' can not be created
> > > > > > > > >
> > > > > > > > > Everything seems to work, but this just looks fishy.
> > > > > > > >
> > > > > > > > This is a userspace program renaming your network device to a name that
> > > > > > > > is already in use.  What distro and release is this?
> > > > > > >
> > > > > > > openSUSE 10.2, with some updates (not the most recent, though).
> > > > > >
> > > > > > Can you try 10.3?  I think we fixed this issue there.
> > > > >
> > > > > Ehm nope:
> > > > >
> > > > > Oct 16 19:36:27 carl kernel: sysfs: duplicate filename 'wlan0_rename'
> > > > > can not be created
> > > > > Oct 16 19:36:27 carl kernel: udev: renamed network interface wmaster0 to
> > > > > eth1
> > > > > Oct 16 19:36:27 carl kernel: WARNING: at fs/sysfs/dir.c:425
> > > > > sysfs_add_one()
> > > > > Oct 16 19:36:27 carl kernel:  [<c01b2dbf>] sysfs_add_one+0x9f/0xe0
> > > > > Oct 16 19:36:27 carl kernel:  [<c01b3b76>] sysfs_create_link+0x86/0x110
> > > > > Oct 16 19:36:27 carl kernel:  [<c02398ca>] device_rename+0x17a/0x1e0
> > > > > Oct 16 19:36:27 carl kernel:  [<c015b56f>] filemap_fault+0x1ff/0x400
> > > > > Oct 16 19:36:27 carl kernel:  [<c02b8fc0>] dev_change_name+0xb0/0x210
> > > > > Oct 16 19:36:27 carl kernel:  [<c02b9779>] dev_ioctl+0x3c9/0x530
> > > > > Oct 16 19:36:27 carl kernel:  [<c01a1938>]
> > > > > inotify_d_instantiate+0x18/0x80
> > > > > Oct 16 19:36:27 carl kernel:  [<c0120044>] do_page_fault+0x4a4/0x6f0
> > > > > Oct 16 19:36:27 carl kernel:  [<c02ac080>] sock_ioctl+0x0/0x220
> > > > > Oct 16 19:36:27 carl kernel:  [<c01851ab>] do_ioctl+0x2b/0x90
> > > > > Oct 16 19:36:27 carl kernel:  [<c02ad50b>] sys_socket+0x2b/0x50
> > > > > Oct 16 19:36:27 carl kernel:  [<c018542e>] vfs_ioctl+0x21e/0x2a0
> > > > > Oct 16 19:36:27 carl kernel:  [<c01854ed>] sys_ioctl+0x3d/0x70
> > > > > Oct 16 19:36:27 carl kernel:  [<c01042d6>] sysenter_past_esp+0x6b/0xa1
> > > > > Oct 16 19:36:27 carl kernel:  =======================
> > > > > Oct 16 19:36:27 carl kernel: net wlan0_rename: device_rename:
> > > > > sysfs_create_symlink failed (-17)
> > > >
> > > > Plus it doesn't happen on 2.6.23 on my system, so I count it as a regression.
> > >
> > > It's a new warning I've added to the kernel to catch stupid userspace
> > > and kernel code that is quietly failing when they are doing things
> > > incorrectly with kobjects and sysfs.
> > >
> > > So it's not really a "regression" in that we never notified anyone of
> > > this kind of thing before, think of it as a new feature :)
> >
> > Well, it seems to be a little bit over the top, then. ;-)
> 
> In the network renaming it's a bit noisy, yes, but for other users
> which we discovered by this, it already exposed real bugs.

Is it possible to change udev rules to avoid the warnings on openSUSE 10.2?

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-17 10:16               ` Kay Sievers
@ 2007-10-24 23:43                 ` Greg KH
  2007-10-24 23:52                   ` Greg KH
  0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2007-10-24 23:43 UTC (permalink / raw)
  To: Kay Sievers
  Cc: David Miller, jens.axboe, rjw, torvalds, akpm, htejun,
	linux-kernel

On Wed, Oct 17, 2007 at 12:16:54PM +0200, Kay Sievers wrote:
> On Tue, 2007-10-16 at 16:23 -0700, Greg KH wrote:
> > On Tue, Oct 16, 2007 at 03:32:48PM -0700, David Miller wrote:
> > > From: Greg KH <greg@kroah.com>
> > > Date: Tue, 16 Oct 2007 14:37:30 -0700
> > > 
> > > > Kay, are we doing something wrong in userspace when renaming wireless
> > > > devices such that we can overlap names?
> 
> Not udev, but SUSE 10.2's network renaming. It uses udev and calls
> ifrename in the same code path. 10.3 uses the unified version from the
> udev tree.
> 
> > > It does it for all network devices, I see this ugly message on every
> > > single system I have from Fedora foo to RHEL foo to ubuntu foo to
> > > debian foo.
> > >
> > > udev simply applies the MAC address to device name rules blindly, it
> > > doesn't check if the device already has the desired name already
> 
> There is a check for the same name in udev for long.
> 
> > Ugh :(
> > 
> > > It's been like this forever, and since userland has been doing it for
> > > so long, you can't warn on this there is too much established
> > > practice.  Expecting people to install "fixed" udev is not an
> > > acceptable answer, the warning is a regression and therefore you'll
> > > have to remove the kernel warning for this case and live with this
> > > issue essentially forever.
> 
> We should probably just add the check to kobject_rename() and print a
> simple warning and then do nothing. Or just do the check in the network
> ioctl, if we really don't want to see this.

I agree that perhaps kobject_rename() should check for this.  Let me go
see if I can get that to work...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-24 23:43                 ` Greg KH
@ 2007-10-24 23:52                   ` Greg KH
  2007-10-25 16:58                     ` Kay Sievers
  0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2007-10-24 23:52 UTC (permalink / raw)
  To: Kay Sievers
  Cc: David Miller, jens.axboe, rjw, torvalds, akpm, htejun,
	linux-kernel

On Wed, Oct 24, 2007 at 04:43:48PM -0700, Greg KH wrote:
> On Wed, Oct 17, 2007 at 12:16:54PM +0200, Kay Sievers wrote:
> > On Tue, 2007-10-16 at 16:23 -0700, Greg KH wrote:
> > > On Tue, Oct 16, 2007 at 03:32:48PM -0700, David Miller wrote:
> > > > From: Greg KH <greg@kroah.com>
> > > > Date: Tue, 16 Oct 2007 14:37:30 -0700
> > > > 
> > > > > Kay, are we doing something wrong in userspace when renaming wireless
> > > > > devices such that we can overlap names?
> > 
> > Not udev, but SUSE 10.2's network renaming. It uses udev and calls
> > ifrename in the same code path. 10.3 uses the unified version from the
> > udev tree.
> > 
> > > > It does it for all network devices, I see this ugly message on every
> > > > single system I have from Fedora foo to RHEL foo to ubuntu foo to
> > > > debian foo.
> > > >
> > > > udev simply applies the MAC address to device name rules blindly, it
> > > > doesn't check if the device already has the desired name already
> > 
> > There is a check for the same name in udev for long.
> > 
> > > Ugh :(
> > > 
> > > > It's been like this forever, and since userland has been doing it for
> > > > so long, you can't warn on this there is too much established
> > > > practice.  Expecting people to install "fixed" udev is not an
> > > > acceptable answer, the warning is a regression and therefore you'll
> > > > have to remove the kernel warning for this case and live with this
> > > > issue essentially forever.
> > 
> > We should probably just add the check to kobject_rename() and print a
> > simple warning and then do nothing. Or just do the check in the network
> > ioctl, if we really don't want to see this.
> 
> I agree that perhaps kobject_rename() should check for this.  Let me go
> see if I can get that to work...

Can someone try this patch, and see what happens when they try to rename
an object to something that is already existing?

thanks,

greg k-h


---
 lib/kobject.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -366,6 +366,19 @@ int kobject_rename(struct kobject * kobj
 	if (!kobj->parent)
 		return -EINVAL;
 
+	/* see if this name is already in use */
+	if (kobj->kset) {
+		struct kobject *temp_kobj;
+		temp_kobj = kset_find_obj(kobj->kset, new_name);
+		if (temp_kobj) {
+			printk(KERN_WARNING "kobject '%s' can not be renamed "
+			       "to '%s' as '%s' is already in existance.\n",
+			       kobject_name(kobj), new_name, new_name);
+			kobject_put(temp_kobj);
+			return -EINVAL;
+		}
+	}
+
 	devpath = kobject_get_path(kobj, GFP_KERNEL);
 	if (!devpath) {
 		error = -ENOMEM;

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-24 23:52                   ` Greg KH
@ 2007-10-25 16:58                     ` Kay Sievers
  0 siblings, 0 replies; 27+ messages in thread
From: Kay Sievers @ 2007-10-25 16:58 UTC (permalink / raw)
  To: Greg KH; +Cc: David Miller, jens.axboe, rjw, torvalds, akpm, htejun,
	linux-kernel

On Wed, 2007-10-24 at 16:52 -0700, Greg KH wrote: 
> On Wed, Oct 24, 2007 at 04:43:48PM -0700, Greg KH wrote:
> > On Wed, Oct 17, 2007 at 12:16:54PM +0200, Kay Sievers wrote:
> > > On Tue, 2007-10-16 at 16:23 -0700, Greg KH wrote:
> > > > On Tue, Oct 16, 2007 at 03:32:48PM -0700, David Miller wrote:
> > > > > From: Greg KH <greg@kroah.com>
> > > > > Date: Tue, 16 Oct 2007 14:37:30 -0700
> > > > > 
> > > > > > Kay, are we doing something wrong in userspace when renaming wireless
> > > > > > devices such that we can overlap names?
> > > 
> > > Not udev, but SUSE 10.2's network renaming. It uses udev and calls
> > > ifrename in the same code path. 10.3 uses the unified version from the
> > > udev tree.
> > > 
> > > > > It does it for all network devices, I see this ugly message on every
> > > > > single system I have from Fedora foo to RHEL foo to ubuntu foo to
> > > > > debian foo.
> > > > >
> > > > > udev simply applies the MAC address to device name rules blindly, it
> > > > > doesn't check if the device already has the desired name already
> > > 
> > > There is a check for the same name in udev for long.
> > > 
> > > > Ugh :(
> > > > 
> > > > > It's been like this forever, and since userland has been doing it for
> > > > > so long, you can't warn on this there is too much established
> > > > > practice.  Expecting people to install "fixed" udev is not an
> > > > > acceptable answer, the warning is a regression and therefore you'll
> > > > > have to remove the kernel warning for this case and live with this
> > > > > issue essentially forever.
> > > 
> > > We should probably just add the check to kobject_rename() and print a
> > > simple warning and then do nothing. Or just do the check in the network
> > > ioctl, if we really don't want to see this.
> > 
> > I agree that perhaps kobject_rename() should check for this.  Let me go
> > see if I can get that to work...
> 
> Can someone try this patch, and see what happens when they try to rename
> an object to something that is already existing?

That may still fail if a netif creation, and a rename compete about the
same name, right?

The driver core name of the netdev is part of the netdev, so the net
core might need to rename the driver core part while holding its usual
lock, just like it does when it changes the net internal name?

The netdev rename should also fail, if the core rename fails, right?

Thanks,
Kay

diff --git a/net/core/dev.c b/net/core/dev.c
index 8726589..ed3db06 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -899,9 +899,12 @@ int dev_change_name(struct net_device *dev, char *newname)
 		strlcpy(dev->name, newname, IFNAMSIZ);
 
 rollback:
-	device_rename(&dev->dev, dev->name);
-
 	write_lock_bh(&dev_base_lock);
+	err = device_rename(&dev->dev, dev->name);
+	if (err) {
+		write_unlock_bh(&dev_base_lock);
+		return err;
+	}
 	hlist_del(&dev->name_hlist);
 	hlist_add_head(&dev->name_hlist, dev_name_hash(net, dev->name));
 	write_unlock_bh(&dev_base_lock);




^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
@ 2007-10-26 17:05 Larry Finger
  2007-10-26 18:07 ` Kay Sievers
  0 siblings, 1 reply; 27+ messages in thread
From: Larry Finger @ 2007-10-26 17:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Kay Sievers; +Cc: LKML

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-26 17:05 Larry Finger
@ 2007-10-26 18:07 ` Kay Sievers
  2007-10-26 18:20   ` Larry Finger
  2007-10-27  2:36   ` Greg KH
  0 siblings, 2 replies; 27+ messages in thread
From: Kay Sievers @ 2007-10-26 18:07 UTC (permalink / raw)
  To: Larry Finger; +Cc: Greg Kroah-Hartman, LKML

On Fri, 2007-10-26 at 12:05 -0500, Larry Finger wrote:
> On my openSUSE 10.3 x86_64 system running v2.6.24-rc1-281-g22d2aa1,
> I get the sysfs rename messages.

Care to try this? Seems like a silly bug in the core if
SYSFS_DEPRECATED=y. That's why we didn't catch this earlier, sorry.

Thanks a lot for the help,
Kay



From: Kay Sievers <kay.sievers@vrfy.org>
Subject: Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
---

diff --git a/drivers/base/core.c b/drivers/base/core.c
index c134341..3f4d6aa 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1228,18 +1228,18 @@ int device_rename(struct device *dev, char *new_name)
 			sysfs_remove_link(&dev->parent->kobj, old_class_name);
 		}
 	}
-#endif
-
+#else
 	if (dev->class) {
 		sysfs_remove_link(&dev->class->subsys.kobj, old_device_name);
 		error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
 					  dev->bus_id);
 		if (error) {
-			/* Uh... how to unravel this if restoring can fail? */
 			dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n",
 				__FUNCTION__, error);
 		}
 	}
+#endif
+
 out:
 	put_device(dev);
 


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-26 18:07 ` Kay Sievers
@ 2007-10-26 18:20   ` Larry Finger
  2007-10-27  2:36   ` Greg KH
  1 sibling, 0 replies; 27+ messages in thread
From: Larry Finger @ 2007-10-26 18:20 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Greg Kroah-Hartman, LKML

Kay Sievers wrote:
> On Fri, 2007-10-26 at 12:05 -0500, Larry Finger wrote:
>> On my openSUSE 10.3 x86_64 system running v2.6.24-rc1-281-g22d2aa1,
>> I get the sysfs rename messages.
> 
> Care to try this? Seems like a silly bug in the core if
> SYSFS_DEPRECATED=y. That's why we didn't catch this earlier, sorry.
> 
> Thanks a lot for the help,
> Kay
> 
> 
> 
> From: Kay Sievers <kay.sievers@vrfy.org>
> Subject: Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y
> 
> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---

Yes, that fixed the problem.

Thanks,

Larry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-26 18:07 ` Kay Sievers
  2007-10-26 18:20   ` Larry Finger
@ 2007-10-27  2:36   ` Greg KH
  2007-10-27  6:08     ` Kay Sievers
  1 sibling, 1 reply; 27+ messages in thread
From: Greg KH @ 2007-10-27  2:36 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Larry Finger, LKML

On Fri, Oct 26, 2007 at 08:07:44PM +0200, Kay Sievers wrote:
> On Fri, 2007-10-26 at 12:05 -0500, Larry Finger wrote:
> > On my openSUSE 10.3 x86_64 system running v2.6.24-rc1-281-g22d2aa1,
> > I get the sysfs rename messages.
> 
> Care to try this? Seems like a silly bug in the core if
> SYSFS_DEPRECATED=y. That's why we didn't catch this earlier, sorry.
> 
> Thanks a lot for the help,
> Kay
> 
> 
> 
> From: Kay Sievers <kay.sievers@vrfy.org>
> Subject: Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y
> 

Do you have some more information for the change log here?  Are we just
not unwinding from errors properly?

This should get so much better and easier to test with the sysfs version
number in the future :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-27  2:36   ` Greg KH
@ 2007-10-27  6:08     ` Kay Sievers
  2007-10-27  6:32       ` Greg KH
  0 siblings, 1 reply; 27+ messages in thread
From: Kay Sievers @ 2007-10-27  6:08 UTC (permalink / raw)
  To: Greg KH; +Cc: Larry Finger, LKML

On Fri, 2007-10-26 at 19:36 -0700, Greg KH wrote:
> On Fri, Oct 26, 2007 at 08:07:44PM +0200, Kay Sievers wrote:
> > On Fri, 2007-10-26 at 12:05 -0500, Larry Finger wrote:
> > > On my openSUSE 10.3 x86_64 system running v2.6.24-rc1-281-g22d2aa1,
> > > I get the sysfs rename messages.
> > 
> > Care to try this? Seems like a silly bug in the core if
> > SYSFS_DEPRECATED=y. That's why we didn't catch this earlier, sorry.

> > From: Kay Sievers <kay.sievers@vrfy.org>
> > Subject: Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y
> > 
> 
> Do you have some more information for the change log here?  Are we just
> not unwinding from errors properly?

The code just shouldn't run if class devices are real directories, it's
an update for the symlink in the class directory. Nobody noticed that as
long as the creation of sysfs files silently failed, and we both missed
it before the merge, because we don't run SYSFS_DEPRECATED=y.

Kay


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: linux-2.6.23-git3: Many sysfs-related warnings in dmesg
  2007-10-27  6:08     ` Kay Sievers
@ 2007-10-27  6:32       ` Greg KH
  0 siblings, 0 replies; 27+ messages in thread
From: Greg KH @ 2007-10-27  6:32 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Larry Finger, LKML

On Sat, Oct 27, 2007 at 08:08:14AM +0200, Kay Sievers wrote:
> On Fri, 2007-10-26 at 19:36 -0700, Greg KH wrote:
> > On Fri, Oct 26, 2007 at 08:07:44PM +0200, Kay Sievers wrote:
> > > On Fri, 2007-10-26 at 12:05 -0500, Larry Finger wrote:
> > > > On my openSUSE 10.3 x86_64 system running v2.6.24-rc1-281-g22d2aa1,
> > > > I get the sysfs rename messages.
> > > 
> > > Care to try this? Seems like a silly bug in the core if
> > > SYSFS_DEPRECATED=y. That's why we didn't catch this earlier, sorry.
> 
> > > From: Kay Sievers <kay.sievers@vrfy.org>
> > > Subject: Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y
> > > 
> > 
> > Do you have some more information for the change log here?  Are we just
> > not unwinding from errors properly?
> 
> The code just shouldn't run if class devices are real directories, it's
> an update for the symlink in the class directory. Nobody noticed that as
> long as the creation of sysfs files silently failed, and we both missed
> it before the merge, because we don't run SYSFS_DEPRECATED=y.

Ah, thanks, that makes sense.

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2007-10-27  6:27 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-13 19:26 linux-2.6.23-git3: Many sysfs-related warnings in dmesg 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
  -- strict thread matches above, loose matches on Subject: below --
2007-10-26 17:05 Larry Finger
2007-10-26 18:07 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox