Date: Sun, 26 Feb 2023 20:14:39 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Mateusz Guzik <mjguzik@gmail.com> Cc: Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b8bb73ab724b - main - pseudofs: Fix LOR in VOP_READDIR. Message-ID: <Y/uhj7jFnSha6Muv@kib.kiev.ua> In-Reply-To: <CAGudoHH1njT63ppGqqxGKpZ2K22u7XphKu=9kA_JPP2D8m4tOQ@mail.gmail.com> References: <202302261624.31QGOl8I089368@gitrepo.freebsd.org> <CAGudoHH1njT63ppGqqxGKpZ2K22u7XphKu=9kA_JPP2D8m4tOQ@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
On Sun, Feb 26, 2023 at 05:30:22PM +0100, Mateusz Guzik wrote: > On 2/26/23, Dag-Erling Smørgrav <des@freebsd.org> wrote: > > The branch main has been updated by des: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=b8bb73ab724b19063481dba089c3dc9a8e1926b1 > > > > commit b8bb73ab724b19063481dba089c3dc9a8e1926b1 > > Author: Dag-Erling Smørgrav <des@FreeBSD.org> > > AuthorDate: 2023-02-26 15:30:53 +0000 > > Commit: Dag-Erling Smørgrav <des@FreeBSD.org> > > CommitDate: 2023-02-26 15:30:53 +0000 > > > > pseudofs: Fix LOR in VOP_READDIR. > > > > MFC after: 3 days > > Differential Revision: https://reviews.freebsd.org/D20862 > > --- > > sys/fs/pseudofs/pseudofs_vnops.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sys/fs/pseudofs/pseudofs_vnops.c > > b/sys/fs/pseudofs/pseudofs_vnops.c > > index eae4c1c71ab9..f4e27b469213 100644 > > --- a/sys/fs/pseudofs/pseudofs_vnops.c > > +++ b/sys/fs/pseudofs/pseudofs_vnops.c > > @@ -897,8 +897,8 @@ pfs_readdir(struct vop_readdir_args *va) > > if (!pfs_visible_proc(curthread, pd, proc)) { > > _PRELE(proc); > > PROC_UNLOCK(proc); > > - sx_sunlock(&allproc_lock); > > pfs_unlock(pd); > > + sx_sunlock(&allproc_lock); > > PFS_RETURN (ENOENT); > > } > > } > > > > this does not fix any LORs. it is legal to *unlock* in any order. To be pedantic: it is true that unlock of normal locks is correct in any order. There are exceptions for spinlocks. This is, of course, not relevant for the commit starting the thread.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Y/uhj7jFnSha6Muv>
