Module Name:    src
Committed By:   jdolecek
Date:           Tue Nov 20 20:07:20 UTC 2018

Modified Files:
        src/sys/uvm: uvm_bio.c

Log Message:
need to use PGO_NOBLOCKALLOC also in ubc_alloc_direct() case, same
as non-direct code - otherwise the code tries to acquire the wapbl
lock again in genfs_getpages(), and panic due to locking against itself

towards PR kern/53124


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/uvm/uvm_bio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_bio.c
diff -u src/sys/uvm/uvm_bio.c:1.97 src/sys/uvm/uvm_bio.c:1.98
--- src/sys/uvm/uvm_bio.c:1.97	Sat Jun  2 15:24:55 2018
+++ src/sys/uvm/uvm_bio.c	Tue Nov 20 20:07:19 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_bio.c,v 1.97 2018/06/02 15:24:55 chs Exp $	*/
+/*	$NetBSD: uvm_bio.c,v 1.98 2018/11/20 20:07:19 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.97 2018/06/02 15:24:55 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.98 2018/11/20 20:07:19 jdolecek Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_ubc.h"
@@ -814,7 +814,8 @@ ubc_alloc_direct(struct uvm_object *uobj
 {
 	voff_t pgoff;
 	int error;
-	int gpflags = flags | PGO_NOTIMESTAMP | PGO_SYNCIO | PGO_ALLPAGES;
+	int gpflags = flags | PGO_NOTIMESTAMP | PGO_SYNCIO | PGO_ALLPAGES
+	    | PGO_NOBLOCKALLOC;
 	int access_type = VM_PROT_READ;
 	UVMHIST_FUNC("ubc_alloc_direct"); UVMHIST_CALLED(ubchist);
 

Reply via email to