mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests/capabilities/test_execve: Initialize the variable have_outer_privilege
@ 2025-01-14  5:41 liuye
  2025-01-20  7:31 ` Muhammad Usama Anjum
  0 siblings, 1 reply; 2+ messages in thread
From: liuye @ 2025-01-14  5:41 UTC (permalink / raw)
  To: shuah; +Cc: amer.shanawany, usama.anjum, linux-kselftest, linux-kernel, liuye

    Uninitialized variable: have_outer_privilege.
    Fix it.

Signed-off-by: liuye <liuye@kylinos.cn>
---
 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/capabilities/test_execve.c
index 47bad7ddc5bc..c9617b38d6f7 100644
--- a/tools/testing/selftests/capabilities/test_execve.c
+++ b/tools/testing/selftests/capabilities/test_execve.c
@@ -83,7 +83,7 @@ static bool create_and_enter_ns(uid_t inner_uid)
 	uid_t outer_uid;
 	gid_t outer_gid;
 	int i, ret;
-	bool have_outer_privilege;
+	bool have_outer_privilege = false;
 
 	outer_uid = getuid();
 	outer_gid = getgid();
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] selftests/capabilities/test_execve: Initialize the variable have_outer_privilege
  2025-01-14  5:41 [PATCH] selftests/capabilities/test_execve: Initialize the variable have_outer_privilege liuye
@ 2025-01-20  7:31 ` Muhammad Usama Anjum
  0 siblings, 0 replies; 2+ messages in thread
From: Muhammad Usama Anjum @ 2025-01-20  7:31 UTC (permalink / raw)
  To: liuye, shuah; +Cc: Usama.Anjum, amer.shanawany, linux-kselftest, linux-kernel

On 1/14/25 10:41 AM, liuye wrote:
>     Uninitialized variable: have_outer_privilege.
>     Fix it.
Please improve the description. Explain how the current code
is wrong. After that add:
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

> 
> Signed-off-by: liuye <liuye@kylinos.cn>
> ---
>  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/capabilities/test_execve.c
> index 47bad7ddc5bc..c9617b38d6f7 100644
> --- a/tools/testing/selftests/capabilities/test_execve.c
> +++ b/tools/testing/selftests/capabilities/test_execve.c
> @@ -83,7 +83,7 @@ static bool create_and_enter_ns(uid_t inner_uid)
>  	uid_t outer_uid;
>  	gid_t outer_gid;
>  	int i, ret;
> -	bool have_outer_privilege;
> +	bool have_outer_privilege = false;
>  
>  	outer_uid = getuid();
>  	outer_gid = getgid();


-- 
BR,
Muhammad Usama Anjum

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-20  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-14  5:41 [PATCH] selftests/capabilities/test_execve: Initialize the variable have_outer_privilege liuye
2025-01-20  7:31 ` Muhammad Usama Anjum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®