lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.11.1603281140010.1086@eggly.anvils>
Date:	Mon, 28 Mar 2016 11:42:05 -0700 (PDT)
From:	Hugh Dickins <hughd@...gle.com>
To:	"Kirill A. Shutemov" <kirill@...temov.name>
cc:	Hugh Dickins <hughd@...gle.com>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Dave Hansen <dave.hansen@...el.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Christoph Lameter <cl@...two.org>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Jerome Marchand <jmarchan@...hat.com>,
	Yang Shi <yang.shi@...aro.org>,
	Sasha Levin <sasha.levin@...cle.com>,
	Ning Qu <quning@...il.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem

On Mon, 28 Mar 2016, Kirill A. Shutemov wrote:
> 
> I think I found it. I have refcounting screwed up in faultaround.
> 
> This should fix the problem:

Yes, this fixes it for me - thanks.

Hugh

> 
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 94c097ec08e7..1325bb4568d1 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2292,19 +2292,18 @@ repeat:
>  		if (fe->pte)
>  			fe->pte += iter.index - last_pgoff;
>  		last_pgoff = iter.index;
> -		alloc_set_pte(fe, NULL, page);
> +		if (alloc_set_pte(fe, NULL, page))
> +			goto unlock;
>  		unlock_page(page);
> -		/* Huge page is mapped? No need to proceed. */
> -		if (pmd_trans_huge(*fe->pmd))
> -			break;
> -		/* Failed to setup page table? */
> -		VM_BUG_ON(!fe->pte);
>  		goto next;
>  unlock:
>  		unlock_page(page);
>  skip:
>  		page_cache_release(page);
>  next:
> +		/* Huge page is mapped? No need to proceed. */
> +		if (pmd_trans_huge(*fe->pmd))
> +			break;
>  		if (iter.index == end_pgoff)
>  			break;
>  	}
> -- 
>  Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ