Commit 37b55d67 authored by Liam Merwick's avatar Liam Merwick Committed by Stefan Berger
Browse files

tpm_tis: fix loop that cancels any seizure by a lower locality



In tpm_tis_mmio_write() if the requesting locality is seizing
access, any seizure by a lower locality is cancelled.  However the
loop doing the seizure had an off-by-one error and the locality
immediately preceding the requesting locality was not being cleared.
This is fixed by adjusting the test in the for loop to check the
localities up to the requesting locality.

Signed-off-by: default avatarLiam Merwick <Liam.Merwick@oracle.com>
Reviewed-by: default avatarStefan Berger <stefanb@linux.ibm.com>
Signed-off-by: default avatarStefan Berger <stefanb@linux.ibm.com>
parent 8eb29f1b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -624,7 +624,7 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,
                }

                /* cancel any seize by a lower locality */
                for (l = 0; l < locty - 1; l++) {
                for (l = 0; l < locty; l++) {
                    s->loc[l].access &= ~TPM_TIS_ACCESS_SEIZE;
                }