linux-security-module October 2008 archive
Main Archive Page > Month Archives  > linux-security-module archives
linux-security-module: [PATCH] CRED: Fix creds refcounting in lo

[PATCH] CRED: Fix creds refcounting in lookup_user_key()

From: David Howells <dhowells_at_nospam>
Date: Tue Oct 14 2008 - 21:52:49 GMT

Make lookup_user_key() at all return points drop the reference to the current creds that it took at the top of the function.

Signed-off-by: David Howells <> Tested-by: Serge Hallyn <> --- security/keys/process_keys.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index e40f61d..2d6076d 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c @@ -667,6 +667,7 @@ try_again: goto invalid_key; error: + put_cred(cred); return key_ref; invalid_key: -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to More majordomo info at