This is a patch that's a ripple from the bug in signaltest that Luis and Jeff Burke
were working on. Looks like there's a race where a variable can be used
uninitialized, depending on thread scheduling circumstances. Probably not major, but
hey, can't hurt :).
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signaltest was hanging in a wide variety of kernel versions, in some cases
after a few iterations and in other cases right after being called on the
command line. We created a bugzilla ticket for this issue:
https://bugzilla.redhat.com/show_bug.cgi?id=308231
After a few debug sessions we realized that a shared variable used to
synchronize the work between threads, stat[i].threadstarted, could end up
being used before initialization depending on the scheduling of the
threads.
The fix is a one-liner.
Signed-off-by: Luis Claudio R. Goncalves <lclaudio@uudg.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>