From nobody Sun Feb 26 18:14:39 2023 X-Original-To: dev-commits-src-all@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 4PPsH502Qlz3tsM7; Sun, 26 Feb 2023 18:14:57 +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 4PPsH42x61z45dx; Sun, 26 Feb 2023 18:14:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 31QIEeS5057685 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 26 Feb 2023 20:14:43 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 31QIEeS5057685 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 31QIEeHY057684; Sun, 26 Feb 2023 20:14:40 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 26 Feb 2023 20:14:39 +0200 From: Konstantin Belousov To: Mateusz Guzik Cc: Dag-Erling =?utf-8?B?U23DuHJncmF2?= , 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: References: <202302261624.31QGOl8I089368@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4PPsH42x61z45dx 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-ThisMailContainsUnwantedMimeParts: N On Sun, Feb 26, 2023 at 05:30:22PM +0100, Mateusz Guzik wrote: > On 2/26/23, Dag-Erling Smørgrav 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 > > AuthorDate: 2023-02-26 15:30:53 +0000 > > Commit: Dag-Erling Smørgrav > > 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.