summaryrefslogtreecommitdiff
path: root/fs/pstore/platform.c
diff options
context:
space:
mode:
authorSiqi Lin <siqilin@google.com>2017-10-03 16:08:09 -0700
committerMichael Bestas <mkbestas@lineageos.org>2019-12-23 23:43:34 +0200
commitcfaa1d1bd77780cd31c8d51ba9f2365c34c6a752 (patch)
treefc179b28833acf15ceef7b3092e1da3bdc3f0c40 /fs/pstore/platform.c
parent34c47947c68ab444ace3ca938a1fde63c230b4b2 (diff)
ANDROID: pstore: Use vmalloc for large allocations due to ramoops size
Android uses a 1 MiB console ramoops region, which requires kmalloc to be changed to vmalloc in the following places: 1. pstore_mkfile(), allocation of inode->i_private 2. ramoops_pstore_read(), allocation of buf Bug: 67383905 Change-Id: Ie4f355a5991b7cb6ad356ded7bd9d41630602bf5 Signed-off-by: Siqi Lin <siqilin@google.com>
Diffstat (limited to 'fs/pstore/platform.c')
-rw-r--r--fs/pstore/platform.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 6fbfa8189451..21bf055bdebf 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -36,6 +36,7 @@
#include <linux/hardirq.h>
#include <linux/jiffies.h>
#include <linux/workqueue.h>
+#include <linux/vmalloc.h>
#include "internal.h"
@@ -580,7 +581,7 @@ void pstore_get_records(int quiet)
big_oops_buf_sz);
if (unzipped_len > 0) {
- kfree(buf);
+ vfree(buf);
buf = big_oops_buf;
size = unzipped_len;
compressed = false;
@@ -594,7 +595,7 @@ void pstore_get_records(int quiet)
compressed, (size_t)size, time, psi);
if (unzipped_len < 0) {
/* Free buffer other than big oops */
- kfree(buf);
+ vfree(buf);
buf = NULL;
} else
unzipped_len = -1;