Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933130AbbKRXuf (ORCPT ); Wed, 18 Nov 2015 18:50:35 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:53479 "EHLO e06smtp14.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757346AbbKRXuE (ORCPT ); Wed, 18 Nov 2015 18:50:04 -0500 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: dingel@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org;linux-s390@vger.kernel.org From: Dominik Dingel To: linux-s390@vger.kernel.org, linux-mm@kvack.org Cc: Andrew Morton , "Kirill A. Shutemov" , Andrea Arcangeli , David Rientjes , Eric B Munson , Naoya Horiguchi , Mel Gorman , Martin Schwidefsky , Heiko Carstens , Dominik Dingel , Christian Borntraeger , Paolo Bonzini , "Jason J. Herne" , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mm: fixup_userfault returns VM_FAULT_RETRY if asked Date: Thu, 19 Nov 2015 00:49:57 +0100 Message-Id: <1447890598-56860-2-git-send-email-dingel@linux.vnet.ibm.com> X-Mailer: git-send-email 2.3.9 In-Reply-To: <1447890598-56860-1-git-send-email-dingel@linux.vnet.ibm.com> References: <1447890598-56860-1-git-send-email-dingel@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15111823-0017-0000-0000-0000063CE5E0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 902 Lines: 30 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 --- 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; if (tsk) { if (ret & VM_FAULT_MAJOR) tsk->maj_flt++; -- 2.3.9 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/