* Re: [PATCH] user_namespace: Remove unnecessary ‘NULL’ values from map_write
2023-08-01 18:45 [PATCH] user_namespace: Remove unnecessary ‘NULL’ values from map_write Li zeming
@ 2023-08-01 1:52 ` Randy Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2023-08-01 1:52 UTC (permalink / raw)
To: Li zeming, paul, brauner, fred, kpsingh; +Cc: linux-kernel
On 8/1/23 11:45, Li zeming wrote:
^^^^^^^^^^^^^^^
Please fix your system's date/time.
> kbuf is assigned first, so it does not need to initialize the
> assignment.
>
> Signed-off-by: Li zeming <zeming@nfschina.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> 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 */
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] user_namespace: Remove unnecessary ‘NULL’ values from map_write
@ 2023-08-01 18:45 Li zeming
2023-08-01 1:52 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2023-08-01 18:45 UTC (permalink / raw)
To: paul, brauner, fred, kpsingh, rdunlap; +Cc: linux-kernel, Li zeming
kbuf is assigned first, so it does not need to initialize the
assignment.
Signed-off-by: Li zeming <zeming@nfschina.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-01 1:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01 18:45 [PATCH] user_namespace: Remove unnecessary ‘NULL’ values from map_write Li zeming
2023-08-01 1:52 ` Randy Dunlap
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®