RELENG_6 patch for MPT
Scott Long
scottl at samsco.org
Thu Aug 21 00:23:57 UTC 2008
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
More information about the freebsd-scsi
mailing list