Re: network regression: cannot rename netdev twice

From: Eric W. Biederman
Date: Tue Jan 31 2012 - 09:15:18 EST


Kay Sievers <kay.sievers@xxxxxxxx> writes:

> On Tue, Jan 31, 2012 at 12:17, Jiri Slaby <jslaby@xxxxxxx> wrote:
>> On 01/31/2012 12:13 PM, Kay Sievers wrote:
>
>>> This is a command sequence you type manually?
>>
>> Yea, and it is working with 3.3.0-rc1-next-20120124_64+. Not with
>> 3.3.0-rc1-next-20120131_64+.
>>
>>> You are sure that userspace is not working in the background,
>>> triggered by uevents, and comes into your way here?
>>
>> Note that krtek exists after the first command. But cannot be renamed
>> further.
>
> Yeah, I can confirm the problem here. I works fine with earlier
> kernels and fails with the latest -next:
>
> # uname -r
> 3.3.0-rc1-next-20120131+
> # modprobe dummy
> # ip link set dummy0 name foo0
> # ip link set foo0 name bar0
> RTNETLINK answers: No such file or directory

There is something weird going on when sysfs directories and symlinks
are renamed. My guess is that I fat fingered something with one of my
last sysfs patches. I will look more deeply once I have slept some
more.

The second network device renames fails because the first rename did not
work properly. ls -l /sys/class/net/ /sys/virtual/net/ will let you see
what I mean.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/