
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9K8D1 CVE: NA -------------------------------- Add null pointer check for early parameter. Fixes: a8a836a36072 ("mm/dynamic_hugetlb: establish the dynamic hugetlb feature framework") Signed-off-by: Liu Shixin <liushixin2@huawei.com> --- mm/dynamic_hugetlb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/dynamic_hugetlb.c b/mm/dynamic_hugetlb.c index bf217db405fb..dbdd8546994e 100644 --- a/mm/dynamic_hugetlb.c +++ b/mm/dynamic_hugetlb.c @@ -1250,6 +1250,9 @@ void __init dynamic_hugetlb_init(void) static int __init dynamic_hugetlb_setup(char *s) { + if (!s) + return 0; + if (!strcmp(s, "on")) enable_dhugetlb = true; return 0; -- 2.25.1