From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "markus@trippelsdorf.de" <markus@trippelsdorf.de>
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 15:47:59 +0000 [thread overview]
Message-ID: <1494258478.2591.7.camel@sandisk.com> (raw)
In-Reply-To: <20170506052243.GB291@x4>
On Sat, 2017-05-06 at 07:22 +0200, markus@trippelsdorf.de wrote:
> - ret =3D __elevator_change(q, name);
> + strlcpy(elevator_name, skip_spaces(name), sizeof(elevator_name));
Hello Markus,
Please include the version number of a patch in the e-mail subject line whe=
n
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 strin=
gs
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
Thanks,
Bart.=
next prev parent reply other threads:[~2017-05-08 15:47 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 [this message]
2017-05-08 16:48 ` markus
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=1494258478.2591.7.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=markus@trippelsdorf.de \
/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