Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Oct 2012 09:49:04 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        freebsd-geom@FreeBSD.org
Subject:   geom access method and g_topology_lock
Message-ID:  <5088E0E0.2080307@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

Is that bad if a geom's access method drops and re-acquires g_topology_lock
while doing some internal stuff?
Is that allowed at all?

The problem is that the following innocent-looking code may become not quite so
innocent:

g_topology_assert();
g_access(cp, -1, 0, -1);
/* a lot might have happened between these two lines */
g_detach(cp);
g_destroy_consumer(cp);


-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5088E0E0.2080307>