• Pavel Emelyanov's avatar
    uffd: Check for uffd event being PF early · 6d405370
    Pavel Emelyanov authored
    The event received should be checked to be #PF before
    accessing its other arguments.
    
    [ Mike:
        Well, looking forward to see non-cooperative userfaultfd patches in kernel
        we should have something like
    
        static int handle_uffd_enent(struct lazy_pages_info *lpi)
        {
        	read(&msg...);
    
        	switch (msg.event) {
        	case UFFD_EVENT_PAGEFAULT:
        		handle_pagefault(lpi, msg);
        		break;
        	default:
        		return -1;
        	}
        }
    
        But since this patch is anyway is a bugfix: <ack>
    ]
    
    travis-ci: success for uffd: A set of improvements over criu/uffd.c
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    Acked-by: 's avatarMike Rapoport <rppt@linux.vnet.ibm.com>
    6d405370
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...