From 350ffdd54baf880f440ddf9697666e283894ded1 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Thu, 22 Oct 2020 15:56:51 -0700 Subject: 13273 want upanic(2) Reviewed by: C Fraire Reviewed by: Andy Fiddaman Approved by: Gordon Ross --- usr/src/uts/common/os/exit.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'usr/src/uts/common/os/exit.c') diff --git a/usr/src/uts/common/os/exit.c b/usr/src/uts/common/os/exit.c index 1b9359da47..2d571a73d0 100644 --- a/usr/src/uts/common/os/exit.c +++ b/usr/src/uts/common/os/exit.c @@ -22,6 +22,7 @@ /* * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright 2020 Oxide Computer Company */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -71,6 +72,7 @@ #include #include #include +#include #include #include @@ -472,6 +474,14 @@ proc_exit(int why, int what) (void) untimeout(tmp_id); } + /* + * If we had generated any upanic(2) state, free that now. + */ + if (p->p_upanic != NULL) { + kmem_free(p->p_upanic, PRUPANIC_BUFLEN); + p->p_upanic = NULL; + } + /* * Remove any fpollinfo_t's for this (last) thread from our file * descriptors so closeall() can ASSERT() that they're all gone. -- cgit v1.2.3