summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--security/keys/big_key.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/keys/big_key.c b/security/keys/big_key.c
index 5f9defc4a807..2cf5e62d67af 100644
--- a/security/keys/big_key.c
+++ b/security/keys/big_key.c
@@ -71,8 +71,10 @@ int big_key_instantiate(struct key *key, struct key_preparsed_payload *prep)
* TODO: Encrypt the stored data with a temporary key.
*/
file = shmem_file_setup("", datalen, 0);
- if (IS_ERR(file))
+ if (IS_ERR(file)) {
+ ret = PTR_ERR(file);
goto err_quota;
+ }
written = kernel_write(file, prep->data, prep->datalen, 0);
if (written != datalen) {