diff options
author | Vasily Gorbik | 2020-09-11 11:40:21 +0200 |
---|---|---|
committer | Vasily Gorbik | 2020-09-16 14:08:47 +0200 |
commit | c2314cb2dd4140cb14b79a8139be34459777f421 (patch) | |
tree | 03f8534072654315da57d9a9cd8297b2fe0c1df3 /arch/s390/kernel/uv.c | |
parent | 1d6671ae46e52e383bc6eea8d33bdd32ae61b323 (diff) |
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 <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/uv.c')
-rw-r--r-- | arch/s390/kernel/uv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c index 4233245737bd..1a166a1119c0 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); } /* |