Skip to content

Commit

Permalink
crypto: picoxcell - fix possible invalid pointer dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jamie Iles authored and Herbert Xu committed Aug 10, 2011
1 parent 30343ef commit b64dc04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/picoxcell_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit b64dc04

Please sign in to comment.