From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: mingo@elte.hu
Cc: a.p.zijlstra@chello.nl, xemul@parallels.com,
drosenberg@vsecurity.com, linux-kernel@vger.kernel.org,
eparis@redhat.com, bfields@fieldses.org,
jbottomley@parallels.com, akpm@linux-foundation.org,
devel@openvz.org
Subject: [PATCH 1/2] SYSCTL: root unregister routine introduced
Date: Mon, 12 Dec 2011 21:50:00 +0300 [thread overview]
Message-ID: <20111212175000.7084.94219.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20111212174709.7084.54702.stgit@localhost6.localdomain6>
This routine is required for SUNRPC sysctl's, which are going to be allocated,
processed and destroyed per network namespace context.
IOW, new sysctl root will be registered on network namespace creation and
thus have to unregistered before network namespace destruction.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
---
kernel/sysctl.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ae27196..21e68c1 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1701,6 +1701,13 @@ void register_sysctl_root(struct ctl_table_root *root)
spin_unlock(&sysctl_lock);
}
+void unregister_sysctl_root(struct ctl_table_root *root)
+{
+ spin_lock(&sysctl_lock);
+ list_del(&root->root_list);
+ spin_unlock(&sysctl_lock);
+}
+
/*
* sysctl_perm does NOT grant the superuser all rights automatically, because
* some sysctl variables are readonly even to root.
next prev parent reply other threads:[~2011-12-12 17:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 18:49 [PATCH 0/2] SYSCTL: export root handling routines Stanislav Kinsbursky
2011-12-12 18:50 ` Stanislav Kinsbursky [this message]
2011-12-12 22:52 ` [PATCH 1/2] SYSCTL: root unregister routine introduced Andrew Morton
2011-12-13 9:02 ` Stanislav Kinsbursky
2011-12-17 22:30 ` Eric W. Biederman
2011-12-12 18:50 ` [PATCH 2/2] SYSCTL: export root register and unregister routines Stanislav Kinsbursky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111212175000.7084.94219.stgit@localhost6.localdomain6 \
--to=skinsbursky@parallels.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=devel@openvz.org \
--cc=drosenberg@vsecurity.com \
--cc=eparis@redhat.com \
--cc=jbottomley@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=xemul@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome