summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/files/0015-fix-pkc-request-deallocation.patch
diff options
context:
space:
mode:
authorCristian Stoica <cristian.stoica@freescale.com>2015-07-17 17:29:44 +0800
committerZhenhua Luo <zhenhua.luo@freescale.com>2015-07-20 17:24:46 +0800
commit8dcd2490816db6397d1677da933c6c19e7fbdd4f (patch)
treef2959e9dd028ea3b2a68d81b819b7186e4917c44 /recipes-kernel/cryptodev/files/0015-fix-pkc-request-deallocation.patch
parentae92c669322865ac51321a65104a678ac9d713f8 (diff)
downloadmeta-fsl-ppc-8dcd2490816db6397d1677da933c6c19e7fbdd4f.tar.gz
cryptodev: update to 1.7 plus FSL patches
To avoid build issue when Poky upgrades cryptodev, keep a copy of cryptodev-{linux,modules,tests) recipe in this repository. Based on the upstream, this includes the following FSL patches: 0001-add-support-for-composite-TLS10-SHA1-AES-algorithm-o.patch 0002-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch 0003-PKC-support-added-in-cryptodev-module.patch 0004-Compat-versions-of-PKC-IOCTLs.patch 0005-Asynchronous-interface-changes-in-cryptodev.patch 0006-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch 0007-RCU-stall-fixed-in-PKC-asynchronous-interface.patch 0008-Add-RSA-Key-generation-offloading.patch 0009-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch 0010-add-support-for-composite-TLS10-SHA1-3DES-algorithm-.patch 0011-add-support-for-TLSv1.1-record-offload.patch 0012-add-support-for-TLSv1.2-record-offload.patch 0013-clean-up-code-layout.patch 0014-remove-redundant-data-copy-for-pkc-operations.patch 0015-fix-pkc-request-deallocation.patch 0016-add-basic-detection-of-asym-features.patch 0017-remove-dead-code.patch 0018-fix-compat-warnings.patch 0019-fix-size_t-print-format.patch 0020-fix-uninitialized-variable-compiler-warning.patch Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Ting Liu <ting.liu@freescale.com>
Diffstat (limited to 'recipes-kernel/cryptodev/files/0015-fix-pkc-request-deallocation.patch')
-rw-r--r--recipes-kernel/cryptodev/files/0015-fix-pkc-request-deallocation.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/files/0015-fix-pkc-request-deallocation.patch b/recipes-kernel/cryptodev/files/0015-fix-pkc-request-deallocation.patch
new file mode 100644
index 0000000..949fe12
--- /dev/null
+++ b/recipes-kernel/cryptodev/files/0015-fix-pkc-request-deallocation.patch
@@ -0,0 +1,40 @@
1From 8361f99c940fbe270fca2112dae3d97c9a5776d6 Mon Sep 17 00:00:00 2001
2From: Cristian Stoica <cristian.stoica@freescale.com>
3Date: Mon, 23 Feb 2015 15:28:22 +0200
4Subject: [PATCH 15/15] fix pkc request deallocation
5
6The request to be freed is actually pkc->req, and should be done inside
7the fetch ioctl for ASYNC (this patch) and in crypt ioctl for SYNC
8operations.
9
10Change-Id: I6f046f2ebeae4cb513a419996ca96b52e37468ed
11Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
12Reviewed-on: http://git.am.freescale.net:8181/34224
13---
14 ioctl.c | 3 +--
15 1 file changed, 1 insertion(+), 2 deletions(-)
16
17diff --git a/ioctl.c b/ioctl.c
18index 797b73c..da3a842 100644
19--- a/ioctl.c
20+++ b/ioctl.c
21@@ -114,8 +114,6 @@ void cryptodev_complete_asym(struct crypto_async_request *req, int err)
22 /* wake for POLLIN */
23 wake_up_interruptible(&pcr->user_waiter);
24 }
25-
26- kfree(req);
27 }
28
29 #define FILL_SG(sg, ptr, len) \
30@@ -1113,6 +1111,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_)
31 cookie_list.cookie[i] = pkc->kop.kop.cookie;
32 cookie_list.status[i] = pkc->result.err;
33 }
34+ kfree(pkc->req);
35 kfree(pkc);
36 } else {
37 spin_unlock_bh(&pcr->completion_lock);
38--
392.3.5
40