Author: mav
Date: Sat Aug 23 07:03:04 2014
New Revision: 270389
URL: http://svnweb.freebsd.org/changeset/base/270389

Log:
  MFC r270176:
  Fix lock recursion on LUN shutdown, introduced on r269497.

Modified:
  stable/10/sys/cam/ctl/ctl_tpc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_tpc.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_tpc.c     Sat Aug 23 07:02:57 2014        
(r270388)
+++ stable/10/sys/cam/ctl/ctl_tpc.c     Sat Aug 23 07:03:04 2014        
(r270389)
@@ -228,7 +228,7 @@ ctl_tpc_lun_shutdown(struct ctl_lun *lun
        }
 
        /* Free ROD tokens for this LUN. */
-       mtx_lock(&control_softc->ctl_lock);
+       mtx_assert(&control_softc->ctl_lock, MA_OWNED);
        TAILQ_FOREACH_SAFE(token, &control_softc->tpc_tokens, links, ttoken) {
                if (token->lun != lun->lun || token->active)
                        continue;
@@ -236,7 +236,6 @@ ctl_tpc_lun_shutdown(struct ctl_lun *lun
                free(token->params, M_CTL);
                free(token, M_CTL);
        }
-       mtx_unlock(&control_softc->ctl_lock);
 }
 
 int
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to