This is not good.

Driver might allocate some resources, which needs to be released.
crypto_ahash_final() should do some kind of "cleanup" task.

- Dmitry

On 10/11/10 14:27, ext Herbert Xu wrote:
> Dmitry Kasatkin <dmitry.kasat...@nokia.com> wrote:
>   
>> Hello,
>>
>> When using crypto ahash API, is it necessary/mandatory to call
>> crypto_ahash_final() if crypto_ahash_update() returns error...
>>
>> Basically it might happen after several calls while calculating hash if
>> HW error happens.
>> It is not possible to continue hash calculation. it is necessary to
>> reset HW and start whole hash again..
>>
>> Any comments?
>>     
> From the driver's perspective you cannot expect that the user
> will call crypto_ahash_final in this case, or for that matter in
> any other case as the user is always free to leave a hash in
> an unfinalised state.
>
> Cheers,
>   
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to