From: Oleg Nesterov Date: Sun, 25 Nov 2012 21:01:42 +0000 (+0100) Subject: uprobes: Introduce uprobe_is_active() X-Git-Tag: v3.9-rc1~173^2~2^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06b7bcd8cbd7eb1af331e437ec3d8f5182ae1b7e;p=pandora-kernel.git uprobes: Introduce uprobe_is_active() The lifetime of uprobe->rb_node and uprobe->inode is not refcounted, delete_uprobe() is called when we detect that uprobe has no consumers, and it would be deadly wrong to do this twice. Change delete_uprobe() to WARN() if it was already called. We use RB_CLEAR_NODE() to mark uprobe "inactive", then RB_EMPTY_NODE() can be used to detect this case. RB_EMPTY_NODE() is not used directly, we add the trivial helper for the next change. Signed-off-by: Oleg Nesterov Acked-by: Anton Arapov Acked-by: Srikar Dronamraju --- Reading git-diff-tree failed