cfm: Make the CFM module thread safe.