Skip to contentSkip to conversation

device_rename: sysfs_create_symlink failed (-17)

SYSFS - 2.6.23-rc5-git1 Daniel Lezcano 2 participants 2 messages Sep 7, 2007 – Sep 10, 2007

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 6 lines · Daniel Lezcano

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?

Quoted 2 lines

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

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

Quoted 6 lines

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?)

Quoted 4 lines

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.