Commit e1eac194 authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik

s390/vdso: remove BUG_ON()

Handle allocation error gracefully and simply disable vdso instead of
leaving the system in an undefined state.
Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent ea44de69
......@@ -175,7 +175,10 @@ static int __init vdso_init(void)
/* Make sure pages are in the correct state */
vdso64_pagelist = kcalloc(vdso64_pages + 1, sizeof(struct page *),
GFP_KERNEL);
BUG_ON(vdso64_pagelist == NULL);
if (!vdso64_pagelist) {
vdso_enabled = 0;
return -ENOMEM;
}
for (i = 0; i < vdso64_pages - 1; i++) {
struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE);
get_page(pg);
......
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