summaryrefslogtreecommitdiff
path: root/fs/pstore
diff options
context:
space:
mode:
authorSiqi Lin <siqilin@google.com>2017-09-08 16:40:31 -0700
committerMichael Bestas <mkbestas@lineageos.org>2019-12-23 23:43:34 +0200
commit34c47947c68ab444ace3ca938a1fde63c230b4b2 (patch)
tree61f3e095fdfb39fe820e89b321f609a2c7f282ae /fs/pstore
parentc5afd1e79e809d9feea7318bab97f1cc3896b7bb (diff)
ANDROID: fs/pstore/ramoops: Use vmalloc() for old buffer
console-ramoops size can be big enough for kmalloc() to fail due to memory fragmentation. Use vmalloc() instead. Bug: 65495856 Change-Id: I28c7ba97e8ebfd6b8f4ebfe9296a2d76fa6e2652 Signed-off-by: Siqi Lin <siqilin@google.com>
Diffstat (limited to 'fs/pstore')
-rw-r--r--fs/pstore/ram_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index 11e558efd61e..cdf82f4b5698 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -291,7 +291,7 @@ void persistent_ram_save_old(struct persistent_ram_zone *prz)
if (!prz->old_log) {
persistent_ram_ecc_old(prz);
- prz->old_log = kmalloc(size, GFP_KERNEL);
+ prz->old_log = vmalloc(size);
}
if (!prz->old_log) {
pr_err("failed to allocate buffer\n");
@@ -377,7 +377,7 @@ void *persistent_ram_old(struct persistent_ram_zone *prz)
void persistent_ram_free_old(struct persistent_ram_zone *prz)
{
- kfree(prz->old_log);
+ vfree(prz->old_log);
prz->old_log = NULL;
prz->old_log_size = 0;
}