diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/dns_resolver/dns_key.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/dns_resolver/dns_key.c b/net/dns_resolver/dns_key.c index 8aa4b111538..0a69d075779 100644 --- a/net/dns_resolver/dns_key.c +++ b/net/dns_resolver/dns_key.c | |||
@@ -259,20 +259,16 @@ static int __init init_dns_resolver(void) | |||
259 | if (!cred) | 259 | if (!cred) |
260 | return -ENOMEM; | 260 | return -ENOMEM; |
261 | 261 | ||
262 | keyring = key_alloc(&key_type_keyring, ".dns_resolver", | 262 | keyring = keyring_alloc(".dns_resolver", |
263 | GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, | 263 | GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, |
264 | (KEY_POS_ALL & ~KEY_POS_SETATTR) | | 264 | (KEY_POS_ALL & ~KEY_POS_SETATTR) | |
265 | KEY_USR_VIEW | KEY_USR_READ, | 265 | KEY_USR_VIEW | KEY_USR_READ, |
266 | KEY_ALLOC_NOT_IN_QUOTA); | 266 | KEY_ALLOC_NOT_IN_QUOTA, NULL); |
267 | if (IS_ERR(keyring)) { | 267 | if (IS_ERR(keyring)) { |
268 | ret = PTR_ERR(keyring); | 268 | ret = PTR_ERR(keyring); |
269 | goto failed_put_cred; | 269 | goto failed_put_cred; |
270 | } | 270 | } |
271 | 271 | ||
272 | ret = key_instantiate_and_link(keyring, NULL, 0, NULL, NULL); | ||
273 | if (ret < 0) | ||
274 | goto failed_put_key; | ||
275 | |||
276 | ret = register_key_type(&key_type_dns_resolver); | 272 | ret = register_key_type(&key_type_dns_resolver); |
277 | if (ret < 0) | 273 | if (ret < 0) |
278 | goto failed_put_key; | 274 | goto failed_put_key; |
@@ -304,3 +300,4 @@ static void __exit exit_dns_resolver(void) | |||
304 | module_init(init_dns_resolver) | 300 | module_init(init_dns_resolver) |
305 | module_exit(exit_dns_resolver) | 301 | module_exit(exit_dns_resolver) |
306 | MODULE_LICENSE("GPL"); | 302 | MODULE_LICENSE("GPL"); |
303 | |||