aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-02 18:48:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-03 12:49:59 -0400
commitb61c37f57988567c84359645f8202a7c84bc798a (patch)
treea808c891711d060060a751f4119198dc06e2c847 /security/apparmor
parent3f0882c48286e7bdb0bbdec9c4bfa934e0db8e09 (diff)
lsm_audit: don't specify the audit pre/post callbacks in 'struct common_audit_data'
It just bloats the audit data structure for no good reason, since the only time those fields are filled are just before calling the common_lsm_audit() function, which is also the only user of those fields. So just make them be the arguments to common_lsm_audit(), rather than bloating that structure that is passed around everywhere, and is initialized in hot paths. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/audit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
index 23f7eb658d9c..cc3520d39a78 100644
--- a/security/apparmor/audit.c
+++ b/security/apparmor/audit.c
@@ -160,9 +160,7 @@ void aa_audit_msg(int type, struct common_audit_data *sa,
160 void (*cb) (struct audit_buffer *, void *)) 160 void (*cb) (struct audit_buffer *, void *))
161{ 161{
162 sa->aad->type = type; 162 sa->aad->type = type;
163 sa->lsm_pre_audit = audit_pre; 163 common_lsm_audit(sa, audit_pre, cb);
164 sa->lsm_post_audit = cb;
165 common_lsm_audit(sa);
166} 164}
167 165
168/** 166/**