Skip to content

Commit 50a191a

Browse files
t-8chJoelgranados
authored andcommitted
sysctl: update comments to new registration APIs
The sysctl registration APIs do not need a terminating table entry anymore and with commit acc1546 ("sysctl: Warn on an empty procname element") even emit warnings if such a sentinel entry is supplied. While at it also remove the mention of "table->de" which was removed in commit 3fbfa98 ("[PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables") back in 2007. Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Joel Granados <[email protected]>
1 parent 7701ab7 commit 50a191a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/linux/sysctl.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ int proc_do_static_key(const struct ctl_table *table, int write, void *buffer,
9090

9191
/*
9292
* Register a set of sysctl names by calling register_sysctl
93-
* with an initialised array of struct ctl_table's. An entry with
94-
* NULL procname terminates the table. table->de will be
95-
* set up by the registration and need not be initialised in advance.
93+
* with an initialised array of struct ctl_table's.
9694
*
9795
* sysctl names can be mirrored automatically under /proc/sys. The
9896
* procname supplied controls /proc naming.
@@ -133,7 +131,7 @@ static inline void *proc_sys_poll_event(struct ctl_table_poll *poll)
133131

134132
/* A sysctl table is an array of struct ctl_table: */
135133
struct ctl_table {
136-
const char *procname; /* Text ID for /proc/sys, or zero */
134+
const char *procname; /* Text ID for /proc/sys */
137135
void *data;
138136
int maxlen;
139137
umode_t mode;

0 commit comments

Comments
 (0)