• Mike Rapoport's avatar
    lazy-pages: handle_requests: fix return value propagation · 2ad16d4c
    Mike Rapoport authored
    When we return from epoll_run_rfds with positive return value it means that
    event handling loop was interrupted because the event should be handled
    outside of that loop. Is always the case with UFFD_EVENT_FORK.
    
    It may happen that the event occurred after we've completed the memory
    transfer and we are on the way to successful return from the
    handle_requests() function, but instead of returning 0 we will return the
    positive value we've got from epoll_run_rfds.
    
    Explicitly assigning return value of complete_forks() fixes this issue.
    Signed-off-by: 's avatarMike Rapoport <rppt@linux.vnet.ibm.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    2ad16d4c
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...