From 59ff758441b0443b24d1b0bfa712d94c817d1177 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 21 Dec 2012 23:26:48 +0000 Subject: [PATCH] kernel debug: priv can be NULL early on --- kernel/debug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/debug.c b/kernel/debug.c index 9f8936328..7ef956a39 100644 --- a/kernel/debug.c +++ b/kernel/debug.c @@ -236,8 +236,9 @@ static void print_sigmgr(struct proc *pp) { endpoint_t sig_mgr, bak_sig_mgr; - sig_mgr = priv(pp)->s_sig_mgr; - bak_sig_mgr = priv(pp)->s_bak_sig_mgr; + sig_mgr = priv(pp) ? priv(pp)->s_sig_mgr : NONE; + bak_sig_mgr = priv(pp) ? priv(pp)->s_bak_sig_mgr : NONE; + if(sig_mgr == NONE) { printf("no sigmgr"); return; } printf("sigmgr "); print_endpoint(sig_mgr); if(bak_sig_mgr != NONE) { -- 2.11.4.GIT