Skip to contentSkip to conversation

fix up leak_check calls

PATCH New Daniel Walker 1 participant 1 message Jan 14, 2008 Workqueue

lore
Share & tools
lore
#0 lore raw

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.

---
 kernel/workqueue.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/workqueue.c +2 -2
Index: linux-2.6.23/kernel/workqueue.c
===================================================================
@@ -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
--