diff options
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ca937b0c3a96..f128b3becfe1 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -2093,6 +2093,7 @@ __acquires(&pool->lock) | |||
2093 | 2093 | ||
2094 | lock_map_acquire_read(&pwq->wq->lockdep_map); | 2094 | lock_map_acquire_read(&pwq->wq->lockdep_map); |
2095 | lock_map_acquire(&lockdep_map); | 2095 | lock_map_acquire(&lockdep_map); |
2096 | crossrelease_hist_start(XHLOCK_PROC); | ||
2096 | trace_workqueue_execute_start(work); | 2097 | trace_workqueue_execute_start(work); |
2097 | worker->current_func(work); | 2098 | worker->current_func(work); |
2098 | /* | 2099 | /* |
@@ -2100,6 +2101,7 @@ __acquires(&pool->lock) | |||
2100 | * point will only record its address. | 2101 | * point will only record its address. |
2101 | */ | 2102 | */ |
2102 | trace_workqueue_execute_end(work); | 2103 | trace_workqueue_execute_end(work); |
2104 | crossrelease_hist_end(XHLOCK_PROC); | ||
2103 | lock_map_release(&lockdep_map); | 2105 | lock_map_release(&lockdep_map); |
2104 | lock_map_release(&pwq->wq->lockdep_map); | 2106 | lock_map_release(&pwq->wq->lockdep_map); |
2105 | 2107 | ||
@@ -2474,7 +2476,16 @@ static void insert_wq_barrier(struct pool_workqueue *pwq, | |||
2474 | */ | 2476 | */ |
2475 | INIT_WORK_ONSTACK(&barr->work, wq_barrier_func); | 2477 | INIT_WORK_ONSTACK(&barr->work, wq_barrier_func); |
2476 | __set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(&barr->work)); | 2478 | __set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(&barr->work)); |
2477 | init_completion(&barr->done); | 2479 | |
2480 | /* | ||
2481 | * Explicitly init the crosslock for wq_barrier::done, make its lock | ||
2482 | * key a subkey of the corresponding work. As a result we won't | ||
2483 | * build a dependency between wq_barrier::done and unrelated work. | ||
2484 | */ | ||
2485 | lockdep_init_map_crosslock((struct lockdep_map *)&barr->done.map, | ||
2486 | "(complete)wq_barr::done", | ||
2487 | target->lockdep_map.key, 1); | ||
2488 | __init_completion(&barr->done); | ||
2478 | barr->task = current; | 2489 | barr->task = current; |
2479 | 2490 | ||
2480 | /* | 2491 | /* |