[lkml]   [2009]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch -stable] firware_class oops: fix firmware_loading_store locking
Linus Torvalds wrote:
> I don't think this is correct.
> I think you should protect the FW_STATUS_LOADING bit too, shouldn't you?
> As it is, it does this:
> if (test_bit(FW_STATUS_LOADING, &fw_priv->status)) {
> mutex_lock(&fw_lock);
> ...
> clear_bit(FW_STATUS_LOADING, &fw_priv->status);
> mutex_unlock(&fw_lock);
> break;
> }
> and if this code can race (which it obviously can, since your addition of
> fw_lock mutex matters), then I think it can race on that FW_STATUS_LOADING
> bit too. No?
> So my gut feel is that the whole damn function should be protected by the
> mutex_lock thing. IOW, the patch would be something like the appended.
> UNTESTED. Somebody needs to test this, verify, and send it back to me.
I did a quick boot test with this patch and didn't find any issues.

But that said i haven't been able to recreate the problem reported by Lars,
so not sure how relevant would be the test results from me.



Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India

 \ /
  Last update: 2009-09-24 17:17    [from the cache]
©2003-2011 Jasper Spaans