[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure b
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure by a lower locality |
Date: |
Tue, 23 Jul 2019 12:00:43 -0500 |
From: Liam Merwick <address@hidden>
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: Liam Merwick <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
(cherry picked from commit 37b55d67c0f001b20b7831db3f9f24f1d453e1de)
Signed-off-by: Michael Roth <address@hidden>
---
hw/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 1554026788..fb08b483bc 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -620,7 +620,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;
}
--
2.17.1
- [Qemu-stable] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 10/36] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 09/36] exec.c: Don't reallocate IOMMUNotifiers that are in use, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 13/36] hw/rdma: another clang compilation fix, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 11/36] tpm: Make sure the locality received from backend is valid, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 16/36] vfio-ap: flag as compatible with balloon, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure by a lower locality,
Michael Roth <=
- [Qemu-stable] [PATCH 12/36] block: Fix invalidate_cache error path for parent activation, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 20/36] qga-win: include glib when building VSS DLL, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 17/36] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 18/36] i386: remove the 'INTEL_PT' CPUID bit from named CPU models, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 25/36] usb-mtp: use O_NOFOLLOW and O_CLOEXEC., Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 19/36] json: Fix % handling when not interpolating, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 27/36] qcow2: Avoid COW during metadata preallocation, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 24/36] qga: update docs with systemd suspend support info, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 21/36] configure: improve usbfs check, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 29/36] block: Fix AioContext switch for bs->drv == NULL, Michael Roth, 2019/07/23