arm: Enable IRQs before attempting to read user space in __und_usr
authorCatalin Marinas <catalin.marinas@arm.com>
Tue, 20 Aug 2013 17:37:02 +0000 (18:37 +0100)
committerMrutyunjay Sawant <msawant@nvidia.com>
Wed, 28 Aug 2013 11:42:53 +0000 (04:42 -0700)
commit099ae886a528059cdda926ce1701caaaeaa9e0e8
treee9c5907e194a78220647dad76046ab8cf1ba9e0c
parentf03db070f67951423c09e9018b838007fe6ee1b4
arm: Enable IRQs before attempting to read user space in __und_usr

The Undef abort handler in the kernel reads the undefined instruction
from user space. If the page table was modified from another CPU, the
user access could fail and do_page_fault() will be executed with
interrupts disabled. This can potentially deadlock on ARM11MPCore or on
Cortex-A15 with erratum 798181 workaround enabled (both implying IPI for
TLB maintenance with page table lock held).

This patch enables the IRQs in __und_usr before attempting to read the
instruction from user space.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Change-Id: Ie5164d8ada9646d723b2b6ef65797e9307718292
Reviewed-on: http://git-master/r/264300
Reviewed-by: Bo Yan <byan@nvidia.com>
Tested-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
arch/arm/kernel/entry-armv.S