From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Dominik Dingel <dingel@linux.vnet.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andrea Arcangeli <aarcange@redhat.com>,
David Rientjes <rientjes@google.com>,
Eric B Munson <emunson@akamai.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Mel Gorman <mgorman@suse.de>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"Jason J. Herne" <jjherne@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm: fixup_userfault returns VM_FAULT_RETRY if asked
Date: Thu, 19 Nov 2015 02:14:40 +0200 [thread overview]
Message-ID: <20151119001440.GA7206@black.fi.intel.com> (raw)
In-Reply-To: <1447890598-56860-2-git-send-email-dingel@linux.vnet.ibm.com>
On Thu, Nov 19, 2015 at 12:49:57AM +0100, Dominik Dingel wrote:
> When calling fixup_userfault with FAULT_FLAG_ALLOW_RETRY, fixup_userfault
> didn't care about VM_FAULT_RETRY and returned 0. If the VM_FAULT_RETRY flag is
> set we will return the complete result of handle_mm_fault.
>
> Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
> ---
> mm/gup.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/gup.c b/mm/gup.c
> index deafa2c..2af3b31 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -609,6 +609,8 @@ int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
> return -EFAULT;
> BUG();
> }
> + if (ret & VM_FAULT_RETRY)
> + return ret;
Nope. fixup_user_fault() return errno, not VM_FAULT_* mask.
I guess it should be
return -EBUSY;
> if (tsk) {
> if (ret & VM_FAULT_MAJOR)
> tsk->maj_flt++;
> --
> 2.3.9
>
--
Kirill A. Shutemov
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-11-19 0:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 23:49 [PATCH 0/2] Allow gmap fault to retry Dominik Dingel
2015-11-18 23:49 ` [PATCH 1/2] mm: fixup_userfault returns VM_FAULT_RETRY if asked Dominik Dingel
2015-11-19 0:14 ` Kirill A. Shutemov [this message]
2015-11-18 23:49 ` [PATCH 2/2] s390/mm: allow gmap code to retry on faulting in guest memory Dominik Dingel
2015-11-19 8:18 ` Martin Schwidefsky
2015-11-19 8:25 ` Christian Borntraeger
2015-11-19 10:50 ` Dominik Dingel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151119001440.GA7206@black.fi.intel.com \
--to=kirill@shutemov.name \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=borntraeger@de.ibm.com \
--cc=dingel@linux.vnet.ibm.com \
--cc=emunson@akamai.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jjherne@linux.vnet.ibm.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=pbonzini@redhat.com \
--cc=rientjes@google.com \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox