lkml.org 
[lkml]   [2022]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5.15 v3] mm/filemap: fix UAF in find_lock_entries
On Wed, Jul 06, 2022 at 03:45:27PM +0800, Liu Shixin wrote:
> rcu_read_lock();
> while ((page = find_get_entry(&xas, end, XA_PRESENT))) {
> + unsigned long next_idx = xas.xa_index;

It's confusing to have next_idx not be the actual next index.
That was why I made it 'xas.xa_index + 1'. I know it's somewhat
used as an indicator that we don't need to call xas_set(), and so
it doesn't really matter, but let's say what we mean.

\
 
 \ /
  Last update: 2022-07-06 16:11    [W:0.045 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site