WSL2-Linux-Kernel/drivers/s390
Julian Wiedmann e6b1b7da24 s390/qeth: overhaul L3 IP address dump code
The current code that dumps the RXIP/VIPA/IPATO addresses via sysfs
first checks whether the buffer still provides sufficient space to hold
another formatted address.
But the maximum length of an formatted IPv4 address is 15 characters,
not 12. So we underestimate the max required length and if the buffer
was previously filled to _just_ the right level, a formatted address can
end up being truncated.

Revamp these code paths to use the _actually_ required length of the
formatted IP address, and while at it suppress a gratuitous newline.

Also use scnprintf() to format the output. In case of a truncation, this
would allow us to return the number of characters that were actually
written.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-12-18 12:34:56 -08:00
..
block block: remove (__)blkdev_reread_part as an exported API 2019-11-14 07:43:59 -07:00
char compat_ioctl: move tape handling into drivers 2019-10-23 17:23:44 +02:00
cio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-11-25 20:02:57 -08:00
crypto s390/zcrypt: handle new reply code FILTERED_BY_HYPERVISOR 2019-11-30 10:52:44 +01:00
net s390/qeth: overhaul L3 IP address dump code 2019-12-18 12:34:56 -08:00
scsi scsi: zfcp: trace channel log even for FCP command responses 2019-10-28 22:16:15 -04:00
virtio virtio/s390: fix race on airq_areas[] 2019-07-26 13:36:18 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00