stop_con_cpu_nowait() usage in set_mtrr()

From: Tejun Heo
Date: Tue Mar 29 2011 - 09:09:04 EST


Hello, Suresh, Thomas.

This is about the openSUSE complete system freeze at start bug Thomas
just pinged about - https://bugzilla.novell.com/show_bug.cgi?id=672008

I looked through the set_mtrr() code and it's implementing its own
stop_machine() using stop_one_cpu_nowait(). This isn't safe. There
is only one stop cpu execution context per cpu and the custom
implementation can race against the standard stop_machine() - it can
deadlock with each holding some of the execution contexts and neither
stepping away.

Suresh, is there any reason why set_mtrr() is using its own
synchronization instead of stop_machine()?

Thanks.

--
tejun
--
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/