summary refs log tree commit diff
path: root/security/apparmor/include
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2017-05-23 03:25:14 -0700
committerJohn Johansen <john.johansen@canonical.com>2017-06-08 11:29:34 -0700
commit4227c333f65cddc6c2f048e5b67cfe796b9df9a6 (patch)
tree4deee8d16246bc879036da19642451b8e7cdcde0 /security/apparmor/include
parent72c8a768641dc6ee8d1d9dcebd51bbec2817459b (diff)
downloadlinux-4227c333f65cddc6c2f048e5b67cfe796b9df9a6.tar.gz
apparmor: Move path lookup to using preallocated buffers
Dynamically allocating buffers is problematic and is an extra layer
that is a potntial point of failure and can slow down mediation.
Change path lookup to use the preallocated per cpu buffers.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include')
-rw-r--r--security/apparmor/include/path.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/include/path.h b/security/apparmor/include/path.h
index 78e4909dcc6a..05fb3305671e 100644
--- a/security/apparmor/include/path.h
+++ b/security/apparmor/include/path.h
@@ -23,10 +23,10 @@ enum path_flags {
 	PATH_CHROOT_NSCONNECT = 0x10,	/* connect paths that are at ns root */
 
 	PATH_DELEGATE_DELETED = 0x08000, /* delegate deleted files */
-	PATH_MEDIATE_DELETED = 0x10000,	/* mediate deleted paths */
+	PATH_MEDIATE_DELETED = 0x10000,	 /* mediate deleted paths */
 };
 
-int aa_path_name(const struct path *path, int flags, char **buffer,
+int aa_path_name(const struct path *path, int flags, char *buffer,
 		 const char **name, const char **info,
 		 const char *disconnected);