From nobody Sun Oct 5 21:55:50 2025 X-Original-To: dev-commits-src-main@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 4cfx6s5lQgz6Bn2J; Sun, 05 Oct 2025 21:56:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4cfx6s0t7Cz3J4w; Sun, 05 Oct 2025 21:56:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 595LtoMa036880; Mon, 6 Oct 2025 00:55:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 595LtoMa036880 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 595LtoH3036879; Mon, 6 Oct 2025 00:55:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 6 Oct 2025 00:55:50 +0300 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b1de02c415de - main - vfs offset: fix assertion failure in face of racing ffofset and setfl locking Message-ID: References: <202510052122.595LM1mb099170@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202510052122.595LM1mb099170@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cfx6s0t7Cz3J4w On Sun, Oct 05, 2025 at 09:22:01PM +0000, Mateusz Guzik wrote: > The branch main has been updated by mjg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b1de02c415de5df2d24d8021827634fc095b7a26 > > commit b1de02c415de5df2d24d8021827634fc095b7a26 > Author: Mateusz Guzik > AuthorDate: 2025-10-05 17:03:54 +0000 > Commit: Mateusz Guzik > CommitDate: 2025-10-05 21:21:34 +0000 > > vfs offset: fix assertion failure in face of racing ffofset and setfl locking > > Both use the same 16 bit var to store their locked and waiters bits, > then this in file_v_unlock: > > state = atomic_load_16(flagsp); > if ((state & lock_wait_bit) == 0 && > atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) > return; > > can fail if for example foffset is being unlocked while setfl is getting > locked. > > Afterwards the code assumes there are blocked waiters on foffset. > > Reviewed by: kib, markj > Sponsored by: Rubicon Communications, LLC ("Netgate") > Differential Revision: https://reviews.freebsd.org/D52915 This should be merged both to stable/15 and 14.