Conditions for the existence of Kelvin-Helmholtz instability in a CME