From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: target-devel@vger.kernel.org
Subject: Re: [bug report] target/cxgbit: Fix endianness annotations
Date: Wed, 23 Oct 2019 02:05:24 +0000 [thread overview]
Message-ID: <yq1tv80dxnf.fsf@oracle.com> (raw)
In-Reply-To: <20191014115025.GA9350@mwanda>
Bart?
> 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,
>
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2019-10-23 2:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 11:50 [bug report] target/cxgbit: Fix endianness annotations Dan Carpenter
2019-10-23 2:05 ` Martin K. Petersen [this message]
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=yq1tv80dxnf.fsf@oracle.com \
--to=martin.petersen@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.