[bug report] crypto: marvell - add the Virtual Function driver for CPT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello SrujanaChalla,

This is a semi-automatic email about new static checker warnings.

The patch 10b4f09491bf: "crypto: marvell - add the Virtual Function 
driver for CPT" from Mar 13, 2020, leads to the following Smatch 
complaint:

    drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:132 otx_cpt_aead_callback()
    warn: variable dereferenced before check 'cpt_info' (see line 121)

drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
   120	
   121		cpt_req = cpt_info->req;
                          ^^^^^^^^^^^^^
Dereference

   122		if (!status) {
   123			/*
   124			 * When selected cipher is NULL we need to manually
   125			 * verify whether calculated hmac value matches
   126			 * received hmac value
   127			 */
   128			if (cpt_req->req_type == OTX_CPT_AEAD_ENC_DEC_NULL_REQ &&
   129			    !cpt_req->is_enc)
   130				status = validate_hmac_cipher_null(cpt_req);
   131		}
   132		if (cpt_info) {
                   ^^^^^^^^^
Check is too late.

   133			pdev = cpt_info->pdev;
   134			do_request_cleanup(pdev, cpt_info);

regards,
dan carpenter



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux