summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/sdk_patches/0015-fix-pkc-request-deallocation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0015-fix-pkc-request-deallocation.patch')
-rw-r--r--recipes-kernel/cryptodev/sdk_patches/0015-fix-pkc-request-deallocation.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0015-fix-pkc-request-deallocation.patch b/recipes-kernel/cryptodev/sdk_patches/0015-fix-pkc-request-deallocation.patch
new file mode 100644
index 0000000..ef18992
--- /dev/null
+++ b/recipes-kernel/cryptodev/sdk_patches/0015-fix-pkc-request-deallocation.patch
@@ -0,0 +1,40 @@
1From 212e418fa7b70c8ba79446006001c574cb9d42f8 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/38] 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.7.0
40