From b64dc04beba30947dc80745dcb95ae3c04fd18cf Mon Sep 17 00:00:00 2001 From: Jamie Iles Date: Tue, 2 Aug 2011 11:29:06 +0100 Subject: 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 --- drivers/crypto/picoxcell_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') 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); } } -- cgit v1.2.3-18-g5258