From owner-freebsd-current@FreeBSD.ORG Sun Dec 21 06:20:58 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81E5B1065676 for ; Sun, 21 Dec 2008 06:20:58 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 396958FC16 for ; Sun, 21 Dec 2008 06:20:57 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id mBL6KrM1094792; Sat, 20 Dec 2008 23:20:54 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <494DE045.4070005@samsco.org> Date: Sat, 20 Dec 2008 23:20:53 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Ganbold References: <494DBBEC.7080107@micom.mng.net> <494DD17F.5090903@micom.mng.net> In-Reply-To: <494DD17F.5090903@micom.mng.net> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: "freebsd-current@freebsd.org" Subject: Re: mutex ATAPICAM lock owned at /usr/src/sys/cam/cam_periph.c:316 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 21 Dec 2008 06:20:58 -0000 Ganbold wrote: > Ganbold wrote: >> Hi, >> >> I got panic today with recent CURRENT. >> >> All relevant infos are here: >> >> http://people.freebsd.org/~ganbold/ddb.txt >> http://people.freebsd.org/~ganbold/msgbuf.txt >> http://people.freebsd.org/~ganbold/panic.txt >> http://people.freebsd.org/~ganbold/version.txt >> > > Replying myself, I guess there should be unlock before releasing the > periph at scsi_pass.c: > > --- /var/current/src/sys/cam/scsi/scsi_pass.c 2008-11-22 16:58:50.000000000 +0800 > +++ /usr/src/sys/cam/scsi/scsi_pass.c 2008-12-21 12:59:36.000000000 +0800 > @@ -347,8 +347,10 @@ > if ((softc->flags & PASS_FLAG_OPEN) == 0) { > softc->flags |= PASS_FLAG_OPEN; > } else { > - /* Device closes aren't symmertical, so fix up the refcount */ > + /* Device closes aren't symmetrical, so fix up the refcount */ > + cam_periph_unlock(periph); > cam_periph_release(periph); > + return(EINVAL); > } > > > cam_periph_unlock(periph); > Already started fixing it before I started this. I believe that I've caught all of the problems, please let me know if anything else comes up. Scott