xtensa: fix lock_mm_and_find_vma in case VMA not found
authorMax Filippov <jcmvbkbc@gmail.com>
Sat, 1 Jul 2023 10:31:55 +0000 (03:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2023 17:27:37 +0000 (18:27 +0100)
commit6b2849b3e05d5dcda36a000ec81a15caa828e0a8
treef52ea9ffdc48524212b84b426e2e7342f65eee05
parent0f4ac6b4c5f00f45b7a429c8a5b028a598c6400c
xtensa: fix lock_mm_and_find_vma in case VMA not found

commit 03f889378f33aa9a9d8e5f49ba94134cf6158090 upstream.

MMU version of lock_mm_and_find_vma releases the mm lock before
returning when VMA is not found. Do the same in noMMU version.
This fixes hang on an attempt to handle protection fault.

Fixes: d85a143b69ab ("xtensa: fix NOMMU build with lock_mm_and_find_vma() conversion")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/nommu.c