MFC r324954:
Fix a locking issue found by running AFL on the userland stack. Thanks to Felix Weinrank for reporting the issue.