Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: bmt@zurich.ibm.com
Cc: linux-rdma@vger.kernel.org
Subject: [bug report] rdma/siw: connection management
Date: Mon, 19 Aug 2019 15:09:43 +0300	[thread overview]
Message-ID: <20190819120943.GA27514@mwanda> (raw)

Hello Bernard Metzler,

This is a semi-automatic email about new static checker warnings.

The patch 6c52fdc244b5: "rdma/siw: connection management" from Jun
20, 2019, leads to the following Smatch complaint:

    drivers/infiniband/sw/siw/siw_cm.c:1518 siw_connect()
    error: we previously assumed 'qp' could be null (see line 1372)

drivers/infiniband/sw/siw/siw_cm.c
  1371		qp = siw_qp_id2obj(sdev, params->qpn);
  1372		if (!qp) {
                    ^^^
NULL

  1373			WARN(1, "[QP %u] does not exist\n", params->qpn);
  1374			rv = -EINVAL;
  1375			goto error;
                        ^^^^^^^^^^

  1376		}
  1377		if (v4)
  1378			siw_dbg_qp(qp,

[ snip ]

  1508		if (rv >= 0) {
  1509			rv = siw_cm_queue_work(cep, SIW_CM_WORK_MPATIMEOUT);
  1510			if (!rv) {
  1511				siw_dbg_cep(cep, "id 0x%p, [QP %u]: exit\n", id,
  1512					    qp_id(qp));
  1513				siw_cep_set_free(cep);
  1514				return 0;
  1515			}
  1516		}
  1517	error:
  1518		siw_dbg_qp(qp, "failed: %d\n", rv);
                           ^^
NULL dereference.

  1519	
  1520		if (cep) {

regards,
dan carpenter

             reply	other threads:[~2019-08-19 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 12:09 Dan Carpenter [this message]
2019-08-19 14:02 ` [bug report] rdma/siw: connection management Bernard Metzler
  -- strict thread matches above, loose matches on Subject: below --
2023-10-25 11:56 Dan Carpenter
2023-10-25 14:31 ` Bernard Metzler
2023-10-25 15:02   ` Dan Carpenter

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=20190819120943.GA27514@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=bmt@zurich.ibm.com \
    --cc=linux-rdma@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox