From: Vasily Gorbik Date: Fri, 11 Sep 2020 09:40:21 +0000 (+0200) Subject: s390/protvirt: support ultravisor without secure storage limit X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c2314cb2dd4140cb14b79a8139be34459777f421;p=linux.git s390/protvirt: support ultravisor without secure storage limit Avoid potential crash due to lack of secure storage limit. Check that max_sec_stor_addr is not 0 before adjusting vmalloc position. Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c index 4233245737bd9..1a166a1119c0e 100644 --- a/arch/s390/kernel/uv.c +++ b/arch/s390/kernel/uv.c @@ -90,7 +90,8 @@ fail: void adjust_to_uv_max(unsigned long *vmax) { - *vmax = min_t(unsigned long, *vmax, uv_info.max_sec_stor_addr); + if (uv_info.max_sec_stor_addr) + *vmax = min_t(unsigned long, *vmax, uv_info.max_sec_stor_addr); } /*