aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2014-02-18 15:29:43 -0500
committerEric Paris <eparis@redhat.com>2014-03-20 10:11:54 -0400
commit4a3eb726d1543c4b616b9a0a4d4c53ddd276f5f4 (patch)
treedeb241702245a155b36a36ab93a19096eb41eb19 /kernel/auditsc.c
parent4b58841149dcaa500ceba1d5378ae70622fe4899 (diff)
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.c7
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)
811 rcu_read_unlock(); 811 rcu_read_unlock();
812} 812}
813 813
814static inline struct audit_context *audit_get_context(struct task_struct *tsk, 814/* Transfer the audit context pointer to the caller, clearing it in the tsk's struct */
815static inline struct audit_context *audit_take_context(struct task_struct *tsk,
815 int return_valid, 816 int return_valid,
816 long return_code) 817 long return_code)
817{ 818{
@@ -1474,7 +1475,7 @@ void __audit_free(struct task_struct *tsk)
1474{ 1475{
1475 struct audit_context *context; 1476 struct audit_context *context;
1476 1477
1477 context = audit_get_context(tsk, 0, 0); 1478 context = audit_take_context(tsk, 0, 0);
1478 if (!context) 1479 if (!context)
1479 return; 1480 return;
1480 1481
@@ -1568,7 +1569,7 @@ void __audit_syscall_exit(int success, long return_code)
1568 else 1569 else
1569 success = AUDITSC_FAILURE; 1570 success = AUDITSC_FAILURE;
1570 1571
1571 context = audit_get_context(tsk, success, return_code); 1572 context = audit_take_context(tsk, success, return_code);
1572 if (!context) 1573 if (!context)
1573 return; 1574 return;
1574 1575