summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-01-04 09:46:11 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-01-10 16:37:31 +0300
commit06bbf753476dab23eb262cb5fbab6d6d277a0ba3 (patch)
tree7e65ade381ed83f80504c8ee4941da7396215b1b /drivers/crypto
parenta7773363624b034ab198c738661253d20a8055c2 (diff)
downloadlinux-06bbf753476dab23eb262cb5fbab6d6d277a0ba3.tar.xz
crypto: cavium/nitrox - Use after free in process_response_list()
We free "sr" and then dereference it on the next line. Fixes: c9613335bf4f ("crypto: cavium/nitrox - Added AEAD cipher support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/cavium/nitrox/nitrox_reqmgr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c
index e34e4df8fd24..fe070d75c842 100644
--- a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c
+++ b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c
@@ -567,10 +567,10 @@ static void process_response_list(struct nitrox_cmdq *cmdq)
/* ORH error code */
err = READ_ONCE(*sr->resp.orh) & 0xff;
- softreq_destroy(sr);
if (sr->callback)
sr->callback(sr->cb_arg, err);
+ softreq_destroy(sr);
req_completed++;
}