]> Zhao Yanbai Git Server - minix.git/commitdiff
kernel debug: priv can be NULL early on
authorBen Gras <ben@minix3.org>
Fri, 21 Dec 2012 23:26:48 +0000 (23:26 +0000)
committerBen Gras <ben@minix3.org>
Sat, 29 Dec 2012 00:56:42 +0000 (00:56 +0000)
kernel/debug.c

index 9f89363288da832a79ae5875b83284f7a59535d9..7ef956a397f7d86e7df8bd60d0d260021a17b707 100644 (file)
@@ -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) {