public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [SYSFS - 2.6.23-rc5-git1 ] device_rename: sysfs_create_symlink failed (-17)
@ 2007-09-07 14:14 Daniel Lezcano
  2007-09-10 11:30 ` Cornelia Huck
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Lezcano @ 2007-09-07 14:14 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,

when using the 2.6.23-rc5-git1 kernel and trying to change a network 
device name, I have the following error:

device_rename: sysfs_create_symlink failed (-17)

That comes from drivers/base/core.c : 1261

I know anything about sysfs, so no much help to give... :(

I don't know if this is a bug, but my code use device_rename, check the 
return value and fails. I will ignore it, but it seems not to be a 
correct behavior to have such error.

Easy to reproduce:
	load a dummy network driver => dummy0
	change its name with : ip link set name foo0 dev dummy0

Thanks.
  --Daniel

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

* Re: [SYSFS - 2.6.23-rc5-git1 ] device_rename: sysfs_create_symlink failed (-17)
  2007-09-07 14:14 [SYSFS - 2.6.23-rc5-git1 ] device_rename: sysfs_create_symlink failed (-17) Daniel Lezcano
@ 2007-09-10 11:30 ` Cornelia Huck
  0 siblings, 0 replies; 2+ messages in thread
From: Cornelia Huck @ 2007-09-10 11:30 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: Linux Kernel Mailing List

On Fri, 07 Sep 2007 16:14:12 +0200,
Daniel Lezcano <dlezcano@fr.ibm.com> wrote:

> Hi,
> 
> when using the 2.6.23-rc5-git1 kernel and trying to change a network 
> device name, I have the following error:
> 
> device_rename: sysfs_create_symlink failed (-17)

-EEXIST, maybe a double rename?

> 
> That comes from drivers/base/core.c : 1261

This is the link under the class directory to the renamed device.

> 
> I know anything about sysfs, so no much help to give... :(
> 
> I don't know if this is a bug, but my code use device_rename, check the 
> return value and fails. I will ignore it, but it seems not to be a 
> correct behavior to have such error.

Why does your code need to call device_rename() itself, I'd have
thought the networking code took care of it? (BTW: Which driver?)

> 
> Easy to reproduce:
> 	load a dummy network driver => dummy0
> 	change its name with : ip link set name foo0 dev dummy0

[Don't know if ip is sensitive to order, but shouldn't that be
ip link set dev dummy0 name foo0 ?]

You could try to switch on DEBUG_DRIVER and DEBUG_KOBJECT, this may
point to where the double name pops up. 

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

end of thread, other threads:[~2007-09-10 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-07 14:14 [SYSFS - 2.6.23-rc5-git1 ] device_rename: sysfs_create_symlink failed (-17) Daniel Lezcano
2007-09-10 11:30 ` Cornelia Huck

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