lkml.org 
[lkml]   [2013]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 01/21] workqueue: add missing POOL_FREEZING
    Date
    When we create a new pool via get_unbound_pool() when freezing.
    the pool->flags' POOL_FREEZING is incorrect.

    Fix it by adding POOL_FREEZING if workqueue_freezing.
    (wq_mutex is already held for accessing workqueue_freezing.)

    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    ---
    kernel/workqueue.c | 3 +++
    1 files changed, 3 insertions(+), 0 deletions(-)

    diff --git a/kernel/workqueue.c b/kernel/workqueue.c
    index e38d035..40f4017 100644
    --- a/kernel/workqueue.c
    +++ b/kernel/workqueue.c
    @@ -3503,6 +3503,9 @@ static struct worker_pool *get_unbound_pool(const struct workqueue_attrs *attrs)
    if (!pool || init_worker_pool(pool) < 0)
    goto fail;

    + if (workqueue_freezing)
    + pool->flags |= POOL_FREEZING;
    +
    lockdep_set_subclass(&pool->lock, 1); /* see put_pwq() */
    copy_workqueue_attrs(pool->attrs, attrs);

    --
    1.7.7.6


    \
     
     \ /
      Last update: 2013-03-19 21:21    [W:4.142 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site