mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:30:53 +07:00
keys: ensure that ->match_free() is called in request_key_and_link()
If check_cached_key() returns a non-NULL value, we still need to call
key_type::match_free() to undo key_type::match_preparse().
Fixes: 7743c48e54
("keys: Cache result of request_key*() temporarily in task_struct")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e8d6766f3c
commit
846d2db3e0
@ -595,7 +595,7 @@ struct key *request_key_and_link(struct key_type *type,
|
||||
|
||||
key = check_cached_key(&ctx);
|
||||
if (key)
|
||||
return key;
|
||||
goto error_free;
|
||||
|
||||
/* search all the process keyrings for a key */
|
||||
rcu_read_lock();
|
||||
|
Loading…
Reference in New Issue
Block a user