From owner-svn-src-all@freebsd.org Sat Oct 19 20:48:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53F931562BB; Sat, 19 Oct 2019 20:48:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46wZkZ1Yfpz4cD8; Sat, 19 Oct 2019 20:48:54 +0000 (UTC) (envelope-from tuexen@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 1A3B327F6D; Sat, 19 Oct 2019 20:48:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9JKmrx3042285; Sat, 19 Oct 2019 20:48:53 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9JKmrwo042283; Sat, 19 Oct 2019 20:48:53 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201910192048.x9JKmrwo042283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 19 Oct 2019 20:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353770 - in head/sys: net netinet/netdump X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head/sys: net netinet/netdump X-SVN-Commit-Revision: 353770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2019 20:48:54 -0000 Author: tuexen Date: Sat Oct 19 20:48:53 2019 New Revision: 353770 URL: https://svnweb.freebsd.org/changeset/base/353770 Log: Fix compile issues when building a kernel without the VIMAGE option. Thanks to cem@ for discussing the issue which resulted in this patch. Reviewed by: cem@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D22089 Modified: head/sys/net/debugnet.c head/sys/netinet/netdump/netdump_client.c Modified: head/sys/net/debugnet.c ============================================================================== --- head/sys/net/debugnet.c Sat Oct 19 19:52:19 2019 (r353769) +++ head/sys/net/debugnet.c Sat Oct 19 20:48:53 2019 (r353770) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/netinet/netdump/netdump_client.c ============================================================================== --- head/sys/netinet/netdump/netdump_client.c Sat Oct 19 19:52:19 2019 (r353769) +++ head/sys/netinet/netdump/netdump_client.c Sat Oct 19 20:48:53 2019 (r353770) @@ -409,20 +409,13 @@ static int netdump_configure(struct diocskerneldump_arg *conf, struct thread *td) { struct ifnet *ifp; - struct vnet *vnet; NETDUMP_ASSERT_WLOCKED(); if (conf->kda_iface[0] != 0) { - if (td != NULL) - vnet = TD_TO_VNET(td); - else - vnet = vnet0; - CURVNET_SET(vnet); - if (td != NULL && !IS_DEFAULT_VNET(curvnet)) { - CURVNET_RESTORE(); + if (td != NULL && !IS_DEFAULT_VNET(TD_TO_VNET(td))) return (EINVAL); - } + CURVNET_SET(vnet0); ifp = ifunit_ref(conf->kda_iface); CURVNET_RESTORE(); } else