]> git.baikalelectronics.ru Git - kernel.git/commit
rtla/utils: Use calloc and check the potential memory allocation failure
authorjianchunfu <jianchunfu@cmss.chinamobile.com>
Wed, 15 Jun 2022 07:33:48 +0000 (15:33 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 12 Jul 2022 01:14:29 +0000 (21:14 -0400)
commita30ad064327b5bfa5e0debfe8d983defdc2253c0
tree1fff9e6a92508b628be5e2ef8d8714370da5b1cf
parent1b68ebd3d24bb21b76bad3eec1cff5fe29f36122
rtla/utils: Use calloc and check the potential memory allocation failure

Replace malloc with calloc and add memory allocating check
of mon_cpus before used.

Link: https://lkml.kernel.org/r/20220615073348.6891-1-jianchunfu@cmss.chinamobile.com
Fixes: 4de872b11d7d ("rtla/timerlat: Add --dma-latency option")
Signed-off-by: jianchunfu <jianchunfu@cmss.chinamobile.com>
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/tracing/rtla/src/utils.c