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
Index: linux-2.6.17.9/fs/namespace.c
16
===================================================================
17
--- linux-2.6.17.9.orig/fs/namespace.c
18
+++ linux-2.6.17.9/fs/namespace.c
19
@@ -46,7 +46,8 @@ static int event;
20
static struct list_head *mount_hashtable __read_mostly;
21
static int hash_mask __read_mostly, hash_bits __read_mostly;
22
static kmem_cache_t *mnt_cache __read_mostly;
23
-static struct rw_semaphore namespace_sem;
24
+struct rw_semaphore namespace_sem;
25
+EXPORT_SYMBOL_GPL(namespace_sem);
28
decl_subsys(fs, NULL, NULL);
29
Index: linux-2.6.17.9/include/linux/namespace.h
30
===================================================================
31
--- linux-2.6.17.9.orig/include/linux/namespace.h
32
+++ linux-2.6.17.9/include/linux/namespace.h
34
#include <linux/mount.h>
35
#include <linux/sched.h>
37
+/* exported for AppArmor (SubDomain) */
38
+extern struct rw_semaphore namespace_sem;
42
struct vfsmount * root;