[CRIU] [PATCH] pagemap: Use ssize_t type in read_local_page

Cyrill Gorcunov gorcunov at gmail.com
Mon Aug 13 17:22:59 MSK 2018


On Mon, Aug 13, 2018 at 05:10:39PM +0300, Mike Rapoport wrote:
> On Fri, Aug 10, 2018 at 05:58:11PM +0300, Cyrill Gorcunov wrote:
> > Integer is too small for big memory slabs.
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
> > ---
> >  criu/pagemap.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/criu/pagemap.c b/criu/pagemap.c
> > index 227db6bffe3a..06c470a7fed1 100644
> > --- a/criu/pagemap.c
> > +++ b/criu/pagemap.c
> > @@ -244,7 +244,7 @@ static int read_local_page(struct page_read *pr, unsigned long vaddr,
> >  			   unsigned long len, void *buf)
> >  {
> >  	int fd = img_raw_fd(pr->pi);
> > -	int ret;
> > +	ssize_t ret;
> 
> I think process_async_reads() should also use ssize_t to be on the safe
> size :)

Definitely, I could miss some of code snippets. This patch was sitting in vz7
stable branch for hell knows how long ;)


More information about the CRIU mailing list