From: Dan Carpenter <dan.carpenter@oracle.com>
To: target-devel@vger.kernel.org
Subject: [bug report] target/cxgbit: Fix endianness annotations
Date: Mon, 14 Oct 2019 11:50:25 +0000 [thread overview]
Message-ID: <20191014115025.GA9350@mwanda> (raw)
Hello Bart Van Assche,
This is a semi-automatic email about new static checker warnings.
The patch 5cadafb236df: "target/cxgbit: Fix endianness annotations"
from Jan 13, 2017, leads to the following Smatch complaint:
drivers/target/iscsi/cxgbit/cxgbit_cm.c:1836 cxgbit_fw4_ack()
warn: variable dereferenced before check 'p' (see line 1834)
drivers/target/iscsi/cxgbit/cxgbit_cm.c
1833 struct sk_buff *p = cxgbit_sock_peek_wr(csk);
1834 const u32 csum = (__force u32)p->csum;
^^^^^^^
We moved this dereference earlier
1835
1836 if (unlikely(!p)) {
^
so now it's before the NULL check
1837 pr_err("csk 0x%p,%u, cr %u,%u+%u, empty.\n",
1838 csk, csk->tid, credits,
regards,
dan carpenter
next reply other threads:[~2019-10-14 11:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 11:50 Dan Carpenter [this message]
2019-10-23 2:05 ` [bug report] target/cxgbit: Fix endianness annotations Martin K. Petersen
2019-10-23 2:30 ` Bart Van Assche
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=20191014115025.GA9350@mwanda \
--to=dan.carpenter@oracle.com \
--cc=target-devel@vger.kernel.org \
/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.