~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

Viewing changes to kernel-patches/2.6.19/patches/apparmor_namespacesem.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: tonyj@suse.de
2
 
Subject: Export namespace semaphore
3
 
Patch-mainline: no
4
 
 
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
8
 
 
9
 
 
10
 
---
11
 
 fs/namespace.c            |    3 ++-
12
 
 include/linux/namespace.h |    3 +++
13
 
 2 files changed, 5 insertions(+), 1 deletion(-)
14
 
 
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);
24
 
 
25
 
 /* /sys/fs */
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
29
 
@@ -5,6 +5,9 @@
30
 
 #include <linux/mount.h>
31
 
 #include <linux/sched.h>
32
 
 
33
 
+/* exported for AppArmor (SubDomain) */
34
 
+extern struct rw_semaphore namespace_sem;
35
 
+
36
 
 struct namespace {
37
 
        atomic_t                count;
38
 
        struct vfsmount *       root;