Date: Wed, 28 Feb 2018 22:33:08 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330132 - in stable: 10/sys/amd64/amd64 11/sys/amd64/amd64 Message-ID: <201802282233.w1SMX8kN010883@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Feb 28 22:33:07 2018 New Revision: 330132 URL: https://svnweb.freebsd.org/changeset/base/330132 Log: MFC 328610: Ensure 'name' is not NULL before passing to strcmp(). This avoids a nested page fault when obtaining a stack trace in DDB if the address from the first frame does not resolve to a known symbol. Modified: stable/11/sys/amd64/amd64/db_trace.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/amd64/amd64/db_trace.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/amd64/amd64/db_trace.c ============================================================================== --- stable/11/sys/amd64/amd64/db_trace.c Wed Feb 28 21:51:51 2018 (r330131) +++ stable/11/sys/amd64/amd64/db_trace.c Wed Feb 28 22:33:07 2018 (r330132) @@ -336,7 +336,8 @@ db_backtrace(struct thread *td, struct trapframe *tf, /* Probably an assembler symbol. */ actframe = (void *)(tf->tf_rsp - 8); } - } else if (strcmp(name, "fork_trampoline") == 0) { + } else if (name != NULL && + strcmp(name, "fork_trampoline") == 0) { /* * Don't try to walk back on a stack for a * process that hasn't actually been run yet.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802282233.w1SMX8kN010883>