For the mass m, attached to a spring, to move in a circle centripetal force and restoring force of the spring must be equal. Centripetal force is given with this formula:

Restoring force only occurs if the spring is stretched. If L is the length of unstretched spring we have the following formula for restoring force:

r is the length of a circle that mass m is traveling along.
As said above, these two forces have to be equal:

We solve for r:

r(w) will go to infinity when denominator is equal to zero:

Please keep in mind that Hooke's law has it's limitations, and before we reach our critial value of angular velocity spring will be strecthed to a point where Hooke's law does not aply anymore.