[24/46] TPM: fix pcrread

From: Greg KH
Date: Fri Oct 16 2009 - 13:24:20 EST


2.6.31-stable review patch. If anyone has any objections, please let us know.

------------------
From: Rajiv Andrade <srajiv@xxxxxxxxxxxxxxxxxx>

commit 15d031c394e7bef9da4ec764e6b0330d701a0126 upstream.

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@xxxxxxxxxxxxxxxxxxxx>
Cc: Debora Velarde <debora@xxxxxxxxxxxxxxxxxx>
Cc: Marcel Selhorst <m.selhorst@xxxxxxxxxx>
Cc: James Morris <jmorris@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Rajiv Andrade <srajiv@xxxxxxxxxxxxxxxxxx>
Acked-by: Mimi Zohar <zohar@xxxxxxxxxx>
Tested-by: Mimi Zohar <zohar@xxxxxxxxxx>
Signed-off-by: James Morris <jmorris@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/char/tpm/tpm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -696,8 +696,7 @@ int __tpm_pcr_read(struct tpm_chip *chip

cmd.header.in = pcrread_header;
cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx);
- BUILD_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)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/