Stability of nonradial oscillations of cold nonrotating neutron stars