Merge 54a4c789ca ("Merge tag 'docs/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media") into android-mainline

Steps on the way to 5.10-rc1

Resolves conflicts in:
	fs/userfaultfd.c

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie3fe3c818f1f6565cfd4fa551de72d2b72ef60af
This commit is contained in:
Greg Kroah-Hartman
2020-10-26 08:26:18 +01:00
994 changed files with 13557 additions and 12409 deletions

View File

@@ -872,7 +872,6 @@ static long madvise_remove(struct vm_area_struct *vma,
static int madvise_inject_error(int behavior,
unsigned long start, unsigned long end)
{
struct page *page;
struct zone *zone;
unsigned long size;
@@ -882,6 +881,7 @@ static int madvise_inject_error(int behavior,
for (; start < end; start += size) {
unsigned long pfn;
struct page *page;
int ret;
ret = get_user_pages_fast(start, 1, 0, &page);
@@ -896,32 +896,23 @@ static int madvise_inject_error(int behavior,
*/
size = page_size(compound_head(page));
if (PageHWPoison(page)) {
put_page(page);
continue;
}
if (behavior == MADV_SOFT_OFFLINE) {
pr_info("Soft offlining pfn %#lx at process virtual address %#lx\n",
pfn, start);
pfn, start);
ret = soft_offline_page(pfn, MF_COUNT_INCREASED);
if (ret)
return ret;
continue;
} else {
pr_info("Injecting memory failure for pfn %#lx at process virtual address %#lx\n",
pfn, start);
/*
* Drop the page reference taken by get_user_pages_fast(). In
* the absence of MF_COUNT_INCREASED the memory_failure()
* routine is responsible for pinning the page to prevent it
* from being released back to the page allocator.
*/
put_page(page);
ret = memory_failure(pfn, 0);
}
pr_info("Injecting memory failure for pfn %#lx at process virtual address %#lx\n",
pfn, start);
/*
* Drop the page reference taken by get_user_pages_fast(). In
* the absence of MF_COUNT_INCREASED the memory_failure()
* routine is responsible for pinning the page to prevent it
* from being released back to the page allocator.
*/
put_page(page);
ret = memory_failure(pfn, 0);
if (ret)
return ret;
}
@@ -1094,23 +1085,6 @@ int do_madvise(unsigned long start, size_t len_in, int behavior)
if (write) {
if (mmap_write_lock_killable(current->mm))
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)) {
mmap_write_unlock(current->mm);
return -EINTR;
}
} else {
mmap_read_lock(current->mm);
}