diff options
author | Jason Gunthorpe <[email protected]> | 2019-05-23 10:24:13 -0300 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2019-06-18 11:55:07 -0300 |
commit | 8a9320b7ec5d879884c547fb73c35ac411a0b977 (patch) | |
tree | 618f60433e2626404a186d49275f9cfb90edb605 /scripts/gen_compile_commands.py | |
parent | c8a53b2db0aec40d8b217936e1b7f3d840c50390 (diff) |
mm/hmm: Simplify hmm_get_or_create and make it reliable
As coded this function can false-fail in various racy situations. Make it
reliable and simpler by running under the write side of the mmap_sem and
avoiding the false-failing compare/exchange pattern. Due to the mmap_sem
this no longer has to avoid racing with a 2nd parallel
hmm_get_or_create().
Unfortunately this still has to use the page_table_lock as the
non-sleeping lock protecting mm->hmm, since the contexts where we free the
hmm are incompatible with mmap_sem.
Signed-off-by: Jason Gunthorpe <[email protected]>
Reviewed-by: John Hubbard <[email protected]>
Reviewed-by: Ralph Campbell <[email protected]>
Reviewed-by: Ira Weiny <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Tested-by: Philip Yang <[email protected]>
Diffstat (limited to 'scripts/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions