Cognitive radios allow unlicensed wireless users to access channels that are in the licensed spectrum bands. However, in a wireless network with cognitive radios, when a licensed user becomes active on a channel in a certain area, nodes and links that were using that channel must release it, which will cause traffic failures. Simple and effective recovery schemes are needed to re-allocate available resources for the failed traffic. In this paper, we study the failure recovery in wireless mesh networks with cognitive radios. We formally formulate the corresponding problems as integer linear programming problems. By solving them, we can obtain optimal solutions. Moreover, an efficient distributed heuristic algorithm is presented for fast recovery. Simulation results show that the performance given by our distributed algorithm is close to that of the optimal solutions.