From owner-svn-src-stable-10@freebsd.org Thu Aug 16 15:54:13 2018 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F16C106BAD0; Thu, 16 Aug 2018 15:54:13 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E84AF899F5; Thu, 16 Aug 2018 15:54:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C95EB1B8DE; Thu, 16 Aug 2018 15:54:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7GFsC8A061174; Thu, 16 Aug 2018 15:54:12 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GFsCGq061173; Thu, 16 Aug 2018 15:54:12 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201808161554.w7GFsCGq061173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 16 Aug 2018 15:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337912 - stable/10/sys/dev/sbni X-SVN-Group: stable-10 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/10/sys/dev/sbni X-SVN-Commit-Revision: 337912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 15:54:13 -0000 Author: brooks Date: Thu Aug 16 15:54:12 2018 New Revision: 337912 URL: https://svnweb.freebsd.org/changeset/base/337912 Log: MFC r337727 (rewritten due to unmerged API change in 11+): Copy out from kernel to data, not the other way around. Sponsored by: DARPA, AFRL Modified: stable/10/sys/dev/sbni/if_sbni.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sbni/if_sbni.c ============================================================================== --- stable/10/sys/dev/sbni/if_sbni.c Thu Aug 16 15:44:48 2018 (r337911) +++ stable/10/sys/dev/sbni/if_sbni.c Thu Aug 16 15:54:12 2018 (r337912) @@ -1153,7 +1153,7 @@ sbni_ioctl(struct ifnet *ifp, u_long command, caddr_t SBNI_LOCK(sc); bcopy(&sc->in_stats, in_stats, sizeof(struct sbni_in_stats)); SBNI_UNLOCK(sc); - error = copyout(ifr->ifr_data, in_stats, + error = copyout(in_stats, ifr->ifr_data, sizeof(struct sbni_in_stats)); free(in_stats, M_DEVBUF); break;