[lkml]   [2011]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RESEND 2/3 v2.6.39-rc7] block: make disk_block_events() properly wait for work cancellation

On Wed, May 18, 2011 at 02:46:30AM -0700, Linus Torvalds wrote:
> Quite frankly. right now I think I need to just release 2.6.39, and
> then for 2.6.40 merge the trivial
> mutex_lock(&ev->mutex);
> if (!ev->block++)
> cancel_delayed_work_sync(&ev->dwork);
> mutex_unlock(&ev->mutex);
> with a cc: stable for backporting.

This isn't super-critical and releasing without the fix but later
backporting via -stable definitely is an option.

> So we can't be in some atomic context inside some other spinlock
> anyway, afaik. And there can be no lock order issues, since this
> would always be a new inner lock.

Yeap, the problem was unblock/check being allowed to be called without
sleeping context, which isn't used anymore and was broken due to
cancellation race. We can just enclose the whole thing inside per-ev
mutex and everything should be simple and fine. I'll post patches



 \ /
  Last update: 2011-05-18 12:07    [W:0.144 / U:2.900 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site