Module Name: src Committed By: riastradh Date: Thu May 21 16:50:25 UTC 2020
Modified Files: src/sys/uvm: uvm_swap.c Log Message: Let's not waste time decrypting garbage, shall we? Skip to the end if the transfer failed. To generate a diff of this commit: cvs rdiff -u -r1.190 -r1.191 src/sys/uvm/uvm_swap.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_swap.c diff -u src/sys/uvm/uvm_swap.c:1.190 src/sys/uvm/uvm_swap.c:1.191 --- src/sys/uvm/uvm_swap.c:1.190 Wed May 20 17:48:34 2020 +++ src/sys/uvm/uvm_swap.c Thu May 21 16:50:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.c,v 1.190 2020/05/20 17:48:34 riastradh Exp $ */ +/* $NetBSD: uvm_swap.c,v 1.191 2020/05/21 16:50:25 riastradh Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.190 2020/05/20 17:48:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.191 2020/05/21 16:50:25 riastradh Exp $"); #include "opt_uvmhist.h" #include "opt_compat_netbsd.h" @@ -2000,6 +2000,8 @@ uvm_swap_io(struct vm_page **pps, int st */ error = biowait(bp); + if (error) + goto out; /* * decrypt reads in place if needed @@ -2042,7 +2044,7 @@ uvm_swap_io(struct vm_page **pps, int st (void *)(kva + (vsize_t)i*PAGE_SIZE), s); } } while (0); - +out: /* * kill the pager mapping */