• James Bottomley's avatar
    tpm_tis: Clean up locality release · e42acf10
    James Bottomley authored
    The current release locality code seems to be based on the
    misunderstanding that the TPM interrupts when a locality is released:
    it doesn't, only when the locality is acquired.
    
    Furthermore, there seems to be no point in waiting for the locality to
    be released.  All it does is penalize the last TPM user.  However, if
    there's no next TPM user, this is a pointless wait and if there is a
    next TPM user, they'll pay the penalty waiting for the new locality
    (or possibly not if it's the same as the old locality).
    
    Fix the code by making release_locality as simple write to release
    with no waiting for completion.
    
    Cc: stable@ger.kernel.org
    Fixes: 33bafe90 ("tpm_tis: verify locality released before returning from release_locality")
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
    Reviewed-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
    Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
    Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
    e42acf10
tpm_tis_core.c 27.3 KB