Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49488def authored by Zhen Kong's avatar Zhen Kong Committed by Gerrit - the friendly Code Review server
Browse files

crypto: msm: qcrypto: fix crash in _qcrypto_tfm_complete



_qcrypto_tfm_complete calls a user completion function and if
it's the user's last request, cra_exit may be called to destroy
the tfm context. The tfm context is no longer valid, and referring
to the deleted tfm context after the callback is invoked may cause
a crash. The solution is to look ahead to ensure that there are
more entries in the response queue to process before calling the
user completion callback. If there are no more entries to process
after the callback is invoked, it won't proceed to look at tfm
for additional completed responses to process.

Change-Id: I71367bd6ef4131e8e31f03d7cc6bece16e8957e7
Acked-by: default avatarChemin Hsieh <cheminh@qti.qualcomm.com>
Signed-off-by: default avatarZhen Kong <zkong@codeaurora.org>
parent 4c73444d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment