aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
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