Prevent "lock (iscsi) sx does not match earlier (sleep mutex) lock" panic

triggered by "kldload iscsi_initiator; kldunload iscsi_initiator; kldload
iscsi".

Approved by:	re (marius)
This commit is contained in:
Edward Tomasz Napierala 2013-09-23 10:36:03 +00:00
parent 49cede74ee
commit d19cfc0197

View File

@ -717,7 +717,7 @@ iscsi_start(void)
isc = malloc(sizeof(struct isc_softc), M_ISCSI, M_ZERO|M_WAITOK);
isc->dev = make_dev(&iscsi_cdevsw, max_sessions, UID_ROOT, GID_WHEEL, 0600, "iscsi");
isc->dev->si_drv1 = isc;
mtx_init(&isc->isc_mtx, "iscsi", NULL, MTX_DEF);
mtx_init(&isc->isc_mtx, "iscsi-isc", NULL, MTX_DEF);
TAILQ_INIT(&isc->isc_sess);
/*