Module Name: src Committed By: maxv Date: Tue Mar 24 07:12:16 UTC 2020
Modified Files: src/sys/dev/usb: if_umb.c Log Message: Fix type confusion. Found by kASan when doing a normal attach+detach over vHCI. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/dev/usb/if_umb.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/usb/if_umb.c diff -u src/sys/dev/usb/if_umb.c:1.18 src/sys/dev/usb/if_umb.c:1.19 --- src/sys/dev/usb/if_umb.c:1.18 Sat Mar 21 06:55:13 2020 +++ src/sys/dev/usb/if_umb.c Tue Mar 24 07:12:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_umb.c,v 1.18 2020/03/21 06:55:13 skrll Exp $ */ +/* $NetBSD: if_umb.c,v 1.19 2020/03/24 07:12:16 maxv Exp $ */ /* $OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */ /* @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.18 2020/03/21 06:55:13 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.19 2020/03/24 07:12:16 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -569,7 +569,7 @@ fail: Static int umb_detach(device_t self, int flags) { - struct umb_softc *sc = (struct umb_softc *)self; + struct umb_softc *sc = device_private(self); struct ifnet *ifp = GET_IFP(sc); int s;