Module Name: src Committed By: maxv Date: Mon Aug 26 10:35:35 UTC 2019
Modified Files: src/sys/kern: subr_pool.c Log Message: Revert r1.254, put back || for KASAN, some destructors like lwp_dtor() caused false positives. Needs more work. To generate a diff of this commit: cvs rdiff -u -r1.256 -r1.257 src/sys/kern/subr_pool.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/kern/subr_pool.c diff -u src/sys/kern/subr_pool.c:1.256 src/sys/kern/subr_pool.c:1.257 --- src/sys/kern/subr_pool.c:1.256 Sat Aug 17 12:37:49 2019 +++ src/sys/kern/subr_pool.c Mon Aug 26 10:35:35 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.256 2019/08/17 12:37:49 maxv Exp $ */ +/* $NetBSD: subr_pool.c,v 1.257 2019/08/26 10:35:35 maxv Exp $ */ /* * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018 @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.256 2019/08/17 12:37:49 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.257 2019/08/26 10:35:35 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -3104,8 +3104,8 @@ static void pool_cache_redzone_check(pool_cache_t pc, void *p) { #ifdef KASAN - /* If there is a ctor+dtor, leave the data as valid. */ - if (__predict_false(pc_has_ctor(pc) && pc_has_dtor(pc))) { + /* If there is a ctor/dtor, leave the data as valid. */ + if (__predict_false(pc_has_ctor(pc) || pc_has_dtor(pc))) { return; } #endif