Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm fix KASAN PoolUseAfterFree for async write - can't r...
details: https://anonhg.NetBSD.org/src/rev/9f4b6dbb0eba
branches: trunk
changeset: 933307:9f4b6dbb0eba
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun May 24 14:11:49 2020 +0000
description:
fix KASAN PoolUseAfterFree for async write - can't read bp after VOP_STRATEGY()
problem found and fix provided by Paul Ripke
diffstat:
sys/uvm/uvm_swap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 262cb893bf63 -r 9f4b6dbb0eba sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c Sun May 24 10:42:27 2020 +0000
+++ b/sys/uvm/uvm_swap.c Sun May 24 14:11:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_swap.c,v 1.192 2020/05/22 11:54:05 jdolecek Exp $ */
+/* $NetBSD: uvm_swap.c,v 1.193 2020/05/24 14:11:49 jdolecek 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.192 2020/05/22 11:54:05 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.193 2020/05/24 14:11:49 jdolecek Exp $");
#include "opt_uvmhist.h"
#include "opt_compat_netbsd.h"
@@ -1985,7 +1985,7 @@
* Reads are always synchronous; if this changes, we
* need to add an asynchronous path for decryption.
*/
- KASSERT((bp->b_flags & B_READ) == 0);
+ KASSERT(write);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index