Magnetic shear stabilization of diocotron instability