lkml.org 
[lkml]   [2022]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] shmem: Update folio if shmem_replace_page() updates the page
On Sat, 30 Jul 2022 05:25:18 +0100 "Matthew Wilcox (Oracle)" <willy@infradead.org> wrote:

> If we allocate a new page, we need to make sure that our folio matches
> that new page. This will be solved by changing shmem_replace_page()
> to shmem_replace_folio(), but this is the minimal fix.
>
> ...
>
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -1771,6 +1771,7 @@ static int shmem_swapin_folio(struct inode *inode, pgoff_t index,
>
> if (shmem_should_replace_folio(folio, gfp)) {
> error = shmem_replace_page(&page, gfp, info, index);
> + folio = page_folio(page);
> if (error)
> goto failed;
> }

What are the user-visible runtime effects of the bug?

Should we backport this into 5.19.X?

\
 
 \ /
  Last update: 2022-08-03 02:47    [W:0.073 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site