All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] iommu/amd: Restore IRTE.RemapEn bit after programming IRTE
@ 2020-09-09 11:46 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-09-09 11:46 UTC (permalink / raw)
  To: suravee.suthikulpanit; +Cc: iommu

Hello Suravee Suthikulpanit,

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

The patch 26e495f34107: "iommu/amd: Restore IRTE.RemapEn bit after
programming IRTE" from Sep 3, 2020, leads to the following Smatch
complaint:

    drivers/iommu/amd/iommu.c:3870 amd_iommu_deactivate_guest_mode()
    warn: variable dereferenced before check 'entry' (see line 3867)

drivers/iommu/amd/iommu.c
  3866		struct irq_cfg *cfg = ir_data->cfg;
  3867		u64 valid = entry->lo.fields_remap.valid;
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The patch adds a new dereference

  3868	
  3869		if (!AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir) ||
  3870		    !entry || !entry->lo.fields_vapic.guest_mode)
                    ^^^^^^
before "entry" has been checked for NULL.

  3871			return 0;
  3872	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-09 11:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-09 11:46 [bug report] iommu/amd: Restore IRTE.RemapEn bit after programming IRTE Dan Carpenter

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.