On Thu, 2007-07-05 at 10:45 +0200, Ingo Molnar wrote: > > +#ifdef CONFIG_LOCKDEP > > + /* > > + * It is permissible to free the struct work_struct > > + * from inside the function that is called from it, > > + * this we need to take into account for lockdep too. > > + * To avoid bogus "held lock freed" warnings as well > > + * as problems when looking into work->lockdep_map, > > + * make a copy and use that here. > > + */ > > + struct lockdep_map lockdep_map = work->lockdep_map; > > +#endif > > > + lock_acquire(&lockdep_map, 0, 0, 0, 2, _THIS_IP_); > > f(work); > > + lock_release(&lockdep_map, 1, _THIS_IP_); > > neat trick :) Not like I had a choice ;) But since I assign .key it still works :) Btw, do you have a tree you'll submit this through, or Oleg, or should I send it to akpm after we sort out any further issues? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part
- Follow-Ups:
- Re: [PATCH] debug work struct cancel deadlocks with lockdep
- From: Ingo Molnar <[email protected]>
- Re: [PATCH] debug work struct cancel deadlocks with lockdep
- References:
- [PATCH] debug work struct cancel deadlocks with lockdep
- From: Johannes Berg <[email protected]>
- Re: [PATCH] debug work struct cancel deadlocks with lockdep
- From: Ingo Molnar <[email protected]>
- [PATCH] debug work struct cancel deadlocks with lockdep
- Prev by Date: Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway
- Next by Date: Re: [PATCH] debug workqueue flushing deadlocks with lockdep
- Previous by thread: Re: [PATCH] debug work struct cancel deadlocks with lockdep
- Next by thread: Re: [PATCH] debug work struct cancel deadlocks with lockdep
- Index(es):