Source-Changes-HG archive

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

[src/trunk]: src/sys/kern kmem(9): Show the pointer in kmem_free(..., 0) asse...



details:   https://anonhg.NetBSD.org/src/rev/d560abf98dba
branches:  trunk
changeset: 363453:d560abf98dba
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Mar 12 22:20:34 2022 +0000

description:
kmem(9): Show the pointer in kmem_free(..., 0) assertion like before.

diffstat:

 sys/kern/subr_kmem.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 62ff5d5f3328 -r d560abf98dba sys/kern/subr_kmem.c
--- a/sys/kern/subr_kmem.c      Sat Mar 12 21:37:55 2022 +0000
+++ b/sys/kern/subr_kmem.c      Sat Mar 12 22:20:34 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_kmem.c,v 1.83 2022/03/12 16:54:17 riastradh Exp $ */
+/*     $NetBSD: subr_kmem.c,v 1.84 2022/03/12 22:20:34 riastradh Exp $ */
 
 /*
  * Copyright (c) 2009-2020 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.83 2022/03/12 16:54:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.84 2022/03/12 22:20:34 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kmem.h"
@@ -258,7 +258,7 @@
        pool_cache_t pc;
 
        KASSERT(p != NULL);
-       KASSERT(requested_size > 0);
+       KASSERTMSG(requested_size > 0, "kmem_intr_free(%p, 0)", p);
 
        kasan_add_redzone(&requested_size);
        size = kmem_roundup_size(requested_size);



Home | Main Index | Thread Index | Old Index