[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YrrFqfFdwDM0vrrw@kroah.com>
Date: Tue, 28 Jun 2022 11:11:05 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Yangxi Xiang <xyangxi5@...il.com>
Cc: Jiri Slaby <jirislaby@...nel.org>, linux-kernel@...r.kernel.org,
Johan Hovold <johan@...nel.org>,
Igor Matheus Andrade Torrente <igormtorrente@...il.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
nick black <dankamongmen@...il.com>
Subject: Re: [PATCH] vt: fix memory overlapping when deleting chars in the
buffer
On Tue, Jun 28, 2022 at 04:59:22PM +0800, Yangxi Xiang wrote:
> >> Both of them works, and I pick one of them.
> >
> > Sorry, I don't understand.
>
> We can use both scr_memcpyw() and scr_memmovew() for the not
> overlapping case (cp <= nr), which is more likely to happen.
> In this case I keep using scr_memcpyw().
The point is we should just do one type of copy, let's pick the one that
always works and do that, no need to check anything here.
thanks,
greg k-h
Powered by blists - more mailing lists