All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: baolu.lu@linux.intel.com
Cc: iommu@lists.linux-foundation.org
Subject: [bug report] iommu/vt-d: Allocate/register iopf queue for sva devices
Date: Fri, 18 Jun 2021 09:55:47 +0300	[thread overview]
Message-ID: <YMxDc2Wtn+sMAYDj@mwanda> (raw)

Hello Lu Baolu,

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

The patch 4c82b88696ac: "iommu/vt-d: Allocate/register iopf queue for 
sva devices" from Jun 10, 2021, leads to the following Smatch 
complaint:

    drivers/iommu/intel/iommu.c:5335 intel_iommu_enable_sva()
    warn: variable dereferenced before check 'info' (see line 5332)

drivers/iommu/intel/iommu.c
  5331		struct device_domain_info *info = get_domain_info(dev);
  5332		struct intel_iommu *iommu = info->iommu;
                                            ^^^^^^^^^^^
Dereferenced

  5333		int ret;
  5334	
  5335		if (!info || !iommu || dmar_disabled)
                    ^^^^^
Checked too late.  <dramatic prairie dog.gif>


  5336			return -EINVAL;
  5337	

regards,
dan carpenter
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

             reply	other threads:[~2021-06-18  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  6:55 Dan Carpenter [this message]
2021-06-18  7:30 ` [bug report] iommu/vt-d: Allocate/register iopf queue for sva devices Lu Baolu

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=YMxDc2Wtn+sMAYDj@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux-foundation.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.