summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorArjun Roy <arjunroy@google.com>2020-06-25 20:30:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-26 00:27:37 -0700
commit7f70c2a68a51496289df163f6969d4db7c383f30 (patch)
tree9acf8e8fac975ee9a01806f2f03273fab17bf98d /samples
parent243bce09c91b0145aeaedd5afba799d81841c030 (diff)
downloadlinux-7f70c2a68a51496289df163f6969d4db7c383f30.tar.gz
linux-7f70c2a68a51496289df163f6969d4db7c383f30.tar.bz2
linux-7f70c2a68a51496289df163f6969d4db7c383f30.zip
mm/memory.c: properly pte_offset_map_lock/unlock in vm_insert_pages()
Calls to pte_offset_map() in vm_insert_pages() are erroneously not matched with a call to pte_unmap(). This would cause problems on architectures where that is not a no-op. This patch does away with the non-traditional locking in the existing code, and instead uses pte_offset_map_lock/unlock() as usual, incrementing PTE as necessary. The PTE pointer is kept within bounds since we clamp it with PTRS_PER_PTE. Link: http://lkml.kernel.org/r/20200618220446.20284-1-arjunroy.kdev@gmail.com Fixes: 8cd3984d81d5 ("mm/memory.c: add vm_insert_pages()") Signed-off-by: Arjun Roy <arjunroy@google.com> Acked-by: David Rientjes <rientjes@google.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Hugh Dickins <hughd@google.com> Cc: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions