Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295442
b: refs/heads/master
c: de4e83b
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman committed Jan 25, 2012
1 parent c078c17 commit 8c3b563
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 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: 0ce8974d504913a0f0ae2d97b20a5ac665431a41
refs/heads/master: de4e83bd6b5e16d491ec068cd22801d5d063b07a
3 changes: 2 additions & 1 deletion trunk/fs/proc/proc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,5 +468,6 @@ int __init proc_sys_init(void)
proc_sys_root->proc_iops = &proc_sys_dir_operations;
proc_sys_root->proc_fops = &proc_sys_dir_file_operations;
proc_sys_root->nlink = 0;
return 0;

return sysctl_init();
}
1 change: 1 addition & 0 deletions trunk/include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,7 @@ struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
void unregister_sysctl_table(struct ctl_table_header * table);
int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table);

extern int sysctl_init(void);
#else /* CONFIG_SYSCTL */
static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table)
{
Expand Down
13 changes: 4 additions & 9 deletions trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static int sysrq_sysctl_handler(ctl_table *table, int write,

#endif

static struct ctl_table root_table[];
static struct ctl_table root_table[1];
static struct ctl_table_root sysctl_table_root;
static struct ctl_table_header root_table_header = {
{{.count = 1,
Expand Down Expand Up @@ -222,7 +222,7 @@ int sysctl_legacy_va_layout;

/* The default sysctl tables: */

static struct ctl_table root_table[] = {
static struct ctl_table sysctl_base_table[] = {
{
.procname = "kernel",
.mode = 0555,
Expand Down Expand Up @@ -1747,17 +1747,12 @@ static void sysctl_set_parent(struct ctl_table *parent, struct ctl_table *table)
}
}

static __init int sysctl_init(void)
int __init sysctl_init(void)
{
sysctl_set_parent(NULL, root_table);
#ifdef CONFIG_SYSCTL_SYSCALL_CHECK
sysctl_check_table(current->nsproxy, root_table);
#endif
register_sysctl_table(sysctl_base_table);
return 0;
}

core_initcall(sysctl_init);

static struct ctl_table *is_branch_in(struct ctl_table *branch,
struct ctl_table *table)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sysctl_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static struct pernet_operations sysctl_pernet_ops = {
.exit = sysctl_net_exit,
};

static __init int sysctl_init(void)
static __init int net_sysctl_init(void)
{
int ret;
ret = register_pernet_subsys(&sysctl_pernet_ops);
Expand All @@ -102,7 +102,7 @@ static __init int sysctl_init(void)
out:
return ret;
}
subsys_initcall(sysctl_init);
subsys_initcall(net_sysctl_init);

struct ctl_table_header *register_net_sysctl_table(struct net *net,
const struct ctl_path *path, struct ctl_table *table)
Expand Down

0 comments on commit 8c3b563

Please sign in to comment.