Skip to content

Commit b380b0d

Browse files
Al Virotorvalds
authored andcommitted
forgotten refcount on sysctl root table
We should've set refcount on the root sysctl table; otherwise we'll blow up the first time we get down to zero dynamically registered sysctl tables. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Tested-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5f17cfc commit b380b0d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎kernel/sysctl.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ static int proc_dointvec_taint(struct ctl_table *table, int write, struct file *
159159
static struct ctl_table root_table[];
160160
static struct ctl_table_root sysctl_table_root;
161161
static struct ctl_table_header root_table_header = {
162+
.count = 1,
162163
.ctl_table = root_table,
163164
.ctl_entry = LIST_HEAD_INIT(sysctl_table_root.default_set.list),
164165
.root = &sysctl_table_root,

0 commit comments

Comments
 (0)