From: Al Viro Date: Thu, 4 Sep 2008 16:05:57 +0000 (+0100) Subject: forgotten refcount on sysctl root table X-Git-Tag: firefly_0821_release~18064 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b380b0d4f7dffcc235c0facefa537d4655619101;p=firefly-linux-kernel-4.4.55.git 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 Tested-by: James Bottomley Signed-off-by: Linus Torvalds --- diff --git a/kernel/sysctl.c b/kernel/sysctl.c index fe4713347275..50ec0886fa3d 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -159,6 +159,7 @@ static int proc_dointvec_taint(struct ctl_table *table, int write, struct file * static struct ctl_table root_table[]; static struct ctl_table_root sysctl_table_root; static struct ctl_table_header root_table_header = { + .count = 1, .ctl_table = root_table, .ctl_entry = LIST_HEAD_INIT(sysctl_table_root.default_set.list), .root = &sysctl_table_root,