Skip to content

Commit

Permalink
powerpc/mm: print warning in arch_remove_linear_mapping()
Browse files Browse the repository at this point in the history
Let's print a warning similar to in arch_add_linear_mapping() instead of
WARN_ON_ONCE() and eventually crashing the kernel.

Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201111145322.15793-6-david@redhat.com
  • Loading branch information
David Hildenbrand authored and Michael Ellerman committed Nov 19, 2020
1 parent e5b2af0 commit 1f73ad3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/powerpc/mm/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ void __ref arch_remove_linear_mapping(u64 start, u64 size)
mutex_lock(&linear_mapping_mutex);
ret = remove_section_mapping(start, start + size);
mutex_unlock(&linear_mapping_mutex);
WARN_ON_ONCE(ret);
if (ret)
pr_warn("Unable to remove linear mapping for 0x%llx..0x%llx: %d\n",
start, start + size, ret);

/* Ensure all vmalloc mappings are flushed in case they also
* hit that section of memory
Expand Down

0 comments on commit 1f73ad3

Please sign in to comment.