summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/cavium
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 21:37:31 +0800
commit06bbf753476dab23eb262cb5fbab6d6d277a0ba3 (patch)
tree7e65ade381ed83f80504c8ee4941da7396215b1b /drivers/crypto/cavium
parenta7773363624b034ab198c738661253d20a8055c2 (diff)
downloadlinux-stable-06bbf753476dab23eb262cb5fbab6d6d277a0ba3.tar.gz
linux-stable-06bbf753476dab23eb262cb5fbab6d6d277a0ba3.tar.bz2
linux-stable-06bbf753476dab23eb262cb5fbab6d6d277a0ba3.zip
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/cavium')
-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++;
}