From 603bf4f04a941db10ee48b2f222bfd83ff76cffa Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Fri, 10 Sep 2010 04:46:25 +0000 Subject: scsi_xsh_del the io handler in deactivate to prevent it from being run on a device thats now gone, or from being on the list of pending io when the device is actually detached. found and fix tested by jakemsr@ "go for it" jakemsr@ --- sys/scsi/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index fe08b311008..0513ca6a141 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.211 2010/09/08 15:16:22 jsing Exp $ */ +/* $OpenBSD: sd.c,v 1.212 2010/09/10 04:46:24 dlg Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -291,6 +291,7 @@ sdactivate(struct device *self, int act) case DVACT_DEACTIVATE: sc->flags |= SDF_DYING; bufq_drain(&sc->sc_bufq); + scsi_xsh_del(&sc->sc_xsh); break; } return (rv); -- cgit v1.2.3