From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: IB/core: Use GID table in AH creation and dmac resolution
Date: Tue, 3 Nov 2015 16:11:40 +0300 [thread overview]
Message-ID: <20151103131140.GA12150@mwanda> (raw)
Hello Matan Barak,
This is a semi-automatic email about new static checker warnings.
The patch dbf727de7440: "IB/core: Use GID table in AH creation and
dmac resolution" from Oct 15, 2015, leads to the following Smatch
complaint:
drivers/infiniband/hw/ocrdma/ocrdma_ah.c:157 ocrdma_create_ah()
error: we previously assumed 'sgid_attr.ndev' could be null (see line 146)
drivers/infiniband/hw/ocrdma/ocrdma_ah.c
145 }
146 if (sgid_attr.ndev) {
^^^^^^^^^^^^^^
Patch introduces a NULL check.
147 if (is_vlan_dev(sgid_attr.ndev))
148 vlan_tag = vlan_dev_vlan_id(sgid_attr.ndev);
149 dev_put(sgid_attr.ndev);
150 }
151
152 if ((pd->uctx) &&
153 (!rdma_is_multicast_addr((struct in6_addr *)attr->grh.dgid.raw)) &&
154 (!rdma_link_local_addr((struct in6_addr *)attr->grh.dgid.raw))) {
155 status = rdma_addr_find_dmac_by_grh(&sgid, &attr->grh.dgid,
156 attr->dmac, &vlan_tag,
157 sgid_attr.ndev->ifindex);
^^^^^^^^^^^^^^^^
Patch introduces this new dereference. The warning might be a false
positive if "pd->uctx" or rdma_is_multicast_addr() imply it's non-NULL
but I don't know this code well enough to say for sure. Hence this
email. :)
158 if (status) {
159 pr_err("%s(): Failed to resolve dmac from gid."
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2015-11-03 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 13:11 Dan Carpenter [this message]
2015-11-03 13:44 ` IB/core: Use GID table in AH creation and dmac resolution Matan Barak
[not found] ` <CAOBf=msvVXCw129URdiWTLogGOpAjzboCB=h0haTh4wJZG5XXw@mail.gmail.com>
[not found] ` <CAOBf=msvVXCw129URdiWTLogGOpAjzboCB=h0haTh4wJZG5XXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-04 4:28 ` Somnath Kotur
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=20151103131140.GA12150@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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.