diff options
author | ae <ae@FreeBSD.org> | 2011-10-28 11:45:24 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2011-10-28 11:45:24 +0000 |
commit | 97fe037955ae3ed7129ea7459805ae3b946315c3 (patch) | |
tree | e2698fc9069e9295ae69989a52e8481e9aa16cbb /sys/geom/part | |
parent | 16fb97459d6b793264dc66244bb0c411c00da89c (diff) | |
download | FreeBSD-src-97fe037955ae3ed7129ea7459805ae3b946315c3.zip FreeBSD-src-97fe037955ae3ed7129ea7459805ae3b946315c3.tar.gz |
Our geom withering function could take some time before geom with its
providers and consumers will be destroyed. Before take some actions
with a geom, check that it is not destroyed at the moment.
Tested by: nwhitehorn
MFC after: 1 week
Diffstat (limited to 'sys/geom/part')
-rw-r--r-- | sys/geom/part/g_part.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index f24e7b5..a192ded 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -451,6 +451,10 @@ g_part_parm_geom(struct gctl_req *req, const char *name, struct g_geom **v) gctl_error(req, "%d %s '%s'", EINVAL, name, gname); return (EINVAL); } + if ((gp->flags & G_GEOM_WITHER) != 0) { + gctl_error(req, "%d %s", ENXIO, gname); + return (ENXIO); + } *v = gp; return (0); } |