diff options
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 09c65640cad6..e85bdfd15fed 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1021,8 +1021,7 @@ static int audit_log_single_execve_arg(struct audit_context *context, | |||
1021 | * for strings that are too long, we should not have created | 1021 | * for strings that are too long, we should not have created |
1022 | * any. | 1022 | * any. |
1023 | */ | 1023 | */ |
1024 | if (unlikely((len == 0) || len > MAX_ARG_STRLEN - 1)) { | 1024 | if (WARN_ON_ONCE(len < 0 || len > MAX_ARG_STRLEN - 1)) { |
1025 | WARN_ON(1); | ||
1026 | send_sig(SIGKILL, current, 0); | 1025 | send_sig(SIGKILL, current, 0); |
1027 | return -1; | 1026 | return -1; |
1028 | } | 1027 | } |