The completion callback will free the request so we must remove it from
the completion list before calling the callback.

Cc: [email protected]
Cc: Herbert Xu <[email protected]>
Signed-off-by: Jamie Iles <[email protected]>
---
 drivers/crypto/picoxcell_crypto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/crypto/picoxcell_crypto.c 
b/drivers/crypto/picoxcell_crypto.c
index db7cb31..a1b4ca2 100644
--- a/drivers/crypto/picoxcell_crypto.c
+++ b/drivers/crypto/picoxcell_crypto.c
@@ -1267,8 +1267,8 @@ static void spacc_spacc_complete(unsigned long data)
        spin_unlock_irqrestore(&engine->hw_lock, flags);
 
        list_for_each_entry_safe(req, tmp, &completed, list) {
-               req->complete(req);
                list_del(&req->list);
+               req->complete(req);
        }
 }
 
-- 
1.7.4.1

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to