HomeFreeBSD

Fix a use-after-free when "zpool import" fails

Description

Fix a use-after-free when "zpool import" fails

clear vd->vdev_tsd in vdev_geom_close_locked instead of vdev_geom_detach.
In the latter function, it would fail to happen in certain circumstances
where cp->private was unset. Ideally, the latter should never happen, but
it can happen when vdev open fails, or where spares are involved.

MFC after: 4 weeks
X-MFC-With: 298786
Sponsored by: Spectra Logic Corp

Details

Provenance
asomersAuthored on Apr 29 2016, 9:29 PM
Parents
rG053359b7f43a: sys/netgraph: spelling fixes in comments.
Branches
Unknown
Tags
Unknown

Event Timeline