Module Name: src
Committed By: knakahara
Date: Thu Feb 21 08:10:22 UTC 2019
Modified Files:
src/sys/dev/pci: if_wm.c
Log Message:
Fix panic when wm(4) is reattached. ok by [email protected].
This panic occured after kern_rndq.c:r1.90.
To generate a diff of this commit:
cvs rdiff -u -r1.626 -r1.627 src/sys/dev/pci/if_wm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.626 src/sys/dev/pci/if_wm.c:1.627
--- src/sys/dev/pci/if_wm.c:1.626 Fri Feb 8 06:33:04 2019
+++ src/sys/dev/pci/if_wm.c Thu Feb 21 08:10:22 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.626 2019/02/08 06:33:04 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.627 2019/02/21 08:10:22 knakahara Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.626 2019/02/08 06:33:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.627 2019/02/21 08:10:22 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -2995,6 +2995,8 @@ wm_detach(device_t self, int flags __unu
evcnt_detach(&sc->sc_ev_rx_macctl);
#endif /* WM_EVENT_COUNTERS */
+ rnd_detach_source(&sc->rnd_source);
+
/* Tell the firmware about the release */
WM_CORE_LOCK(sc);
wm_release_manageability(sc);