From owner-svn-src-head@freebsd.org Tue Oct 23 19:55:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14DF3FFA3F4; Tue, 23 Oct 2018 19:55:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BEAD08D7D8; Tue, 23 Oct 2018 19:55:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 9EFBF249CF; Tue, 23 Oct 2018 19:55:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [IPv6:2607:fb90:361f:4639:5848:3ec9:2b09:ec] (unknown [IPv6:2607:fb90:361f:4639:5848:3ec9:2b09:ec]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 76FDE1AC4E; Tue, 23 Oct 2018 21:55:11 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r339646 - head/sys/net From: Kristof Provost X-Mailer: iPhone Mail (16A404) In-Reply-To: <201810231303.w9ND33C1016372@repo.freebsd.org> Date: Tue, 23 Oct 2018 12:55:03 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <01551B73-DD94-4F44-A0CB-276480B603A1@FreeBSD.org> References: <201810231303.w9ND33C1016372@repo.freebsd.org> To: "Andrey V. Elsukov" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Tue, 23 Oct 2018 19:55:14 -0000 > On 23 Oct 2018, at 06:03, Andrey V. Elsukov wrote: > > Author: ae > Date: Tue Oct 23 13:03:03 2018 > New Revision: 339646 > URL: https://svnweb.freebsd.org/changeset/base/339646 > > Log: > Add the check that current VNET is ready and access to srchash is > allowed. > > ipsec_srcaddr() callback can be called during VNET teardown, since > ingress address checking subsystem isn't VNET specific. And thus > callback can make access to already freed memory. To prevent this, > use V_ipsec_idhtbl pointer as indicator of VNET readiness. And make > epoch_wait() after resetting it to NULL in vnet_ipsec_uninit() to > be sure that ipsec_srcaddr() is finished its work. > > Reported by: kp > MFC after: 20 days > Thanks for the fix. Kristof