diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-07-28 11:25:41 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-07-28 11:25:41 +0000 |
commit | fd851958ac43e040125201c92bdfbe0cd5e4ad03 (patch) | |
tree | f6926d6969d8cd65a41231e2f63e1839cb698918 | |
parent | 13abaa186736e911163528b6d9e3ba0d04541962 (diff) | |
parent | c65bd18728f347251dbeb256af17dbac88a50e8c (diff) | |
download | illumos-joyent-fd851958ac43e040125201c92bdfbe0cd5e4ad03.tar.gz |
[illumos-gate merge]
commit c65bd18728f347251dbeb256af17dbac88a50e8c
12981 vdev_hold prone to NULL dereference
-rw-r--r-- | usr/src/uts/common/fs/zfs/vdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev.c b/usr/src/uts/common/fs/zfs/vdev.c index 487379aba4..e82b309537 100644 --- a/usr/src/uts/common/fs/zfs/vdev.c +++ b/usr/src/uts/common/fs/zfs/vdev.c @@ -2135,7 +2135,7 @@ vdev_hold(vdev_t *vd) for (int c = 0; c < vd->vdev_children; c++) vdev_hold(vd->vdev_child[c]); - if (vd->vdev_ops->vdev_op_leaf) + if (vd->vdev_ops->vdev_op_leaf && vd->vdev_ops->vdev_op_hold != NULL) vd->vdev_ops->vdev_op_hold(vd); } @@ -2148,7 +2148,7 @@ vdev_rele(vdev_t *vd) for (int c = 0; c < vd->vdev_children; c++) vdev_rele(vd->vdev_child[c]); - if (vd->vdev_ops->vdev_op_leaf) + if (vd->vdev_ops->vdev_op_leaf && vd->vdev_ops->vdev_op_rele != NULL) vd->vdev_ops->vdev_op_rele(vd); } |