Commit 23eb06de authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller
Browse files

sysctl: Remember the ctl_table we passed to register_sysctl_paths

By doing this we allow users of register_sysctl_paths that build
and dynamically allocate their ctl_table to be simpler.  This allows
them to just remember the ctl_table_header returned from
register_sysctl_paths from which they can now find the
ctl_table array they need to free.
Signed-off-by: default avatarEric W. Biederman <>
Cc: Serge Hallyn <>
Cc: Daniel Lezcano <>
Cc: Cedric Le Goater <>
Cc: Pavel Emelyanov <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarHerbert Xu <>
Signed-off-by: default avatarDavid S. Miller <>
parent 29e796fd
......@@ -1057,6 +1057,7 @@ struct ctl_table_header
struct list_head ctl_entry;
int used;
struct completion *unregistering;
struct ctl_table *ctl_table_arg;
/* struct ctl_path describes where in the hierarchy a table is added */
......@@ -1669,6 +1669,7 @@ struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
new += 2;
*prevp = table;
header->ctl_table_arg = table;
header->used = 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment