From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756316Ab3EXORw (ORCPT ); Fri, 24 May 2013 10:17:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14051 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753367Ab3EXORv (ORCPT ); Fri, 24 May 2013 10:17:51 -0400 Date: Fri, 24 May 2013 17:17:47 +0300 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 02/11] arm64: uaccess s/might_sleep/might_fault/ Message-ID: <1369404522-12927-2-git-send-email-mst@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The only reason uaccess routines might sleep is if they fault. Make this explicit. Signed-off-by: Michael S. Tsirkin Acked-by: Catalin Marinas --- arch/arm64/include/asm/uaccess.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index 008f848..edb3d5c 100644 --- a/arch/arm64/include/asm/uaccess.h +++ b/arch/arm64/include/asm/uaccess.h @@ -166,7 +166,7 @@ do { \ #define get_user(x, ptr) \ ({ \ - might_sleep(); \ + might_fault(); \ access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) ? \ __get_user((x), (ptr)) : \ ((x) = 0, -EFAULT); \ @@ -227,7 +227,7 @@ do { \ #define put_user(x, ptr) \ ({ \ - might_sleep(); \ + might_fault(); \ access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) ? \ __put_user((x), (ptr)) : \ -EFAULT; \ -- MST From mboxrd@z Thu Jan 1 00:00:00 1970 From: mst@redhat.com (Michael S. Tsirkin) Date: Fri, 24 May 2013 17:17:47 +0300 Subject: [PATCH v3 02/11] arm64: uaccess s/might_sleep/might_fault/ In-Reply-To: References: Message-ID: <1369404522-12927-2-git-send-email-mst@redhat.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org The only reason uaccess routines might sleep is if they fault. Make this explicit. Signed-off-by: Michael S. Tsirkin Acked-by: Catalin Marinas --- arch/arm64/include/asm/uaccess.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index 008f848..edb3d5c 100644 --- a/arch/arm64/include/asm/uaccess.h +++ b/arch/arm64/include/asm/uaccess.h @@ -166,7 +166,7 @@ do { \ #define get_user(x, ptr) \ ({ \ - might_sleep(); \ + might_fault(); \ access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) ? \ __get_user((x), (ptr)) : \ ((x) = 0, -EFAULT); \ @@ -227,7 +227,7 @@ do { \ #define put_user(x, ptr) \ ({ \ - might_sleep(); \ + might_fault(); \ access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) ? \ __put_user((x), (ptr)) : \ -EFAULT; \ -- MST