File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -213,9 +213,11 @@ int _ext4_get_encryption_info(struct inode *inode)
213
213
res = - ENOKEY ;
214
214
goto out ;
215
215
}
216
+ down_read (& keyring_key -> sem );
216
217
ukp = ((struct user_key_payload * )keyring_key -> payload .data );
217
218
if (ukp -> datalen != sizeof (struct ext4_encryption_key )) {
218
219
res = - EINVAL ;
220
+ up_read (& keyring_key -> sem );
219
221
goto out ;
220
222
}
221
223
master_key = (struct ext4_encryption_key * )ukp -> data ;
@@ -226,10 +228,12 @@ int _ext4_get_encryption_info(struct inode *inode)
226
228
"ext4: key size incorrect: %d\n" ,
227
229
master_key -> size );
228
230
res = - ENOKEY ;
231
+ up_read (& keyring_key -> sem );
229
232
goto out ;
230
233
}
231
234
res = ext4_derive_key_aes (ctx .nonce , master_key -> raw ,
232
235
raw_key );
236
+ up_read (& keyring_key -> sem );
233
237
if (res )
234
238
goto out ;
235
239
got_key :
You can’t perform that action at this time.
0 commit comments