Print this page
NEX-3288 fmd segfaults in zfs-diagnosis.so`zfs_fm_close
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Marcel Telka <marcel.telka@nexenta.com>
NEX-3011 zfs-diagnosis: Memory leak in zpool_find_load_time()
Reviewed by: Dan Fields <dan.fields@nexenta.com>
OS-70 remove zio timer code
re #12393 rb3935 Kerberos and smbd disagree about who is our AD server (fix elf runtime attributes check)
re #11612 rb3907 Failing vdev of a mirrored pool should not take zfs operations out of action for extended periods of time.

@@ -18,13 +18,15 @@
  *
  * CDDL HEADER END
  */
 
 /*
- * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  */
+/*
+ * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
+ */
 
 #include <assert.h>
 #include <stddef.h>
 #include <strings.h>
 #include <libuutil.h>

@@ -930,12 +932,15 @@
 }
 
 static void
 zfs_fm_close(fmd_hdl_t *hdl, fmd_case_t *cs)
 {
-        zfs_case_t *zcp = fmd_case_getspecific(hdl, cs);
+        zfs_case_t *zcp;
 
+        if ((zcp = fmd_case_getspecific(hdl, cs)) == NULL)
+                return;
+
         if (zcp->zc_data.zc_serd_checksum[0] != '\0')
                 fmd_serd_destroy(hdl, zcp->zc_data.zc_serd_checksum);
         if (zcp->zc_data.zc_serd_io[0] != '\0')
                 fmd_serd_destroy(hdl, zcp->zc_data.zc_serd_io);
         if (zcp->zc_data.zc_has_remove_timer)

@@ -970,11 +975,11 @@
         { "remove_timeout", FMD_TYPE_TIME, "15sec" },
         { NULL, 0, NULL }
 };
 
 static const fmd_hdl_info_t fmd_info = {
-        "ZFS Diagnosis Engine", "1.0", &fmd_ops, fmd_props
+        "ZFS Diagnosis Engine", "1.1", &fmd_ops, fmd_props
 };
 
 void
 _fmd_init(fmd_hdl_t *hdl)
 {