summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorBlagovest Kolenichev <bkolenichev@codeaurora.org>2017-05-09 16:43:06 -0700
committerBlagovest Kolenichev <bkolenichev@codeaurora.org>2017-05-09 16:50:19 -0700
commit7e061af6db97a51e9c89bcef7c2317b13cc79699 (patch)
treee1dadff2c2e68fdcc0a1e7d09f57b45787b5f881 /fs/ext4
parent78cf4322e2ed0dcb54e7f9872a8d15340ebfa8bb (diff)
parent9796ea8fa00e6e664c846c40f6a14b4c227c1bdc (diff)
Merge branch 'android-4.4@9796ea8' into branch 'msm-4.4'
* refs/heads/9796ea8 Linux 4.4.67 dm ioctl: prevent stack leak in dm ioctl call nfsd: stricter decoding of write-like NFSv2/v3 ops nfsd4: minor NFSv2/v3 write decoding cleanup ext4/fscrypto: avoid RCU lookup in d_revalidate ext4 crypto: use dget_parent() in ext4_d_revalidate() ext4 crypto: revalidate dentry after adding or removing the key ext4: require encryption feature for EXT4_IOC_SET_ENCRYPTION_POLICY IB/ehca: fix maybe-uninitialized warnings IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE netlink: Allow direct reclaim for fallback allocation 8250_pci: Fix potential use-after-free in error path scsi: cxlflash: Improve EEH recovery time scsi: cxlflash: Fix to avoid EEH and host reset collisions scsi: cxlflash: Scan host only after the port is ready for I/O net: tg3: avoid uninitialized variable warning mtd: avoid stack overflow in MTD CFI code drbd: avoid redefinition of BITS_PER_PAGE ALSA: ppc/awacs: shut up maybe-uninitialized warning ASoC: intel: Fix PM and non-atomic crash in bytcr drivers Handle mismatched open calls timerfd: Protect the might cancel mechanism proper ANDROID: android-base.cfg: remove USB_OTG_WAKELOCK ANDROID: android-base.cfg: remove defunct options ANDROID: arm64: suspend: Restore the UAO state ANDROID: usb: gadget: f_audio_source: disable the CPU C-states upon playback ANDROID: usb: gadget: f_mtp: Set 0xFFFFFFFF in mtp header ContainerLength field Conflicts: drivers/usb/gadget/function/f_mtp.c fs/ext4/crypto.c Change-Id: I408054176798ba49f0b62fb46a3b0d59060d108e Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/crypto.c5
-rw-r--r--fs/ext4/ioctl.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
index 664f42c850b7..e14b1b8fceb0 100644
--- a/fs/ext4/crypto.c
+++ b/fs/ext4/crypto.c
@@ -497,11 +497,6 @@ static int ext4_d_revalidate(struct dentry *dentry, unsigned int flags)
return 0;
}
ci = EXT4_I(d_inode(dir))->i_crypt_info;
- if (ci && ci->ci_keyring_key &&
- (ci->ci_keyring_key->flags & ((1 << KEY_FLAG_INVALIDATED) |
- (1 << KEY_FLAG_REVOKED) |
- (1 << KEY_FLAG_DEAD))))
- ci = NULL;
/* this should eventually be an flag in d_flags */
cached_with_key = dentry->d_fsdata != NULL;
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 3a2594665b44..c21826be1cb3 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -626,6 +626,9 @@ resizefs_out:
struct ext4_encryption_policy policy;
int err = 0;
+ if (!ext4_has_feature_encrypt(sb))
+ return -EOPNOTSUPP;
+
if (copy_from_user(&policy,
(struct ext4_encryption_policy __user *)arg,
sizeof(policy))) {