Commit 9dffa35e authored by David Howells's avatar David Howells Committed by Linus Torvalds

[PATCH] Make keyctl(KEYCTL_JOIN_SESSION_KEYRING) use the correct arg

The attached patch makes keyctl() use the correct argument when invoking
the KEYCTL_JOIN_SESSION_KEYRING function.

I'm not sure how this evaded testing before, but I suspect the compiler was
kind and made both argument registers hold the same value.

Thanks to Kevin Coffman <kwc@citi.umich.edu> for spotting this.
Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 16d5c084
......@@ -31,7 +31,7 @@ asmlinkage long compat_sys_keyctl(u32 option,
return keyctl_get_keyring_ID(arg2, arg3);
case KEYCTL_JOIN_SESSION_KEYRING:
return keyctl_join_session_keyring(compat_ptr(arg3));
return keyctl_join_session_keyring(compat_ptr(arg2));
case KEYCTL_UPDATE:
return keyctl_update_key(arg2, compat_ptr(arg3), arg4);
......
......@@ -923,7 +923,7 @@ asmlinkage long sys_keyctl(int option, unsigned long arg2, unsigned long arg3,
(int) arg3);
case KEYCTL_JOIN_SESSION_KEYRING:
return keyctl_join_session_keyring((const char __user *) arg3);
return keyctl_join_session_keyring((const char __user *) arg2);
case KEYCTL_UPDATE:
return keyctl_update_key((key_serial_t) arg2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment