Avoid calling bufq_free() from critical section.
This commit is contained in:
parent
1d6ebe4f76
commit
e38abff020
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: flash_ebus.c,v 1.18 2015/12/13 19:36:40 christos Exp $ */
|
||||
/* $NetBSD: flash_ebus.c,v 1.19 2016/11/20 02:34:27 pgoyette Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.18 2015/12/13 19:36:40 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.19 2016/11/20 02:34:27 pgoyette Exp $");
|
||||
|
||||
/* Driver for the Intel 28F320/640/128 (J3A150) StrataFlash memory device
|
||||
* Extended to include the Intel JS28F256P30T95.
|
||||
|
@ -1524,10 +1524,10 @@ eflashdetach(device_t self, int flags)
|
|||
/* Kill off any queued buffers. */
|
||||
bufq_drain(sc->sc_q);
|
||||
|
||||
bufq_free(sc->sc_q);
|
||||
/*sc->atabus->ata_killpending(sc->drvp);*/
|
||||
|
||||
splx(s);
|
||||
bufq_free(sc->sc_q);
|
||||
|
||||
/* Detach disk. */
|
||||
disk_detach(&sc->sc_dk);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wd.c,v 1.426 2016/08/05 06:54:22 christos Exp $ */
|
||||
/* $NetBSD: wd.c,v 1.427 2016/11/20 02:35:19 pgoyette Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
|
||||
|
@ -54,7 +54,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.426 2016/08/05 06:54:22 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.427 2016/11/20 02:35:19 pgoyette Exp $");
|
||||
|
||||
#include "opt_ata.h"
|
||||
|
||||
|
@ -482,12 +482,12 @@ wddetach(device_t self, int flags)
|
|||
/* Kill off any queued buffers. */
|
||||
bufq_drain(sc->sc_q);
|
||||
|
||||
bufq_free(sc->sc_q);
|
||||
sc->atabus->ata_killpending(sc->drvp);
|
||||
if (flags & DETACH_POWEROFF)
|
||||
wd_standby(sc, AT_POLL);
|
||||
|
||||
splx(s);
|
||||
bufq_free(sc->sc_q);
|
||||
|
||||
/* Detach disk. */
|
||||
disk_detach(&sc->sc_dk);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ccd.c,v 1.167 2016/08/07 02:40:41 pgoyette Exp $ */
|
||||
/* $NetBSD: ccd.c,v 1.168 2016/11/20 02:35:19 pgoyette Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
|
||||
|
@ -88,7 +88,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.167 2016/08/07 02:40:41 pgoyette Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.168 2016/11/20 02:35:19 pgoyette Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -1291,8 +1291,9 @@ ccdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
|
|||
kmem_free(vpp, ccio->ccio_ndisks * sizeof(*vpp));
|
||||
kmem_free(cpp, ccio->ccio_ndisks * sizeof(*cpp));
|
||||
disk_detach(&cs->sc_dkdev);
|
||||
mutex_exit(&cs->sc_dvlock);
|
||||
bufq_free(cs->sc_bufq);
|
||||
goto out;
|
||||
return error;
|
||||
}
|
||||
|
||||
/* We can free the temporary variables now. */
|
||||
|
|
Loading…
Reference in New Issue