[PATCH v1] security_manager: Ensure top lock is acquired before nested locks