From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: IB/mlx5: Add create and destroy functionality for Raw Packet QP
Date: Tue, 26 Jan 2016 04:08:46 +0300 [thread overview]
Message-ID: <20160126010846.GA13162@mwanda> (raw)
Hello majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
This is a semi-automatic email about new static checker warnings.
The patch 0fb2ed66a14c: "IB/mlx5: Add create and destroy
functionality for Raw Packet QP" from Jan 14, 2016, leads to the
following Smatch complaint:
drivers/infiniband/hw/mlx5/qp.c:1629 mlx5_ib_create_qp()
error: we previously assumed 'pd' could be null (see line 1616)
drivers/infiniband/hw/mlx5/qp.c
1615
1616 if (pd) {
^^
Check for NULL.
1617 dev = to_mdev(pd->device);
1618 } else {
1619 /* being cautious here */
1620 if (init_attr->qp_type != IB_QPT_XRC_TGT &&
1621 init_attr->qp_type != MLX5_IB_QPT_REG_UMR) {
1622 pr_warn("%s: no PD for transport %s\n", __func__,
1623 ib_qp_type_str(init_attr->qp_type));
1624 return ERR_PTR(-EINVAL);
1625 }
1626 dev = to_mdev(to_mxrcd(init_attr->xrcd)->ibxrcd.device);
1627
1628 if (init_attr->qp_type == IB_QPT_RAW_PACKET) {
1629 if (!pd->uobject) {
^^^^^^^^^^^
Patch adds new NULL dereferences.
1630 mlx5_ib_dbg(dev, "Raw Packet QP is not supported for kernel consumers\n");
1631 return ERR_PTR(-EINVAL);
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:[~2016-01-26 1:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 1:08 Dan Carpenter [this message]
2016-01-26 8:48 ` IB/mlx5: Add create and destroy functionality for Raw Packet QP Majd Dibbiny
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=20160126010846.GA13162@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=majd-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox