[PATCH] idr: Print a stack dump after ida_remove warning

From: Jean Delvare
Date: Sun May 05 2013 - 05:33:32 EST


We print a dump stack after idr_remove warning. This is useful to find
the faulty piece of code. Let's do the same for ida_remove, as it
would be equally useful there.

Signed-off-by: Jean Delvare <jdelvare@xxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Takashi Iwai <tiwai@xxxxxxx>
---
lib/idr.c | 1 +
1 file changed, 1 insertion(+)

--- linux-3.10-rc0.orig/lib/idr.c 2013-05-05 10:17:03.086198024 +0200
+++ linux-3.10-rc0/lib/idr.c 2013-05-05 10:41:11.939134735 +0200
@@ -1066,6 +1066,7 @@ void ida_remove(struct ida *ida, int id)
err:
printk(KERN_WARNING
"ida_remove called for id=%d which is not allocated.\n", id);
+ dump_stack();
}
EXPORT_SYMBOL(ida_remove);


--
Jean Delvare
Suse L3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/