diff options
author | Richard Guy Briggs <rgb@redhat.com> | 2014-02-18 21:29:43 +0100 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2014-03-20 15:11:54 +0100 |
commit | 4a3eb726d1543c4b616b9a0a4d4c53ddd276f5f4 (patch) | |
tree | deb241702245a155b36a36ab93a19096eb41eb19 /kernel/auditsc.c | |
parent | audit: Add generic compat syscall support (diff) | |
download | linux-4a3eb726d1543c4b616b9a0a4d4c53ddd276f5f4.tar.xz linux-4a3eb726d1543c4b616b9a0a4d4c53ddd276f5f4.zip |
audit: rename the misleading audit_get_context() to audit_take_context()
"get" usually implies incrementing a refcount into a structure to indicate a
reference being held by another part of code.
Change this function name to indicate it is in fact being taken from it,
returning the value while clearing it in the supplying structure.
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 043d1ef9362f..57bf178ca7d5 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -811,7 +811,8 @@ void audit_filter_inodes(struct task_struct *tsk, struct audit_context *ctx) rcu_read_unlock(); } -static inline struct audit_context *audit_get_context(struct task_struct *tsk, +/* Transfer the audit context pointer to the caller, clearing it in the tsk's struct */ +static inline struct audit_context *audit_take_context(struct task_struct *tsk, int return_valid, long return_code) { @@ -1474,7 +1475,7 @@ void __audit_free(struct task_struct *tsk) { struct audit_context *context; - context = audit_get_context(tsk, 0, 0); + context = audit_take_context(tsk, 0, 0); if (!context) return; @@ -1568,7 +1569,7 @@ void __audit_syscall_exit(int success, long return_code) else success = AUDITSC_FAILURE; - context = audit_get_context(tsk, success, return_code); + context = audit_take_context(tsk, success, return_code); if (!context) return; |