Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295457
b: refs/heads/master
c: a194558
h: refs/heads/master
i:
  295455: 425aeb6
v: v3
  • Loading branch information
Eric W. Biederman committed Jan 25, 2012
1 parent dcb92b0 commit b759390
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 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: 8425d6aaf0704b98480131ed339c208ffce12e44
refs/heads/master: a194558e8698621a9ce7f2c6a720123e644af131
15 changes: 11 additions & 4 deletions trunk/fs/proc/proc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ void proc_sys_poll_notify(struct ctl_table_poll *poll)
wake_up_interruptible(&poll->wait);
}

static struct ctl_table root_table[1];
static struct ctl_table root_table[] = {
{
.procname = "",
.mode = S_IRUGO|S_IXUGO,
.child = &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 @@ -319,7 +326,7 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
goto out;
}

table = table ? table->child : head->ctl_table;
table = table ? table->child : &head->ctl_table[1];

p = find_in_table(table, name);
if (!p) {
Expand Down Expand Up @@ -510,7 +517,7 @@ static int proc_sys_readdir(struct file *filp, void *dirent, filldir_t filldir)
goto out;
}

table = table ? table->child : head->ctl_table;
table = table ? table->child : &head->ctl_table[1];

ret = 0;
/* Avoid a switch here: arm builds fail with missing __cmpdi2 */
Expand Down Expand Up @@ -966,7 +973,7 @@ struct ctl_table_header *__register_sysctl_table(
spin_lock(&sysctl_lock);
header->set = lookup_header_set(root, namespaces);
header->attached_by = header->ctl_table;
header->attached_to = root_table;
header->attached_to = &root_table[1];
header->parent = &root_table_header;
set = header->set;
root = header->root;
Expand Down

0 comments on commit b759390

Please sign in to comment.