add forgotten mutex_exit() in detach, which caused panic in uvm_unmap1()
due to held spin lock
This commit is contained in:
parent
0376c5faf1
commit
2b093b00ba
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: xbd_xenbus.c,v 1.109 2020/04/14 09:27:28 jdolecek Exp $ */
|
/* $NetBSD: xbd_xenbus.c,v 1.110 2020/04/14 13:02:40 jdolecek Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006 Manuel Bouyer.
|
* Copyright (c) 2006 Manuel Bouyer.
|
||||||
@ -50,7 +50,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.109 2020/04/14 09:27:28 jdolecek Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.110 2020/04/14 13:02:40 jdolecek Exp $");
|
||||||
|
|
||||||
#include "opt_xen.h"
|
#include "opt_xen.h"
|
||||||
|
|
||||||
@ -393,6 +393,7 @@ xbd_xenbus_detach(device_t dev, int flags)
|
|||||||
mutex_enter(&sc->sc_lock);
|
mutex_enter(&sc->sc_lock);
|
||||||
while (xengnt_status(sc->sc_ring_gntref))
|
while (xengnt_status(sc->sc_ring_gntref))
|
||||||
cv_timedwait(&sc->sc_detach_cv, &sc->sc_lock, hz/2);
|
cv_timedwait(&sc->sc_detach_cv, &sc->sc_lock, hz/2);
|
||||||
|
mutex_exit(&sc->sc_lock);
|
||||||
|
|
||||||
xengnt_revoke_access(sc->sc_ring_gntref);
|
xengnt_revoke_access(sc->sc_ring_gntref);
|
||||||
uvm_km_free(kernel_map, (vaddr_t)sc->sc_ring.sring,
|
uvm_km_free(kernel_map, (vaddr_t)sc->sc_ring.sring,
|
||||||
|
Loading…
Reference in New Issue
Block a user