From nobody Thu Sep 21 10:53:05 2023 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 4Rrsgk02lxz4txDw for ; Thu, 21 Sep 2023 10:53: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rrsgj660Xz4f5B for ; Thu, 21 Sep 2023 10:53:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695293585; a=rsa-sha256; cv=none; b=khUgBoXXRJwgvEdpDSj/f9pNoUw+1tYZeO3vV5BVSqj9LJ3qgof8J9Z2cLmh3e+LpT64t9 79qe2a+G9It7VutzgxRs/4aTg/mHWM4ylMLo4lBZGzAtNemlPrfnhXPjc4cnWJTNtLiTTM F9gHw8QluglMVtBM0gvKt1crV0j9BecMM0TjmeWGX6clDL7vyGXQXhXCjoQrx4zBygHV5w D2DaOras8VWZkCNCSdgJtFS3lKcq4pK+tZgyXhVcwJrg+WyX+tByeMWD6/YeDfSZY2d3TP 07q9QkUxtgrz9YxY6Fz3hPKdZVoH9kxk18vkvdgPFMMy+ynhVH8CpyKEZLNz8g== 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=1695293585; 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=3nHJxkJxNLkHahrBIcH5yalbLxcYWjokFmbhI8i9xeg=; b=TSHHRNxPHhTTnIPZqAwzHxXN9Qg09qXd1O+K2pQbx9WtOHa0qrsDVryMjHniFQrm+hGrEj FhhT8zFK0KA22hJVnlYBlswUUoVmEI9BjNh/O/1up58gzfww0vIYs5/OjuTliCw62euXlt b5eGHe1BstSn72Rj0MT3vSnH5m0VM7JMlSBK7Iar2mFKdS4pgB5c0DMq4mun3XmthRIfbx jYww3aCjS37UdYpZg4puJYXauzIbwFCyoY2AQtMfsvot42YlT/b2qL6fqITEBHX4Pz+vH6 odMvPzZtWSsdxJPiXH0PrUv5F6VZy5+bMF5I8GK/C9RFGv4cgmGX6lcXLJ1zYw== 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 4Rrsgj59JCzbpp for ; Thu, 21 Sep 2023 10:53: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 38LAr5re024128 for ; Thu, 21 Sep 2023 10:53:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38LAr5DS024127 for bugs@FreeBSD.org; Thu, 21 Sep 2023 10:53:05 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 273418] [panic] Repeating kernel panic on open(/dev/console) Date: Thu, 21 Sep 2023 10:53: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: 13.2-STABLE X-Bugzilla-Keywords: crash, regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kib@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: 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=3D273418 --- Comment #33 from Konstantin Belousov --- Yes, this is the usual problem with dev_clone handlers. commit f041428f9d8aea9fe5a33c5c91ac31074d652672 Author: Konstantin Belousov Date: Thu Sep 21 13:47:14 2023 +0300 tun/tap: correct ref count on cloned cdevs PR: 273418 diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index f4dbf685fba6..a01bc11aa64c 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -548,6 +548,7 @@ tun_clone_create(struct if_clone *ifc, char *name, size= _t len, if (i !=3D 0) i =3D tun_create_device(drv, unit, NULL, &dev, name); if (i =3D=3D 0) { + dev_ref(dev); tuncreate(dev); struct tuntap_softc *tp =3D dev->si_drv1; *ifpp =3D tp->tun_ifp; @@ -611,8 +612,10 @@ tunclone(void *arg, struct ucred *cred, char *name, int namelen, i =3D tun_create_device(drv, u, cred, dev, name); } - if (i =3D=3D 0) + if (i =3D=3D 0) { + dev_ref(*dev); if_clone_create(name, namelen, NULL); + } out: CURVNET_RESTORE(); } --=20 You are receiving this mail because: You are the assignee for the bug.=