lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm/madvise: elevate page refcount while isolating in process_madvise()
From
Date

On 12/15/2021 7:25 PM, Matthew Wilcox wrote:
> On Wed, Dec 15, 2021 at 05:53:39PM +0530, Charan Teja Reddy wrote:
>> The documentation of isolate_lru_page() says that, "it must be called
>> with an elevated refcount on the page", which is not followed while
>> isolating pages in process_madvise() system call with advise
>> MADV_PAGEOUT. Fix it.
>
> We hold the mmap_lock over the call to this function, so the reference
> to the page from the page tables cannot go away. There's no need to
> grab an extra reference here.

Thanks Matthew for clearing such fundamentals.

>

\
 
 \ /
  Last update: 2021-12-15 16:41    [W:0.035 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site