aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-09-01 11:39:14 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-09-04 19:05:15 -0400
commite13ec939e96b13e664bb6cee361cc976a0ee621a (patch)
tree9537ad39e7cc842c1f6d756aba43b1f753be9eaa /security
parentbdd1d2d3d251c65b74ac4493e08db18971c09240 (diff)
fs: fix kernel_write prototype
Make the position an in/out argument like all the other read/write helpers and and make the buf argument a void pointer. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security')
-rw-r--r--security/keys/big_key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/keys/big_key.c b/security/keys/big_key.c
index 9f4c86cade8e..6acb00f6f22c 100644
--- a/security/keys/big_key.c
+++ b/security/keys/big_key.c
@@ -147,6 +147,7 @@ int big_key_preparse(struct key_preparsed_payload *prep)
147 * File content is stored encrypted with randomly generated key. 147 * File content is stored encrypted with randomly generated key.
148 */ 148 */
149 size_t enclen = ALIGN(datalen, crypto_skcipher_blocksize(big_key_skcipher)); 149 size_t enclen = ALIGN(datalen, crypto_skcipher_blocksize(big_key_skcipher));
150 loff_t pos = 0;
150 151
151 /* prepare aligned data to encrypt */ 152 /* prepare aligned data to encrypt */
152 data = kmalloc(enclen, GFP_KERNEL); 153 data = kmalloc(enclen, GFP_KERNEL);
@@ -179,7 +180,7 @@ int big_key_preparse(struct key_preparsed_payload *prep)
179 goto err_enckey; 180 goto err_enckey;
180 } 181 }
181 182
182 written = kernel_write(file, data, enclen, 0); 183 written = kernel_write(file, data, enclen, &pos);
183 if (written != enclen) { 184 if (written != enclen) {
184 ret = written; 185 ret = written;
185 if (written >= 0) 186 if (written >= 0)