Skip to content

Commit

Permalink
arch/arc/kernel/troubleshoot: use vma_lookup() instead of find_vma()
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Liam R. Howlett <[email protected]>
Reviewed-by: Laurent Dufour <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Acked-by: Davidlohr Bueso <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
howlett authored and torvalds committed Jun 29, 2021
1 parent 064b266 commit b555414
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/arc/kernel/troubleshoot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "?";

Expand Down

0 comments on commit b555414

Please sign in to comment.