Wireless mesh networks (WMNs) are considered to be an economical solution for last-mile broadband Internet access. In this paper, we study end-to-end bandwidth allocation in WMNs with cognitive radios, which involves routing, scheduling, and spectrum allocation. To achieve a good tradeoff between fairness and throughput, we define two fair bandwidth-allocation problems based on a simple max-min fairness model and the well-known lexicographical max-min (LMM) fairness model, respectively. We present linear programming (LP)-based optimal and heuristic algorithms to solve both problems. Extensive simulation results are presented to justify the effectiveness of the proposed algorithms.