From nobody@FreeBSD.org  Thu Aug 12 18:37:44 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7AED91065673
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Aug 2010 18:37:44 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A9858FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Aug 2010 18:37:44 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o7CIbiYA096469
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Aug 2010 18:37:44 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o7CIbiKt096468;
	Thu, 12 Aug 2010 18:37:44 GMT
	(envelope-from nobody)
Message-Id: <201008121837.o7CIbiKt096468@www.freebsd.org>
Date: Thu, 12 Aug 2010 18:37:44 GMT
From: John Giacomoni <John.Giacomoni@LineRateSystems.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: _callout_stop_safe prematurely unsets CALLOUT_ACTIVE
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         149586
>Category:       kern
>Synopsis:       [kernel] _callout_stop_safe prematurely unsets CALLOUT_ACTIVE
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 12 18:40:03 UTC 2010
>Closed-Date:    
>Last-Modified:  Thu Aug 12 19:17:25 UTC 2010
>Originator:     John Giacomoni
>Release:        7.3/8.1
>Organization:
LineRate Systems
>Environment:
>Description:
in kern/kern_timeout.c
_callout_stop_safe(c, 0) prematurely unsets CALLOUT_ACTIVE on inflight
callouts making it impossible to know when a callout is actually stopped
(one cannot spin on callout_active() to know when it is drained/dead/idle).

This is problematic for unsleepable threads that need to deallocate an
object shared with a callout but cannot call callout_drain to guarantee
that the reference has been implicitly freed.

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
