Commit b5554141 authored by Liam Howlett's avatar Liam Howlett Committed by Linus Torvalds
Browse files

arch/arc/kernel/troubleshoot: use vma_lookup() instead of find_vma()

Use vma_lookup() to find the VMA at a specific address.  As vma_lookup()
will return NULL if the address is not within any VMA, the start address
no longer needs to be validated.

Link: https://lkml.kernel.org/r/20210521174745.2219620-4-Liam.Howlett@Oracle.com


Signed-off-by: default avatarLiam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: default avatarLaurent Dufour <ldufour@linux.ibm.com>
Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Acked-by: default avatarDavidlohr Bueso <dbueso@suse.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 064b2663
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -83,12 +83,12 @@ static void show_faulting_vma(unsigned long address)
	 * non-inclusive vma
	 */
	mmap_read_lock(active_mm);
	vma = find_vma(active_mm, address);
	vma = vma_lookup(active_mm, address);

	/* check against the find_vma( ) behaviour which returns the next VMA
	 * if the container VMA is not found
	/* Lookup the vma at the address and report if the container VMA is not
	 * found
	 */
	if (vma && (vma->vm_start <= address)) {
	if (vma) {
		char buf[ARC_PATH_MAX];
		char *nm = "?";