Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71159
b: refs/heads/master
c: fc6cd25
h: refs/heads/master
i:
  71157: af181fb
  71155: c7c20c7
  71151: fffb552
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Oct 18, 2007
1 parent 6728c10 commit 3f6d1a1
Show file tree
Hide file tree
Showing 5 changed files with 1,565 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f429cd37a21b8efc825bdbb22db7f033564cbc98
refs/heads/master: fc6cd25b738c2369d7ed3a6ef2ca248b51fcd2d4
1 change: 1 addition & 0 deletions trunk/include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ struct ctl_table_header
struct ctl_table_header *register_sysctl_table(struct ctl_table * table);

void unregister_sysctl_table(struct ctl_table_header * table);
int sysctl_check_table(struct ctl_table *table);

#else /* __KERNEL__ */

Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
rcupdate.o extable.o params.o posix-timers.o \
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
hrtimer.o rwsem.o latency.o nsproxy.o srcu.o die_notifier.o \
utsname.o
utsname.o sysctl_check.o

obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-y += time/
Expand Down
6 changes: 6 additions & 0 deletions trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,9 @@ static void sysctl_set_parent(struct ctl_table *parent, struct ctl_table *table)

static __init int sysctl_init(void)
{
int err;
sysctl_set_parent(NULL, root_table);
err = sysctl_check_table(root_table);
return 0;
}

Expand Down Expand Up @@ -1546,6 +1548,10 @@ struct ctl_table_header *register_sysctl_table(struct ctl_table * table)
tmp->used = 0;
tmp->unregistering = NULL;
sysctl_set_parent(NULL, table);
if (sysctl_check_table(tmp->ctl_table)) {
kfree(tmp);
return NULL;
}
spin_lock(&sysctl_lock);
list_add_tail(&tmp->ctl_entry, &root_table_header.ctl_entry);
spin_unlock(&sysctl_lock);
Expand Down
Loading

0 comments on commit 3f6d1a1

Please sign in to comment.