On Sun, Jul 10, 2011 at 01:30:05PM +1000, Bruce Evans wrote: > % DROP_GIANT(); > % g_topology_lock(); > % - g_access(ump->um_cp, 0, -1, 0); > % + error = g_access(ump->um_cp, 0, -1, > % + (mp->mnt_flag & MNT_ROOTFS) ? -1 : 0); > > This might be the fix. > > % g_topology_unlock(); > % PICKUP_GIANT(); > % + if (error) > % + return (error); > % + > > Add missing error handling. g_access() can easily fail, although it > rarely fails in the above since the above asks for less access than > has already been granted.
It never fails when you are closing. From g_access(): error = pp->geom->access(pp, dcr, dcw, dce); KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0, ("Geom provider %s::%s failed closing ->access()", pp->geom->class->name, pp->name)); -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com
pgpjy2QwTkycn.pgp
Description: PGP signature