lkml.org 
[lkml]   [2013]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 3/3] workqueue: add a check point in pwq_activate_delayed_work()
get_work_pwq() is possible to return NULL, add a check point for that in
the context inside pwq_activate_delayed_work().

CC: Tejun Heo <tj@kernel.org>
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
---
kernel/workqueue.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index ee8e29a..ea2ec38 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1072,6 +1072,7 @@ static void put_pwq_unlocked(struct pool_workqueue *pwq)
static void pwq_activate_delayed_work(struct work_struct *work)
{
struct pool_workqueue *pwq = get_work_pwq(work);
+ BUG_ON(!pwq);

trace_workqueue_activate_work(work);
move_linked_works(work, &pwq->pool->worklist, NULL);
--
1.7.4.1


\
 
 \ /
  Last update: 2013-06-05 09:21    [W:8.996 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site