fix up leak_check calls
PATCH 1/1 fix up leak_check calls
If lockdep is enabled the lock_aquire() calls with trigger the leak_check().
We need to check prior to calling lock_aquire/lock_release, so we're only checking locks taken in the workqueue function.
Signed-off-by Daniel Walker <[email protected]>
--- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/workqueue.c +2 -2
@@ -326,13 +326,13 @@ again:BUG_ON (get_wq_data (work) != cwq);work_clear_pending (work); +leak_check (NULL );lock_acquire (&cwq->wq->lockdep_map,0 ,0 ,0 ,2 , _THIS_IP_);lock_acquire (&lockdep_map,0 ,0 ,0 ,2 , _THIS_IP_); -leak_check (NULL );f (work); -leak_check (f);lock_release (&lockdep_map,1 , _THIS_IP_);lock_release (&cwq->wq->lockdep_map,1 , _THIS_IP_); +leak_check (f);spin_lock_irq (&cwq->lock); cwq->current_work =NULL ;
Signature · 1 line
--