]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:41:45 +0000 (14:41 +0200)
commit2ecd2b93771444f667f727fc089a97668ad341d4
treea081f45e1c8acdf7f336c91d88a29241ad1ebf34
parent1fd2c6b8996515d8326f0fc987827a219c7a1995
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>
tools/tracing/rtla/src/utils.c