linux/arch
Aneesh Kumar K.V 6457f42eb3 powerpc/mm: Drop VM_BUG_ON in get_region_id()
We call get_region_id() without validating the ea value. That means
with a wrong ea value we hit the BUG as below.

  kernel BUG at arch/powerpc/include/asm/book3s/64/hash.h:129!
  Oops: Exception in kernel mode, sig: 5 [#1]
  LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
  CPU: 0 PID: 3937 Comm: access_tests Not tainted 5.1.0
  ....
  NIP [c00000000007ba20] do_slb_fault+0x70/0x320
  LR [c00000000000896c] data_access_slb_common+0x15c/0x1a0

Fix this by removing the VM_BUG_ON. All callers make sure the returned
region id is valid and error out otherwise.

Fixes: 0034d395f8 ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range")
Reported-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-05-17 00:40:01 +10:00
..
alpha Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
arc audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
arm We have a couple new features and changes in the core clk framework this time 2019-05-09 14:50:09 -07:00
arm64 DMA mapping updates for 5.2 2019-05-09 08:40:55 -07:00
c6x audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
csky DMA mapping updates for 5.2 2019-05-09 08:40:55 -07:00
h8300 audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
hexagon audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
ia64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
m68k audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
microblaze audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
mips We have a couple new features and changes in the core clk framework this time 2019-05-09 14:50:09 -07:00
nds32 audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
nios2 audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
openrisc audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
parisc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
powerpc powerpc/mm: Drop VM_BUG_ON in get_region_id() 2019-05-17 00:40:01 +10:00
riscv audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
s390 audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
sh Pin control changes for v5.2: 2019-05-08 10:23:54 -07:00
sparc sparc64: simplify reduce_memory() function 2019-05-09 14:26:17 -07:00
um Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
unicore32 audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
x86 Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-05-09 12:54:40 -07:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
.gitignore
Kconfig Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-06 16:13:31 -07:00