mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
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: df323337e5
("apparmor: Use a memory pool instead per-CPU caches")
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user