Subject: Re: sysfs^H^H^H^H^Hsysctl warnings, reserved names

From: [email-masked] (Eric W. Biederman)
Date: Sun, 19 Feb 2012 13:11:41 -0800

Eric Dumazet <[email-masked]> writes:

>> Well we are talking about sysctl not sysfs but same difference, I keep
>> an on eye on them.
>> 
>> I expect renaming a network device to "all" or "default" would be a
>> problem in any kernel supporting renaming of networking devices.
>> 
>> At the basic level of handling it.  sysctl checks for this sometimes
>> now and as soon as my sysctl tree is merged the checks will become
>> unconditionally present.  In what sense were you thinking it would
>> be better to address this in the sysctl?
>> 
>
> Because problem is : it seems a rename() of "eth3" to "default" is
> allowed by sysctl, yet "default" is already in directory.
>
> It seems sysfs_rename_link() / sysfs_rename_dir() / sysfs_rename() might
> have a problem ?

The files are under /proc/sys so we are talking about sysctls, which
means that the error is reported from register_net_sysctl_table.

The path is:
NETDEV_CHANGENAME
	devinet_sysctl_unregister() -> void
	devinet_sysctl_register() -> void
return NOTIFY_DONE;

Eric