mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-02 02:06:14 +07:00
encrypted_keys: avoid dumping the master key if the request fails
Do not dump the master key if an error is encountered during the request. Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Acked-by: Gianluca Ramunno <ramunno@polito.it> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
This commit is contained in:
parent
4d67431f80
commit
f91c2c5cfa
@ -378,11 +378,13 @@ static struct key *request_master_key(struct encrypted_key_payload *epayload,
|
|||||||
} else
|
} else
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (IS_ERR(mkey))
|
if (IS_ERR(mkey)) {
|
||||||
pr_info("encrypted_key: key %s not found",
|
pr_info("encrypted_key: key %s not found",
|
||||||
epayload->master_desc);
|
epayload->master_desc);
|
||||||
if (mkey)
|
goto out;
|
||||||
dump_master_key(*master_key, *master_keylen);
|
}
|
||||||
|
|
||||||
|
dump_master_key(*master_key, *master_keylen);
|
||||||
out:
|
out:
|
||||||
return mkey;
|
return mkey;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user