• Martin Schwidefsky's avatar
    s390/mm,gmap: segment mapping race · ab8e5235
    Martin Schwidefsky authored
    The gmap_map_segment function creates a special invalid segment table
    entry with the address of the requested target location in the process
    address space. The first access will create the connection between the
    gmap segment table and the target page table of the main process.
    If two threads do this concurrently both will walk the page tables and
    allocate a gmap_rmap structure for the same segment table entry.
    To avoid the race recheck the segment table entry after taking to page
    table lock.
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    ab8e5235
pgtable.c 27.2 KB