Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 22:18:57 +0000 (15:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 22:18:57 +0000 (15:18 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  SELinux: do not destroy the avc_cache_nodep
  KEYS: Have the garbage collector set its timer for live expired keys
  tpm-fixup-pcrs-sysfs-file-update
  creds_are_invalid() needs to be exported for use by modules:
  include/linux/cred.h: fix build

Fix trivial BUILD_BUG_ON-induced conflicts in drivers/char/tpm/tpm.c

1  2 
drivers/char/tpm/tpm.c

diff --combined drivers/char/tpm/tpm.c
index 32b957efa42047af3065b6e30c31827031e94159,1f32b520ca26c14dc231c69ddd4001d4a5a6eb44..45d58002b06c0087ad5ece5a2bbb14a844f574c0
@@@ -696,7 -696,7 +696,7 @@@ int __tpm_pcr_read(struct tpm_chip *chi
  
        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);
 +      BUG_ON(cmd.header.in.length > READ_PCR_RESULT_SIZE);
        rc = transmit_cmd(chip, &cmd, cmd.header.in.length,
                          "attempting to read a pcr value");
  
@@@ -742,7 -742,7 +742,7 @@@ EXPORT_SYMBOL_GPL(tpm_pcr_read)
   * the module usage count.
   */
  #define TPM_ORD_PCR_EXTEND cpu_to_be32(20)
- #define EXTEND_PCR_SIZE 34
+ #define EXTEND_PCR_RESULT_SIZE 34
  static struct tpm_input_header pcrextend_header = {
        .tag = TPM_TAG_RQU_COMMAND,
        .length = cpu_to_be32(34),
@@@ -760,10 -760,9 +760,9 @@@ int tpm_pcr_extend(u32 chip_num, int pc
                return -ENODEV;
  
        cmd.header.in = pcrextend_header;
-       BUG_ON(be32_to_cpu(cmd.header.in.length) > EXTEND_PCR_SIZE);
        cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx);
        memcpy(cmd.params.pcrextend_in.hash, hash, TPM_DIGEST_SIZE);
-       rc = transmit_cmd(chip, &cmd, cmd.header.in.length,
+       rc = transmit_cmd(chip, &cmd, EXTEND_PCR_RESULT_SIZE,
                          "attempting extend a PCR value");
  
        module_put(chip->dev->driver->owner);