From: Jamie Iles Date: Tue, 2 Aug 2011 10:29:06 +0000 (+0100) Subject: crypto: picoxcell - fix possible invalid pointer dereference X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b64dc04beba30947dc80745dcb95ae3c04fd18cf;p=mv-sheeva.git 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 Signed-off-by: Jamie Iles Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index 017340c3b71..a2b553eabbd 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/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); } }