On 16.03.2016 12:10, Sowmini Varadhan wrote:
On (03/16/16 11:29), Hannes Frederic Sowa wrote:
Normally we kmemdup a table per netns and update its data pointer,
so we can reuse the proc_doint_minmax functions.
I remembered one more thing.. in this particular case, I need to
have my one ->proc_handler, because I need to rds_tcp_sysctl_reset()
existing connections to make them use the new tunable.
My hope was actually that by using the ->data pointer in netns you don't
need to provide the two functions, just simply use something like the
following for both cases.
static int rds_skbuf_handler(...) {
int err;
err = proc_dointvec(...);
if (err)
return err;
if (write)
rds_tcp_sysctl_reset(...);
return err;
}
If you use proc_dointvec_min(max) you can already sanitize the input
values even more.
Do I understand it correctly that all connections of a namespace will be
dropped if you modify those sysctls?
Thanks,
Hannes