diff options
author | Robert Mustacchi <rm@fingolfin.org> | 2022-09-27 11:55:45 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@mnx.io> | 2022-09-28 15:19:48 -0400 |
commit | b7335573a496fd332333ccc5718fb23ea11815ba (patch) | |
tree | b9dc20f63b17024d8cb7ff08b74b1874e4cf8b63 | |
parent | 48e2dbe9fb92ee91dbf11fbf095e75288ece7e40 (diff) | |
download | illumos-joyent-b7335573a496fd332333ccc5718fb23ea11815ba.tar.gz |
15021 upanic recursive mutex enter
Reviewed by: Dan McDonald <danmcd@mnx.io>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
-rw-r--r-- | usr/src/uts/common/exec/elf/elf_notes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/uts/common/exec/elf/elf_notes.c b/usr/src/uts/common/exec/elf/elf_notes.c index 62c3025b65..78305cc076 100644 --- a/usr/src/uts/common/exec/elf/elf_notes.c +++ b/usr/src/uts/common/exec/elf/elf_notes.c @@ -28,6 +28,7 @@ * Copyright 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright 2018 Joyent, Inc. * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. + * Copyright 2022 Oxide Computer Company */ #include <sys/types.h> @@ -626,14 +627,15 @@ write_elfnotes(proc_t *p, int sig, vnode_t *vp, offset_t offset, PRUPANIC_BUFLEN); } + mutex_exit(&p->p_lock); error = elfnote(vp, &offset, NT_UPANIC, sizeof (prupanic_t), &bigwad->upanic, rlimit, credp); if (error != 0) { - mutex_exit(&p->p_lock); goto done; } + } else { + mutex_exit(&p->p_lock); } - mutex_exit(&p->p_lock); done: kmem_free(bigwad, bigsize); |