Merge 5.7-rc3 into android-mainline

Linux 5.7-rc3

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7ac2896e866a898b1f42fc8fd6d60b40a75ae1f0
This commit is contained in:
Greg Kroah-Hartman
2020-04-27 13:27:01 +02:00
462 changed files with 4821 additions and 2567 deletions

View File

@@ -27,6 +27,7 @@
#include <linux/swapops.h>
#include <linux/shmem_fs.h>
#include <linux/mmu_notifier.h>
#include <linux/sched/mm.h>
#include <asm/tlb.h>
@@ -1090,6 +1091,23 @@ int do_madvise(unsigned long start, size_t len_in, int behavior)
if (write) {
if (down_write_killable(&current->mm->mmap_sem))
return -EINTR;
/*
* We may have stolen the mm from another process
* that is undergoing core dumping.
*
* Right now that's io_ring, in the future it may
* be remote process management and not "current"
* at all.
*
* We need to fix core dumping to not do this,
* but for now we have the mmget_still_valid()
* model.
*/
if (!mmget_still_valid(current->mm)) {
up_write(&current->mm->mmap_sem);
return -EINTR;
}
} else {
down_read(&current->mm->mmap_sem);
}