6f792dd Upstream patch to fix a deadlock

Authored and Committed by ajax 10 years ago
    Upstream patch to fix a deadlock