summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include/path.h
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2019-09-14 12:34:06 +0200
committerJohn Johansen <john.johansen@canonical.com>2019-11-23 01:41:08 +0100
commit341c1fda5e17156619fb71acfc7082b2669b4b72 (patch)
treee5fbbd464835c19aec5fa16ce4bd325a4667fa05 /security/apparmor/include/path.h
parentapparmor: reduce rcu_read_lock scope for aa_file_perm mediation (diff)
downloadlinux-341c1fda5e17156619fb71acfc7082b2669b4b72.tar.xz
linux-341c1fda5e17156619fb71acfc7082b2669b4b72.zip
apparmor: make it so work buffers can be allocated from atomic context
In some situations AppArmor needs to be able to use its work buffers from atomic context. Add the ability to specify when in atomic context and hold a set of work buffers in reserve for atomic context to reduce the chance that a large work buffer allocation will need to be done. Fixes: df323337e507 ("apparmor: Use a memory pool instead per-CPU caches") Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include/path.h')
-rw-r--r--security/apparmor/include/path.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/apparmor/include/path.h b/security/apparmor/include/path.h
index b0b2ab85e42d..d2ab8a932bad 100644
--- a/security/apparmor/include/path.h
+++ b/security/apparmor/include/path.h
@@ -29,7 +29,8 @@ int aa_path_name(const struct path *path, int flags, char *buffer,
const char **name, const char **info,
const char *disconnected);
-char *aa_get_buffer(void);
+#define IN_ATOMIC true
+char *aa_get_buffer(bool in_atomic);
void aa_put_buffer(char *buf);
#endif /* __AA_PATH_H */