From owner-svn-src-all@freebsd.org Thu Oct 8 09:54:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1357D9D1CCD; Thu, 8 Oct 2015 09:54:35 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D250A1356; Thu, 8 Oct 2015 09:54:34 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t989sX3v095654; Thu, 8 Oct 2015 09:54:33 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t989sXAx095653; Thu, 8 Oct 2015 09:54:33 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201510080954.t989sXAx095653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Thu, 8 Oct 2015 09:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289024 - 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-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: Thu, 08 Oct 2015 09:54:35 -0000 Author: fabient Date: Thu Oct 8 09:54:33 2015 New Revision: 289024 URL: https://svnweb.freebsd.org/changeset/base/289024 Log: Fix r283998 that broke mapin events for hwpmc. Reviewed by: jhb Sponsored by: Stormshield Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Oct 8 09:46:35 2015 (r289023) +++ head/sys/kern/vfs_vnops.c Thu Oct 8 09:54:33 2015 (r289024) @@ -43,6 +43,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_hwpmc_hooks.h" + #include #include #include @@ -84,6 +86,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef HWPMC_HOOKS +#include +#endif + static fo_rdwr_t vn_read; static fo_rdwr_t vn_write; static fo_rdwr_t vn_io_fault; @@ -2461,7 +2467,7 @@ vn_mmap(struct file *fp, vm_map_t map, v /* Inform hwpmc(4) if an executable is being mapped. */ if (error == 0 && (prot & VM_PROT_EXECUTE) != 0) { pkm.pm_file = vp; - pkm.pm_address = (uintptr_t) addr; + pkm.pm_address = (uintptr_t) *addr; PMC_CALL_HOOK(td, PMC_FN_MMAP, (void *) &pkm); } #endif