Re: [linux-pm] PM: cannot hibernate -- BUG at kernel/workqueue.c:3659

From: Jiri Slaby
Date: Wed Jan 25 2012 - 17:00:17 EST


On 01/25/2012 05:00 PM, Srivatsa S. Bhat wrote:
> So, Jiri, can you please try the following patch and see if it works for
> you as expected? I'll be happy to provide a formal patch with a changelog
> if this works.

FWIW it works, thanks. If you want me test a proper fix, jsut let me know.

> ---
> kernel/workqueue.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index bec7b5b..cb26c5d 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -3656,7 +3656,9 @@ void freeze_workqueues_begin(void)
>
> spin_lock(&workqueue_lock);
>
> - BUG_ON(workqueue_freezing);
> + if (workqueue_freezing)
> + goto out_unlock;
> +
> workqueue_freezing = true;
>
> for_each_gcwq_cpu(cpu) {
> @@ -3678,6 +3680,7 @@ void freeze_workqueues_begin(void)
> spin_unlock_irq(&gcwq->lock);
> }
>
> +out_unlock:
> spin_unlock(&workqueue_lock);
> }
>


--
js
--
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/