Commit c2314cb2 authored by Vasily Gorbik's avatar Vasily Gorbik

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: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 1d6671ae
...@@ -90,6 +90,7 @@ void __init setup_uv(void) ...@@ -90,6 +90,7 @@ void __init setup_uv(void)
void adjust_to_uv_max(unsigned long *vmax) void adjust_to_uv_max(unsigned long *vmax)
{ {
if (uv_info.max_sec_stor_addr)
*vmax = min_t(unsigned long, *vmax, uv_info.max_sec_stor_addr); *vmax = min_t(unsigned long, *vmax, uv_info.max_sec_stor_addr);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment