Date: Mon, 6 Oct 2025 00:36:10 +0200 From: Mateusz Guzik <mjguzik@gmail.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Mateusz Guzik <mjg@freebsd.org>, 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: <CAGudoHFRRdwSC-qiaH9WUwXgB=r9baGAsnjfCFjBovwgxVu_Aw@mail.gmail.com> In-Reply-To: <aOLpZpG1-HoY92xu@kib.kiev.ua> References: <202510052122.595LM1mb099170@gitrepo.freebsd.org> <aOLpZpG1-HoY92xu@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
I'll take care of it on Wednesday On Sun, Oct 5, 2025 at 11:56=E2=80=AFPM Konstantin Belousov <kostikbel@gmai= l.com> wrote: > > 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=3Db1de02c415de5df2d24d8021= 827634fc095b7a26 > > > > 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 set= fl locking > > > > Both use the same 16 bit var to store their locked and waiters bits= , > > then this in file_v_unlock: > > > > state =3D atomic_load_16(flagsp); > > if ((state & lock_wait_bit) =3D=3D 0 && > > atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) > > return; > > > > can fail if for example foffset is being unlocked while setfl is ge= tting > > 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?CAGudoHFRRdwSC-qiaH9WUwXgB=r9baGAsnjfCFjBovwgxVu_Aw>