Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Let's not waste time decrypting garbage, shall we?



details:   https://anonhg.NetBSD.org/src/rev/21bda4d546c9
branches:  trunk
changeset: 933196:21bda4d546c9
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu May 21 16:50:25 2020 +0000

description:
Let's not waste time decrypting garbage, shall we?

Skip to the end if the transfer failed.

diffstat:

 sys/uvm/uvm_swap.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 8bb518550679 -r 21bda4d546c9 sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c        Thu May 21 15:28:35 2020 +0000
+++ b/sys/uvm/uvm_swap.c        Thu May 21 16:50:25 2020 +0000
@@ -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 @@
         */
 
        error = biowait(bp);
+       if (error)
+               goto out;
 
        /*
         * decrypt reads in place if needed
@@ -2042,7 +2044,7 @@
                            (void *)(kva + (vsize_t)i*PAGE_SIZE), s);
                }
        } while (0);
-
+out:
        /*
         * kill the pager mapping
         */



Home | Main Index | Thread Index | Old Index