summaryrefslogtreecommitdiffstats
path: root/fs/ext4/crypto.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2015-10-03 16:49:27 +0200
committerTheodore Ts'o <tytso@mit.edu>2015-10-03 16:49:27 +0200
commit687c3c36e754a999a8263745b27965128db4fee5 (patch)
treeb2da54484833da41c4d112429becc0ae5df1941e /fs/ext4/crypto.c
parentext4 crypto: ext4_page_crypto() doesn't need a encryption context (diff)
downloadlinux-687c3c36e754a999a8263745b27965128db4fee5.tar.xz
linux-687c3c36e754a999a8263745b27965128db4fee5.zip
ext4 crypto: replace some BUG_ON()'s with error checks
Buggy (or hostile) userspace should not be able to cause the kernel to crash. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/ext4/crypto.c')
-rw-r--r--fs/ext4/crypto.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
index 3a5a7a2597de..879cb15b7a21 100644
--- a/fs/ext4/crypto.c
+++ b/fs/ext4/crypto.c
@@ -295,7 +295,6 @@ static int ext4_page_crypto(struct inode *inode,
else
res = crypto_ablkcipher_encrypt(req);
if (res == -EINPROGRESS || res == -EBUSY) {
- BUG_ON(req->base.data != &ecr);
wait_for_completion(&ecr.completion);
res = ecr.res;
}