From 90bd49ab6649269cd10d0edc86d0e0f62864726a Mon Sep 17 00:00:00 2001 From: James Morris Date: Mon, 29 Dec 2008 14:35:35 +1100 Subject: keys: fix sparse warning by adding __user annotation to cast Fix the following sparse warning: CC security/keys/key.o security/keys/keyctl.c:1297:10: warning: incorrect type in argument 2 (different address spaces) security/keys/keyctl.c:1297:10: expected char [noderef] *buffer security/keys/keyctl.c:1297:10: got char * which appears to be caused by lack of __user annotation to the cast of a syscall argument. Signed-off-by: James Morris Acked-by: David Howells --- security/keys/keyctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'security/keys') diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 6688765bd8b..09796797d12 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -1294,7 +1294,7 @@ asmlinkage long sys_keyctl(int option, unsigned long arg2, unsigned long arg3, case KEYCTL_GET_SECURITY: return keyctl_get_security((key_serial_t) arg2, - (char *) arg3, + (char __user *) arg3, (size_t) arg4); default: -- cgit v1.2.3