On solving a linear programs with a quadratic constraint