lkml.org 
[lkml]   [2012]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-pm] PM: cannot hibernate -- BUG at kernel/workqueue.c:3659
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


\
 
 \ /
  Last update: 2012-01-25 23:03    [W:0.073 / U:19.684 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site