summaryrefslogtreecommitdiff
path: root/usr/src/lib/libscf/common/midlevel.c
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-08-08 11:55:46 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-08-08 11:55:46 +0000
commit185a422e63f55e51465370d497ca1c1a13366df4 (patch)
tree453b9dfb7bcf20d2a40d87ffcdffce5a9d30e916 /usr/src/lib/libscf/common/midlevel.c
parent757454db6669c1186f60bc625510c1b67217aae6 (diff)
parent0e986b9d87352cd82909c748e7f684afe0ed579f (diff)
downloadillumos-joyent-185a422e63f55e51465370d497ca1c1a13366df4.tar.gz
[illumos-gate merge]
commit d8873b3136f0985c9e33ff8801644e1b4253b36c 9695 Slow crash dumps, significantly slower than live core commit 6ccea42291d6cef3970fbb35ece075406851267f 9694 Parallel dump hangs commit eea802b0a2c12269d15276d4657e5cd64dd541a4 9685 KPTI %cr3 handling needs fixes commit 72dc11568f48cd37cf8182a82d9cb55b22d7c805 9638 libc/port/fp/sigfpe.c: this statement may fall through commit 64216313af8955ed170cf25df29a04c18b3e0296 9249 System crash dump to NVME not working commit e6ccb06dae563daedbe76eeadbdd3940a4e4f693 9645 scf_read_propvec segfaults on error
Diffstat (limited to 'usr/src/lib/libscf/common/midlevel.c')
-rw-r--r--usr/src/lib/libscf/common/midlevel.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr/src/lib/libscf/common/midlevel.c b/usr/src/lib/libscf/common/midlevel.c
index 3037e85113..69d5bd09d3 100644
--- a/usr/src/lib/libscf/common/midlevel.c
+++ b/usr/src/lib/libscf/common/midlevel.c
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2018 RackTop Systems.
*/
#include "libscf_impl.h"
@@ -2601,6 +2602,13 @@ scf_read_propvec(const char *fmri, const char *pgname, boolean_t running,
scf_propvec_t *prop;
int error = 0;
+ for (prop = properties; prop->pv_prop != NULL; prop++) {
+ if (prop->pv_type == SCF_TYPE_OPAQUE)
+ ((scf_opaque_t *)prop->pv_ptr)->so_addr = NULL;
+ else if (scf_true_base_type(prop->pv_type) == SCF_TYPE_ASTRING)
+ *((char **)prop->pv_ptr) = NULL;
+ }
+
if (h == NULL || s == NULL || i == NULL || (running && snap == NULL) ||
pg == NULL || p == NULL || v == NULL)
goto scferror;
@@ -2630,13 +2638,6 @@ scf_read_propvec(const char *fmri, const char *pgname, boolean_t running,
goto scferror;
for (prop = properties; prop->pv_prop != NULL; prop++) {
- if (prop->pv_type == SCF_TYPE_OPAQUE)
- ((scf_opaque_t *)prop->pv_ptr)->so_addr = NULL;
- else if (scf_true_base_type(prop->pv_type) == SCF_TYPE_ASTRING)
- *((char **)prop->pv_ptr) = NULL;
- }
-
- for (prop = properties; prop->pv_prop != NULL; prop++) {
int ret = 0;
if (scf_pg_get_property(pg, prop->pv_prop, p) == -1 ||