From owner-svn-src-head@freebsd.org Tue Oct 9 15:02:38 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 AFD9210AE29A; Tue, 9 Oct 2018 15:02:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA318D320; Tue, 9 Oct 2018 15:02:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 11A3110AFD2; Tue, 9 Oct 2018 11:02:36 -0400 (EDT) Subject: Re: svn commit: r339251 - in head/sys: net netinet netinet6 To: "Jonathan T. Looney" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201810091326.w99DQ7MN083891@repo.freebsd.org> From: John Baldwin Message-ID: Date: Tue, 9 Oct 2018 08:02:34 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <201810091326.w99DQ7MN083891@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 09 Oct 2018 11:02:37 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 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, 09 Oct 2018 15:02:38 -0000 On 10/9/18 6:26 AM, Jonathan T. Looney wrote: > Author: jtl > Date: Tue Oct 9 13:26:06 2018 > New Revision: 339251 > URL: https://svnweb.freebsd.org/changeset/base/339251 > > Log: > There are three places where we return from a function which entered an > epoch section without exiting that epoch section. This is bad for two > reasons: the epoch section won't exit, and we will leave the epoch tracker > from the stack on the epoch list. > > Fix the epoch leak by making sure we exit epoch sections before returning. Do we have some sort of simple per-thread epoch counter similar to td->td_locks that we could assert on in userret() and in the ithread loop when ithreads go to sleep to help catch leaked locks? -- John Baldwin