summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2019-01-16 22:54:09 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2019-01-16 22:54:09 +0100
commitb355d4f7ce55352f5b025306e2113f2f98302a6b (patch)
tree7697e6bf11653ec508e7093922b6cb8cc50364a3 /crypto
parente137948e4b118c77c81942768d1d8059d6ecbffd (diff)
parentc5feba4358ed485b91c2f535d703758aa6d8872f (diff)
Merge 4.4.171 into android-4.4
Changes in 4.4.171 ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225 btrfs: cleanup, stop casting for extent_map->lookup everywhere btrfs: Enhance chunk validation check Btrfs: add validadtion checks for chunk loading Btrfs: check inconsistence between chunk and block group Btrfs: fix em leak in find_first_block_group Btrfs: detect corruption when non-root leaf has zero item Btrfs: check btree node's nritems Btrfs: fix BUG_ON in btrfs_mark_buffer_dirty Btrfs: memset to avoid stale content in btree node block Btrfs: improve check_node to avoid reading corrupted nodes Btrfs: kill BUG_ON in run_delayed_tree_ref Btrfs: memset to avoid stale content in btree leaf Btrfs: fix emptiness check for dirtied extent buffers at check_leaf() btrfs: struct-funcs, constify readers btrfs: Refactor check_leaf function for later expansion btrfs: Check if item pointer overlaps with the item itself btrfs: Add sanity check for EXTENT_DATA when reading out leaf btrfs: Add checker for EXTENT_CSUM btrfs: Move leaf and node validation checker to tree-checker.c btrfs: tree-checker: Enhance btrfs_check_node output btrfs: tree-checker: Fix false panic for sanity test btrfs: tree-checker: Add checker for dir item btrfs: tree-checker: use %zu format string for size_t btrfs: tree-check: reduce stack consumption in check_dir_item btrfs: tree-checker: Verify block_group_item btrfs: tree-checker: Detect invalid and empty essential trees btrfs: validate type when reading a chunk btrfs: Check that each block group has corresponding chunk at mount time btrfs: Verify that every chunk has corresponding block group at mount time btrfs: tree-checker: Check level for leaves and nodes btrfs: tree-checker: Fix misleading group system information CIFS: Do not hide EINTR after sending network packets cifs: Fix potential OOB access of lock element array usb: cdc-acm: send ZLP for Telit 3G Intel based modems USB: storage: don't insert sane sense for SPC3+ when bad sense specified USB: storage: add quirk for SMI SM3350 USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB slab: alien caches must not be initialized if the allocation of the alien cache failed PCI: altera: Fix altera_pcie_link_is_up() PCI: altera: Reorder read/write functions PCI: altera: Check link status before retrain link PCI: altera: Poll for link up status after retraining the link PCI: altera: Poll for link training status after retraining the link PCI: altera: Rework config accessors for use without a struct pci_bus PCI: altera: Move retrain from fixup to altera_pcie_host_init() ACPI: power: Skip duplicate power resource references in _PRx i2c: dev: prevent adapter retries and timeout being set as minus value crypto: cts - fix crash on short inputs ext4: fix a potential fiemap/page fault deadlock w/ inline_data sunrpc: use-after-free in svc_process_common() Linux 4.4.171 Change-Id: If59c94897d4f135b24d45772a7db116503695ba7 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/cts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/cts.c b/crypto/cts.c
index e467ec0acf9f..e65688d6a4ca 100644
--- a/crypto/cts.c
+++ b/crypto/cts.c
@@ -137,8 +137,8 @@ static int crypto_cts_encrypt(struct blkcipher_desc *desc,
lcldesc.info = desc->info;
lcldesc.flags = desc->flags;
- if (tot_blocks == 1) {
- err = crypto_blkcipher_encrypt_iv(&lcldesc, dst, src, bsize);
+ if (tot_blocks <= 1) {
+ err = crypto_blkcipher_encrypt_iv(&lcldesc, dst, src, nbytes);
} else if (nbytes <= bsize * 2) {
err = cts_cbc_encrypt(ctx, desc, dst, src, 0, nbytes);
} else {
@@ -232,8 +232,8 @@ static int crypto_cts_decrypt(struct blkcipher_desc *desc,
lcldesc.info = desc->info;
lcldesc.flags = desc->flags;
- if (tot_blocks == 1) {
- err = crypto_blkcipher_decrypt_iv(&lcldesc, dst, src, bsize);
+ if (tot_blocks <= 1) {
+ err = crypto_blkcipher_decrypt_iv(&lcldesc, dst, src, nbytes);
} else if (nbytes <= bsize * 2) {
err = cts_cbc_decrypt(ctx, desc, dst, src, 0, nbytes);
} else {