Skip to contentSkip to conversation

Patch "xtensa: fix preemption in {clear,copy}_user_highpage" has been added to the 4.5-stable tree

PATCH [email protected] 1 participant 1 message Apr 10, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

xtensa: fix preemption in {clear,copy}_user_highpage

to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
xtensa-fix-preemption-in-clear-copy-_user_highpage.patch
and it can be found in the queue-4.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a67cc9aa2dfc6e66addf240bbd79e16e01565e81 Mon Sep 17 00:00:00 2001

From: Max Filippov <[email protected]>
Date: Thu, 25 Feb 2016 23:27:51 +0300
Subject: xtensa: fix preemption in {clear,copy}_user_highpage

From: Max Filippov <[email protected]>

commit a67cc9aa2dfc6e66addf240bbd79e16e01565e81 upstream.

Disabling pagefault makes little sense there, preemption disabling is what was meant.

---
 arch/xtensa/mm/cache.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/xtensa/mm/cache.c +4 -4
@@ -97,11 +97,11 @@ void clear_user_highpage(struct page *pa
 	unsigned long paddr;
 	void *kvaddr = coherent_kvaddr(page, TLBTEMP_BASE_1, vaddr, &paddr);
 
-	pagefault_disable();
+	preempt_disable();
 	kmap_invalidate_coherent(page, vaddr);
 	set_bit(PG_arch_1, &page->flags);
 	clear_page_alias(kvaddr, paddr);
-	pagefault_enable();
+	preempt_enable();
 }
 
 void copy_user_highpage(struct page *dst, struct page *src,
@@ -113,11 +113,11 @@ void copy_user_highpage(struct page *dst
 	void *src_vaddr = coherent_kvaddr(src, TLBTEMP_BASE_2, vaddr,
 					  &src_paddr);
 
-	pagefault_disable();
+	preempt_disable();
 	kmap_invalidate_coherent(dst, vaddr);
 	set_bit(PG_arch_1, &dst->flags);
 	copy_page_alias(dst_vaddr, src_vaddr, dst_paddr, src_paddr);
-	pagefault_enable();
+	preempt_enable();
 }
 
 #endif /* DCACHE_WAY_SIZE > PAGE_SIZE */

Patches currently in stable-queue which might be from [email protected] are

queue-4.5/xtensa-iss-don-t-hang-if-stdin-eof-is-reached.patch queue-4.5/xtensa-clear-all-dbreakc-registers-on-start.patch queue-4.5/xtensa-fix-preemption-in-clear-copy-_user_highpage.patch