From owner-freebsd-current@freebsd.org Wed Jul 1 21:09:28 2015 Return-Path: Delivered-To: freebsd-current@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 53479992C8A for ; Wed, 1 Jul 2015 21:09:28 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CF0D1E01 for ; Wed, 1 Jul 2015 21:09:28 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by ieqy10 with SMTP id y10so43733588ieq.0 for ; Wed, 01 Jul 2015 14:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1U6AHL46UFUp9fKYG5VydAOiF3y5VXjqyccjQjOviFU=; b=JEBbL62ijs9zLZ7RLeGv6CLtR6eQnQdvUbFQ6Q5psS7YFk9ONwDlmugA0cpWZbrlFj 2o5x7HLKpVp5LQL6QKF+nDDOQzwh45ZUoaD436Drluv+73vtQ6H7hc/0/9FC2WLgBUkO +C3sHyQHsp08vymKei45QRd+DcPhe+bbGLRKJ3DLSMvexCXawefzcaJy6phNCYRIFMBo 8uNMNygc71WCW0ol/QU2ny46+khxDEjHuTdwx4msSp2J9eXuAM8JMOP4UoElwJebQGwy suoZgqvEi/y9FCWdv+lkfdgNs7qq1w7TzKJz6HXPUKPuPePlJLw6tM6KjpS8PWIm76vH mUnA== MIME-Version: 1.0 X-Received: by 10.107.10.212 with SMTP id 81mr32905167iok.89.1435784967482; Wed, 01 Jul 2015 14:09:27 -0700 (PDT) Received: by 10.107.145.68 with HTTP; Wed, 1 Jul 2015 14:09:27 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Jul 2015 17:09:27 -0400 Message-ID: Subject: Re: How should a driver shutdown a taskqueue on detach? From: Ryan Stone To: Jack Vogel Cc: FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2015 21:09:28 -0000 On Wed, Jul 1, 2015 at 4:58 PM, Jack Vogel wrote: > But if you've disabled interrupts why would an "interrupt-handling task" > even run?? > > Jack > There's a race. The task could have already have been scheduled by a previous interrupt and could be running while I am trying to disable interrupts and drain the taskqueue.