Re: [PATCH] incorrect use of init_completion fixup

From: Nicholas Mc Guire
Date: Wed Dec 24 2014 - 14:11:20 EST


On Wed, 24 Dec 2014, Prarit Bhargava wrote:

>
>
> On 12/23/2014 12:52 PM, Nicholas Mc Guire wrote:
> > The successive init_completion calls should be reinit_completion here.
> >
>
> Hi Nicholas,
>
> I know enough about this code to break it ;) ... what condition did you hit that
> led you to this patch?
>

Was writing up documentation for completion (also posted today) and the
intended API is reinit_completion which is just resetting the counter but
not touching the related waitqueu. So the failure scenario would be
a race between accessing elements on the current wait-queue and the
init_completion reinitializing this very wait-queue.

Further if switching from init_completion -> reinit_completion brakes
anything then it really *is* broken now.

thx!
hofrat
--
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/