[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <45d450dc-356b-e984-eff5-9f4c698e7ffe@infradead.org>
Date: Mon, 31 Jul 2023 18:52:41 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Li zeming <zeming@...china.com>, paul@...l-moore.com,
brauner@...nel.org, fred@...udflare.com, kpsingh@...nel.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] user_namespace: Remove unnecessary ‘NULL’ values from map_write
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@...china.com>
Reviewed-by: Randy Dunlap <rdunlap@...radead.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
Powered by blists - more mailing lists