From nobody Sat Mar 15 02:01:43 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 4ZF4Gx2Yd3z5r8H4 for ; Sat, 15 Mar 2025 02:01:45 +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 4ZF4Gw69Dzz3MKB for ; Sat, 15 Mar 2025 02:01:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742004104; 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=yOedvwI7b6ahXT6h7STjL5mhkSidykuJN9MhuciZSnY=; b=O9Ag2dJ2qxSEDHS8gYuF5K2iNX0sHWgb6x0fPF2Gr9jmrxetc4T0EEcV6rFj5AXco3Lqsv BNALipBZGV3heIj3EQFyWR7gGBFI48jqxOI+wiXaIJ6mZbIlJl8vDSRRTMsqw9oxe23Mkn dXvvlDgb+HKCxOwL9RcCqvEHgWP60RbN08DmwvnBLvH48/FH0btdmKdl6QrABCXRSEOvqS Xd8ihgIe9xxHlqmSEjzzSbtLElm+ezF4y86oL5jpfMihKvujjLMtVyjsE/5Y026pnD/BB7 e2xZF/XCoHMFabeqUiweHYVLF8g1N9HePTFjmhamNzqHPmVs0AftUNPYy9D2Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742004104; a=rsa-sha256; cv=none; b=Y1KwYko4oI/h+W0Ls53WtxQ2oE+Flb1rpsUSjnjBKQo/2AbvAH3bf4rxZuqHzWBVPUBPZ7 lrHzVoA/Pfqo/CvWeiOJNJKG1DoIcQm5o+j1YEyea7EQfWps2QGYWYDpQ6H26Dlz8YxVCP NCU+VMZwwVelUHDzNCvcRUuXmebHA9XLa+1bu5BqSOmY1InZBV4oiKhd7eN3tRr/pps+zd KBHLCpP/SoGvoLNScR4a8aAlunYWDM/ZxO3CQyESSib6Yv1h8+4e/gMOgOpCbfyuOICEZJ O0nNdgKW9Qz1z2HBXjk0qAxxqiWFHqqJx8L1YDKZ7on9NCD2ebhyFf/AvR2uiA== 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=1742004104; 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=yOedvwI7b6ahXT6h7STjL5mhkSidykuJN9MhuciZSnY=; b=ipRZjVqvLi8rCYQntMAop+byRaseKQwKSlWQBZ5YSRrtZzScRgZHxecEr3ag2hGcFULb8v Ya1LKBrgOgCdAf+9HcS8yh8WRF8+kB7LA7DnTwOY9HMK0uxNd5VrV9B3gOECUeiZsfOK+4 aHQX2lv7dT+So4Ui4YrOe3h9Ik8mUaXJFBAqQxNeEFFXxQI0fbpXF05Y7XU60JVaPcLJ3Z 8fdkVI05mOb7Lw/SkioSXsNO+C3iGNldXW5Njbl43eoFhPaAXTLQwiCdPQxTo3vibs0iap BbaWao4rMi1A7nfezp1q/xT2ggaRkId9m9NYK+qvrVqlM5Z2XrBFpim60W6oAg== 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 4ZF4Gw5fH2z18Vp for ; Sat, 15 Mar 2025 02:01:44 +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 52F21inm033822 for ; Sat, 15 Mar 2025 02:01:44 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 52F21iVB033820 for net@FreeBSD.org; Sat, 15 Mar 2025 02:01:44 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 02:01:43 +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: glebius@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: 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 --- Comment #9 from Gleb Smirnoff --- This conditional assignment had made several people to scratch their heads, but eventually every one agreed that it is safe. I'd be interested to see the 3 thread race that actually makes this code fail. The more you think on this race, the more you would think that the code that does it is not correct. By definition, if your *m->m_ext.ext_cnt is 1, then you OWN this mbuf, and nobody else should see it. So how does two other find it? Given that bug report is quite old, I'd prefer not to change any code unless submitter comes back and gives more information. btw, thanks for bring it up, Zhenlei. I totally missed it, and didn't know about its existence. --=20 You are receiving this mail because: You are the assignee for the bug.=