Re: [PATCH RESEND v1] locking/ww_mutex: Prevent read of uninitialized memory

From: Chris Wilson
Date: Tue Mar 14 2017 - 17:48:58 EST


On Tue, Mar 14, 2017 at 03:44:02PM -0400, Robert Foss wrote:
> On "missed ABBA deadlock" abba.result is read, but not initialized
> in all situations.
>
> Detected by CoverityScan, CID#1402035 ("Uninitialized scalar variable")

It's unconditionally set by the worker, and only accessed by the parent
after the flush_work() barrier.
-Chris

--
Chris Wilson, Intel Open Source Technology Centre