Perturbation theory of thermodynamic potentials in QCD at T > T c is considered with the nonperturbative background vacuum taken into account. It is shown that the colormagnetic confinement in the QCD vacuum prevents the infrared catastrophe of the perturbation theory present in the case of the free vacuum (the "Linde problem"). A short discussion is given of the applicability of the nonperturbative formalism at large T and of the relation with the HTL theory. The observation of A.D.Linde, that the terms O(g n ), n > 6 contribute to the order O(g 6 ) is confirmed also with the account of the colormagnetic confinement, and it is shown that the latter makes these terms IR convergent, and summable. As a result one obtains the selfconsistent theory of the gluon plasma.