Re: [PATCH v2 3/3] mm/hugetlb: add migration entry check in hugetlb_change_protection

2014-08-12 Thread Naoya Horiguchi
On Sat, Aug 09, 2014 at 04:12:09PM -0700, Hugh Dickins wrote: > On Fri, 1 Aug 2014, Naoya Horiguchi wrote: > > > There is a race condition between hugepage migration and > > change_protection(), > > where hugetlb_change_protection() doesn't care about migration entries and > > wrongly overwrites

Re: [PATCH v2 3/3] mm/hugetlb: add migration entry check in hugetlb_change_protection

2014-08-09 Thread Hugh Dickins
On Fri, 1 Aug 2014, Naoya Horiguchi wrote: > There is a race condition between hugepage migration and change_protection(), > where hugetlb_change_protection() doesn't care about migration entries and > wrongly overwrites them. That causes unexpected results like kernel crash. > > This patch adds

[PATCH v2 3/3] mm/hugetlb: add migration entry check in hugetlb_change_protection

2014-08-01 Thread Naoya Horiguchi
There is a race condition between hugepage migration and change_protection(), where hugetlb_change_protection() doesn't care about migration entries and wrongly overwrites them. That causes unexpected results like kernel crash. This patch adds is_hugetlb_entry_(migration|hwpoisoned) check in this