From owner-svn-src-head@FreeBSD.ORG Sat Mar 22 22:35:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CC1C5CC; Sat, 22 Mar 2014 22:35:58 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29E62E4D; Sat, 22 Mar 2014 22:35:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2MMZwcs043585; Sat, 22 Mar 2014 22:35:58 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2MMZwt7043584; Sat, 22 Mar 2014 22:35:58 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201403222235.s2MMZwt7043584@svn.freebsd.org> From: Neel Natu Date: Sat, 22 Mar 2014 22:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263651 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 22:35:58 -0000 Author: neel Date: Sat Mar 22 22:35:57 2014 New Revision: 263651 URL: http://svnweb.freebsd.org/changeset/base/263651 Log: Don't lose track of the KTR entries copied from 'ktr_buf_init[]' to the dynamically allocated 'ktr_buf[]'. The memcpy arranges 'ktr_buf[]' such that the latest KTR entry is at 'KTR_BOOT_ENTRIES - 1'. Modified: head/sys/kern/kern_ktr.c Modified: head/sys/kern/kern_ktr.c ============================================================================== --- head/sys/kern/kern_ktr.c Sat Mar 22 22:20:43 2014 (r263650) +++ head/sys/kern/kern_ktr.c Sat Mar 22 22:35:57 2014 (r263651) @@ -212,9 +212,11 @@ ktr_entries_initializer(void *dummy __un M_WAITOK | M_ZERO); memcpy(ktr_buf, ktr_buf_init + ktr_idx, (KTR_BOOT_ENTRIES - ktr_idx) * sizeof(*ktr_buf)); - if (ktr_idx != 0) + if (ktr_idx != 0) { memcpy(ktr_buf + KTR_BOOT_ENTRIES - ktr_idx, ktr_buf_init, ktr_idx * sizeof(*ktr_buf)); + ktr_idx = KTR_BOOT_ENTRIES; + } ktr_entries = KTR_ENTRIES; ktr_mask = mask; }