From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: mlx5: Add driver for Mellanox Connect-IB adapters
Date: Fri, 20 Jun 2014 20:58:32 +0300 [thread overview]
Message-ID: <20140620175832.GA11900@mwanda> (raw)
Hello Eli Cohen,
This is a semi-automatic email about new static checker warnings.
The patch e126ba97dba9: "mlx5: Add driver for Mellanox Connect-IB
adapters" from Jul 7, 2013, leads to the following Smatch complaint:
drivers/infiniband/hw/mlx5/qp.c:979 create_qp_common()
error: we previously assumed 'pd->uobject' could be null (see line 847)
drivers/infiniband/hw/mlx5/qp.c
846 if (pd) {
847 if (pd->uobject) {
^^^^^^^^^^^
There are a bunch of checks for pd->uobject.
848 mlx5_ib_dbg(dev, "requested sq_wqe_count (%d)\n", ucmd.sq_wqe_count);
849 if (ucmd.rq_wqe_shift != qp->rq.wqe_shift ||
850 ucmd.rq_wqe_count != qp->rq.wqe_cnt) {
851 mlx5_ib_dbg(dev, "invalid rq params\n");
852 return -EINVAL;
853 }
854 if (ucmd.sq_wqe_count > dev->mdev.caps.max_wqes) {
855 mlx5_ib_dbg(dev, "requested sq_wqe_count (%d) > max allowed (%d)\n",
[ snip ]
971 qp->doorbell_qpn = swab32(qp->mqp.qpn << 8);
972
973 qp->mqp.event = mlx5_ib_qp_event;
974
975 return 0;
976
977 err_create:
978 if (qp->create_type == MLX5_QP_USER)
979 destroy_qp_user(pd, qp);
^^^^^^^^^^^^^^^
But we dereference it inside destroy_qp_user() unconditionally.
980 else if (qp->create_type == MLX5_QP_KERNEL)
981 destroy_qp_kernel(dev, qp);
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:[~2014-06-20 17:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 17:58 Dan Carpenter [this message]
2014-06-26 10:37 ` mlx5: Add driver for Mellanox Connect-IB adapters Eli Cohen
-- strict thread matches above, loose matches on Subject: below --
2013-07-10 10:55 Dan Carpenter
[not found] ` <20130710105538.GB31232-dZEljifmRObu9KfB+GxooP8+0UxHXcjY@public.gmane.org>
2013-07-15 14:29 ` Or Gerlitz
2013-07-15 15:18 ` Eli Cohen
2013-07-10 10:54 Dan Carpenter
[not found] ` <20130710105415.GA31232-dZEljifmRObu9KfB+GxooP8+0UxHXcjY@public.gmane.org>
2013-07-10 11:28 ` Or Gerlitz
2013-07-10 20:16 ` Josh Triplett
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=20140620175832.GA11900@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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.