All of lore.kernel.org
 help / color / mirror / Atom feed
* re: iommu/amd: Put IOMMUv2 devices in a direct mapped domain
@ 2015-06-10 15:36 Dan Carpenter
  2015-06-11  7:35 ` [PATCH] iommu/amd: Handle errors returned from iommu_init_device Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-06-10 15:36 UTC (permalink / raw)
  To: jroedel-l3A5Bk7waGM; +Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Hello Joerg Roedel,

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

The patch 0a3da4517107: "iommu/amd: Put IOMMUv2 devices in a direct 
mapped domain" from May 28, 2015, leads to the following Smatch 
complaint:

drivers/iommu/amd_iommu.c:2285 amd_iommu_add_device()
	 error: we previously assumed 'dev_data' could be null (see line 2279)

drivers/iommu/amd_iommu.c
  2278		dev_data = get_dev_data(dev);
  2279		if (dev_data && dev_data->iommu_v2)
                    ^^^^^^^^
Check.

  2280			iommu_request_dm_for_dev(dev);
  2281	
  2282		/* Domains are initialized for this device - have a look what we ended up with */
  2283		domain = iommu_get_domain_for_dev(dev);
  2284		if (domain->type == IOMMU_DOMAIN_IDENTITY) {
  2285			dev_data->passthrough = true;
                        ^^^^^^^^^^
Unchecked dereference.

  2286			dev->archdata.dma_ops = &nommu_dma_ops;
  2287		} else {

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-11  7:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 15:36 iommu/amd: Put IOMMUv2 devices in a direct mapped domain Dan Carpenter
2015-06-11  7:35 ` [PATCH] iommu/amd: Handle errors returned from iommu_init_device Joerg Roedel

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.