Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753063Ab2KTOjT (ORCPT ); Tue, 20 Nov 2012 09:39:19 -0500 Received: from us02smtp1.synopsys.com ([198.182.60.75]:40644 "EHLO vaxjo.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752929Ab2KTOjR (ORCPT ); Tue, 20 Nov 2012 09:39:17 -0500 From: To: CC: , , Vineet Gupta Subject: [PATCH 1/2] asm-generic: uaccess: allow arch to over-ride __get_user_fn() Date: Tue, 20 Nov 2012 20:08:16 +0530 Message-ID: <1353422297-29079-2-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353422297-29079-1-git-send-email-vgupta@synopsys.com> References: <1353422297-29079-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.12.197.205] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1080 Lines: 37 From: Vineet Gupta Signed-off-by: Vineet Gupta --- include/asm-generic/uaccess.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index 5f6ee61..432d55f 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h @@ -225,12 +225,17 @@ extern int __put_user_bad(void) __attribute__((noreturn)); -EFAULT; \ }) +#ifndef __get_user_fn static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) { size = __copy_from_user(x, ptr, size); return size ? -EFAULT : size; } +#define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k) + +#endif + extern int __get_user_bad(void) __attribute__((noreturn)); #ifndef __copy_from_user_inatomic -- 1.7.4.1 -- 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/