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

« back to all changes in this revision

Viewing changes to kernel-patches/2.6.17/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
 
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);
26
 
 
27
 
 /* /sys/fs */
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
33
 
@@ -5,6 +5,9 @@
34
 
 #include <linux/mount.h>
35
 
 #include <linux/sched.h>
36
 
 
37
 
+/* exported for AppArmor (SubDomain) */
38
 
+extern struct rw_semaphore namespace_sem;
39
 
+
40
 
 struct namespace {
41
 
        atomic_t                count;
42
 
        struct vfsmount *       root;