* [PATCH] Make keyctl(KEYCTL_JOIN_SESSION_KEYRING) use the correct arg
[not found] <20050225015755.14B611BAA9@citi.umich.edu>
@ 2005-02-25 11:36 ` David Howells
0 siblings, 0 replies; only message in thread
From: David Howells @ 2005-02-25 11:36 UTC (permalink / raw)
To: torvalds, akpm, kwc; +Cc: linux-kernel
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: David Howells <dhowells@redhat.com>
---
warthog>diffstat -p1 keys-joinsess-2611rc4.diff
security/keys/compat.c | 2 +-
security/keys/keyctl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff -uNr linux-2.6.11-rc4/security/keys/compat.c linux-2.6.11-rc4-keys-task/security/keys/compat.c
--- linux-2.6.11-rc4/security/keys/compat.c 2005-01-04 11:14:01.000000000 +0000
+++ linux-2.6.11-rc4-keys-task/security/keys/compat.c 2005-02-25 11:02:33.853339509 +0000
@@ -31,7 +31,7 @@
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);
diff -uNr linux-2.6.11-rc4/security/keys/keyctl.c linux-2.6.11-rc4-keys-task/security/keys/keyctl.c
--- linux-2.6.11-rc4/security/keys/keyctl.c 2005-01-04 11:14:01.000000000 +0000
+++ linux-2.6.11-rc4-keys-task/security/keys/keyctl.c 2005-02-25 11:02:24.134152856 +0000
@@ -923,7 +923,7 @@
(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,
^ permalink raw reply [flat|nested] only message in thread