From owner-svn-src-head@FreeBSD.ORG Thu May 21 13:31:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 428971065686; Thu, 21 May 2009 13:31:29 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f165.google.com (mail-bw0-f165.google.com [209.85.218.165]) by mx1.freebsd.org (Postfix) with ESMTP id 5F1AF8FC08; Thu, 21 May 2009 13:31:28 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by bwz9 with SMTP id 9so1047186bwz.43 for ; Thu, 21 May 2009 06:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=V/XpSPTbxC+JK1KE+EgVJ4lJuuB+0WzVmt4XU1/Sagw=; b=A1s/DmHfbX3cWSU6oTzYKis1fneX7JuyVH0IhtFFDdW7o8lMltgFK338xzWpglMVsB krhXtTxu1KhFTrWmTHqutpq81Pk/lraC2YsHtNZrQDVG8pPhvhvYLSp46drlg1vLyu40 jtHEK34UbqK5aEA4m6x4orCqWFZDFi31nPGko= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Gt2nN5tANT85QGVlv56gusELpua4d+vyk+ua3FJT50eMe9qgkE9JJkn7Ls2jyYbdCQ uv74RQ2A+hXtpy3N3siRXCr6bn33CLENJz7b9GZYJ6TkeErja0N+FG4h2g4V9RQO8Fez hi9ulV+TmlxbKcCwHlTHkVOAV1ig1KEuFmQjo= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.126.145 with SMTP id c17mr1614755fas.16.1242912687203; Thu, 21 May 2009 06:31:27 -0700 (PDT) In-Reply-To: <3bbf2fe10905210629p46c7a204v6863aaba77354462@mail.gmail.com> References: <200905211322.n4LDM73t067924@svn.freebsd.org> <20090521132641.GJ1927@deviant.kiev.zoral.com.ua> <3bbf2fe10905210629p46c7a204v6863aaba77354462@mail.gmail.com> Date: Thu, 21 May 2009 15:31:26 +0200 X-Google-Sender-Auth: a22694202d437169 Message-ID: <3bbf2fe10905210631y5f04c428l8bfe052a39011c4a@mail.gmail.com> From: Attilio Rao To: Kostik Belousov 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: r192535 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 21 May 2009 13:31:29 -0000 2009/5/21 Attilio Rao : > 2009/5/21 Kostik Belousov : >> On Thu, May 21, 2009 at 01:22:07PM +0000, Attilio Rao wrote: >>> Author: attilio >>> Date: Thu May 21 13:22:07 2009 >>> New Revision: 192535 >>> URL: http://svn.freebsd.org/changeset/base/192535 >>> >>> Log: >>> Move the M_WAITOK flag in notify() into an M_NOWAIT one in order to match >>> the behaviour alredy present with the further malloc() call in >>> devctl_notify(). >>> This fixes a bug in the CAM layer where the camisr handler finished to >>> call camperiphfree() (and subsequently destroy_dev() resulting in a new >>> dev notify) while the xpt lock is held. >> This is wrong. You cannot call destroy_dev() while holding any mutex. >> Taking this into account, it makes no sense to use M_NOWAIT in notify(). > > As long as devctl_notify() also calls M_NOWAIT and if not available > skips "silently" it just does the same thing, I think this approach is > more consistent. > > It remains, though, the fact to fix CAM when calling destroy_dev(). > Maybe we should add a witness_warn() there? s/add/also add Attilio -- Peace can only be achieved by understanding - A. Einstein