mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Li zeming <zeming@nfschina.com>,
	paul@paul-moore.com, brauner@kernel.org, fred@cloudflare.com,
	kpsingh@kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] user_namespace: Remove unnecessary ‘NULL’ values from map_write
Date: Mon, 31 Jul 2023 18:52:41 -0700	[thread overview]
Message-ID: <45d450dc-356b-e984-eff5-9f4c698e7ffe@infradead.org> (raw)
In-Reply-To: <20230801184512.2892-1-zeming@nfschina.com>



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

      reply	other threads:[~2023-08-01  1:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 18:45 Li zeming
2023-08-01  1:52 ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45d450dc-356b-e984-eff5-9f4c698e7ffe@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=brauner@kernel.org \
    --cc=fred@cloudflare.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=zeming@nfschina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®