On Thu, 6 Jul 2017 11:45:48 +0100 Ferruh Yigit <ferruh.yi...@intel.com> wrote:
> > > Blocking for completion with mutex held? > > Sleeping with mutex held is not allowed in Linux. > > > > You will see this if you run with lockdep and all the other kernel debug > > config options. > > Thank you for the review, > > I will send a new version addressing all comments. > > Thanks, > ferruh > I was wrong, it is okay to sleep with mutex held. You might find it easier to use a spin_lock and waitqueue directly via wait_event_interruptible_locked