  We consider a family of variational problems on a Hilbert manifold
parameterized by an open subset of a Banach manifold, and we discuss the
genericity of the nondegeneracy condition for the critical points. Based on an
idea of B. White, we prove an abstract genericity result that employs the
infinite dimensional Sard--Smale theorem. Applications are given by proving the
genericity of metrics without degenerate geodesics between fixed endpoints in
general (non compact) semi-Riemannian manifolds, in orthogonally split
semi-Riemannian manifolds and in globally hyperbolic Lorentzian manifolds. We
discuss the genericity property also in stationary Lorentzian manifolds.
