Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Dec 2008 23:20:53 -0700
From:      Scott Long <scottl@samsco.org>
To:        Ganbold <ganbold@micom.mng.net>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: mutex ATAPICAM lock owned at /usr/src/sys/cam/cam_periph.c:316
Message-ID:  <494DE045.4070005@samsco.org>
In-Reply-To: <494DD17F.5090903@micom.mng.net>
References:  <494DBBEC.7080107@micom.mng.net> <494DD17F.5090903@micom.mng.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?494DE045.4070005>