linux/arch/s390
Roberto Sassu 98544ca6cb s390: fix strrchr() implementation
commit 8e0ab8e26b72a80e991c66a8abc16e6c856abe3d 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 11:40:12 +02:00
..
appldata
boot s390/boot: fix use of expolines in the DMA code 2021-07-28 13:30:58 +02:00
configs
crypto s390/archrandom: add parameter check for s390_arch_random_generate 2021-05-11 14:04:13 +02:00
hypfs
include s390: make PCI mio support a machine flag 2021-09-22 12:26:29 +02:00
kernel s390: make PCI mio support a machine flag 2021-09-22 12:26:29 +02:00
kvm KVM: s390: index kvm->arch.idle_mask by vcpu_idx 2021-09-15 09:47:40 +02:00
lib s390: fix strrchr() implementation 2021-10-20 11:40:12 +02:00
mm s390/pv: fix the forcing of the swiotlb 2021-09-22 12:26:37 +02:00
net bpf, s390: Fix potential memory leak about jit_data 2021-10-13 10:08:20 +02:00
numa s390/numa: set node distance to LOCAL_DISTANCE 2020-09-03 11:26:50 +02:00
oprofile
pci s390/pci_mmio: fully validate the VMA before calling follow_pte() 2021-09-26 14:07:06 +02:00
purgatory s390/kexec_file: fix diag308 subcode when loading crash kernel 2020-12-30 11:51:34 +01:00
scripts
tools
Kbuild
Kconfig s390: appldata depends on PROC_SYSCTL 2021-07-14 16:53:42 +02:00
Kconfig.debug
Makefile