summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authordyoung <dyoung@NetBSD.org>2008-12-05 18:20:19 +0000
committerdyoung <dyoung@NetBSD.org>2008-12-05 18:20:19 +0000
commit20baa33fe26baee9f2a7e489b7f6700003fd97ef (patch)
treebe65bbe756b1bb3fa4a4a68fdb77ba27376dee30 /sys/dev
parentdbc045b3d9b813ff2cfddb36ac009061c114015a (diff)
In wddetach(), avoid a crash by destroying the callout sc_restart_ch.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/wd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index eaca2bc9485..5f3737e0f10 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.363 2008/06/08 18:34:06 tsutsui Exp $ */
+/* $NetBSD: wd.c,v 1.364 2008/12/05 18:20:19 dyoung Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.363 2008/06/08 18:34:06 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.364 2008/12/05 18:20:19 dyoung Exp $");
#include "opt_ata.h"
@@ -504,6 +504,8 @@ wddetach(struct device *self, int flags)
rnd_detach_source(&sc->rnd_source);
#endif
+ callout_destroy(&sc->sc_restart_ch);
+
sc->drvp->drive_flags = 0; /* no drive any more here */
return (0);