Date: Mon, 6 Oct 2025 00:55:50 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Mateusz Guzik <mjg@freebsd.org> 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: <aOLpZpG1-HoY92xu@kib.kiev.ua> In-Reply-To: <202510052122.595LM1mb099170@gitrepo.freebsd.org> References: <202510052122.595LM1mb099170@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <mjg@FreeBSD.org> > AuthorDate: 2025-10-05 17:03:54 +0000 > Commit: Mateusz Guzik <mjg@FreeBSD.org> > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aOLpZpG1-HoY92xu>