Re: [PATCH] block: Remove leading whitespace and trailing newline in elevator switch error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2017-05-06 at 07:22 +0200, markus@xxxxxxxxxxxxxxx wrote:
> -	ret = __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 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

Thanks,

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux