From 8f4dfca127e16ba03630b74cbcfac73a8a3930cf Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Mon, 13 Aug 2018 21:53:18 +0000 Subject: [PATCH] Copy out from kernel to data, not the other way around. MFC after: 3 days Sponsored by: DARPA, AFRL --- sys/dev/sbni/if_sbni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sbni/if_sbni.c b/sys/dev/sbni/if_sbni.c index 12f7c0afc414..166984797138 100644 --- a/sys/dev/sbni/if_sbni.c +++ b/sys/dev/sbni/if_sbni.c @@ -1153,7 +1153,7 @@ sbni_ioctl(struct ifnet *ifp, u_long command, caddr_t data) SBNI_LOCK(sc); bcopy(&sc->in_stats, in_stats, sizeof(struct sbni_in_stats)); SBNI_UNLOCK(sc); - error = copyout(ifr_data_get_ptr(ifr), in_stats, + error = copyout(in_stats, ifr_data_get_ptr(ifr), sizeof(struct sbni_in_stats)); free(in_stats, M_DEVBUF); break;