From owner-freebsd-current@FreeBSD.ORG Sat Nov 24 15:51:13 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60F722CA; Sat, 24 Nov 2012 15:51:13 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id A4EA58FC12; Sat, 24 Nov 2012 15:51:12 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id go10so6868074lbb.13 for ; Sat, 24 Nov 2012 07:51:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=CYpgVJnXLlwLTbDc8TtDTtNpdgV3nMttj9y2gOKOzgE=; b=Ijfzhr8w9vGlRkWy4miqy6LQ45i15UeWhKY8D9q60O4xWNztuEbDVzdUHSKqiXW1vs pdn/eziIa2oOlo4auu+COVoul//y+fhFLVAqr8bGFH5j0bGHuePUOYDRB+JdZJs5Gss2 eMRHGrsyUAT5Io9j0KO0N0vtAbdN+rf/9DORqMMRk5GavTSZdaaL5iZ22h+/2svcxOc4 o/OvnGPHGWQyXVk7Bnk3+7C4PnxNR8ImLfUd5VREnNTH6pYVR0UT0srjn+oOzN9BdLHi OydOQF0ek7VHCpUOdln+fMqz8+rm5OrQiBJFUf4SZrZOLk5UIznDtBTgxK+B2uZ9uIc5 4Kvg== MIME-Version: 1.0 Received: by 10.112.24.41 with SMTP id r9mr3013236lbf.115.1353772271403; Sat, 24 Nov 2012 07:51:11 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.112.134.5 with HTTP; Sat, 24 Nov 2012 07:51:11 -0800 (PST) In-Reply-To: References: Date: Sat, 24 Nov 2012 15:51:11 +0000 X-Google-Sender-Auth: x3XD8SGpDdC5-Wk70xbclgK-Zeo Message-ID: Subject: Re: Spurious witness warning when destroying spin mtx From: Attilio Rao To: Ryan Stone Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Nov 2012 15:51:13 -0000 On Sat, Nov 24, 2012 at 3:46 PM, Ryan Stone wrote: > > On Sat, Nov 24, 2012 at 10:01 AM, Attilio Rao wrote: >> >> I seriously wonder why right now we don't assume the lock is unheld. >> There are likely historically reasons for that, but I would like to >> know which one are those and eventually fix them out. >> FWIK, all the other locking primitives assume the lock is already >> unheld when destroying and I think it would be good to have that for >> mutexes as well. >> >> Can you please show which lock triggers the panic you saw? >> >> Thanks, >> Attilio >> > > It was taskqueue_free: taskqueue_free() must not be called in places where there are still races, so the lock is not really meaningful and should be acquired. Attilio -- Peace can only be achieved by understanding - A. Einstein