From a45f1c3c5ee26f908655e7762d7e1e2aecdfefbc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 4 Apr 2015 18:29:25 -0700 Subject: [PATCH] 5770 Add load_nvlist() error handling Reviewed by: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Richard Elling Reviewed by: Richard PALO Approved by: Richard Lowe --- usr/src/uts/common/fs/zfs/spa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr/src/uts/common/fs/zfs/spa.c b/usr/src/uts/common/fs/zfs/spa.c index 7947d25f48d1..d9fc3e8d9df5 100644 --- a/usr/src/uts/common/fs/zfs/spa.c +++ b/usr/src/uts/common/fs/zfs/spa.c @@ -1575,7 +1575,10 @@ load_nvlist(spa_t *spa, uint64_t obj, nvlist_t **value) int error; *value = NULL; - VERIFY(0 == dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db)); + error = dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db); + if (error != 0) + return (error); + nvsize = *(uint64_t *)db->db_data; dmu_buf_rele(db, FTAG);