We show that for a d-dimensional model in which a quench with a rate tau^{-1} takes the system across a d-m dimensional critical surface, the defect density scales as n sim 1/tau^{m u/(z u +1)}, where u and z are the correlation length and dynamical critical exponents characterizing the critical surface. We explicitly demonstrate that the Kitaev model provides an example of such a scaling with d=2 and m= u=z=1. We also provide the first example of an exact calculation of some multispin correlation functions for a two-dimensional model which can be used to determine the correlation between the defects. We suggest possible experiments to test our theory.