diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-28 14:06:39 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-28 14:06:39 -0400 |
commit | f28e71617ddaf2483e3e5c5237103484a303743f (patch) | |
tree | 67627d2d8ddbf6a4449371e9261d796c013b1fa1 /security/keys/user_defined.c | |
parent | dc6a78f1af10d28fb8c395034ae1e099b85c05b0 (diff) | |
parent | a39727f212426b9d5f9267b3318a2afaf9922d3b (diff) |
Merge ../linux-2.6/
Conflicts:
drivers/scsi/aacraid/comminit.c
Fixed up by removing the now renamed CONFIG_IOMMU option from
aacraid
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'security/keys/user_defined.c')
-rw-r--r-- | security/keys/user_defined.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c index 8e71895b97a7..5bbfdebb7acf 100644 --- a/security/keys/user_defined.c +++ b/security/keys/user_defined.c | |||
@@ -28,6 +28,7 @@ struct key_type key_type_user = { | |||
28 | .instantiate = user_instantiate, | 28 | .instantiate = user_instantiate, |
29 | .update = user_update, | 29 | .update = user_update, |
30 | .match = user_match, | 30 | .match = user_match, |
31 | .revoke = user_revoke, | ||
31 | .destroy = user_destroy, | 32 | .destroy = user_destroy, |
32 | .describe = user_describe, | 33 | .describe = user_describe, |
33 | .read = user_read, | 34 | .read = user_read, |
@@ -67,6 +68,7 @@ error: | |||
67 | return ret; | 68 | return ret; |
68 | 69 | ||
69 | } /* end user_instantiate() */ | 70 | } /* end user_instantiate() */ |
71 | |||
70 | EXPORT_SYMBOL_GPL(user_instantiate); | 72 | EXPORT_SYMBOL_GPL(user_instantiate); |
71 | 73 | ||
72 | /*****************************************************************************/ | 74 | /*****************************************************************************/ |
@@ -141,7 +143,28 @@ EXPORT_SYMBOL_GPL(user_match); | |||
141 | 143 | ||
142 | /*****************************************************************************/ | 144 | /*****************************************************************************/ |
143 | /* | 145 | /* |
144 | * dispose of the data dangling from the corpse of a user | 146 | * dispose of the links from a revoked keyring |
147 | * - called with the key sem write-locked | ||
148 | */ | ||
149 | void user_revoke(struct key *key) | ||
150 | { | ||
151 | struct user_key_payload *upayload = key->payload.data; | ||
152 | |||
153 | /* clear the quota */ | ||
154 | key_payload_reserve(key, 0); | ||
155 | |||
156 | if (upayload) { | ||
157 | rcu_assign_pointer(key->payload.data, NULL); | ||
158 | call_rcu(&upayload->rcu, user_update_rcu_disposal); | ||
159 | } | ||
160 | |||
161 | } /* end user_revoke() */ | ||
162 | |||
163 | EXPORT_SYMBOL(user_revoke); | ||
164 | |||
165 | /*****************************************************************************/ | ||
166 | /* | ||
167 | * dispose of the data dangling from the corpse of a user key | ||
145 | */ | 168 | */ |
146 | void user_destroy(struct key *key) | 169 | void user_destroy(struct key *key) |
147 | { | 170 | { |