A vulnerability in the Linux kernel has been resolved. The issue is related to the Trusted Platform Module (TPM) and occurs when the TPM CHIP FLAG SUSPENDED flag is set at the end of the tpm pm suspend() function, leaving a window for the tpm hwrng read() function to be called while the operation is in progress. This can lead to a race condition. The problem is addressed by locking the TPM chip before checking any chip flags in both tpm pm suspend() and tpm hwrng read() functions. The TPM CHIP FLAG SUSPENDED check is moved inside the tpm get random() function to ensure it is always checked when the lock is reserved.