Merge tag 'v3.10.107' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / security / apparmor / audit.c
index 3ae28db5a64fb8595aadf512ebca42020e4e8106..c8031c1c52ca420630fec6ae9257a35f9001ed42 100644 (file)
@@ -212,7 +212,8 @@ int aa_audit(int type, struct aa_profile *profile, gfp_t gfp,
 
        if (sa->aad->type == AUDIT_APPARMOR_KILL)
                (void)send_sig_info(SIGKILL, NULL,
-                                   sa->aad->tsk ?  sa->aad->tsk : current);
+                       sa->type == LSM_AUDIT_DATA_TASK && sa->aad->tsk ?
+                                   sa->aad->tsk : current);
 
        if (sa->aad->type == AUDIT_APPARMOR_ALLOWED)
                return complain_error(sa->aad->error);