[PATCH][2.6.8-rc4-mm1] perfctr SMP hang fix

From: Mikael Pettersson
Date: Tue Aug 10 2004 - 07:11:56 EST


Andrew,

This patch fixes a critical SMP bug in the perfctr
inheritance fix I sent yesterday. I added a spinlock
to the perfctr state, but forgot to initialise it,
which results in a hard hang on SMP the first time
someone tries to program their perfctrs. It works
on UP, which is why I didn't detect it before :-(

Signed-off-by: Mikael Pettersson <mikpe@xxxxxxxxx>

drivers/perfctr/virtual.c | 1 +
1 files changed, 1 insertion(+)

diff -ruN linux-2.6.8-rc4-mm1/drivers/perfctr/virtual.c linux-2.6.8-rc4-mm1.perfctr-spinlock-fix/drivers/perfctr/virtual.c
--- linux-2.6.8-rc4-mm1/drivers/perfctr/virtual.c 2004-08-10 13:52:17.000000000 +0200
+++ linux-2.6.8-rc4-mm1.perfctr-spinlock-fix/drivers/perfctr/virtual.c 2004-08-10 13:53:57.644784000 +0200
@@ -156,6 +156,7 @@
atomic_set(&perfctr->count, 1);
vperfctr_init_bad_cpus_allowed(perfctr);
spin_lock_init(&perfctr->owner_lock);
+ spin_lock_init(&perfctr->children_lock);
}
return perfctr;
}
-
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/