]> git.baikalelectronics.ru Git - kernel.git/commit
s390/mm,gmap: segment mapping race
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 16 Apr 2013 11:37:46 +0000 (13:37 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 23 Apr 2013 08:18:04 +0000 (10:18 +0200)
commit639d6e6cee0ea24ca8333bfc7c34a6a2137b00cb
tree78e4600735c5b690113d281c85b12fcf76b4358b
parent74e58d23926907e18586c3a4ac6e4becd72c900d
s390/mm,gmap: segment mapping race

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: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/pgtable.c