riscv: fix locking violation in page fault handler
authorAndreas Schwab <schwab@suse.de>
Tue, 7 May 2019 07:36:46 +0000 (09:36 +0200)
committerPalmer Dabbelt <palmer@sifive.com>
Fri, 17 May 2019 03:42:13 +0000 (20:42 -0700)
commit8fef9900d43feb9d5017c72840966733085e3e82
tree6343590c54c1b8c5e1d74f83e0da13d1d7e0a92f
parenta967a289f16969527a8a41e261695c639a69bee4
riscv: fix locking violation in page fault handler

When a user mode process accesses an address in the vmalloc area
do_page_fault tries to unlock the mmap semaphore when it isn't locked.

Signed-off-by: Andreas Schwab <schwab@suse.de>
[Palmer: Duplicated code instead of a goto]
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/mm/fault.c