[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20120118100314.20452.87629.stgit@warthog.procyon.org.uk>
Date: Wed, 18 Jan 2012 10:03:14 +0000
From: David Howells <dhowells@...hat.com>
To: jmorris@...ei.org
Cc: keyrings@...ux-nfs.org, linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...nel.org,
Mimi Zohar <zohar@...ibm.com>,
David Howells <dhowells@...hat.com>
Subject: [PATCH] keys: fix user_defined key sparse messages
From: Mimi Zohar <zohar@...ux.vnet.ibm.com>
Replace the rcu_assign_pointer() calls with rcu_assign_keypointer().
Signed-off-by: Mimi Zohar <zohar@...ibm.com>
Signed-off-by: David Howells <dhowells@...hat.com>
---
security/keys/user_defined.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c
index 69ff52c..2aee3c5 100644
--- a/security/keys/user_defined.c
+++ b/security/keys/user_defined.c
@@ -59,7 +59,7 @@ int user_instantiate(struct key *key, const void *data, size_t datalen)
/* attach the data */
upayload->datalen = datalen;
memcpy(upayload->data, data, datalen);
- rcu_assign_pointer(key->payload.data, upayload);
+ rcu_assign_keypointer(key, upayload);
ret = 0;
error:
@@ -98,7 +98,7 @@ int user_update(struct key *key, const void *data, size_t datalen)
if (ret == 0) {
/* attach the new data, displacing the old */
zap = key->payload.data;
- rcu_assign_pointer(key->payload.data, upayload);
+ rcu_assign_keypointer(key, upayload);
key->expiry = 0;
}
@@ -133,7 +133,7 @@ void user_revoke(struct key *key)
key_payload_reserve(key, 0);
if (upayload) {
- rcu_assign_pointer(key->payload.data, NULL);
+ rcu_assign_keypointer(key, NULL);
kfree_rcu(upayload, rcu);
}
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists