Commit a75a2df6 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

nommu: use flush_icache_user_range in brk and mmap

These obviously operate on user addresses.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Greg Ungerer <gerg@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Link: http://lkml.kernel.org/r/20200515143646.3857579-29-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 79ef1e1f
......@@ -433,7 +433,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
/*
* Ok, looks good - let it rip.
*/
flush_icache_range(mm->brk, brk);
flush_icache_user_range(mm->brk, brk);
return mm->brk = brk;
}
......@@ -1277,7 +1277,7 @@ unsigned long do_mmap(struct file *file,
/* we flush the region from the icache only when the first executable
* mapping of it is made */
if (vma->vm_flags & VM_EXEC && !region->vm_icache_flushed) {
flush_icache_range(region->vm_start, region->vm_end);
flush_icache_user_range(region->vm_start, region->vm_end);
region->vm_icache_flushed = true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment