Re: [PATCH] thp, mm: Fix crash due race in MADV_FREE handling

2017-06-29 Thread Kirill A. Shutemov
On Thu, Jun 29, 2017 at 01:50:51PM -0700, Andrew Morton wrote: > On Wed, 28 Jun 2017 13:15:50 +0300 "Kirill A. Shutemov" > wrote: > > > > Signed-off-by: Kirill A. Shutemov > > > Reported-by: Reinette Chatre > > > Fixes: 9818b8cde622 ("madvise_free, thp: fix madvise_free_huge_pmd return > > >

Re: [PATCH] thp, mm: Fix crash due race in MADV_FREE handling

2017-06-29 Thread Andrew Morton
On Wed, 28 Jun 2017 13:15:50 +0300 "Kirill A. Shutemov" wrote: > > Signed-off-by: Kirill A. Shutemov > > Reported-by: Reinette Chatre > > Fixes: 9818b8cde622 ("madvise_free, thp: fix madvise_free_huge_pmd return > > value after splitting") > > Sorry, the wrong Fixes. The right one: > > Fixe

Re: [PATCH] thp, mm: Fix crash due race in MADV_FREE handling

2017-06-29 Thread Michal Hocko
On Wed 28-06-17 13:12:49, Kirill A. Shutemov wrote: > Reinette reported following crash: > > BUG: Bad page state in process log2exe pfn:57600 > page:ea00015d8000 count:0 mapcount:0 mapping: (null) > index:0x20200 > flags: 0x40040019(locked|uptodate|dirty|swapbacked) >

Re: [PATCH] thp, mm: Fix crash due race in MADV_FREE handling

2017-06-29 Thread Minchan Kim
On Wed, Jun 28, 2017 at 01:15:50PM +0300, Kirill A. Shutemov wrote: > On Wed, Jun 28, 2017 at 01:12:49PM +0300, Kirill A. Shutemov wrote: > > Reinette reported following crash: > > > > BUG: Bad page state in process log2exe pfn:57600 > > page:ea00015d8000 count:0 mapcount:0 mapping:

Re: [PATCH] thp, mm: Fix crash due race in MADV_FREE handling

2017-06-28 Thread Dave Hansen
I came up with the exact same patch. For posterity, here's the test case, generated by syzkaller and trimmed down by Reinette: https://www.sr71.net/~dave/intel/log2.c And the config that helps detect this: https://www.sr71.net/~dave/intel/config-log2 Acked-by: Dave Hansen

Re: [PATCH] thp, mm: Fix crash due race in MADV_FREE handling

2017-06-28 Thread Kirill A. Shutemov
On Wed, Jun 28, 2017 at 01:12:49PM +0300, Kirill A. Shutemov wrote: > Reinette reported following crash: > > BUG: Bad page state in process log2exe pfn:57600 > page:ea00015d8000 count:0 mapcount:0 mapping: (null) > index:0x20200 > flags: 0x40040019(locked|uptodate|dirt