* Error message from device_rename in drivers/base/core.c
@ 2007-08-08 4:17 Larry Finger
2007-08-08 4:37 ` David Miller
0 siblings, 1 reply; 12+ messages in thread
From: Larry Finger @ 2007-08-08 4:17 UTC (permalink / raw)
To: LKML
I am getting the following error message from drivers/base/core.c:
net eth1: device_rename: sysfs_create_symlink failed (-17)
Upon investigation, the call generating the error is renaming 'eth1' to 'eth1'. The following patch
suppresses the error.
Index: wireless-dev/drivers/base/core.c
===================================================================
--- wireless-dev.orig/drivers/base/core.c
+++ wireless-dev/drivers/base/core.c
@@ -1256,7 +1256,7 @@ int device_rename(struct device *dev, ch
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) {
+ if (error && memcmp(dev->bus_id, new_name, sizeof(new_name))) {
/* Uh... how to unravel this if restoring can fail? */
dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n",
__FUNCTION__, error);
Larry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 4:17 Error message from device_rename in drivers/base/core.c Larry Finger
@ 2007-08-08 4:37 ` David Miller
2007-08-08 4:52 ` Larry Finger
2007-08-08 9:33 ` Cornelia Huck
0 siblings, 2 replies; 12+ messages in thread
From: David Miller @ 2007-08-08 4:37 UTC (permalink / raw)
To: Larry.Finger; +Cc: linux-kernel
From: Larry Finger <Larry.Finger@lwfinger.net>
Date: Tue, 07 Aug 2007 23:17:23 -0500
> I am getting the following error message from drivers/base/core.c:
>
> net eth1: device_rename: sysfs_create_symlink failed (-17)
>
> Upon investigation, the call generating the error is renaming 'eth1' to 'eth1'. The following patch
> suppresses the error.
I think this check belongs in udev not in the kernel. Thankfully
this message at least tells us it is happening, please don't
remove it.
I'm pretty sure it's UDEV doing this, and it should not try to rename
a netdevice to what it already is named.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 4:37 ` David Miller
@ 2007-08-08 4:52 ` Larry Finger
2007-08-08 4:55 ` David Miller
2007-08-08 6:18 ` Sam Ravnborg
2007-08-08 9:33 ` Cornelia Huck
1 sibling, 2 replies; 12+ messages in thread
From: Larry Finger @ 2007-08-08 4:52 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel
David Miller wrote:
> From: Larry Finger <Larry.Finger@lwfinger.net>
> Date: Tue, 07 Aug 2007 23:17:23 -0500
>
>> I am getting the following error message from drivers/base/core.c:
>>
>> net eth1: device_rename: sysfs_create_symlink failed (-17)
>>
>> Upon investigation, the call generating the error is renaming 'eth1' to 'eth1'. The following patch
>> suppresses the error.
>
> I think this check belongs in udev not in the kernel. Thankfully
> this message at least tells us it is happening, please don't
> remove it.
>
> I'm pretty sure it's UDEV doing this, and it should not try to rename
> a netdevice to what it already is named.
>
Yes, it is most likely coming from udev. Do you know who maintains udev? Google didn't give an
answer in the first two pages.
Thanks,
Larry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 4:52 ` Larry Finger
@ 2007-08-08 4:55 ` David Miller
2007-08-08 5:02 ` Larry Finger
2007-08-08 6:18 ` Sam Ravnborg
1 sibling, 1 reply; 12+ messages in thread
From: David Miller @ 2007-08-08 4:55 UTC (permalink / raw)
To: larry.finger; +Cc: linux-kernel
From: Larry Finger <larry.finger@lwfinger.net>
Date: Tue, 07 Aug 2007 23:52:34 -0500
> Yes, it is most likely coming from udev. Do you know who maintains
> udev? Google didn't give an answer in the first two pages.
I may be mis-remembering but I thought Greg KH was at the
helm at least at one point.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 4:55 ` David Miller
@ 2007-08-08 5:02 ` Larry Finger
0 siblings, 0 replies; 12+ messages in thread
From: Larry Finger @ 2007-08-08 5:02 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel
David Miller wrote:
> From: Larry Finger <larry.finger@lwfinger.net>
> Date: Tue, 07 Aug 2007 23:52:34 -0500
>
>> Yes, it is most likely coming from udev. Do you know who maintains
>> udev? Google didn't give an answer in the first two pages.
>
> I may be mis-remembering but I thought Greg KH was at the
> helm at least at one point.
>
Between the previous message and this one, I found a link that lists him as one of the authors. I'll
ping him about the "problem". Thanks for your help.
Larry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 4:52 ` Larry Finger
2007-08-08 4:55 ` David Miller
@ 2007-08-08 6:18 ` Sam Ravnborg
1 sibling, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2007-08-08 6:18 UTC (permalink / raw)
To: Larry Finger; +Cc: David Miller, linux-kernel
On Tue, Aug 07, 2007 at 11:52:34PM -0500, Larry Finger wrote:
> David Miller wrote:
> >From: Larry Finger <Larry.Finger@lwfinger.net>
> >Date: Tue, 07 Aug 2007 23:17:23 -0500
> >
> >>I am getting the following error message from drivers/base/core.c:
> >>
> >>net eth1: device_rename: sysfs_create_symlink failed (-17)
> >>
> >>Upon investigation, the call generating the error is renaming 'eth1' to
> >>'eth1'. The following patch suppresses the error.
> >
> >I think this check belongs in udev not in the kernel. Thankfully
> >this message at least tells us it is happening, please don't
> >remove it.
> >
> >I'm pretty sure it's UDEV doing this, and it should not try to rename
> >a netdevice to what it already is named.
> >
>
> Yes, it is most likely coming from udev. Do you know who maintains udev?
> Google didn't give an answer in the first two pages.
Kay Sievers. Se contact details on his udev page here:
http://vrfy.org/log/recent-state-of-udev.html
Sam
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 4:37 ` David Miller
2007-08-08 4:52 ` Larry Finger
@ 2007-08-08 9:33 ` Cornelia Huck
2007-08-08 12:23 ` Larry Finger
1 sibling, 1 reply; 12+ messages in thread
From: Cornelia Huck @ 2007-08-08 9:33 UTC (permalink / raw)
To: David Miller; +Cc: Larry.Finger, linux-kernel
On Tue, 07 Aug 2007 21:37:24 -0700 (PDT),
David Miller <davem@davemloft.net> wrote:
> From: Larry Finger <Larry.Finger@lwfinger.net>
> Date: Tue, 07 Aug 2007 23:17:23 -0500
>
> > I am getting the following error message from drivers/base/core.c:
> >
> > net eth1: device_rename: sysfs_create_symlink failed (-17)
> >
> > Upon investigation, the call generating the error is renaming 'eth1' to 'eth1'. The following patch
> > suppresses the error.
>
> I think this check belongs in udev not in the kernel. Thankfully
> this message at least tells us it is happening, please don't
> remove it.
Hm, device_rename() could alternatively just return success if
dev->bus_id and new_name are the same.
>
> I'm pretty sure it's UDEV doing this, and it should not try to rename
> a netdevice to what it already is named.
But it shouldn't cause an error either :)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 9:33 ` Cornelia Huck
@ 2007-08-08 12:23 ` Larry Finger
2007-08-08 13:46 ` Kay Sievers
0 siblings, 1 reply; 12+ messages in thread
From: Larry Finger @ 2007-08-08 12:23 UTC (permalink / raw)
To: Cornelia Huck; +Cc: David Miller, linux-kernel
Cornelia Huck wrote:
> On Tue, 07 Aug 2007 21:37:24 -0700 (PDT),
> David Miller <davem@davemloft.net> wrote:
>
>> I think this check belongs in udev not in the kernel. Thankfully
>> this message at least tells us it is happening, please don't
>> remove it.
>
> Hm, device_rename() could alternatively just return success if
> dev->bus_id and new_name are the same.
That is what my proposed patch did. One could argue that the test should come before the failure,
not after, but the effect is the same.
>> I'm pretty sure it's UDEV doing this, and it should not try to rename
>> a netdevice to what it already is named.
>
> But it shouldn't cause an error either :)
I agree with you, but you and David can fight it out. While finding out where to ask/complain about
udev, I had a private communication with GregKH. He thinks that a patch to fix this has already been
pushed through Linus. As Linville's wireless-dev tree is a little behind, I'm waiting to see if it
gets fixed here by 2.6.23-rc3. If not, I'll talk to the udev/hotplug folks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 12:23 ` Larry Finger
@ 2007-08-08 13:46 ` Kay Sievers
2007-08-08 13:59 ` Larry Finger
0 siblings, 1 reply; 12+ messages in thread
From: Kay Sievers @ 2007-08-08 13:46 UTC (permalink / raw)
To: Larry Finger; +Cc: Cornelia Huck, David Miller, linux-kernel
On 8/8/07, Larry Finger <larry.finger@lwfinger.net> wrote:
> Cornelia Huck wrote:
> > On Tue, 07 Aug 2007 21:37:24 -0700 (PDT),
> > David Miller <davem@davemloft.net> wrote:
> >
> >> I think this check belongs in udev not in the kernel. Thankfully
> >> this message at least tells us it is happening, please don't
> >> remove it.
> >
> > Hm, device_rename() could alternatively just return success if
> > dev->bus_id and new_name are the same.
>
> That is what my proposed patch did. One could argue that the test should come before the failure,
> not after, but the effect is the same.
>
> >> I'm pretty sure it's UDEV doing this, and it should not try to rename
> >> a netdevice to what it already is named.
> >
> > But it shouldn't cause an error either :)
>
> I agree with you, but you and David can fight it out. While finding out where to ask/complain about
> udev, I had a private communication with GregKH. He thinks that a patch to fix this has already been
> pushed through Linus. As Linville's wireless-dev tree is a little behind, I'm waiting to see if it
> gets fixed here by 2.6.23-rc3. If not, I'll talk to the udev/hotplug folks.
Hmm, I can not immediately see how udev could request the renaming to
the same name:
/* look if we want to change the name of the netif */
if (strcmp(udev->name, udev->dev->kernel) != 0) {
...
retval = rename_netif(udev);
...
}
What udev version is it and which distro and version?
Kay
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 13:46 ` Kay Sievers
@ 2007-08-08 13:59 ` Larry Finger
2007-08-08 14:14 ` Kay Sievers
0 siblings, 1 reply; 12+ messages in thread
From: Larry Finger @ 2007-08-08 13:59 UTC (permalink / raw)
To: Kay Sievers; +Cc: Cornelia Huck, David Miller, linux-kernel
Kay Sievers wrote:
> On 8/8/07, Larry Finger <larry.finger@lwfinger.net> wrote:
>> I agree with you, but you and David can fight it out. While finding out where to ask/complain about
>> udev, I had a private communication with GregKH. He thinks that a patch to fix this has already been
>> pushed through Linus. As Linville's wireless-dev tree is a little behind, I'm waiting to see if it
>> gets fixed here by 2.6.23-rc3. If not, I'll talk to the udev/hotplug folks.
>
> Hmm, I can not immediately see how udev could request the renaming to
> the same name:
>
> /* look if we want to change the name of the netif */
> if (strcmp(udev->name, udev->dev->kernel) != 0) {
> ...
> retval = rename_netif(udev);
> ...
> }
>
> What udev version is it and which distro and version?
My distro is openSUSE 10.2, which is fully patched/updated. According to YaST, I'm using version
103-12 x86_64. My kernel is 2.6.23-rc2 from John Linville's git tree - I run bcm43xx-mac80211.
Larry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 13:59 ` Larry Finger
@ 2007-08-08 14:14 ` Kay Sievers
2007-08-08 15:19 ` Larry Finger
0 siblings, 1 reply; 12+ messages in thread
From: Kay Sievers @ 2007-08-08 14:14 UTC (permalink / raw)
To: Larry Finger; +Cc: Cornelia Huck, David Miller, linux-kernel
On Wed, 2007-08-08 at 08:59 -0500, Larry Finger wrote:
> Kay Sievers wrote:
> > On 8/8/07, Larry Finger <larry.finger@lwfinger.net> wrote:
> >> I agree with you, but you and David can fight it out. While finding out where to ask/complain about
> >> udev, I had a private communication with GregKH. He thinks that a patch to fix this has already been
> >> pushed through Linus. As Linville's wireless-dev tree is a little behind, I'm waiting to see if it
> >> gets fixed here by 2.6.23-rc3. If not, I'll talk to the udev/hotplug folks.
> >
> > Hmm, I can not immediately see how udev could request the renaming to
> > the same name:
> >
> > /* look if we want to change the name of the netif */
> > if (strcmp(udev->name, udev->dev->kernel) != 0) {
> > ...
> > retval = rename_netif(udev);
> > ...
> > }
> >
> > What udev version is it and which distro and version?
>
> My distro is openSUSE 10.2, which is fully patched/updated. According to YaST, I'm using version
> 103-12 x86_64. My kernel is 2.6.23-rc2 from John Linville's git tree - I run bcm43xx-mac80211.
Oh, that's likely a bug in the SUSE versions of the persistent net
interface rules. It is calling ifrename when it needs to swap interface
names (temp rename to free the target name), that logic which may have
that bug.
For the next SUSE release, it is replaced by the (now available)
upstream stuff from the udev tree, which most distros use now, and which
should not have that problem.
Thanks,
Kay
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Error message from device_rename in drivers/base/core.c
2007-08-08 14:14 ` Kay Sievers
@ 2007-08-08 15:19 ` Larry Finger
0 siblings, 0 replies; 12+ messages in thread
From: Larry Finger @ 2007-08-08 15:19 UTC (permalink / raw)
To: Kay Sievers; +Cc: Cornelia Huck, David Miller, linux-kernel
Kay Sievers wrote:
> On Wed, 2007-08-08 at 08:59 -0500, Larry Finger wrote:
>> Kay Sievers wrote:
>>> On 8/8/07, Larry Finger <larry.finger@lwfinger.net> wrote:
>>>> I agree with you, but you and David can fight it out. While finding out where to ask/complain about
>>>> udev, I had a private communication with GregKH. He thinks that a patch to fix this has already been
>>>> pushed through Linus. As Linville's wireless-dev tree is a little behind, I'm waiting to see if it
>>>> gets fixed here by 2.6.23-rc3. If not, I'll talk to the udev/hotplug folks.
>>> Hmm, I can not immediately see how udev could request the renaming to
>>> the same name:
>>>
>>> /* look if we want to change the name of the netif */
>>> if (strcmp(udev->name, udev->dev->kernel) != 0) {
>>> ...
>>> retval = rename_netif(udev);
>>> ...
>>> }
>>>
>>> What udev version is it and which distro and version?
>> My distro is openSUSE 10.2, which is fully patched/updated. According to YaST, I'm using version
>> 103-12 x86_64. My kernel is 2.6.23-rc2 from John Linville's git tree - I run bcm43xx-mac80211.
>
> Oh, that's likely a bug in the SUSE versions of the persistent net
> interface rules. It is calling ifrename when it needs to swap interface
> names (temp rename to free the target name), that logic which may have
> that bug.
> For the next SUSE release, it is replaced by the (now available)
> upstream stuff from the udev tree, which most distros use now, and which
> should not have that problem.
Thanks for the explanation. I'll ignore the message - it doesn't cause any problems anyway, and I'll
expect it to go away when openSUSE 10.3 comes out in October. I think I'll post a bug report with
SUSE just to make sure it gets fixed.
Larry
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-08-08 15:19 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-08 4:17 Error message from device_rename in drivers/base/core.c Larry Finger
2007-08-08 4:37 ` David Miller
2007-08-08 4:52 ` Larry Finger
2007-08-08 4:55 ` David Miller
2007-08-08 5:02 ` Larry Finger
2007-08-08 6:18 ` Sam Ravnborg
2007-08-08 9:33 ` Cornelia Huck
2007-08-08 12:23 ` Larry Finger
2007-08-08 13:46 ` Kay Sievers
2007-08-08 13:59 ` Larry Finger
2007-08-08 14:14 ` Kay Sievers
2007-08-08 15:19 ` Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).