jianchunfu e76a9f6808 rtla/utils: Use calloc and check the potential memory allocation failure
[ Upstream commit b5f37a0b6f667f5c72340ca9dcd7703f261cb981 ]

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: 7d0dc9576dc3 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 15:15:30 +02:00
..
2022-03-31 11:59:03 -07:00
2022-03-31 11:59:03 -07:00
2022-05-24 16:19:30 -07:00