From nobody Sat Oct 19 13:05:05 2024 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XW1yB1YsMz5b4l3 for ; Sat, 19 Oct 2024 13:05:06 +0000 (UTC) (envelope-from bugzilla-noreply@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XW1y96V18z4QkH for ; Sat, 19 Oct 2024 13:05:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729343105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IAiVEvJpEGagVniZ9aB4GM4UMNWFIONemCa4XDT/Unc=; b=n0+5yE4GiX2lgWlng7ROFsz1XSQi3xbLBmvF/qiP7ZQAWyDpJ1ypPc7Od+0Le+iuSD7K+R lIlO/XIK35oe7dP3x4XHY8eaG9quCzJB41LGVwTbVfzUB9NtHDPoMDwS7083CfehjWfyN9 LcC9auIk8ZlXbpU9VQMIKq1qvjVSrOdRyViDXcXXl53TbM14CRbWhPUhP74I6dvtbO1Bw3 TC89ioXKu0RgEmvEBOVjUabkm1Y+i7njUPKh0P99LTUOWRzLicCqf2qOVrB8bKlLOal7wD 2U3WyiNvIypMJd9npdkMYBnyLOO5myIfVfd7WZDnZCmrKxglwZHNSWGM21MeHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729343105; a=rsa-sha256; cv=none; b=EL9kmgQgipWPyACEvMuEcQUNdHNn4IZjrAi35hevgPAfUOVHLvu6E2atAG5EWPAHximwvG oaG9gNEaUAWDpbUf+lQQHTh8UMXDoDKU7Ao6Tccx+aRmKb/ein1IzpVcYXpfSDERTOYjNw kGLUUiZZORhAULTbdWgc0k1NqQaVJQR0JVuCQ12g0LQrbVQms2s5kV68n80SWNUWqUpumA BtYVX3qGEmmm+T0d/6oes5Nv+GT7ioOaMReAnDD8Q2XXemNkLNHv63Jf3obacgIGFV5u4E N/87Ra9SdmzuaWBrIWDMRu6/W362nvNseSyhflONRrOdo2P68XjuKJ3u8weNWQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XW1y95zCMzJgg for ; Sat, 19 Oct 2024 13:05:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 49JD55h5000948 for ; Sat, 19 Oct 2024 13:05:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 49JD55ID000947 for net@FreeBSD.org; Sat, 19 Oct 2024 13:05:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 282168] vtnet(4): panic in if_attach_internal() when kldloading Date: Sat, 19 Oct 2024 13:05:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: crash X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282168 --- Comment #11 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Df4e35c044c8988b7452cefbdcc417f5fd= 723e021 commit f4e35c044c8988b7452cefbdcc417f5fd723e021 Author: Mark Johnston AuthorDate: 2024-10-19 13:03:56 +0000 Commit: Mark Johnston CommitDate: 2024-10-19 13:03:56 +0000 bus: Set the current VNET in device_attach() Some drivers, in particular anything which creates an ifnet during attach, need to have the current VNET set, as if_attach_internal() and its callees access VNET-global variables. device_probe_and_attach() handles this, but this is not the only way to arrive in DEVICE_ATTACH. In particular, bus drivers may invoke device_attach() directly, as does devctl2's DEV_ENABLE ioctl handler. So, set the current VNET in device_attach() instead. I believe it is always safe to use vnet0, as devctl2 ioctls are not permitted within a jail. PR: 282168 Reviewed by: zlei, kevans, bz, imp, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47174 sys/kern/subr_bus.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=