From nobody Tue May 21 08:34:19 2024 X-Original-To: bugs@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 4Vk75R4G13z5LhfS for ; Tue, 21 May 2024 08:34:19 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vk75R2fNmz4hM4 for ; Tue, 21 May 2024 08:34:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716280459; a=rsa-sha256; cv=none; b=lPJCR7xRnor5Zfl7U2wJGvu26EJiCelRh6E3cUfCds9l04XoBS1p3j+fajeiNHwXMF43He 30TQDZW3WKlThu3F1EeJIynj7BCO3ugJuUtIu32EaVZLooFpg8PrupIHCCl5sZCGzEMxDd 2hKYBZNypLhujPeZRnFVXJgZrCr2p2naasB+rsDhuORpLqwifF38CDLebGa8mMSTtd3/Ea 4mnBo+63KYq/8DE0etGHuVLzqFRURht3Hz3lkNtZduawStZb5OiQY3LFFz+LqRfPonS5S3 l6uK/yIsvOQUSqpm9IyYVRZhSkw+J8pOMMHMLuJUqVUV9XX4L78ynhY5Pz596w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716280459; 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=0Po++pWYXQOpKRDttG+GDoNcRrvKRnio1uAyq6rso/E=; b=pHBrz0yI3L3wSFJ5BJf4vKx2zvPinXP6QXW7yMmxZK8NQfVrQHCUKP8MbuXTih5MlTaSkl 1fnr1aGJRursYzTuNXvcJayHYuJ6xuFHjcv9n5FqygGU9Pqn3BDYvlTUXskFmhWOIRmlii r9z5BzZe+OmgZh9Kp3xzSw3G1Hx1zr44H0IKqpkPUQpFeK34AfNERbEj/9fSjry69mipGJ ePx+bkE38GnuJBofFF/AKHUrzTREHkwdNSMrcMSsPP60O+/QdR+U7B/mmnVRvPKTlSdM6W bKTVcZuNZuqeFnwZDq9olZ1/3w7k4REWeueqVkE0xvY0CIi96Ymik5C0nqXwAA== 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 4Vk75R2Fy9zFJc for ; Tue, 21 May 2024 08:34:19 +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 44L8YJIb053565 for ; Tue, 21 May 2024 08:34:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44L8YJvx053559 for bugs@FreeBSD.org; Tue, 21 May 2024 08:34:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 279195] kernel panic while re-configuring if_vlan(4) vlan id Date: Tue, 21 May 2024 08:34:19 +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: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kp@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279195 Kristof Provost changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kp@freebsd.org --- Comment #2 from Kristof Provost --- Yeah, that seems to need this: diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index b69d8107e30d..b936d4673404 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1715,10 +1715,17 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid, ifv->ifv_proto =3D proto; if (ifv->ifv_vid !=3D vid) { + int oldvid =3D ifv->ifv_vid; + /* Re-hash */ vlan_remhash(trunk, ifv); ifv->ifv_vid =3D vid; error =3D vlan_inshash(trunk, ifv); + if (error) { + ifv->ifv_vid =3D oldvid; + /* Re-insert back where we found it. */ + vlan_inshash(trunk, ifv); + } } /* Will unlock */ goto done; After # ifconfig vlan0 vlan 110 you'll see that vlan0 thinks it's on 111, so when it tries to vlan_remhash() it's not where it expects to find it. There may be a similar problem in the case where we don't yet have a vlande= v. --=20 You are receiving this mail because: You are the assignee for the bug.=