Re: [PATCH v2] thp: use is_zero_pfn only after pte_present check

2015-10-13 Thread Minchan Kim
On Tue, Oct 13, 2015 at 09:28:23AM +0200, Vlastimil Babka wrote: > On 10/13/2015 04:38 AM, Minchan Kim wrote: > >Use is_zero_pfn on pteval only after pte_present check on pteval > >(It might be better idea to introduce is_zero_pte where checks > >pte_present first). Otherwise, it could work with sw

Re: [PATCH v2] thp: use is_zero_pfn only after pte_present check

2015-10-13 Thread Vlastimil Babka
On 10/13/2015 04:38 AM, Minchan Kim wrote: Use is_zero_pfn on pteval only after pte_present check on pteval (It might be better idea to introduce is_zero_pte where checks pte_present first). Otherwise, it could work with swap or migration entry and if pte_pfn's result is equal to zero_pfn by chan

Re: [PATCH v2] thp: use is_zero_pfn only after pte_present check

2015-10-12 Thread Minchan Kim
On Mon, Oct 12, 2015 at 10:41:24PM -0700, Greg Kroah-Hartman wrote: > On Tue, Oct 13, 2015 at 11:38:38AM +0900, Minchan Kim wrote: > > Use is_zero_pfn on pteval only after pte_present check on pteval > > (It might be better idea to introduce is_zero_pte where checks > > pte_present first). Otherwis

Re: [PATCH v2] thp: use is_zero_pfn only after pte_present check

2015-10-12 Thread Greg Kroah-Hartman
On Tue, Oct 13, 2015 at 11:38:38AM +0900, Minchan Kim wrote: > Use is_zero_pfn on pteval only after pte_present check on pteval > (It might be better idea to introduce is_zero_pte where checks > pte_present first). Otherwise, it could work with swap or > migration entry and if pte_pfn's result is e

[PATCH v2] thp: use is_zero_pfn only after pte_present check

2015-10-12 Thread Minchan Kim
Use is_zero_pfn on pteval only after pte_present check on pteval (It might be better idea to introduce is_zero_pte where checks pte_present first). Otherwise, it could work with swap or migration entry and if pte_pfn's result is equal to zero_pfn by chance, we lose user's data in __collapse_huge_pa