summaryrefslogtreecommitdiffstats
path: root/arch/arm/probes/kprobes/test-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/probes/kprobes/test-core.c')
-rw-r--r--arch/arm/probes/kprobes/test-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/probes/kprobes/test-core.c b/arch/arm/probes/kprobes/test-core.c
index 9ed0129bed3c..14db14152909 100644
--- a/arch/arm/probes/kprobes/test-core.c
+++ b/arch/arm/probes/kprobes/test-core.c
@@ -766,8 +766,9 @@ static int coverage_start_fn(const struct decode_header *h, void *args)
static int coverage_start(const union decode_item *table)
{
- coverage.base = kmalloc(MAX_COVERAGE_ENTRIES *
- sizeof(struct coverage_entry), GFP_KERNEL);
+ coverage.base = kmalloc_array(MAX_COVERAGE_ENTRIES,
+ sizeof(struct coverage_entry),
+ GFP_KERNEL);
coverage.num_entries = 0;
coverage.nesting = 0;
return table_iter(table, coverage_start_fn, &coverage);