Merge "qcedev: Fix null-ptr-deref in qcedev_cipher_req_cb"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
1a392c58fd
@@ -396,7 +396,7 @@ void qcedev_cipher_req_cb(void *cookie, unsigned char *icv,
|
||||
return;
|
||||
qcedev_areq = podev->active_command;
|
||||
|
||||
if (iv)
|
||||
if (iv && qcedev_areq)
|
||||
memcpy(&qcedev_areq->cipher_op_req.iv[0], iv,
|
||||
qcedev_areq->cipher_op_req.ivlen);
|
||||
tasklet_schedule(&podev->done_tasklet);
|
||||
@@ -524,7 +524,7 @@ void qcedev_offload_cipher_req_cb(void *cookie, unsigned char *icv,
|
||||
return;
|
||||
qcedev_areq = podev->active_command;
|
||||
|
||||
if (iv)
|
||||
if (iv && qcedev_areq)
|
||||
memcpy(&qcedev_areq->offload_cipher_op_req.iv[0], iv,
|
||||
qcedev_areq->offload_cipher_op_req.ivlen);
|
||||
|
||||
|
Reference in New Issue
Block a user