]> git.baikalelectronics.ru Git - kernel.git/commit
parisc: Protect huge page pte changes with spinlocks
authorHelge Deller <deller@gmx.de>
Thu, 26 Nov 2015 20:14:02 +0000 (21:14 +0100)
committerHelge Deller <deller@gmx.de>
Sat, 16 Jan 2016 18:19:14 +0000 (19:19 +0100)
commitf4159ab2a4e20abeb74969d86f72330d72ac7ab8
tree99c1e58b4509ab2a5510ac9abde6bc9b606ccbca
parentac4dbe577be3f7df8b76d61966ab961a6a69721a
parisc: Protect huge page pte changes with spinlocks

PA-RISC doesn't have atomic instructions to modify page table entries, so it
takes spinlock in the TLB handler and modifies the page table entry
non-atomically. If you modify the page table entry without the spinlock, you
may race with TLB handler on another CPU and your modification may be lost.
Protect against that with usage of purge_tlb_start() and purge_tlb_end() which
handles the TLB spinlock.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v4.4
arch/parisc/include/asm/hugetlb.h
arch/parisc/mm/hugetlbpage.c