@@ -6044,8 +6044,14 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name,for(i=0;table[i].data;i++){table[i].data+=(char*)p-(char*)&ipv6_devconf;-table[i].extra1=idev;/* embedded; no ref */-table[i].extra2=net;+/* If one of these is already set, then it is not safe to+*overwriteeitherofthem:thismakesproc_dointvec_minmax+*usable.+*/+if(!table[i].extra1&&!table[i].extra2){+table[i].extra1=idev;/* embedded; no ref */+table[i].extra2=net;+}}snprintf(path,sizeof(path),"net/ipv6/conf/%s",dev_name);
From: Maciej Żenczykowski <redacted>
Signed-off-by: Maciej Żenczykowski <redacted>
I was about to ask you to submit this patch alongside an actual
addition of a proc_dointvec_minmax user to the table.
But upon second checking there is one, indirectly via
addrconf_sysctl_mtu().
I should never have to search and figure things out like that. It
should be obvious or explained in the commit message.
You must explain in detail what the dependency is, why you
have to make this change, how you made it, and why you made
it that way.
Especially in this case, your empty commit message is really
not appropriate.
Thanks.
From: Maciej Żenczykowski <redacted>
Signed-off-by: Maciej Żenczykowski <redacted>
I was about to ask you to submit this patch alongside an actual
addition of a proc_dointvec_minmax user to the table.
But upon second checking there is one, indirectly via
addrconf_sysctl_mtu().
And actually these cases use a dummy sysctl blob on the stack to
provide the min/max values to proc_dointvec_minmax. And they do
it _EXACTLY_ because the extra pointers are for the netns pointer
and a pointer to the idev.
And any user envisioned can do the same thing, use a trampoline
like the existing cases do.