Comment 3 for bug 1326473

Revision history for this message
Tyler Hicks (tyhicks) wrote :

This upstream commit, which is not in Lucid, removed the .ctl_name initializer
from netns_core_table:

  f8572d8 sysctl net: Remove unused binary sysctl code

Since Lucid's netns_core_table initializes .ctl_name, sysctl_check_table()
requires the .strategy field to be initialized. Other places using
proc_dointvec_minmax() for the .proc_handler seem to be using sysctl_intvec()
for the .strategy. I suppose the patch below would be the correct fix, but
would like someone from the kernel team to take over from here.

diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 4b1c570..8bc7541 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -132,6 +132,7 @@ static struct ctl_table netns_core_table[] = {
   .extra1 = &zero,
   .extra2 = &ushort_max,
   .proc_handler = proc_dointvec_minmax
+ .strategy = &sysctl_intvec,
  },
  { .ctl_name = 0 }
 };