From bf9d06fab10b43b525aae784af12b4e581735659 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Fri, 14 Jun 2019 14:38:29 +0530 Subject: [PATCH] qcacmn: Use vzalloc instead of vmalloc Currently driver is using vmalloc to allocate the memory inside dbglog_block_read api and this buffer is copied to userspace buffer which may lead to use of uninitialized buffer. To avoid above issue use vzalloc to allocated the buffer which initializes the memory to zero. Change-Id: Iebc530b000c908231ef8718e79054801d294dd8f CRs-Fixed: 2470385 --- utils/fwlog/dbglog_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/fwlog/dbglog_host.c b/utils/fwlog/dbglog_host.c index ad8c56f84d..34165ef46e 100644 --- a/utils/fwlog/dbglog_host.c +++ b/utils/fwlog/dbglog_host.c @@ -4060,7 +4060,7 @@ static ssize_t dbglog_block_read(struct file *file, char *buf; int ret; - buf = vmalloc(count); + buf = vzalloc(count); if (!buf) return -ENOMEM;