From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 06:49:58 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DFA51065673; Wed, 5 Sep 2012 06:49:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id DD6F48FC12; Wed, 5 Sep 2012 06:49:56 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA13029; Wed, 05 Sep 2012 09:49:55 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1T99Qx-0002NK-2N; Wed, 05 Sep 2012 09:49:55 +0300 Message-ID: <5046F612.5090500@FreeBSD.org> Date: Wed, 05 Sep 2012 09:49:54 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120901 Thunderbird/15.0 MIME-Version: 1.0 To: John Baldwin References: <201208222002.q7MK2gVY089435@svn.freebsd.org> In-Reply-To: <201208222002.q7MK2gVY089435@svn.freebsd.org> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r239587 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Sep 2012 06:49:58 -0000 on 22/08/2012 23:02 John Baldwin said the following: > Author: jhb > Date: Wed Aug 22 20:02:42 2012 > New Revision: 239587 > URL: http://svn.freebsd.org/changeset/base/239587 > > Log: > Assert that system calls do not leak a pinned thread (via sched_pin()) to > userland. > > Modified: > head/sys/kern/subr_syscall.c > > Modified: head/sys/kern/subr_syscall.c > ============================================================================== > --- head/sys/kern/subr_syscall.c Wed Aug 22 20:01:57 2012 (r239586) > +++ head/sys/kern/subr_syscall.c Wed Aug 22 20:02:42 2012 (r239587) > @@ -188,6 +188,9 @@ syscallret(struct thread *td, int error, I wonder if userret() would be a better place for this assert as well as the asserts that were already there. userret seems to cover more cases and includes the syscallret case. > KASSERT((td->td_pflags & TDP_NOSLEEPING) == 0, > ("System call %s returning with sleep disabled", > syscallname(p, sa->code))); > + KASSERT(td->td_pinned == 0, > + ("System call %s returning with pinned thread", > + syscallname(p, sa->code))); > > /* > * Handle reschedule and other end-of-syscall issues > -- Andriy Gapon