Module Name: src Committed By: maxv Date: Sat Jun 6 06:42:54 UTC 2020
Modified Files: src/sys/kern: subr_pool.c Log Message: kMSan: re-set the orig after pool_cache_get_slow(), using the address of the caller of pool_cache_get_paddr(). Otherwise the orig is just pool_cache_get_paddr(), and that's not really useful for debugging. To generate a diff of this commit: cvs rdiff -u -r1.268 -r1.269 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.268 src/sys/kern/subr_pool.c:1.269 --- src/sys/kern/subr_pool.c:1.268 Wed Apr 15 17:16:22 2020 +++ src/sys/kern/subr_pool.c Sat Jun 6 06:42:54 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.268 2020/04/15 17:16:22 maxv Exp $ */ +/* $NetBSD: subr_pool.c,v 1.269 2020/06/06 06:42:54 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.268 2020/04/15 17:16:22 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.269 2020/06/06 06:42:54 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -2574,8 +2574,13 @@ pool_cache_get_paddr(pool_cache_t pc, in * no more objects are available, it will return false. * Otherwise, we need to retry. */ - if (!pool_cache_get_slow(cc, s, &object, pap, flags)) + if (!pool_cache_get_slow(cc, s, &object, pap, flags)) { + if (object != NULL) { + kmsan_orig(object, pc->pc_pool.pr_size, + KMSAN_TYPE_POOL, __RET_ADDR); + } break; + } } /*