]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Bug fix for fasttrap module unloading.
authorKris Van Hees <kris.van.hees@oracle.com>
Wed, 7 Aug 2013 20:09:27 +0000 (16:09 -0400)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 8 Aug 2013 10:36:12 +0000 (11:36 +0100)
commitf2edb5e306aaa3776b3bbbc21095f547ee648309
tree0ddde276a2aecdaa96d61610327b88f367c38519
parentd5cf2cacb11cf25d81c653e042be1973bfc77003
Bug fix for fasttrap module unloading.

Various scenarios have been uncovered where unloading of the fasttrap module
would result in an assertion failure.

Essentially, what is going on is that an executable may register providers
for USDT probes (i.e. pass a DOF object to DTrace through the helper interface)
while there isn't any consumer active.  Any attempt to remove the fasttrap
provider at this point in time causes an assertion failure on the reference
count for all providers instantiated by the the meta-provider (fasttrap),
because module removal cannot be stopped once it has been initiated.

The solution is to take a reference on the meta-provider module whenever a new
provider is instantiated in it, and to put the reference back when that
provider is retired (removed from use).  I.e. the module will be listed as in
use as long as there are providers associated with it.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
dtrace/fasttrap_dev.c
dtrace/include/dtrace/provider.h