]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
TPM: revert the list handling logic fixed in 398a1e7
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 2 Nov 2015 17:55:29 +0000 (19:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Feb 2016 22:28:26 +0000 (14:28 -0800)
commit b1a4144a695ff4a6834a2680600f36f991fa4926 upstream.

Mimi reported that afb5abc reverts the fix in 398a1e7. This patch
reverts it back.

Fixes: afb5abc262e9 ("tpm: two-phase chip management functions")
Reported-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Acked-by: Peter Huewe <PeterHuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm-chip.c

index 1082d4bb016a9e4d7caf795a5128509780134916..0f8623d88b842d0a4080ea4f2303e3ce8f11344f 100644 (file)
@@ -231,7 +231,7 @@ int tpm_chip_register(struct tpm_chip *chip)
 
        /* Make the chip available. */
        spin_lock(&driver_lock);
-       list_add_rcu(&chip->list, &tpm_chip_list);
+       list_add_tail_rcu(&chip->list, &tpm_chip_list);
        spin_unlock(&driver_lock);
 
        chip->flags |= TPM_CHIP_FLAG_REGISTERED;