A significant excess of the stellar mass density at high redshift has been discovered from the early data release of James Webb Space Telescope ($\it{JWST}$), and it may require a high star formation efficiency. However, this will lead to large number density of ionizing photons in the epoch of reionization (EoR), so that the reionization history will be changed, which can arise tension with the current EoR observations. Warm dark matter (WDM), via the free streaming effect, can suppress the formation of small-scale structure as well as low-mass galaxies. This provides an effective way to decrease the ionizing photons when considering a large star formation efficiency in high-$z$ massive galaxies without altering the cosmic reionization history. On the other hand, the constraints on the properties of warm dark matter can be derived from the $\it JWST$ observations. In this work, we study WDM as a possible solution to reconcile the $\it JWST$ stellar mass density of high-$z$ massive galaxies and reionization history. {\color{red}We find that, the $\it JWST$ high-$z$ comoving cumulative stellar mass density alone has no significant preference for either CDM or WDM model. But using the observational data of other stellar mass density measurements and reionization history, we obtain that the WDM particle mass with $m_{\text{W}} = 0.51^{+0.22}_{-0.12}$ eV and star formation efficiency parameter $f_{*}^0>0.39$ in 2$\sigma$ confidence level can match both the $\it JWST$ high-$z$ comoving cumulative stellar mass density and the reionization history.