svn commit: r328325 - head/sys/powerpc/powerpc
Wojciech Macek
wma at FreeBSD.org
Wed Jan 24 12:01:33 UTC 2018
Author: wma
Date: Wed Jan 24 12:01:32 2018
New Revision: 328325
URL: https://svnweb.freebsd.org/changeset/base/328325
Log:
PPC: Add KASSERT in intrcnt_add which checks for buffer overflow
Authored by: Patryk Duda <pdk at semihalf.com>
Submitted by: Wojciech Macek <wma at semihalf.com>
Obtained from: Semihalf
Sponsored by: IBM, QCM Technologies
Modified:
head/sys/powerpc/powerpc/intr_machdep.c
Modified: head/sys/powerpc/powerpc/intr_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/intr_machdep.c Wed Jan 24 11:03:18 2018 (r328324)
+++ head/sys/powerpc/powerpc/intr_machdep.c Wed Jan 24 12:01:32 2018 (r328325)
@@ -178,6 +178,8 @@ intrcnt_add(const char *name, u_long **countp)
int idx;
idx = atomic_fetchadd_int(&intrcnt_index, 1);
+ KASSERT(idx < INTR_VECTORS, ("intrcnt_add: Interrupt counter index "
+ "reached INTR_VECTORS"));
*countp = &intrcnt[idx];
intrcnt_setname(name, idx);
}
More information about the svn-src-head
mailing list