From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5hQ-00010T-T2 for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:44:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5hN-00083Y-QT for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:44:48 -0400 Sender: fluxion From: Michael Roth Date: Mon, 18 Jun 2018 20:41:46 -0500 Message-Id: <20180619014319.28272-21-mdroth@linux.vnet.ibm.com> In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 020/113] tpm: Set the flags of the CMD_INIT command to 0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Stefan Berger From: Stefan Berger The flags of the CMD_INIT control channel command were not initialized properly. Fix this and set to 0. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau (cherry picked from commit 302705876492a39f568035ce346e2c9176f5665e) Signed-off-by: Michael Roth --- hw/tpm/tpm_emulator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c index e1a68104d6..ad1f744132 100644 --- a/hw/tpm/tpm_emulator.c +++ b/hw/tpm/tpm_emulator.c @@ -260,7 +260,9 @@ static int tpm_emulator_check_caps(TPMEmulator *tpm_emu) static int tpm_emulator_startup_tpm(TPMBackend *tb) { TPMEmulator *tpm_emu = TPM_EMULATOR(tb); - ptm_init init; + ptm_init init = { + .u.req.init_flags = 0, + }; ptm_res res; DPRINTF("%s", __func__); -- 2.11.0