mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-05 00:35:13 +00:00
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
From: tonyj@suse.de
|
|
Subject: Export namespace semaphore
|
|
Patch-mainline: no
|
|
|
|
Export global namespace_sem (this used to be a per namespace semaphore).
|
|
Alas, this isn't going to win _any_ points for style.
|
|
Patch is not in mainline -- pending AppArmor code submission to lkml
|
|
|
|
Index: linux-2.6.15/fs/namespace.c
|
|
===================================================================
|
|
--- linux-2.6.15.orig/fs/namespace.c
|
|
+++ linux-2.6.15/fs/namespace.c
|
|
@@ -46,7 +46,8 @@ static int event;
|
|
static struct list_head *mount_hashtable;
|
|
static int hash_mask __read_mostly, hash_bits __read_mostly;
|
|
static kmem_cache_t *mnt_cache;
|
|
-static struct rw_semaphore namespace_sem;
|
|
+struct rw_semaphore namespace_sem;
|
|
+EXPORT_SYMBOL_GPL(namespace_sem);
|
|
|
|
/* /sys/fs */
|
|
decl_subsys(fs, NULL, NULL);
|
|
Index: linux-2.6.15/include/linux/namespace.h
|
|
===================================================================
|
|
--- linux-2.6.15.orig/include/linux/namespace.h
|
|
+++ linux-2.6.15/include/linux/namespace.h
|
|
@@ -5,6 +5,9 @@
|
|
#include <linux/mount.h>
|
|
#include <linux/sched.h>
|
|
|
|
+/* exported for AppArmor (SubDomain) */
|
|
+extern struct rw_semaphore namespace_sem;
|
|
+
|
|
struct namespace {
|
|
atomic_t count;
|
|
struct vfsmount * root;
|