From: Ben Gras Date: Fri, 21 Dec 2012 23:26:48 +0000 (+0000) Subject: kernel debug: priv can be NULL early on X-Git-Tag: v3.2.1~150 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=59ff758441b0443b24d1b0bfa712d94c817d1177;p=minix.git kernel debug: priv can be NULL early on --- 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) {