lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  2 Aug 2023 02:45:12 +0800
From:   Li zeming <zeming@...china.com>
To:     paul@...l-moore.com, brauner@...nel.org, fred@...udflare.com,
        kpsingh@...nel.org, rdunlap@...radead.org
Cc:     linux-kernel@...r.kernel.org, Li zeming <zeming@...china.com>
Subject: [PATCH] user_namespace: Remove unnecessary ‘NULL’ values from map_write

kbuf is assigned first, so it does not need to initialize the
assignment.

Signed-off-by: Li zeming <zeming@...china.com>
---
 kernel/user_namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index 1d8e47bed3f1..6fabf388bb8a 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -928,7 +928,7 @@ static ssize_t map_write(struct file *file, const char __user *buf,
 	struct uid_gid_map new_map;
 	unsigned idx;
 	struct uid_gid_extent extent;
-	char *kbuf = NULL, *pos, *next_line;
+	char *kbuf, *pos, *next_line;
 	ssize_t ret;
 
 	/* Only allow < page size writes at the beginning of the file */
-- 
2.18.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ