mirror_zfs/cmd
Matthew Ahrens 1f5979d23f zed crashes when devid not present
zed core dumps due to a NULL pointer in zfs_agent_iter_vdev(). The
gs_devid is NULL, but the nvl has a "devid" entry.

zfs_agent_post_event() checks that ZFS_EV_VDEV_GUID or DEV_IDENTIFIER is
present in nvl, but then later it and zfs_agent_iter_vdev() assume that
DEV_IDENTIFIER is present and thus gs_devid is set.

Typically this is not a problem because usually either all vdevs have
devid's, or none of them do. Since zfs_agent_iter_vdev() first checks if
the vdev has devid before dereferencing gs_devid, the problem isn't
typically encountered. However, if some vdevs have devid's and some do
not, then the problem is easily reproduced.  This can happen if the pool
has been moved from a system that has devid's to one that does not.

The fix is for zfs_agent_iter_vdev() to only try to match the devid's if
both nvl and gsp have devid's present.

Reviewed-by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
External-issue: DLPX-65090
Closes #9054
Closes #9060
2019-09-25 11:27:50 -07:00
..
arc_summary arc_summary: prefer python3 version and install when there is no python 2019-06-11 10:45:02 -07:00
arcstat pyzfs: python3 support (build system) 2019-01-06 10:39:41 -08:00
dbufstat pyzfs: python3 support (build system) 2019-01-06 10:39:41 -08:00
fsck_zfs Add /sbin/fsck.zfs helper 2013-01-09 16:54:58 -08:00
mount_zfs Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
raidz_test Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
vdev_id Add enclosure_symlinks option to vdev_id 2018-12-14 17:27:49 -08:00
zdb MMP interval and fail_intervals in uberblock 2019-03-21 12:47:57 -07:00
zed zed crashes when devid not present 2019-09-25 11:27:50 -07:00
zfs Let zfs mount all tolerate in-progress mounts 2019-09-25 11:27:48 -07:00
zgenhostid Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zhack Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zinject Cleanup nits from ab7615d92 2019-04-14 11:03:06 -07:00
zpool Fix memory leak in check_disk() 2019-09-25 11:27:47 -07:00
zstreamdump zstreamdump: add per-record-type counters and an overhead counter 2019-09-25 11:27:48 -07:00
ztest Race condition between spa async threads and export 2019-09-25 11:27:50 -07:00
zvol_id Fedora 28: Fix misc bounds check compiler warnings 2018-04-04 10:16:47 -07:00
Makefile.am Make Python detection optional and more portable 2019-06-07 12:45:40 -07:00