Linux block layer
 help / color / mirror / Atom feed
From: "markus@trippelsdorf.de" <markus@trippelsdorf.de>
To: Bart Van Assche <Bart.VanAssche@sandisk.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH] block: Remove leading whitespace and trailing newline in elevator switch error message
Date: Mon, 8 May 2017 18:48:36 +0200	[thread overview]
Message-ID: <20170508164836.GA17152@x4> (raw)
In-Reply-To: <1494258478.2591.7.camel@sandisk.com>

On 2017.05.08 at 15:47 +0000, Bart Van Assche wrote:
> On Sat, 2017-05-06 at 07:22 +0200, markus@trippelsdorf.de wrote:
> > -	ret = __elevator_change(q, name);
> > +	strlcpy(elevator_name, skip_spaces(name), sizeof(elevator_name));
> 
> Please include the version number of a patch in the e-mail subject line when
> posting a second or later version. Regarding the strlcpy() call, in the
> FreeBSD strlcpy() man page I found the following: "If the src and dst strings
> overlap, the behavior is undefined." Since the Linux kernel implementation of
> strlcpy() uses memcpy() and since the ANSI C standard does not allow that
> memcpy() input and output buffers overlap, please rework this code. See e.g.
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/memcpy.html

I don't see how src and dst could possibly overlap here.

-- 
Markus

  reply	other threads:[~2017-05-08 16:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-06  5:22 [PATCH] block: Remove leading whitespace and trailing newline in elevator switch error message markus
2017-05-08 15:47 ` Bart Van Assche
2017-05-08 16:48   ` markus [this message]
2017-05-08 16:52     ` Bart Van Assche
2017-05-08 16:53 ` Jens Axboe
2017-05-09  2:18 ` Elliott, Robert (Persistent Memory)
2017-05-09  2:22   ` Jens Axboe
2017-05-09  4:42     ` markus
2017-05-09 14:57       ` Jens Axboe

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=20170508164836.GA17152@x4 \
    --to=markus@trippelsdorf.de \
    --cc=Bart.VanAssche@sandisk.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /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