The instability of the steady axisymmetric flow in a sealed elongated cylinder, driven by a rotating end disk, is studied with the help of numerical simulations. It is argued that this instability is of the shear-layer type, being caused by the presence of an inflection point in the radial distribution of axial velocity of the base circulatory flow. The disturbance kinetic energy is localized in both the radial and axial directions, reaching its peak near the rotating disk, where the magnitude of base-flow axial velocity is close to its maximum. The critical Reynolds number,
, is found to be nearly
is the cylinder length-to-radius ratio. It is shown that the sidewall co-rotation suppresses the instability. As the co-rotation increases, the centrifugal instability becomes the most dangerous, i.e. determines
. Physical explanations are given for the stabilizing effect of the co-rotation, which is stronger (weaker) for the shear-layer (centrifugal) instability.