2
Subject: Export namespace semaphore
5
Export global namespace_sem (this used to be a per namespace semaphore).
6
Alas, this isn't going to win _any_ points for style.
7
Patch is not in mainline -- pending AppArmor code submission to lkml
11
fs/namespace.c | 3 ++-
12
include/linux/namespace.h | 3 +++
13
2 files changed, 5 insertions(+), 1 deletion(-)
15
--- linux-2.6.18.orig/fs/namespace.c
16
+++ linux-2.6.18/fs/namespace.c
17
@@ -45,7 +45,8 @@ static int event;
18
static struct list_head *mount_hashtable __read_mostly;
19
static int hash_mask __read_mostly, hash_bits __read_mostly;
20
static kmem_cache_t *mnt_cache __read_mostly;
21
-static struct rw_semaphore namespace_sem;
22
+struct rw_semaphore namespace_sem;
23
+EXPORT_SYMBOL_GPL(namespace_sem);
26
decl_subsys(fs, NULL, NULL);
27
--- linux-2.6.18.orig/include/linux/namespace.h
28
+++ linux-2.6.18/include/linux/namespace.h
30
#include <linux/mount.h>
31
#include <linux/sched.h>
33
+/* exported for AppArmor (SubDomain) */
34
+extern struct rw_semaphore namespace_sem;
38
struct vfsmount * root;