Re: 2.6.25rc7 lockdep trace
From: Johannes Berg <johannes@sipsolutions.net>
Date: 2008-03-29 01:01:32
Attachments
- signature.asc [application/pgp-signature] 828 bytes
From: Johannes Berg <johannes@sipsolutions.net>
Date: 2008-03-29 01:01:32
quoted
You can't flush a workqueue in the device close handler exactly because of this locking conflict. Nobody has come up with a suitable way to fix this yet.Maybe we should check which schedule_work users actually lock the rtnl within the work function and move them to a uses-rtnl-in-work workqueue so that everybody else can have rtnl around flush.
On the other hand, most drivers don't actually care that their work has run, they just care that it won't run in the future after they give up resources or similar, hence they can and should use cancel_work_sync() which doesn't suffer from the deadlock. But that needs actual inspection because it does change behaviour from "run and wait for it if scheduled" to "cancel if scheduled". johannes