diff mbox series

tools/testing/selftests/x86: add dlclose function in the vdso_restorer.c

Message ID 20231204090111.2967-1-liujing@cmss.chinamobile.com
State New
Headers show
Series tools/testing/selftests/x86: add dlclose function in the vdso_restorer.c | expand

Commit Message

Liu Jing Dec. 4, 2023, 9:01 a.m. UTC
in the main function of vdso_restorer.c,there is a dlopen function,
but there is no dlclose function to close the file

Signed-off-by: liujing <liujing@cmss.chinamobile.com>
---
 tools/testing/selftests/x86/vdso_restorer.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Shuah Khan June 7, 2024, 8:17 p.m. UTC | #1
On 12/4/23 02:01, liujing wrote:
> in the main function of vdso_restorer.c,there is a dlopen function,
> but there is no dlclose function to close the file

Explain the change this patch is making in addition to describing
the problem. Also tell me how you found this problem.

> 
> Signed-off-by: liujing <liujing@cmss.chinamobile.com>
> ---
>   tools/testing/selftests/x86/vdso_restorer.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tools/testing/selftests/x86/vdso_restorer.c b/tools/testing/selftests/x86/vdso_restorer.c
> index fe99f2434155..a0b1155dee31 100644
> --- a/tools/testing/selftests/x86/vdso_restorer.c
> +++ b/tools/testing/selftests/x86/vdso_restorer.c
> @@ -57,6 +57,8 @@ int main()
>   		return 0;
>   	}
>   
> +	dlclose(vdso);
> +
>   	memset(&sa, 0, sizeof(sa));
>   	sa.handler = handler_with_siginfo;
>   	sa.flags = SA_SIGINFO;

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/tools/testing/selftests/x86/vdso_restorer.c b/tools/testing/selftests/x86/vdso_restorer.c
index fe99f2434155..a0b1155dee31 100644
--- a/tools/testing/selftests/x86/vdso_restorer.c
+++ b/tools/testing/selftests/x86/vdso_restorer.c
@@ -57,6 +57,8 @@  int main()
 		return 0;
 	}
 
+	dlclose(vdso);
+
 	memset(&sa, 0, sizeof(sa));
 	sa.handler = handler_with_siginfo;
 	sa.flags = SA_SIGINFO;