[PATCH] tpm: fix race condition in tpm_common_write()