kernel/auditsc.c: fix an off-by-one
This patch fixes an off-by-one in a BUG_ON() spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Amy Griffis <amy.griffis@hp.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
8e81cc13a8
commit
88ae704c2a
@ -2023,7 +2023,7 @@ int __audit_signal_info(int sig, struct task_struct *t)
|
|||||||
axp->d.next = ctx->aux_pids;
|
axp->d.next = ctx->aux_pids;
|
||||||
ctx->aux_pids = (void *)axp;
|
ctx->aux_pids = (void *)axp;
|
||||||
}
|
}
|
||||||
BUG_ON(axp->pid_count > AUDIT_AUX_PIDS);
|
BUG_ON(axp->pid_count >= AUDIT_AUX_PIDS);
|
||||||
|
|
||||||
axp->target_pid[axp->pid_count] = t->tgid;
|
axp->target_pid[axp->pid_count] = t->tgid;
|
||||||
selinux_get_task_sid(t, &axp->target_sid[axp->pid_count]);
|
selinux_get_task_sid(t, &axp->target_sid[axp->pid_count]);
|
||||||
|
Loading…
Reference in New Issue
Block a user