Look at the larger problem.
The completion initialization should be done before you call
kernel_thread to start the worker.
Otherwise, there is a still the general problem: if any event occurs to
cause worker_thread to exit its main loop, you hit an uninitialized
completion.
Just initialize it before you start the kernel thread -- like all the
other driver kernel thread code does -- and forget about barriers :)
Needing a barrier here just signals you need further changes.
> Also extracts functions which actually create and destroy workqueues, for
> use by hotplug CPU patch.
Please do this in separate patches next time. I'm looking into the
above change, and including this second change just obfuscated matters
and slowed down analysis of the first change.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/