Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1375362

[PATCH 4.5 019/238] sched/preempt, sh: kmap_coherent relies on disabled preemption

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.5 019/238] sched/preempt, sh: kmap_coherent relies on disabled preemption
Date 2016-04-10 23:00 +0200
Message-ID <rmuCF-2to-81@gated-at.bofh.it> (permalink)
References <rmsr7-Nr-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: David Hildenbrand <dahi@linux.vnet.ibm.com>

commit b15d53d009558d14c4f394a6d1fa2039c7f45c43 upstream.

kmap_coherent needs disabled preemption to not schedule in the critical
section, just like kmap_coherent on mips and kmap_atomic in general.

Fixes: 8222dbe21e79 "sched/preempt, mm/fault: Decouple preemption from the page fault logic"
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Rich Felker <dalias@libc.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/sh/mm/kmap.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/sh/mm/kmap.c
+++ b/arch/sh/mm/kmap.c
@@ -36,6 +36,7 @@ void *kmap_coherent(struct page *page, u
 
 	BUG_ON(!test_bit(PG_dcache_clean, &page->flags));
 
+	preempt_disable();
 	pagefault_disable();
 
 	idx = FIX_CMAP_END -
@@ -64,4 +65,5 @@ void kunmap_coherent(void *kvaddr)
 	}
 
 	pagefault_enable();
+	preempt_enable();
 }

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.5 000/238] 4.5.1-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 027/238] PCI: ACPI: IA64: fix IO port generic range check Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 001/238] x86/microcode/intel: Make early loader look for builtin microcode too Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 010/238] KVM: VMX: avoid guest hang on invalid invvpid instruction Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 033/238] sg: fix dxferp in from_to case Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 023/238] s390/cpumf: add missing lpp magic initialization Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 024/238] s390/pci: enforce fmb page boundary rule Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 025/238] pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 031/238] x86/iopl: Fix iopl capability check on Xen PV Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 026/238] PCI: Disable IO/MEM decoding for devices with non-compliant BARs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
    Re: [PATCH 4.5 026/238] PCI: Disable IO/MEM decoding for devices  with non-compliant BARs Ben Hutchings <ben@decadent.org.uk> - 2016-04-12 01:50 +0200
      Re: [PATCH 4.5 026/238] PCI: Disable IO/MEM decoding for devices  with non-compliant BARs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-12 16:40 +0200
  [PATCH 4.5 022/238] s390: fix floating pointer register corruption (again) Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 019/238] sched/preempt, sh: kmap_coherent relies on disabled preemption Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 029/238] x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  [PATCH 4.5 021/238] EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 23:00 +0200
  Re: [PATCH 4.5 000/238] 4.5.1-stable review Guenter Roeck <linux@roeck-us.net> - 2016-04-11 08:50 +0200
    Re: [PATCH 4.5 000/238] 4.5.1-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-12 16:40 +0200
  Re: [PATCH 4.5 000/238] 4.5.1-stable review shuahkh <shuahkh@osg.sisa.samsung.com> - 2016-04-11 19:30 +0200
    Re: [PATCH 4.5 000/238] 4.5.1-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-12 08:50 +0200

csiph-web