Author: loos Date: Wed May 13 02:25:54 2015 New Revision: 282829 URL: https://svnweb.freebsd.org/changeset/base/282829
Log: Fix the vmstat -i output on ARM. The consumers of hw.intrnames expect a NULL byte at end of the string containing the interrupt names. On ARM all the interrupt name slots are initialized and this leave no room for the terminating NULL byte, which makes vmstat read beyond the end of intrnames. PR: 199891 Tested on: RPi 2 and BeagleBone Black Modified: head/sys/arm/arm/intr.c Modified: head/sys/arm/arm/intr.c ============================================================================== --- head/sys/arm/arm/intr.c Wed May 13 01:48:47 2015 (r282828) +++ head/sys/arm/arm/intr.c Wed May 13 02:25:54 2015 (r282829) @@ -78,7 +78,7 @@ int (*arm_config_irq)(int irq, enum intr /* Data for statistics reporting. */ u_long intrcnt[NIRQ]; -char intrnames[NIRQ * INTRNAME_LEN]; +char intrnames[(NIRQ * INTRNAME_LEN) + 1]; size_t sintrcnt = sizeof(intrcnt); size_t sintrnames = sizeof(intrnames); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"