aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index b45677eba78f..7556c479d5af 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -675,6 +675,7 @@ static void audit_log_exit(struct audit_context *context)
675{ 675{
676 int i; 676 int i;
677 struct audit_buffer *ab; 677 struct audit_buffer *ab;
678 struct audit_aux_data *aux;
678 679
679 ab = audit_log_start(context, AUDIT_SYSCALL); 680 ab = audit_log_start(context, AUDIT_SYSCALL);
680 if (!ab) 681 if (!ab)
@@ -705,10 +706,8 @@ static void audit_log_exit(struct audit_context *context)
705 context->egid, context->sgid, context->fsgid); 706 context->egid, context->sgid, context->fsgid);
706 audit_log_task_info(ab); 707 audit_log_task_info(ab);
707 audit_log_end(ab); 708 audit_log_end(ab);
708 while (context->aux) {
709 struct audit_aux_data *aux;
710 709
711 aux = context->aux; 710 for (aux = context->aux; aux; aux = aux->next) {
712 711
713 ab = audit_log_start(context, aux->type); 712 ab = audit_log_start(context, aux->type);
714 if (!ab) 713 if (!ab)
@@ -740,15 +739,10 @@ static void audit_log_exit(struct audit_context *context)
740 case AUDIT_AVC_PATH: { 739 case AUDIT_AVC_PATH: {
741 struct audit_aux_data_path *axi = (void *)aux; 740 struct audit_aux_data_path *axi = (void *)aux;
742 audit_log_d_path(ab, "path=", axi->dentry, axi->mnt); 741 audit_log_d_path(ab, "path=", axi->dentry, axi->mnt);
743 dput(axi->dentry);
744 mntput(axi->mnt);
745 break; } 742 break; }
746 743
747 } 744 }
748 audit_log_end(ab); 745 audit_log_end(ab);
749
750 context->aux = aux->next;
751 kfree(aux);
752 } 746 }
753 747
754 for (i = 0; i < context->name_count; i++) { 748 for (i = 0; i < context->name_count; i++) {