From: <dan.carpenter@oracle.com>
To: <varun@chelsio.com>
Cc: linux-scsi@vger.kernel.org
Subject: [bug report] scsi: cxgb4i: Add support for iSCSI segmentation offload
Date: Fri, 10 Jul 2020 17:14:54 +0300 [thread overview]
Message-ID: <20200710141454.GA135495@mwanda> (raw)
Hello Varun Prakash,
This is a semi-automatic email about new static checker warnings.
The patch e33c2482289b: "scsi: cxgb4i: Add support for iSCSI
segmentation offload" from Jun 29, 2020, leads to the following
Smatch complaint:
drivers/scsi/cxgbi/libcxgbi.c:1892 cxgbi_conn_alloc_pdu()
warn: variable dereferenced before check 'cconn' (see line 1891)
drivers/scsi/cxgbi/libcxgbi.c
1890 struct cxgbi_conn *cconn = tcp_conn->dd_data;
1891 struct cxgbi_device *cdev = cconn->chba->cdev;
^^^^^^^^^^^
Unchecked dereference in old code.
1892 struct cxgbi_sock *csk = (cconn && cconn->cep) ? cconn->cep->csk : NULL;
^^^^^
New code adds a check for NULL but it's too late.
1893 struct iscsi_tcp_task *tcp_task = task->dd_data;
1894 struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task);
regards,
dan carpenter
next reply other threads:[~2020-07-10 14:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 14:14 dan.carpenter [this message]
2020-07-13 16:25 ` [bug report] scsi: cxgb4i: Add support for iSCSI segmentation offload Varun Prakash
-- strict thread matches above, loose matches on Subject: below --
2020-07-10 14:17 dan.carpenter
2020-07-10 14:29 ` Dan Carpenter
2020-07-13 16:41 ` Varun Prakash
2020-07-20 10:28 dan.carpenter
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=20200710141454.GA135495@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=varun@chelsio.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.