Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754741AbZI3P1R (ORCPT ); Wed, 30 Sep 2009 11:27:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754730AbZI3P1P (ORCPT ); Wed, 30 Sep 2009 11:27:15 -0400 Received: from e24smtp01.br.ibm.com ([32.104.18.85]:45995 "EHLO e24smtp01.br.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754733AbZI3P1O (ORCPT ); Wed, 30 Sep 2009 11:27:14 -0400 Subject: [PATCH] TPM: fix pcrread From: Rajiv Andrade To: linux-kernel@vger.kernel.org Cc: Jason Gunthorpe , debora@linux.vnet.ibm.com, m.selhorst@sirrix.com, akpm@linux-foundation.org, tpmdd-devel@lists.sourceforge.net Content-Type: text/plain Date: Wed, 30 Sep 2009 12:26:55 -0300 Message-Id: <1254324415.13475.24.camel@blackbox> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1370 Lines: 41 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 Cc: Debora Velarde Cc: Marcel Selhorst Cc: James Morris Signed-off-by: Andrew Morton Signed-off-by: Rajiv Andrade --- drivers/char/tpm/tpm.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 45d5800..47c2d27 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -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) -- 1.6.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/