Re: [PATCH 2/6] mm: Convert __do_fault() to use a folio

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

 



On Wed,  8 Nov 2023 18:28:05 +0000 "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx> wrote:

> Convert vmf->page to a folio as soon as we're going to use it.  This fixes
> a bug if the fault handler returns a tail page with hardware poison;
> tail pages have an invalid page->index, so we would fail to unmap the
> page from the page tables.  We actually have to unmap the entire folio (or
> mapping_evict_folio() will

Would we merely fail to unmap or is there a possibility of unmapping
some random innocent other page?

How might this bug manifest in userspace, worst case?

> fail), so use unmap_mapping_folio() instead.
> 
> This also saves various calls to compound_head() hidden in lock_page(),
> put_page(), etc.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> Fixes: 793917d997df ("mm/readahead: Add large folio readahead")
> Cc: stable@xxxxxxxxxxxxxxx

As it's cc:stable I'll pluck this patch out of the rest of the series
and shall stage it for 6.7-rcX, via mm-hotfixes-unstable ->
mm-hotfixes-stable -> Linus.  Unless this bug is a very minor thing?




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

  Powered by Linux