Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Aug 2008 18:23:53 -0600
From:      Scott Long <scottl@samsco.org>
To:        Sean Bruno <sbruno@miralink.com>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: RELENG_6 patch for MPT
Message-ID:  <48ACB599.8040603@samsco.org>
In-Reply-To: <48AC974B.2020203@miralink.com>
References:  <48AC974B.2020203@miralink.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sean Bruno wrote:
> Hmmm...RELENG_6 looks like it has a locking issue at this time.
> 
> The patch below removes the panic due to dead lock, but I'm not sure
> how safe it is.
> 
> 
> Index: /trunk/src/ankeny/src/FreeBSD_RELENG6/sys/dev/mpt/mpt_user.c
> ===================================================================
> --- /trunk/src/ankeny/src/FreeBSD_RELENG6/sys/dev/mpt/mpt_user.c 
> (revision 5657)
> +++ /trunk/src/ankeny/src/FreeBSD_RELENG6/sys/dev/mpt/mpt_user.c 
> (revision 5761)
> @@ -106,15 +106,13 @@
> mpt_user_attach(struct mpt_softc *mpt)
> {
>     mpt_handler_t handler;
>     int error, unit;
> 
> -    MPT_LOCK(mpt);
>     handler.reply_handler = mpt_user_reply_handler;
>     error = mpt_register_handler(mpt, MPT_HANDLER_REPLY, handler,
>                      &user_handler_id);
> -    MPT_UNLOCK(mpt);
>     if (error != 0) {
>         mpt_prt(mpt, "Unable to register user handler!\n");
>         return (error);
>     }
>     unit = device_get_unit(mpt->dev);
> 

I think this is fine to commit.  I fixed it differently in FreeBSD7,
but there's real locking there and enough differences to make it
hard to directly compare.  Go ahead and check it in, if you want.

Scott



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48ACB599.8040603>