From nobody Thu Aug 21 04:17:10 2025 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 4c6qlp2HPVz65k7s for ; Thu, 21 Aug 2025 04:17:10 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c6qlp1W8zz3Yyl for ; Thu, 21 Aug 2025 04:17:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755749830; 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=RYxaFYqIZVeHVBw6tPSL9gikMJagFKhJ/ta1RFWGluA=; b=g+lqUIa+Quf1bf+oLAkVNpHyVwR1r+bI6Ac1EG5RAJOUJoT2oTMr/AQ+r2CkpuzVC8lHeP Hj+M7lhawFw9Vqk+iUyZCtF+msLuMvuP+HL2ufuIb6NNyeDt6ueM7GflM+Y+p1cZT9KK9j aNQow/nBtyMs3BJBguFr4j55U+QkVkw01WJOxhLDzX/h2V7MunVVJkXM1LVSS5S77oTTu2 sM37Mosb4opor7wG9NveI2UjxL0zXg480h1GGpn9KVfmoDCPBBA58Dq1ecrV2DcBaLt/B8 AgbdKPidK+I0O70/xYVkzoa/8fE4Vngqip98txapOVvpKyhAod5cK5/G/19olw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755749830; 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=RYxaFYqIZVeHVBw6tPSL9gikMJagFKhJ/ta1RFWGluA=; b=f2RHS4QmUv3hTGWAKi4hide5qO10TXuKcbFLVV4ninsA7OQRWFaGgg1kxCfNCAb195S3pI NkR38LMlZRNPIRHEuIgXVv6sHsZRLJxzsI7mUw4mDEvsFr2M/714Zu9HEmgpX/JYl5yi59 WzTj5MERFMybf0QrzyQLSqNviKI51DAXv9575p4j5OtGOVDpD4Dqes0D0KnEJirtwu1GPc Vvg3gMPi8910HBUC34QAiYciwGTFoQUvEgFqP2aloSyczrCku0SLqBsOEuObdyIJoaEAnx h43Q6B7FAS4Sn3n5NBlv0Rd3GtHAmc6L8DfycUmuRCq9P/xQd+Wo/ool4NkihA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755749830; a=rsa-sha256; cv=none; b=kvgaGrRCoN/z51A/1ZmbEZug+j0GUDj1PLO1a10RIYhk0dqLEjlMG0IGN8/RpKBxctjUS/ y/duLXo8pPOBZwZej4Dq1RvKsGFzSuaybko5chitdDmNvLDMZOgGzmV4j+zrTLKjWB6OeA VLExeYBGc10mjy1f99bQ+EWiWgp+0j3tgbN16u+FbrvJQcVYBTpPfy3/qe5kJvYdgiDfvy bm2youVCUbB5X9EaVXdM812AVi3fIzZAretjyxpYqWQWYuItjL9mIQA+xgr6V0uZx9wK3r r+GLc9EFflDz/4KsKrcE8/nmPTqV1nEyIyj2b5A4yY3eAtZoCdpryTDgPyEW/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c6qlp15pWzk3k for ; Thu, 21 Aug 2025 04:17: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 57L4HAKK069339 for ; Thu, 21 Aug 2025 04:17:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 57L4HAEG069338 for bugs@FreeBSD.org; Thu, 21 Aug 2025 04:17: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: bugs@FreeBSD.org Subject: [Bug 288985] [regression 14.2] copy_file_range fails to update inoffp and outoffp Date: Thu, 21 Aug 2025 04:17:10 +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.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: thiago@kde.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-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: 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=3D288985 --- Comment #1 from Thiago Macieira --- I think this is the commit introducing the bug: https://github.com/freebsd/freebsd-src/commit/1d2fd8c9cf0fb796d8b7b7590288d= 3125398d445 https://reviews.freebsd.org/rG197997a4c36d8be5807688a4f973ebe8ae807a6e infp1 =3D outfp1 =3D NULL; if (inoffp !=3D NULL) inoff =3D *inoffp; else infp1 =3D infp; ... if (infp1 !=3D NULL || outfp1 !=3D NULL) { ... foffsets_locked =3D true; } ... error =3D vn_copy_file_range(invp, &inoff, outvp, &outoff, &retlen, flags, infp->f_cred, outfp->f_cred, td); out: if (rl_rcookie !=3D NULL) vn_rangelock_unlock(invp, rl_rcookie); if (rl_wcookie !=3D NULL) vn_rangelock_unlock(outvp, rl_wcookie); if (foffsets_locked) { if (error =3D=3D EINTR || error =3D=3D ERESTART) { inoff =3D savinoff; outoff =3D savoutoff; } if (inoffp =3D=3D NULL) foffset_unlock(infp, inoff, 0); else *inoffp =3D inoff; The patch changed the call to vn_copy_file_range() to take a pointer to the local variable inoff instead of the user pointer, so that function won't up= date any more and we need to do it after it returns. The tail code does that, but only if foffsets_locked =3D=3D true, which it won't be for our case. --=20 You are receiving this mail because: You are the assignee for the bug.=