Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MFC r253754:

Partially close race between calls of orphan() method from GEOM and close()
method from ZFS core, that reliably causes use-after-free panic if SSD vdev
detached during inititial erase.

Approved by:	re (delphij)
  • Loading branch information...
commit 4108c868e555f8df5c13b355f3eba9540c864792 1 parent caa8604
@amotin amotin authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
View
3  sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
@@ -69,6 +69,8 @@ vdev_geom_orphan(struct g_consumer *cp)
g_topology_assert();
vd = cp->private;
+ if (vd == NULL)
+ return;
/*
* Orphan callbacks occur from the GEOM event thread.
@@ -689,6 +691,7 @@ vdev_geom_close(vdev_t *vd)
return;
vd->vdev_tsd = NULL;
vd->vdev_delayed_close = B_FALSE;
+ cp->private = NULL; /* XXX locking */
g_post_event(vdev_geom_detach, cp, M_WAITOK, NULL);
}
Please sign in to comment.
Something went wrong with that request. Please try again.