public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: VMCI: queue pairs implementation.
Date: Thu, 30 Jan 2014 11:52:26 +0000	[thread overview]
Message-ID: <20140130115226.GD12734@elgon.mountain> (raw)
In-Reply-To: <20130110193238.GB17997@elgon.mountain>

Hello George Zhang,

The patch 06164d2b72aa: "VMCI: queue pairs implementation." from Jan
8, 2013, leads to the following static checker warning:

	drivers/misc/vmw_vmci/vmci_queue_pair.c:1145 qp_detatch_guest_work()
	warn: we tested 'entry' before and it was 'true'"

drivers/misc/vmw_vmci/vmci_queue_pair.c
  1140          entry->qp.ref_count--;
  1141          if (entry->qp.ref_count = 0)
  1142                  qp_list_remove_entry(&qp_guest_endpoints, &entry->qp);
  1143  
  1144          /* If we didn't remove the entry, this could change once we unlock. */
  1145          if (entry)
                    ^^^^^
This can never happen.  The comment makes me think we intended to test
something else, but I'm not sure what?

  1146                  ref_count = entry->qp.ref_count;
  1147  
  1148          mutex_unlock(&qp_guest_endpoints.mutex);

regards,
dan carpenter


      parent reply	other threads:[~2014-01-30 11:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 19:32 VMCI: queue pairs implementation Dan Carpenter
2013-01-10 19:36 ` George Zhang
2014-01-30 11:51 ` Dan Carpenter
2014-01-30 11:52 ` Dan Carpenter [this message]

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=20140130115226.GD12734@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@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