Commit d8fc9cde authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
 "This fixes a Kconfig dependency for hisilicon as well as a double free
  in marvell/octeontx"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: marvell/octeontx - fix double free of ptr
  crypto: hisilicon - Fix build error
parents 5602b0af 755bddd1
...@@ -27,6 +27,7 @@ config CRYPTO_DEV_HISI_SEC2 ...@@ -27,6 +27,7 @@ config CRYPTO_DEV_HISI_SEC2
select CRYPTO_SHA256 select CRYPTO_SHA256
select CRYPTO_SHA512 select CRYPTO_SHA512
depends on PCI && PCI_MSI depends on PCI && PCI_MSI
depends on UACCE || UACCE=n
depends on ARM64 || (COMPILE_TEST && 64BIT) depends on ARM64 || (COMPILE_TEST && 64BIT)
help help
Support for HiSilicon SEC Engine of version 2 in crypto subsystem. Support for HiSilicon SEC Engine of version 2 in crypto subsystem.
...@@ -58,6 +59,7 @@ config CRYPTO_DEV_HISI_ZIP ...@@ -58,6 +59,7 @@ config CRYPTO_DEV_HISI_ZIP
config CRYPTO_DEV_HISI_HPRE config CRYPTO_DEV_HISI_HPRE
tristate "Support for HISI HPRE accelerator" tristate "Support for HISI HPRE accelerator"
depends on PCI && PCI_MSI depends on PCI && PCI_MSI
depends on UACCE || UACCE=n
depends on ARM64 || (COMPILE_TEST && 64BIT) depends on ARM64 || (COMPILE_TEST && 64BIT)
select CRYPTO_DEV_HISI_QM select CRYPTO_DEV_HISI_QM
select CRYPTO_DH select CRYPTO_DH
......
...@@ -1161,13 +1161,13 @@ static inline u32 create_aead_null_output_list(struct aead_request *req, ...@@ -1161,13 +1161,13 @@ static inline u32 create_aead_null_output_list(struct aead_request *req,
inputlen); inputlen);
if (status != inputlen) { if (status != inputlen) {
status = -EINVAL; status = -EINVAL;
goto error; goto error_free;
} }
status = sg_copy_from_buffer(req->dst, sg_nents(req->dst), ptr, status = sg_copy_from_buffer(req->dst, sg_nents(req->dst), ptr,
inputlen); inputlen);
if (status != inputlen) { if (status != inputlen) {
status = -EINVAL; status = -EINVAL;
goto error; goto error_free;
} }
kfree(ptr); kfree(ptr);
} }
...@@ -1209,8 +1209,10 @@ static inline u32 create_aead_null_output_list(struct aead_request *req, ...@@ -1209,8 +1209,10 @@ static inline u32 create_aead_null_output_list(struct aead_request *req,
req_info->outcnt = argcnt; req_info->outcnt = argcnt;
return 0; return 0;
error:
error_free:
kfree(ptr); kfree(ptr);
error:
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment