Comment out an incorrect lock assertion.
authormpi <mpi@openbsd.org>
Wed, 19 Jan 2022 02:08:24 +0000 (02:08 +0000)
committermpi <mpi@openbsd.org>
Wed, 19 Jan 2022 02:08:24 +0000 (02:08 +0000)
The swap code path in uvm_aio_aiodone() is not holding the corresponding
page lock and shouldn't as long as anons are locked inside uvm_page_unbusy()
to handle the PG_RELEASED case.

Reported by Ralf Horstmann on bugs@

sys/uvm/uvm_page.c

index e2b91c8..df40cd9 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: uvm_page.c,v 1.160 2021/12/15 12:53:53 mpi Exp $      */
+/*     $OpenBSD: uvm_page.c,v 1.161 2022/01/19 02:08:24 mpi Exp $      */
 /*     $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $        */
 
 /*
@@ -1061,7 +1061,14 @@ uvm_page_unbusy(struct vm_page **pgs, int npgs)
                        continue;
                }
 
+#if notyet
+               /*
+                 * XXX swap case in uvm_aio_aiodone() is not holding the lock.
+                *
+                * This isn't compatible with the PG_RELEASED anon case below.
+                */
                KASSERT(uvm_page_owner_locked_p(pg));
+#endif
                KASSERT(pg->pg_flags & PG_BUSY);
 
                if (pg->pg_flags & PG_WANTED) {