From nobody Sat Mar 15 01:48:11 2025 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 4ZF3zH2wpLz5r6wM for ; Sat, 15 Mar 2025 01:48:11 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZF3zH0BP6z485c for ; Sat, 15 Mar 2025 01:48:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742003291; 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=jfrOTpYvfkwSUK3o+wwmASEvtKxk/Sw7lje17TtZLrE=; b=RYtvh4IybGEcYmsWfiE9m1nOXkWJrMatfRgdWCi3AZs2gjfljVScPN5HgkqPMi5A8xfMaz tkCbYNmnSM0BACiEI98w+jIZzQ//qooARVXTvambxmpQSzYp1wy8FrIAvn+E6H7q9meR+Z OQ2zmjBH4tbzR2+ctlTxg/qCTcynRHm79ZlX8MozzXr3QQhZNrTMXoWt8OuB2TiVZp+elK B03SQWGvJ7126wS4A5HtZb9ASQiYLGMFFZIT6w4EoFGgf0XTO9hJH1SgfoTciaXtE9ZAkm EhkvdRGsR7eqXBPsHuC0ec8iNchukGQMRTsrQtX4cLSN6LyTyOWvghgRXQGiaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742003291; a=rsa-sha256; cv=none; b=YOVduf/E6sPAoJKbcM6kdOVyJb00TWCU+snHMQKRubM3rpgEVKrQX7vgg2ckXRnript77z jLmV5Vcp6wwMKvLn67yW1ZpNkfUGeurl6hlO4IYD1ANMpJZXOEnLF3zn/CGcD7udAdXYBH vn+fJhFxk1e7HleCFv9uuSqxF1DOl+6kytOKdYatEz6epN3OruWk1HwvRaI0sv5qqy/3T1 a/HN/rG9+xle1KqAq1n4xHe72wTu8hzlq1YkWYhiUMMZP85epeRQ9AC0o1TBqAoqqRbXNy w3kksqj5ASP6vWngZA2sMsLIrIQy4upBzJrZRILYLilCokUIzghwpPQYra/Jow== 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=1742003291; 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=jfrOTpYvfkwSUK3o+wwmASEvtKxk/Sw7lje17TtZLrE=; b=hjouAJn9dFCFF+EtPviswwiGRwcWroXjmA9XRpo8H8QQd+FVz178Kk64a3mco7LKtlhZHP OVM7t4dxF0aSdvQf1Z8fNnxIH/j+9CiQED2A6P+1hO8W/LFq64Ay/2kYS9QYPlKoAymz7o /bepUeVZKAxZCyaZ3YO9Ny2tcHv4GLcrqEnUa+tXPKBiYF1lffyqx0ThRy+mti6OgLJ7zx ar7/BRhu82RFbWmfJ7HfvAKRnb4/kLDoKuv4glJ/Jvbwzn5GDQsNJmGK4ZW7JIbuqEJoIX 6xujle6TKc/3CajVraIeAoSaImHKUfibkF/sw6sXQ0SNsgRhZdz/jX42FMNdaQ== 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 4ZF3zG69bDz180B for ; Sat, 15 Mar 2025 01:48:10 +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 52F1mASW000516 for ; Sat, 15 Mar 2025 01:48:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 52F1mAZc000515 for net@FreeBSD.org; Sat, 15 Mar 2025 01:48:10 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: net@FreeBSD.org Subject: [Bug 137145] [mbuf] Reference count computing isn't correct when more than one threads call function m_copypacket Date: Sat, 15 Mar 2025 01:48:11 +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: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: zlei@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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=3D137145 Zhenlei Huang changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |glebius@FreeBSD.org, | |zlei@FreeBSD.org --- Comment #8 from Zhenlei Huang --- Gleb changed some logic of mb_dupcl(), the patch should be rebased. I think= we still risk concurrent mb_dupcl(). ``` /* See if this is the mbuf that holds the embedded refcount. */ if (m->m_ext.ext_flags & EXT_FLAG_EMBREF) { refcnt =3D n->m_ext.ext_cnt =3D &m->m_ext.ext_count; n->m_ext.ext_flags &=3D ~EXT_FLAG_EMBREF; } else { KASSERT(m->m_ext.ext_cnt !=3D NULL, ("%s: no refcounting pointer on %p", __func__, m)); refcnt =3D m->m_ext.ext_cnt; } if (*refcnt =3D=3D 1) *refcnt +=3D 1; /* XXX_ZL possible to lose update on concu= rrent mb_dupcl() */ else atomic_add_int(refcnt, 1); ``` also CC @Gleb --=20 You are receiving this mail because: You are the assignee for the bug.=