lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160410183527.535727032@linuxfoundation.org>
Date:	Sun, 10 Apr 2016 11:34:05 -0700
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	linux-kernel@...r.kernel.org
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	stable@...r.kernel.org, Hans Verkuil <hverkuil@...all.nl>,
	David Hildenbrand <dahi@...ux.vnet.ibm.com>,
	Hans Verkuil <hans.verkuil@...co.com>,
	Rich Felker <dalias@...c.org>
Subject: [PATCH 4.4 024/210] sched/preempt, sh: kmap_coherent relies on disabled preemption

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

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

From: David Hildenbrand <dahi@...ux.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@...all.nl>
Signed-off-by: David Hildenbrand <dahi@...ux.vnet.ibm.com>
Tested-by: Hans Verkuil <hans.verkuil@...co.com>
Signed-off-by: Rich Felker <dalias@...c.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.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();
 }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ