Re: [V2] kexec_file: use crypto_free_shash to free memory

2017-08-09 Thread Baoquan He
On 08/09/17 at 07:30pm, Pan Bian wrote: > In function kexec_calculate_store_digests(), kfree() is used to free > memory allocated by crypto_alloc_shash(). It is better to use function > crypto_free_shash(), which frees up tfm and any resources associated with > it. And then, the refcount of the

[PATCH] kexec-tools: powerpc: fix command line overflow error

2017-08-09 Thread Hari Bathini
Since kernel commit a5980d064fe2 ("powerpc: Bump COMMAND_LINE_SIZE to 2048"), powerpc bumped command line size to 2048 but the size used here is still the default value of 512. Bump it to 2048 to fix command line overflow errors observed when command line length is above 512 bytes. Also, get rid

[V2] kexec_file: use crypto_free_shash to free memory

2017-08-09 Thread Pan Bian
In function kexec_calculate_store_digests(), kfree() is used to free memory allocated by crypto_alloc_shash(). It is better to use function crypto_free_shash(), which frees up tfm and any resources associated with it. And then, the refcount of the algorithm used in crypto_alloc_shash() is also