Patch "vTPM: fix memory allocation flag for rtce buffer at kernel boot" has been added to the 3.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
vTPM: fix memory allocation flag for rtce buffer at kernel boot
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
vtpm-fix-memory-allocation-flag-for-rtce-buffer-at-kernel-boot.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
60ecd86c4d985750efa0ea3d8610972b09951715Mon Sep 17 00:00:00 2001
From: "Hon Ching \\(Vicky\\) Lo" <[email protected]>
Date: Wed, 7 Oct 2015 20:11:51 -0400
Subject: vTPM: fix memory allocation flag for rtce buffer at kernel boot
From: Hon Ching \(Vicky\) Lo <[email protected]>
commit 60ecd86c4d985750efa0ea3d8610972b09951715 upstream.
At ibm vtpm initialzation, tpm_ibmvtpm_probe() registers its interrupt handler, ibmvtpm_interrupt, which calls ibmvtpm_crq_process to allocate memory for rtce buffer. The current code uses 'GFP_KERNEL' as the type of kernel memory allocation, which resulted a warning at kernel/lockdep.c. This patch uses 'GFP_ATOMIC' instead so that the allocation is high-priority and does not sleep.
--- drivers/char/tpm/tpm_ibmvtpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm_ibmvtpm.c +1 -1
@@ -490,7 +490,7 @@ static void ibmvtpm_crq_process(struct i } ibmvtpm->rtce_size =be16_to_cpu (crq->len); ibmvtpm->rtce_buf =kmalloc (ibmvtpm->rtce_size, -GFP_KERNEL ); +GFP_ATOMIC );if (!ibmvtpm->rtce_buf) {dev_err (ibmvtpm->dev,"Failed to allocate memory for rtce buffer\n" );return ;
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/vtpm-fix-memory-allocation-flag-for-rtce-buffer-at-kernel-boot.patch