From owner-svn-src-all@FreeBSD.ORG Wed May 13 02:25:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBD9EFA1; Wed, 13 May 2015 02:25:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F1218F9; Wed, 13 May 2015 02:25:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D2PshJ052603; Wed, 13 May 2015 02:25:54 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D2PsxZ052602; Wed, 13 May 2015 02:25:54 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505130225.t4D2PsxZ052602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 13 May 2015 02:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282829 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 02:25:55 -0000 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);