[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z/U6TTyJXjzdiO8d@MiWiFi-R3L-srv>
Date: Tue, 8 Apr 2025 23:01:33 +0800
From: Baoquan He <bhe@...hat.com>
To: Oscar Salvador <osalvador@...e.de>
Cc: linux-mm@...ck.org, akpm@...ux-foundation.org, david@...hat.com,
mingo@...nel.org, yanjun.zhu@...ux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/3] mm/gup: fix wrongly calculated returned value in
fault_in_safe_writeable()
On 04/08/25 at 11:40am, Oscar Salvador wrote:
> On Mon, Apr 07, 2025 at 11:03:04AM +0800, Baoquan He wrote:
> > Not like fault_in_readable() or fault_in_writeable(), in
> > fault_in_safe_writeable() local variable 'start' is increased page
> > by page to loop till the whole address range is handled. However,
> > it mistakenly calcalates the size of handled range with 'uaddr - start'.
> ^^ calculates
Will fix, thanks.
> >
> > Here fix the code bug in fault_in_safe_writeable(), and also adjusting
> > the codes in fault_in_readable() and fault_in_writeable() to use local
> > variable 'start' to loop so that codes in these three functions are
> > consistent.
> >
> > Signed-off-by: Baoquan He <bhe@...hat.com>
>
> The fix for the bug in fault_in_safe_writeable() looks good to me.
> But I think that David suggested the other way around wrt. uaddr and
> start variables in those three functions? I think he had in mind that
> fault_in_safe_writeable() follows fault_in_safe_writeable() and
> fault_in_readable() lead.
Right, will follow the way he suggested in another sub-thread, thanks
for careful reviewing.
>
> Other than that looks good to me.
>
>
> --
> Oscar Salvador
> SUSE Labs
>
Powered by blists - more mailing lists