summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorJoel Becker <jlbec@evilplan.org>2011-08-21 21:02:57 -0700
committerJoel Becker <jlbec@evilplan.org>2011-08-21 21:02:57 -0700
commit99b1bb61b225c3eb4d3b196d4f1d041695b19a7e (patch)
tree06cabdc34538f3b38a39e3b802ecc1a2ab2aae00 /kernel/sysctl.c
parentc7e25e6e0b0486492c5faaf6312b37413642c48e (diff)
parent93862d5e1ab875664c6cc95254fc365028a48bb1 (diff)
downloadlinux-stable-99b1bb61b225c3eb4d3b196d4f1d041695b19a7e.tar.gz
linux-stable-99b1bb61b225c3eb4d3b196d4f1d041695b19a7e.tar.bz2
linux-stable-99b1bb61b225c3eb4d3b196d4f1d041695b19a7e.zip
Merge branch 'mw-3.1-jul25' of git://oss.oracle.com/git/smushran/linux-2.6 into ocfs2-fixes
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4fc92445a29c..11d65b531e50 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -938,6 +938,12 @@ static struct ctl_table kern_table[] = {
},
#endif
#ifdef CONFIG_PERF_EVENTS
+ /*
+ * User-space scripts rely on the existence of this file
+ * as a feature check for perf_events being enabled.
+ *
+ * So it's an ABI, do not remove!
+ */
{
.procname = "perf_event_paranoid",
.data = &sysctl_perf_event_paranoid,
@@ -1584,16 +1590,11 @@ void sysctl_head_get(struct ctl_table_header *head)
spin_unlock(&sysctl_lock);
}
-static void free_head(struct rcu_head *rcu)
-{
- kfree(container_of(rcu, struct ctl_table_header, rcu));
-}
-
void sysctl_head_put(struct ctl_table_header *head)
{
spin_lock(&sysctl_lock);
if (!--head->count)
- call_rcu(&head->rcu, free_head);
+ kfree_rcu(head, rcu);
spin_unlock(&sysctl_lock);
}
@@ -1965,10 +1966,10 @@ void unregister_sysctl_table(struct ctl_table_header * header)
start_unregistering(header);
if (!--header->parent->count) {
WARN_ON(1);
- call_rcu(&header->parent->rcu, free_head);
+ kfree_rcu(header->parent, rcu);
}
if (!--header->count)
- call_rcu(&header->rcu, free_head);
+ kfree_rcu(header, rcu);
spin_unlock(&sysctl_lock);
}