linux-stable/arch/s390
Roberto Sassu 12d9315b0f s390: fix strrchr() implementation
commit 8e0ab8e26b upstream.

Fix two problems found in the strrchr() implementation for s390
architectures: evaluate empty strings (return the string address instead of
NULL, if '\0' is passed as second argument); evaluate the first character
of non-empty strings (the current implementation stops at the second).

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Reported-by: Heiko Carstens <hca@linux.ibm.com> (incorrect behavior with empty strings)
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Link: https://lore.kernel.org/r/20211005120836.60630-1-roberto.sassu@huawei.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-20 10:42:03 +02:00
..
appldata License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
boot License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
configs s390: fix zfcpdump-config 2017-10-16 08:19:01 +02:00
crypto s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding 2019-10-05 12:48:01 +02:00
hypfs hypfs: Fix error number left in struct pointer member 2019-10-07 18:55:13 +02:00
include s390/ftrace: fix ftrace_update_ftrace_func implementation 2021-07-28 11:12:18 +02:00
kernel s390/jump_label: print real address in a case of a jump label bug 2021-09-22 11:45:29 +02:00
kvm KVM: s390: split kvm_s390_real_to_abs 2021-05-22 10:57:26 +02:00
lib s390: fix strrchr() implementation 2021-10-20 10:42:03 +02:00
mm s390/mm: fix huge pte soft dirty copying 2020-07-22 09:22:19 +02:00
net s390/bpf: Fix optimizing out zero-extensions 2021-09-26 13:37:27 +02:00
numa s390/mm: Fix ERROR: "__node_distance" undefined! 2018-11-27 16:10:48 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci s390/pci: fix sleeping in atomic during hotplug 2019-01-09 17:14:48 +01:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
defconfig s390: update defconfig 2017-06-08 15:53:48 +02:00
Kbuild s390/crypto: Provide s390 specific arch random functionality. 2017-04-26 13:41:35 +02:00
Kconfig s390: appldata depends on PROC_SYSCTL 2021-07-20 16:17:40 +02:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile s390: add automatic detection of the spectre defense 2018-04-29 11:33:15 +02:00