On Wed 17-01-18 23:15:03, Naoya Horiguchi wrote: > On 01/17/2018 09:18 PM, Michal Hocko wrote: > > On Wed 10-01-18 11:47:12, Michal Hocko wrote: > >> [CC Mike and Naoya] > > > > ping > > > >> From 7227218bd526cceb954a688727d78af0b5874e18 Mon Sep 17 00:00:00 2001 > >> From: Michal Hocko <mhocko@xxxxxxxx> > >> Date: Wed, 10 Jan 2018 11:40:20 +0100 > >> Subject: [PATCH] hugetlb, mbind: fall back to default policy if vma is NULL > >> > >> Dan Carpenter has noticed that mbind migration callback (new_page) > >> can get a NULL vma pointer and choke on it inside alloc_huge_page_vma > >> which relies on the VMA to get the hstate. We used to BUG_ON this > >> case but the BUG_+ON has been removed recently by "hugetlb, mempolicy: > >> fix the mbind hugetlb migration". > >> > >> The proper way to handle this is to get the hstate from the migrated > >> page and rely on huge_node (resp. get_vma_policy) do the right thing > >> with null VMA. We are currently falling back to the default mempolicy in > >> that case which is in line what THP path is doing here. > > vma is used only for getting mempolicy in alloc_huge_page_vma(), so > falling back to default mempolicy looks better to me than BUG_ON. > > Reviewed-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Thanks for the review Naoya! -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>