[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] amd/iommu: add missing unlock in iommu_read_log


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 19 Feb 2020 12:32:16 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Wed, 19 Feb 2020 11:32:36 +0000
  • Ironport-sdr: t555AI2JJub8vHpi48dH0dpHeF2DyQn/TBQZSmiahpO/GD9gQf6IxcvzWeSAMJHgFxHTeWh/iF lFv0+/R90vqvlo+oO/NTssKjppvQttPTavtPZhddfLw+Ce11TyJK+vAKIQANx28RcDxlRGbPup xTyRBgugeOaChiPlKjd/ucp0RuqI5GU7cnV+WhXJ1jk9F95Jnj407izzPRIbKwZ13aeCmwQb2O 8hi/miwyMtcBxNGb+5oPt6yJ7M4nRzL20xgv2QdMj30ndf4B+m1SWxBsqNCvwkxrX3EkXcV7M+ KYU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Feb 19, 2020 at 11:23:40AM +0000, Andrew Cooper wrote:
> On 19/02/2020 11:19, Roger Pau Monne wrote:
> > Reported-by: Coverity
> > CID: 1458632
> 
> We tend to use just Coverity-ID: 1458632

Oh, I got confused with FreeBSD usage of CID.

> 
> > Fixes: 709d3ddea2d5e ('AMD/IOMMU: Common the #732/#733 errata handling in 
> > iommu_read_log()')
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> > ---
> >  xen/drivers/passthrough/amd/iommu_init.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/xen/drivers/passthrough/amd/iommu_init.c 
> > b/xen/drivers/passthrough/amd/iommu_init.c
> > index 4c86848c52..e93a090830 100644
> > --- a/xen/drivers/passthrough/amd/iommu_init.c
> > +++ b/xen/drivers/passthrough/amd/iommu_init.c
> > @@ -338,6 +338,7 @@ static int iommu_read_log(struct amd_iommu *iommu,
> >              {
> >                  AMD_IOMMU_DEBUG("AMD-Vi: No entry written to %s Log\n",
> >                                  log == &iommu->event_log ? "Event" : 
> > "PPR");
> > +                spin_unlock(&log->lock);
> 
> A goto out would be cleaner.  Can fix up on commit if you're happy?

That's fine, I don't have a preference. In such cases where a simple
unlock is required I tend to avoid the label as I know Jan prefers
avoiding them.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.