Browse Source

crypto: picoxcell - fix possible invalid pointer dereference

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

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Jamie Iles 14 years ago
parent
commit
b64dc04beb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/crypto/picoxcell_crypto.c

+ 1 - 1
drivers/crypto/picoxcell_crypto.c

@@ -1242,8 +1242,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);
 	}
 }