From owner-svn-src-head@freebsd.org Thu Mar 3 12:27:23 2016 Return-Path: Delivered-To: svn-src-head@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 4B97976B7; Thu, 3 Mar 2016 12:27:23 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 F2E8E7A9; Thu, 3 Mar 2016 12:27:22 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A38DB1FE022; Thu, 3 Mar 2016 13:27:20 +0100 (CET) Subject: Re: svn commit: r296320 - in head/sys: kern sys To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201603021846.u22IkHWM010861@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <56D82E45.3090205@selasky.org> Date: Thu, 3 Mar 2016 13:29:57 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <201603021846.u22IkHWM010861@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 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: Thu, 03 Mar 2016 12:27:23 -0000 On 03/02/16 19:46, Konstantin Belousov wrote: > Modified: head/sys/kern/subr_sleepqueue.c > ============================================================================== > --- head/sys/kern/subr_sleepqueue.c Wed Mar 2 16:36:24 2016 (r296319) > +++ head/sys/kern/subr_sleepqueue.c Wed Mar 2 18:46:17 2016 (r296320) > @@ -586,7 +586,8 @@ sleepq_check_timeout(void) > * another CPU, so synchronize with it to avoid having it > * accidentally wake up a subsequent sleep. > */ > - else if (callout_stop(&td->td_slpcallout) == 0) { > + else if (_callout_stop_safe(&td->td_slpcallout, CS_MIGRBLOCK, NULL) > + == 0) { > td->td_flags |= TDF_TIMEOUT; > TD_SET_SLEEPING(td); > mi_switch(SW_INVOL | SWT_SLEEPQTIMO, NULL); The "td_slpcallout" is not drained anywhere, last time I checked. Does this change require draining of the td_slpcallout in case the thread immediately is exited/destroyed? --HPS