Re: linux-next: BUG: Bad page state in process ip6tables-save pfn:1499f4
From: valdis . kletnieks
Date: Tue Jun 27 2017 - 14:50:48 EST
On Tue, 27 Jun 2017 19:37:34 +0300, "Kirill A. Shutemov" said:
> > > commit c3aab7b2d4e8434d53bc81770442c14ccf0794a8
> > > Merge: 849c34f 93a7379
> > > Author: Stephen Rothwell
> > > Date: Fri Jun 23 16:40:07 2017 +1000
> > >
> > > Merge branch 'akpm-current/current'
> >
> > Hm is it really the merge of mmotm itself and not one of the patches in
> > mmotm?
> > Anyway smells like THP, adding Kirill.
>
> Okay, it took a while to figure it out.
>
> The bug is in patch "mm, gup: ensure real head page is ref-counted when
> using hugepages". We should look for a head *before* the loop. Otherwise
> 'page' may point to the first page beyond the compound page.
>
> The patch below should help.
Confirmed that fixes the BUGs that I was hitting.
Tested-By: Valdis Kletnieks <valdis.kletnieks@xxxxxx>
Attachment:
pgpRI14BTbuK7.pgp
Description: PGP signature