--- ../linux-2.6.8.1-ve022stab077/kernel/ub/beancounter.c	Mon Apr 24 12:42:57 2006
+++ ./kernel/ub/beancounter.c	Wed May 24 17:18:07 2006
@@ -315,6 +315,15 @@ static void __unhash_beancounter(struct 
 }
 #endif
 
+static void put_warn(struct user_beancounter *ub)
+{
+	char id[64];
+
+	print_ub_uid(ub, id, sizeof(id));
+	printk(KERN_ERR "UB: Bad refcount (%d) on put of %s (%p)\n",
+			atomic_read(&ub->ub_refcount), id, ub);
+}
+
 void __put_beancounter(struct user_beancounter *ub)
 {
 	unsigned long flags;
@@ -332,10 +342,7 @@ again:
 	local_irq_save(flags);
 	if (likely(!atomic_dec_and_lock(&ub->ub_refcount, &ub_hash_lock))) {
 		if (unlikely(atomic_read(&ub->ub_refcount) < 0))
-			printk(KERN_ERR "UB: Bad ub refcount: ub=%p, "
-					"luid=%d, ref=%d\n",
-					ub, ub->ub_uid,
-					atomic_read(&ub->ub_refcount));
+			put_warn(ub);
 		local_irq_restore(flags);
 		return;
 	}
