From eddef4dfdf0a11b637e1037ddfe81c1441242543 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Thu, 20 Jul 2023 11:18:29 -0700 Subject: [PATCH] zed: Fix zed ASSERT on slot power cycle We would see zed assert on one of our systems if we powered off a slot. Further examination showed it returning a zfs_retire_recv() with a GUID of 0, which in turn would return a NULL nvlist. Add in a check for a NULL nvlist go get around this. Signed-off-by: Tony Hutter --- cmd/zed/agents/zfs_retire.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/zed/agents/zfs_retire.c b/cmd/zed/agents/zfs_retire.c index f83ae09259ab..5d65f71913c0 100644 --- a/cmd/zed/agents/zfs_retire.c +++ b/cmd/zed/agents/zfs_retire.c @@ -430,6 +430,11 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, &vdev)) == NULL) return; + if (vdev == NULL) { + fmd_hdl_debug(hdl, "No vdev nvlist for guid %llu\n", vdev_guid); + return; + } + devname = zpool_vdev_name(NULL, zhp, vdev, B_FALSE); nvlist_lookup_uint64_array(vdev, ZPOOL_CONFIG_VDEV_STATS,