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>
This commit is contained in:
Jamie Iles 2011-08-02 11:29:06 +01:00 committed by Herbert Xu
parent 30343ef1de
commit b64dc04beb

View file

@ -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);
}
}