Re: [patch added to 3.12-stable] mm/huge_memory.c: respect FOLL_FORCE/FOLL_COW for thp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2017-03-28 at 15:23 +0200, Michal Hocko wrote:
> On Tue 28-03-17 15:11:54, Michal Hocko wrote:
> > On Wed 22-03-17 10:09:43, Jiri Slaby wrote:
> > [...]
> > > @@ -1245,6 +1254,10 @@ struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,
> > >  
> > >  	page = pmd_page(*pmd);
> > >  	VM_BUG_ON(!PageHead(page));
> > > +
> > > +	if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, page, flags))
> > > +		goto out;
> > > +
> > >  	if (flags & FOLL_TOUCH) {
> > > 		pmd_t _pmd;
> > >  		/*
> > 
> > I have just noticed that this patch is not correct fo 3.12 because we
> > should return NULL rather than the page in this case. 3.2 is wrong as
> > well AFAICS.
> 
> The following should be applied on both 3.2 and 3.12 kernels.
[...]

Thanks again; I've queued this up for 3.2.

Ben.

-- 
Ben Hutchings
To err is human; to really foul things up requires a computer.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]