]> err.no Git - linux-2.6/commit
[POWERPC] Add a warning to help trackdown device_node refcounting bugs
authorMichael Ellerman <michael@ellerman.id.au>
Tue, 19 Jun 2007 06:08:00 +0000 (16:08 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 10 Jul 2007 11:53:47 +0000 (21:53 +1000)
commit6a281856c02d2291df2f7d9df5bfdee2e7bdd747
treef9dee0818d797edef6fdb59ddeb069883a7b191c
parentd3b814bb1e8b0c63449a3430196c20cbe24a3e67
[POWERPC] Add a warning to help trackdown device_node refcounting bugs

When the refcount for a device node goes to 0, we call the
destructor - of_node_release(). This should only happen if we've
already detached the node from the device tree.

So add a flag OF_DETACHED which tracks detached-ness, and if we
find ourselves in of_node_release() without it set, issue a
warning and don't free the device_node. To avoid warning
continuously reinitialise the kref to a sane value.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/prom.c
include/asm-powerpc/prom.h