From: Dan Carpenter <dan.carpenter@oracle.com>
To: schalla@marvell.com
Cc: SrujanaChalla <schalla@marvell.com>, linux-crypto@vger.kernel.org
Subject: [bug report] crypto: marvell - add the Virtual Function driver for CPT
Date: Mon, 6 Apr 2020 13:38:05 +0300 [thread overview]
Message-ID: <20200406103805.GA34106@mwanda> (raw)
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
reply other threads:[~2020-04-06 10:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200406103805.GA34106@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-crypto@vger.kernel.org \
--cc=schalla@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).