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

« back to all changes in this revision

Viewing changes to kernel-patches/2.6.16/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
 
Index: linux-2.6.15/fs/namespace.c
10
 
===================================================================
11
 
--- linux-2.6.15.orig/fs/namespace.c
12
 
+++ linux-2.6.15/fs/namespace.c
13
 
@@ -46,7 +46,8 @@ static int event;
14
 
 static struct list_head *mount_hashtable;
15
 
 static int hash_mask __read_mostly, hash_bits __read_mostly;
16
 
 static kmem_cache_t *mnt_cache;
17
 
-static struct rw_semaphore namespace_sem;
18
 
+struct rw_semaphore namespace_sem;
19
 
+EXPORT_SYMBOL_GPL(namespace_sem);
20
 
 
21
 
 /* /sys/fs */
22
 
 decl_subsys(fs, NULL, NULL);
23
 
Index: linux-2.6.15/include/linux/namespace.h
24
 
===================================================================
25
 
--- linux-2.6.15.orig/include/linux/namespace.h
26
 
+++ linux-2.6.15/include/linux/namespace.h
27
 
@@ -5,6 +5,9 @@
28
 
 #include <linux/mount.h>
29
 
 #include <linux/sched.h>
30
 
 
31
 
+/* exported for AppArmor (SubDomain) */
32
 
+extern struct rw_semaphore namespace_sem;
33
 
+
34
 
 struct namespace {
35
 
        atomic_t                count;
36
 
        struct vfsmount *       root;