[lng-odp] [PATCHv3] linux-generic:release memory during session destory

2016-03-15 Thread balakrishna.garapati
Signed-off-by: balakrishna.garapati 
---
 platform/linux-generic/odp_crypto.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/platform/linux-generic/odp_crypto.c 
b/platform/linux-generic/odp_crypto.c
index 08b479d..e468677 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -704,6 +704,8 @@ int odp_crypto_session_destroy(odp_crypto_session_t session)
odp_crypto_generic_session_t *generic;

generic = (odp_crypto_generic_session_t *)(intptr_t)session;
+if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)
+   EVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);
memset(generic, 0, sizeof(*generic));
free_session(generic);
return 0;
--
1.9.1

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCHv3] linux-generic:release memory during session destory

2016-03-19 Thread Bala Manoharan
Reviewed-by: Balasubramanian Manoharan 

On 15 March 2016 at 18:39, balakrishna.garapati <
balakrishna.garap...@linaro.org> wrote:

> Signed-off-by: balakrishna.garapati 
> ---
>  platform/linux-generic/odp_crypto.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/platform/linux-generic/odp_crypto.c
> b/platform/linux-generic/odp_crypto.c
> index 08b479d..e468677 100644
> --- a/platform/linux-generic/odp_crypto.c
> +++ b/platform/linux-generic/odp_crypto.c
> @@ -704,6 +704,8 @@ int odp_crypto_session_destroy(odp_crypto_session_t
> session)
> odp_crypto_generic_session_t *generic;
>
> generic = (odp_crypto_generic_session_t *)(intptr_t)session;
> +if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)
> +   EVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);
> memset(generic, 0, sizeof(*generic));
> free_session(generic);
> return 0;
> --
> 1.9.1
>
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCHv3] linux-generic:release memory during session destory

2016-03-19 Thread Maxim Uvarov
changes are ok, but patch should match code style. Please fix and add 
Bala's review to next version.


perl ./scripts/checkpatch.pl 
0001-linux-generic-release-memory-during-session-destory.patch

WARNING: 'destory' may be misspelled - perhaps 'destroy'?
#4:
Subject: [PATCH] linux-generic:release memory during session destory

ERROR: code indent should use tabs where possible
#20: FILE: platform/linux-generic/odp_crypto.c:707:
+if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)$

WARNING: please, no spaces at the start of a line
#20: FILE: platform/linux-generic/odp_crypto.c:707:
+if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)$

ERROR: code indent should use tabs where possible
#21: FILE: platform/linux-generic/odp_crypto.c:708:
+ ^IEVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);$

WARNING: please, no space before tabs
#21: FILE: platform/linux-generic/odp_crypto.c:708:
+ ^IEVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);$

WARNING: please, no spaces at the start of a line
#21: FILE: platform/linux-generic/odp_crypto.c:708:
+ ^IEVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);$

total: 2 errors, 4 warnings, 0 checks, 8 lines checked

Thank you,
Maxim.

On 03/16/16 16:22, Bala Manoharan wrote:
Reviewed-by: Balasubramanian Manoharan >


On 15 March 2016 at 18:39, balakrishna.garapati 
> wrote:


Signed-off-by: balakrishna.garapati
mailto:balakrishna.garap...@linaro.org>>
---
 platform/linux-generic/odp_crypto.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/platform/linux-generic/odp_crypto.c
b/platform/linux-generic/odp_crypto.c
index 08b479d..e468677 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -704,6 +704,8 @@ int
odp_crypto_session_destroy(odp_crypto_session_t session)
odp_crypto_generic_session_t *generic;

generic = (odp_crypto_generic_session_t *)(intptr_t)session;
+if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)
+  EVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);
memset(generic, 0, sizeof(*generic));
free_session(generic);
return 0;
--
1.9.1




___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCHv3] linux-generic:release memory during session destory

2016-03-22 Thread Mike Holmes
The bug needs to be referenced in the git message, assume it is
https://bugs.linaro.org/show_bug.cgi?id=2127


On 18 March 2016 at 05:14, Maxim Uvarov  wrote:

> changes are ok, but patch should match code style. Please fix and add
> Bala's review to next version.
>
> perl ./scripts/checkpatch.pl
> 0001-linux-generic-release-memory-during-session-destory.patch
> WARNING: 'destory' may be misspelled - perhaps 'destroy'?
> #4:
> Subject: [PATCH] linux-generic:release memory during session destory
>
> ERROR: code indent should use tabs where possible
> #20: FILE: platform/linux-generic/odp_crypto.c:707:
> +if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)$
>
> WARNING: please, no spaces at the start of a line
> #20: FILE: platform/linux-generic/odp_crypto.c:707:
> +if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)$
>
> ERROR: code indent should use tabs where possible
> #21: FILE: platform/linux-generic/odp_crypto.c:708:
> + ^IEVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);$
>
> WARNING: please, no space before tabs
> #21: FILE: platform/linux-generic/odp_crypto.c:708:
> + ^IEVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);$
>
> WARNING: please, no spaces at the start of a line
> #21: FILE: platform/linux-generic/odp_crypto.c:708:
> + ^IEVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);$
>
> total: 2 errors, 4 warnings, 0 checks, 8 lines checked
>
> Thank you,
> Maxim.
>
> On 03/16/16 16:22, Bala Manoharan wrote:
>
>> Reviewed-by: Balasubramanian Manoharan > >
>>
>> On 15 March 2016 at 18:39, balakrishna.garapati <
>> balakrishna.garap...@linaro.org >
>> wrote:
>>
>> Signed-off-by: balakrishna.garapati
>> > >
>> ---
>>  platform/linux-generic/odp_crypto.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/platform/linux-generic/odp_crypto.c
>> b/platform/linux-generic/odp_crypto.c
>> index 08b479d..e468677 100644
>> --- a/platform/linux-generic/odp_crypto.c
>> +++ b/platform/linux-generic/odp_crypto.c
>> @@ -704,6 +704,8 @@ int
>> odp_crypto_session_destroy(odp_crypto_session_t session)
>> odp_crypto_generic_session_t *generic;
>>
>> generic = (odp_crypto_generic_session_t *)(intptr_t)session;
>> +if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)
>> +  EVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);
>> memset(generic, 0, sizeof(*generic));
>> free_session(generic);
>> return 0;
>> --
>> 1.9.1
>>
>>
>>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org  *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCHv3] linux-generic:release memory during session destory

2016-03-22 Thread Krishna Garapati
It is referenced in the message. Fallowing is the commit
id: f4404beac33ba8fab6edeb6587067c366cb8d4b1

/Krishna

On 22 March 2016 at 18:48, Mike Holmes  wrote:

> The bug needs to be referenced in the git message, assume it is
> https://bugs.linaro.org/show_bug.cgi?id=2127
>
>
> On 18 March 2016 at 05:14, Maxim Uvarov  wrote:
>
>> changes are ok, but patch should match code style. Please fix and add
>> Bala's review to next version.
>>
>> perl ./scripts/checkpatch.pl
>> 0001-linux-generic-release-memory-during-session-destory.patch
>> WARNING: 'destory' may be misspelled - perhaps 'destroy'?
>> #4:
>> Subject: [PATCH] linux-generic:release memory during session destory
>>
>> ERROR: code indent should use tabs where possible
>> #20: FILE: platform/linux-generic/odp_crypto.c:707:
>> +if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)$
>>
>> WARNING: please, no spaces at the start of a line
>> #20: FILE: platform/linux-generic/odp_crypto.c:707:
>> +if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)$
>>
>> ERROR: code indent should use tabs where possible
>> #21: FILE: platform/linux-generic/odp_crypto.c:708:
>> + ^IEVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);$
>>
>> WARNING: please, no space before tabs
>> #21: FILE: platform/linux-generic/odp_crypto.c:708:
>> + ^IEVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);$
>>
>> WARNING: please, no spaces at the start of a line
>> #21: FILE: platform/linux-generic/odp_crypto.c:708:
>> + ^IEVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);$
>>
>> total: 2 errors, 4 warnings, 0 checks, 8 lines checked
>>
>> Thank you,
>> Maxim.
>>
>> On 03/16/16 16:22, Bala Manoharan wrote:
>>
>>> Reviewed-by: Balasubramanian Manoharan >> >
>>>
>>> On 15 March 2016 at 18:39, balakrishna.garapati <
>>> balakrishna.garap...@linaro.org >
>>> wrote:
>>>
>>> Signed-off-by: balakrishna.garapati
>>> >> >
>>> ---
>>>  platform/linux-generic/odp_crypto.c | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/platform/linux-generic/odp_crypto.c
>>> b/platform/linux-generic/odp_crypto.c
>>> index 08b479d..e468677 100644
>>> --- a/platform/linux-generic/odp_crypto.c
>>> +++ b/platform/linux-generic/odp_crypto.c
>>> @@ -704,6 +704,8 @@ int
>>> odp_crypto_session_destroy(odp_crypto_session_t session)
>>> odp_crypto_generic_session_t *generic;
>>>
>>> generic = (odp_crypto_generic_session_t *)(intptr_t)session;
>>> +if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM)
>>> +  EVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);
>>> memset(generic, 0, sizeof(*generic));
>>> free_session(generic);
>>> return 0;
>>> --
>>> 1.9.1
>>>
>>>
>>>
>> ___
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
>
> --
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org  *│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>
>
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp