Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1241880
| From | "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] vTPM: fix memory allocation flag for rtce buffer at kernel boot |
| Date | 2015-10-08 02:20 +0200 |
| Message-ID | <qh76a-3Sm-17@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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.
Signed-off-by: Hon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
---
drivers/char/tpm/tpm_ibmvtpm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c
index 27ebf95..3e6a226 100644
--- a/drivers/char/tpm/tpm_ibmvtpm.c
+++ b/drivers/char/tpm/tpm_ibmvtpm.c
@@ -491,7 +491,7 @@ static void ibmvtpm_crq_process(struct ibmvtpm_crq *crq,
}
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;
--
1.7.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/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] vTPM: fix memory allocation flag for rtce buffer at kernel boot "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com> - 2015-10-08 02:20 +0200 [PATCH v2 3/3] vTPM: get the buffer allocated for event log instead of the actual log "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com> - 2015-10-08 02:20 +0200 [PATCH v2 1/3] vTPM: fix searching for the right vTPM node in device tree "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com> - 2015-10-08 02:20 +0200 [PATCH v2 2/3] vTPM: reformat event log to be byte-aligned "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com> - 2015-10-08 02:20 +0200
csiph-web