In the motor imagery based Brain Computer Interface (BCI) research, Common Spatial Pattern (CSP) algorithm is used widely as a spatial filter on multi-channel electroencephalogram (EEG) recordings. Recently the overfitting effect of CSP has been gradually noticed, but what influence the overfitting is still unclear. In this work, the generalization of CSP is investigated by a simple linear mixing model. Several factors in this model are discussed, and the simulation results indicate that channel numbers and the correlation between signals influence the generalization of CSP significantly. A larger number of training trials and a longer time length of the trial would prevent overfitting. The experiments on real data also verify our conclusion.