summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Rosenfeld <hans.rosenfeld@joyent.com>2018-07-12 13:01:22 +0000
committerHans Rosenfeld <hans.rosenfeld@joyent.com>2018-09-26 21:30:14 +0200
commit627227313bb67bd9c7becd366732842c63504f33 (patch)
tree9094db33abc9dc92931465b5d12a2e600c09ce33
parentb5cf5bc277244cdacc06d213322ec98e76ef8d89 (diff)
downloadillumos-joyent-627227313bb67bd9c7becd366732842c63504f33.tar.gz
9797 dump_ttrace() chokes on softints
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Reviewed by: John Levon <levon@movementarian.org> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: Andy Fiddaman <omnios@citrus-it.net> Approved by: Garrett D'Amore <garrett@damore.org>
-rw-r--r--usr/src/uts/i86pc/io/apix/apix.c2
-rw-r--r--usr/src/uts/i86pc/os/trap.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/usr/src/uts/i86pc/io/apix/apix.c b/usr/src/uts/i86pc/io/apix/apix.c
index 87e4b2fe04..9ab5f930ab 100644
--- a/usr/src/uts/i86pc/io/apix/apix.c
+++ b/usr/src/uts/i86pc/io/apix/apix.c
@@ -355,7 +355,7 @@ apix_get_intr_handler(int cpu, short vec)
apix_vector_t *apix_vector;
ASSERT(cpu < apic_nproc && vec < APIX_NVECTOR);
- if (cpu >= apic_nproc)
+ if (cpu >= apic_nproc || vec >= APIX_NVECTOR)
return (NULL);
apix_vector = apixs[cpu]->x_vectbl[vec];
diff --git a/usr/src/uts/i86pc/os/trap.c b/usr/src/uts/i86pc/os/trap.c
index 49d41f770c..ba3d7ac6e9 100644
--- a/usr/src/uts/i86pc/os/trap.c
+++ b/usr/src/uts/i86pc/os/trap.c
@@ -2068,6 +2068,7 @@ dump_ttrace(void)
#endif
/* Define format for the TYPE and VC fields */
const char fmt2[] = "%4s %3x";
+ const char fmt2s[] = "%4s %3s";
char data2[9]; /* length of string formatted by fmt2 + 1 */
/*
* Define format for the HANDLER field. Width is arbitrary, but should
@@ -2157,6 +2158,14 @@ dump_ttrace(void)
break;
case TT_INTERRUPT:
+ if (rec->ttr_regs.r_trapno == T_SOFTINT) {
+ (void) snprintf(data2, sizeof (data2),
+ fmt2s, "intr", "-");
+ (void) snprintf(data3, sizeof (data3),
+ fmt3s, "(fakesoftint)");
+ break;
+ }
+
(void) snprintf(data2, sizeof (data2), fmt2,
"intr", rec->ttr_vector);
if (get_intr_handler != NULL)