Re: [PATCH bpf-next 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query

2024-05-10 Thread Kunwu Chan
Thanks all for your reply. On 2024/5/3 23:47, Daniel Borkmann wrote: On 4/24/24 4:04 AM, Kunwu Chan wrote: There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan ---   tools/testing/selftests/bpf/prog_

Re: [PATCH bpf-next 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query

2024-05-03 Thread Daniel Borkmann
On 5/3/24 5:47 PM, Daniel Borkmann wrote: On 4/24/24 4:04 AM, Kunwu Chan wrote: There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan ---   tools/testing/selftests/bpf/prog_tests/tp_attach_query.c | 3

Re: [PATCH bpf-next 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query

2024-05-03 Thread Daniel Borkmann
On 4/24/24 4:04 AM, Kunwu Chan wrote: There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/prog_tests/tp_attach_query.c | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [PATCH bpf-next 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query

2024-04-24 Thread Markus Elfring
… > Add the malloc failure checking to avoid possible null > dereference. … How do you think about to use the following wording variant? Add a return value check so that a null pointer dereference will be avoided after a memory allocation failure. Would you like to add the tag “Fixes” acc

[PATCH bpf-next 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/prog_tests/tp_attach_query.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/bpf/prog_