summaryrefslogtreecommitdiff
path: root/arch/s390/Kconfig
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@linux.ibm.com>2023-02-27 22:03:00 +0300
committerHeiko Carstens <hca@linux.ibm.com>2023-03-01 22:01:34 +0300
commit8c42dd78df148c90e48efff204cce38743906a79 (patch)
treeb672c8d3862b1112710a9b0a0a40776d2bd9a25b /arch/s390/Kconfig
parent9b5c37bbf659fe4edb4804bc0aa99840d6798878 (diff)
downloadlinux-8c42dd78df148c90e48efff204cce38743906a79.tar.xz
s390/extmem: return correct segment type in __segment_load()
Commit f05f62d04271f ("s390/vmem: get rid of memory segment list") reshuffled the call to vmem_add_mapping() in __segment_load(), which now overwrites rc after it was set to contain the segment type code. As result, __segment_load() will now always return 0 on success, which corresponds to the segment type code SEG_TYPE_SW, i.e. a writeable segment. This results in a kernel crash when loading a read-only segment as dcssblk block device, and trying to write to it. Instead of reshuffling code again, make sure to return the segment type on success, and also describe this rather delicate and unexpected logic in the function comment. Also initialize new segtype variable with invalid value, to prevent possible future confusion. Fixes: f05f62d04271 ("s390/vmem: get rid of memory segment list") Cc: <stable@vger.kernel.org> # 5.9+ Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/Kconfig')
0 files changed, 0 insertions, 0 deletions