]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
TPM: fix pcrread
authorRajiv Andrade <srajiv@linux.vnet.ibm.com>
Wed, 30 Sep 2009 15:26:55 +0000 (12:26 -0300)
committerJames Morris <jmorris@namei.org>
Fri, 9 Oct 2009 01:18:18 +0000 (12:18 +1100)
The previously sent patch:

http://marc.info/?l=tpmdd-devel&m=125208945007834&w=2

Had its first hunk cropped when merged, submitting only this first hunk
again.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Debora Velarde <debora@linux.vnet.ibm.com>
Cc: Marcel Selhorst <m.selhorst@sirrix.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Acked-by: Mimi Zohar <zohar@us.ibm.com>
Tested-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
drivers/char/tpm/tpm.c

index 45d58002b06c0087ad5ece5a2bbb14a844f574c0..47c2d276345665bb6e1c46ff2386d002e87853bc 100644 (file)
@@ -696,8 +696,7 @@ int __tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf)
 
        cmd.header.in = pcrread_header;
        cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx);
-       BUG_ON(cmd.header.in.length > READ_PCR_RESULT_SIZE);
-       rc = transmit_cmd(chip, &cmd, cmd.header.in.length,
+       rc = transmit_cmd(chip, &cmd, READ_PCR_RESULT_SIZE,
                          "attempting to read a pcr value");
 
        if (rc == 0)