From: Huang Ying Date: Mon, 16 Nov 2009 13:52:22 +0000 (+0800) Subject: crypto: gcm - fix another complete call in complete fuction X-Git-Tag: v2.6.32~32^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62c5593aea4b71d61dc0f37fea96c556c158a042;p=pandora-kernel.git crypto: gcm - fix another complete call in complete fuction The flow of the complete function (xxx_done) in gcm.c is as follow: void complete(struct crypto_async_request *areq, int err) { struct aead_request *req = areq->data; if (!err) { err = async_next_step(); if (err == -EINPROGRESS || err == -EBUSY) return; } complete_for_next_step(areq, err); } But *areq may be destroyed in async_next_step(), this makes complete_for_next_step() can not work properly. To fix this, one of following methods is used for each complete function. - Add a __complete() for each complete(), which accept struct aead_request *req instead of areq, so avoid using areq after it is destroyed. - Expand complete_for_next_step(). The fixing method is based on the idea of Herbert Xu. Signed-off-by: Huang Ying Signed-off-by: Herbert Xu --- Reading git-diff-tree failed