lkml.org 
[lkml]   [2023]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 05/12] mm/gup: Fix follow_devmap_p[mu]d() to return even if NULL
On Wed, Nov 15, 2023 at 08:29:01PM -0500, Peter Xu wrote:
> This seems to be a bug not by any report but by code observations.
>
> When GUP sees a devpmd or devpud, it should return whatever value returned
> from follow_devmap_p[mu]d(). If page==NULL returned, it means a fault is
> probably required. Skipping return the NULL should allow the code to fall
> through, which can cause unexpected behavior.
>
> It was there at least before the follow page rework (080dbb618b) in 2017,
> so 6 years. Not yet digging for a Fixes, assuming it can hardly trigger
> even if the logical bug does exist.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>

I'd still add a fixes tag and send if off to Linux for 6.7-rc instead
of letting it linger.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

\
 
 \ /
  Last update: 2023-11-23 08:25    [W:0.468 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site