Re: [PATCH v2 1/2] module: Correct wake up of module_wq

From: Petr Mladek
Date: Fri Oct 14 2022 - 04:40:56 EST


On Fri 2022-09-30 13:22:25, Luis Chamberlain wrote:
> On Mon, Sep 19, 2022 at 02:32:32PM +0200, Petr Pavlu wrote:
> > The module_wq wait queue has only non-exclusive waiters and all waits
> > are interruptible, therefore for consistency use wake_up_interruptible()
> > to wake its waiters.
> >
> > Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
> > Signed-off-by: Petr Pavlu <petr.pavlu@xxxxxxxx>
>
> Does this fix a bug? It seems like it does. Please think of this should
> go to stable, for instance, does it fix a bug not yet reported?

It is rather a clean up. It should not change the existing behavior.

wake_up_all() is needed only in special situations when
exclusive waiters are used. Also wake_up_*() variant should match
the related wait_for_completion_*() variants.

The patch looks good:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr