Merge a68a0262ab ("mm/madvise: remove racy mm ownership check") into android-mainline

Steps on the way to 5.10-rc8/final

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0d1e2f396425894a7c2e9a2680edf763a223c644
This commit is contained in:
Greg Kroah-Hartman
2020-12-09 17:58:00 +01:00
7 changed files with 53 additions and 93 deletions

View File

@@ -1204,8 +1204,7 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
goto put_pid;
}
if (task->mm != current->mm &&
!process_madvise_behavior_valid(behavior)) {
if (!process_madvise_behavior_valid(behavior)) {
ret = -EINVAL;
goto release_task;
}