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.

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fm/modules/common/zfs-diagnosis/zfs_de.c
          +++ new/usr/src/cmd/fm/modules/common/zfs-diagnosis/zfs_de.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23      - * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  24   23   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  25   24   */
       25 +/*
       26 + * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
       27 + */
  26   28  
  27   29  #include <assert.h>
  28   30  #include <stddef.h>
  29   31  #include <strings.h>
  30   32  #include <libuutil.h>
  31   33  #include <libzfs.h>
  32   34  #include <fm/fmd_api.h>
  33   35  #include <fm/libtopo.h>
  34   36  #include <sys/types.h>
  35   37  #include <sys/time.h>
↓ open down ↓ 889 lines elided ↑ open up ↑
 925  927  {
 926  928          zfs_case_t *zcp = data;
 927  929  
 928  930          if (id == zcp->zc_remove_timer)
 929  931                  zfs_case_solve(hdl, zcp, "fault.fs.zfs.vdev.io", B_FALSE);
 930  932  }
 931  933  
 932  934  static void
 933  935  zfs_fm_close(fmd_hdl_t *hdl, fmd_case_t *cs)
 934  936  {
 935      -        zfs_case_t *zcp = fmd_case_getspecific(hdl, cs);
      937 +        zfs_case_t *zcp;
 936  938  
      939 +        if ((zcp = fmd_case_getspecific(hdl, cs)) == NULL)
      940 +                return;
      941 +
 937  942          if (zcp->zc_data.zc_serd_checksum[0] != '\0')
 938  943                  fmd_serd_destroy(hdl, zcp->zc_data.zc_serd_checksum);
 939  944          if (zcp->zc_data.zc_serd_io[0] != '\0')
 940  945                  fmd_serd_destroy(hdl, zcp->zc_data.zc_serd_io);
 941  946          if (zcp->zc_data.zc_has_remove_timer)
 942  947                  fmd_timer_remove(hdl, zcp->zc_remove_timer);
 943  948          uu_list_remove(zfs_cases, zcp);
 944  949          fmd_hdl_free(hdl, zcp, sizeof (zfs_case_t));
 945  950  }
 946  951  
↓ open down ↓ 18 lines elided ↑ open up ↑
 965  970  static const fmd_prop_t fmd_props[] = {
 966  971          { "checksum_N", FMD_TYPE_UINT32, "10" },
 967  972          { "checksum_T", FMD_TYPE_TIME, "10min" },
 968  973          { "io_N", FMD_TYPE_UINT32, "10" },
 969  974          { "io_T", FMD_TYPE_TIME, "10min" },
 970  975          { "remove_timeout", FMD_TYPE_TIME, "15sec" },
 971  976          { NULL, 0, NULL }
 972  977  };
 973  978  
 974  979  static const fmd_hdl_info_t fmd_info = {
 975      -        "ZFS Diagnosis Engine", "1.0", &fmd_ops, fmd_props
      980 +        "ZFS Diagnosis Engine", "1.1", &fmd_ops, fmd_props
 976  981  };
 977  982  
 978  983  void
 979  984  _fmd_init(fmd_hdl_t *hdl)
 980  985  {
 981  986          fmd_case_t *cp;
 982  987          libzfs_handle_t *zhdl;
 983  988  
 984  989          if ((zhdl = libzfs_init()) == NULL)
 985  990                  return;
↓ open down ↓ 65 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX