Skip to content

Add some 'malloc' failure checks

[email protected] bpf kernel-janitors linux-kselftest lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest4 patches 6 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4selftests/bpf: Add some null pointer checkstools/testing/selftests/bpf/test_progs.c+7 -03 replies
2/4selftests/bpf/sockopt: Add a null pointer check for the run_testtools/testing/selftests/bpf/prog_tests/sockopt.c+6 -01 reply
3/4selftests/bpf: Add a null pointer check for the load_btf_spectools/testing/selftests/bpf/test_verifier.c+2 -01 reply
4/4selftests/bpf: Add a null pointer check for the serial_test_tp_attach_querytools/testing/selftests/bpf/prog_tests/tp_attach_query.c+3 -01 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchMuhammad Usama Anjum
1/4
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/4] Add some 'malloc' failure checks

From: Kunwu Chan <[email protected]>

The "malloc" call may not be successful.Add the malloc failure checking to avoid possible null dereference.

Changes since v1 [1]:
- As Daniel Borkmann suggested, change patch 4/4 only
- Other 3 patches no changes.

[1] https://lore.kernel.org/all/[email protected]/

Kunwu Chan (4):
selftests/bpf: Add some null pointer checks selftests/bpf/sockopt: Add a null pointer check for the run_test selftests/bpf: Add a null pointer check for the load_btf_spec selftests/bpf: Add a null pointer check for the
serial_test_tp_attach_query

 tools/testing/selftests/bpf/prog_tests/sockopt.c         | 6 ++++++
 tools/testing/selftests/bpf/prog_tests/tp_attach_query.c | 3 +++
 tools/testing/selftests/bpf/test_progs.c                 | 7 +++++++
 tools/testing/selftests/bpf/test_verifier.c              | 2 ++
 4 files changed, 18 insertions(+)
Signature · 1 line
2.40.1