Re: [PATCH] selftests/dma: Fix bad array reference.

2025-03-02 Thread liuye
By code observation only. Thanks, Liu Ye 在 2025/2/27 05:41, Shuah Khan 写道: > On 2/25/25 18:31, liuye wrote: >> Friendly ping. >> >> 在 2025/2/6 10:12, Liu Ye 写道: >>> dir[directions] should be directions[dir] to correctly index the >>> directio

Re: [PATCH] selftests/dma: Fix bad array reference.

2025-02-25 Thread liuye
Friendly ping. 在 2025/2/6 10:12, Liu Ye 写道: > dir[directions] should be directions[dir] to correctly index the > directions array. > > Signed-off-by: Liu Ye > --- > tools/testing/selftests/dma/dma_map_benchmark.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/test

Re: [PATCH] selftests/mm/cow : Fix memory leak in child_vmsplice_memcmp_fn()

2025-01-14 Thread liuye
在 2025/1/14 18:23, David Hildenbrand 写道: On 14.01.25 03:29, liuye wrote: Release memory before exception branch returns to prevent memory leaks. Signed-off-by: liuye ---   tools/testing/selftests/mm/cow.c | 21 -   1 file changed, 16 insertions(+), 5 deletions

[PATCH] selftests/x86/lam: Fix Memory leak fi in do_uring

2025-01-14 Thread liuye
Exception branch returns without free fi. Signed-off-by: liuye --- tools/testing/selftests/x86/lam.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/x86/lam.c b/tools/testing/selftests/x86/lam.c index 0ea4f6813930..74f422e76dce 100644 --- a

[PATCH] selftests/timens/procfs: Fix Resource leak proc in read_proc_uptime

2025-01-14 Thread liuye
Exception branch returns without closing proc. Signed-off-by: liuye --- tools/testing/selftests/timens/procfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/timens/procfs.c b/tools/testing/selftests/timens/procfs.c index 1833ca97eb24..e47844a73c31 100644

[PATCH] selftests/prctl/set-process-name: Fix Resource leak fptr in check_name

2025-01-14 Thread liuye
Exception branch returns without closing fptr. Signed-off-by: liuye --- tools/testing/selftests/prctl/set-process-name.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/prctl/set-process-name.c b/tools/testing/selftests/prctl/set

[PATCH] selftests/net/ipsec: Fix Null pointer dereference in rtattr_pack()

2025-01-13 Thread liuye
ATA(attr), payload, size); ^ Signed-off-by: liuye --- tools/testing/selftests/net/ipsec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/ipsec.c b/tools/testing/selftests/net/ipsec.c index be4a30a0d02a..725310ac26a9 100644 --- a

[PATCH] selftests/capabilities/test_execve: Initialize the variable have_outer_privilege

2025-01-13 Thread liuye
Uninitialized variable: have_outer_privilege. Fix it. Signed-off-by: liuye --- tools/testing/selftests/capabilities/test_execve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/capabilities/test_execve.c b/tools/testing/selftests

[PATCH] selftests/acct/acct_syscall: Fix file descriptor leak

2025-01-13 Thread liuye
Exception branch returns without closing fp. Signed-off-by: liuye --- tools/testing/selftests/acct/acct_syscall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/acct/acct_syscall.c b/tools/testing/selftests/acct/acct_syscall.c index

[PATCH] selftests/memfd/memfd_test: Fix possible NULL pointer dereference

2025-01-13 Thread liuye
If name is NULL, a NULL pointer may be accessed in printf. Signed-off-by: liuye --- tools/testing/selftests/memfd/memfd_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c index

[PATCH] selftests/mm/mkdirty: Fix memory leak in test_uffdio_copy()

2025-01-13 Thread liuye
Release memory before exception branch returns to prevent memory leaks Checking tools/testing/selftests/mm/mkdirty.c ... tools/testing/selftests/mm/mkdirty.c:283:3: error: Memory leak: src [memleak] return; ^ Signed-off-by: liuye --- tools/testing/selftests/mm/mkdirty.c | 1 + 1 file

[PATCH] selftests/mm/cow : Fix memory leak in child_vmsplice_memcmp_fn()

2025-01-13 Thread liuye
Release memory before exception branch returns to prevent memory leaks. Signed-off-by: liuye --- tools/testing/selftests/mm/cow.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c