Source-Changes-HG archive

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

[src/trunk]: src/sys/ddb Don't pass a unset address to lockdebug_lock_print



details:   https://anonhg.NetBSD.org/src/rev/fa461e8aedc0
branches:  trunk
changeset: 321427:fa461e8aedc0
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Mar 16 04:45:20 2018 +0000

description:
Don't pass a unset address to lockdebug_lock_print

diffstat:

 sys/ddb/db_command.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 2b1c189bd59b -r fa461e8aedc0 sys/ddb/db_command.c
--- a/sys/ddb/db_command.c      Fri Mar 16 04:44:51 2018 +0000
+++ b/sys/ddb/db_command.c      Fri Mar 16 04:45:20 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_command.c,v 1.151 2018/03/16 04:44:51 ozaki-r Exp $ */
+/*     $NetBSD: db_command.c,v 1.152 2018/03/16 04:45:20 ozaki-r Exp $ */
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.151 2018/03/16 04:44:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.152 2018/03/16 04:45:20 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -1229,7 +1229,8 @@
 {
 
 #ifdef _KERNEL /* XXX CRASH(8) */
-       lockdebug_lock_print((void *)(uintptr_t)addr, db_printf);
+       lockdebug_lock_print(have_addr ? (void *)(uintptr_t)addr : NULL,
+           db_printf);
 #endif
 }
 



Home | Main Index | Thread Index | Old Index