diff options
| author | Hongfu Li <lihongfu@kylinos.cn> | 2026-05-12 15:14:24 +0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-05-12 07:31:39 -1000 |
| commit | 2a7d34eba5f5a9b889c0f24a28c3b603ba1e7b2b (patch) | |
| tree | 07081fe2af5a628e50f0675841f666b2a9fc6835 /include/linux/timerqueue_types.h | |
| parent | be2689c9ed47bde6f15a24c9845f6fc1ec52502f (diff) | |
selftests/cgroup: check malloc return value in alloc_anon functions
The alloc_anon() function calls malloc() without checking for a NULL
return. If memory allocation fails, a NULL pointer dereference will
occur when accessing the buffer.
Add proper error handling to return -1 when malloc() fails in all
four alloc_anon variants:
- alloc_anon()
- alloc_anon_50M_check()
- alloc_anon_noexit()
- alloc_anon_50M_check_swap()
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Reviewed-by: Vishal Moola <vishal.moola@gmail.com>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions
