diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-08-08 14:22:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 15:57:25 -0700 |
commit | b8f52d89c0c6daec8a9f9e00c1c9afb680cbcf5e (patch) | |
tree | 2d90ae1c0bb2f39197e923787c46499f3d59109c /fs/pstore | |
parent | 340f365dd9d74d0ca55089481b9c665955db0aaa (diff) | |
download | op-kernel-dev-b8f52d89c0c6daec8a9f9e00c1c9afb680cbcf5e.zip op-kernel-dev-b8f52d89c0c6daec8a9f9e00c1c9afb680cbcf5e.tar.gz |
fs/pstore/ram_core.c: replace count*size kmalloc by kmalloc_array
kmalloc_array manages count*sizeof overflow.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/pstore')
-rw-r--r-- | fs/pstore/ram_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 34a1e5a..9d7b9a8 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -394,7 +394,7 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size) prot = pgprot_noncached(PAGE_KERNEL); - pages = kmalloc(sizeof(struct page *) * page_count, GFP_KERNEL); + pages = kmalloc_array(page_count, sizeof(struct page *), GFP_KERNEL); if (!pages) { pr_err("%s: Failed to allocate array for %u pages\n", __func__, page_count); |