Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Fix type confusion. Found by kASan when doing a ...



details:   https://anonhg.NetBSD.org/src/rev/da0a331f15cd
branches:  trunk
changeset: 746203:da0a331f15cd
user:      maxv <maxv%NetBSD.org@localhost>
date:      Tue Mar 24 07:12:16 2020 +0000

description:
Fix type confusion. Found by kASan when doing a normal attach+detach over
vHCI.

diffstat:

 sys/dev/usb/if_umb.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2a9be773941d -r da0a331f15cd sys/dev/usb/if_umb.c
--- a/sys/dev/usb/if_umb.c      Tue Mar 24 07:11:07 2020 +0000
+++ b/sys/dev/usb/if_umb.c      Tue Mar 24 07:12:16 2020 +0000
@@ -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 @@
 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;
 



Home | Main Index | Thread Index | Old Index