Re: [PATCH 1/2 v2] scripts/coccinelle: catch freeing cryptographic structures via kfree

2014-11-19 Thread Konstantin Khlebnikov
bit to include information > about where the allocation call is: Not sure if this is necessary. This part of crypto-api is simple. > > /// > /// Structures allocated by crypto_alloc_* must be freed using crypto_free_*. > /// This finds freeing them by kfree. > /// > // Confid

[PATCH 1/2 v2] scripts/coccinelle: catch freeing cryptographic structures via kfree

2014-11-18 Thread Konstantin Khlebnikov
Structures allocated by crypto_alloc_* must be freed using crypto_free_*. Signed-off-by: Konstantin Khlebnikov --- scripts/coccinelle/free/crypto_free.cocci | 64 + 1 file changed, 64 insertions(+) create mode 100644 scripts/coccinelle/free/crypto_free.cocci diff

Re: [PATCH 1/2] scripts/coccinelle: catch freeing cryptographic structures via kfree

2014-11-17 Thread Konstantin Khlebnikov
On 2014-11-17 18:30, Julia Lawall wrote: On Mon, 17 Nov 2014, Konstantin Khlebnikov wrote: Structures allocated by crypto_alloc_* must be freed using crypto_free_*. Signed-off-by: Konstantin Khlebnikov --- scripts/coccinelle/free/crypto_free.cocci | 45 + 1

[PATCH 1/2] scripts/coccinelle: catch freeing cryptographic structures via kfree

2014-11-17 Thread Konstantin Khlebnikov
Structures allocated by crypto_alloc_* must be freed using crypto_free_*. Signed-off-by: Konstantin Khlebnikov --- scripts/coccinelle/free/crypto_free.cocci | 45 + 1 file changed, 45 insertions(+) create mode 100644 scripts/coccinelle/free/crypto_free.cocci diff

[PATCH 2/2] kernel/kexec: free crypto_shash using crypto_free_shash

2014-11-17 Thread Konstantin Khlebnikov
These objects have special freeing functions which cares about proper destruction and reference counting. Signed-off-by: Konstantin Khlebnikov --- kernel/kexec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kexec.c b/kernel/kexec.c index 2abf9f6..5a62311 100644