All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vesely, Jan" <Jan.Vesely-5C7GfCeVMHo@public.gmane.org>
To: "joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org"
	<joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/2] iommu/amd: Destroy api_lock mutex when freeing domain
Date: Wed, 15 Jun 2016 17:53:15 +0000	[thread overview]
Message-ID: <1466013192.3265.74.camel@amd.com> (raw)
In-Reply-To: <20160615115406.GF26566-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>

On Wed, 2016-06-15 at 13:54 +0200, joro@8bytes.org wrote:
> On Thu, Jun 09, 2016 at 03:48:44PM +0000, Vesely, Jan wrote:
> > On Sat, 2016-05-21 at 14:11 -0400, Jan Vesely wrote:
> > > From: Jan Vesely <jan.vesely@amd.com>
> > > 
> > > Signed-off-by: Jan Vesely <jan.vesely@amd.com>
> > > ---
> > >  drivers/iommu/amd_iommu.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/iommu/amd_iommu.c
> > > b/drivers/iommu/amd_iommu.c
> > > index 17c76f2..4ff5e40 100644
> > > --- a/drivers/iommu/amd_iommu.c
> > > +++ b/drivers/iommu/amd_iommu.c
> > > @@ -3016,6 +3016,7 @@ static void protection_domain_free(struct
> > > protection_domain *domain)
> > >  
> > >  	del_domain_from_list(domain);
> > >  
> > > +	mutex_destroy(&domain->api_lock);
> > >  	if (domain->id)
> > >  		domain_id_free(domain->id);
> > >  
> > 
> > ping
> 
> Your patches lack commit messages, please add a more detailed
> description of what you are fixing and why. Please also add 'Fixes:'
> tags when resubmitting. The changes itself look good to me.

There are no specific bugs/oopses that these patches fix (that I'm
aware of). Both were found while I was familiarizing myself with the
code looking for memory corruption (which turned out to be [0]).
Either issue would be very difficult to hit in the wild and
mutex_destroy is empty unless you compile using CONFIG_DEBUG_MUTEXES.

Jan

[0] https://lkml.org/lkml/2016/3/7/1087

> 
> 
> 	Joerg
> 
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: "Vesely, Jan" <Jan.Vesely@amd.com>
To: "joro@8bytes.org" <joro@8bytes.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>
Subject: Re: [PATCH 2/2] iommu/amd: Destroy api_lock mutex when freeing domain
Date: Wed, 15 Jun 2016 17:53:15 +0000	[thread overview]
Message-ID: <1466013192.3265.74.camel@amd.com> (raw)
In-Reply-To: <20160615115406.GF26566@8bytes.org>

On Wed, 2016-06-15 at 13:54 +0200, joro@8bytes.org wrote:
> On Thu, Jun 09, 2016 at 03:48:44PM +0000, Vesely, Jan wrote:
> > On Sat, 2016-05-21 at 14:11 -0400, Jan Vesely wrote:
> > > From: Jan Vesely <jan.vesely@amd.com>
> > > 
> > > Signed-off-by: Jan Vesely <jan.vesely@amd.com>
> > > ---
> > >  drivers/iommu/amd_iommu.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/iommu/amd_iommu.c
> > > b/drivers/iommu/amd_iommu.c
> > > index 17c76f2..4ff5e40 100644
> > > --- a/drivers/iommu/amd_iommu.c
> > > +++ b/drivers/iommu/amd_iommu.c
> > > @@ -3016,6 +3016,7 @@ static void protection_domain_free(struct
> > > protection_domain *domain)
> > >  
> > >  	del_domain_from_list(domain);
> > >  
> > > +	mutex_destroy(&domain->api_lock);
> > >  	if (domain->id)
> > >  		domain_id_free(domain->id);
> > >  
> > 
> > ping
> 
> Your patches lack commit messages, please add a more detailed
> description of what you are fixing and why. Please also add 'Fixes:'
> tags when resubmitting. The changes itself look good to me.

There are no specific bugs/oopses that these patches fix (that I'm
aware of). Both were found while I was familiarizing myself with the
code looking for memory corruption (which turned out to be [0]).
Either issue would be very difficult to hit in the wild and
mutex_destroy is empty unless you compile using CONFIG_DEBUG_MUTEXES.

Jan

[0] https://lkml.org/lkml/2016/3/7/1087

> 
> 
> 	Joerg
> 

  parent reply	other threads:[~2016-06-15 17:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-21 18:11 [PATCH 1/2] iommu/amd: Remove entry from the list before freeing it Jan Vesely
2016-05-21 18:11 ` [PATCH 2/2] iommu/amd: Destroy api_lock mutex when freeing domain Jan Vesely
     [not found]   ` <1463854264-26445-2-git-send-email-jan.vesely-kgbqMDwikbSVc3sceRu5cw@public.gmane.org>
2016-06-09 15:48     ` Vesely, Jan
2016-06-09 15:48       ` Vesely, Jan
2016-06-15 11:54       ` joro
     [not found]         ` <20160615115406.GF26566-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-06-15 17:53           ` Vesely, Jan [this message]
2016-06-15 17:53             ` Vesely, Jan
2016-06-15 20:53             ` Borislav Petkov
     [not found]               ` <20160615205311.GB19822-fF5Pk5pvG8Y@public.gmane.org>
2016-06-28 16:48                 ` Vesely, Jan
2016-06-28 16:48                   ` Vesely, Jan

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=1466013192.3265.74.camel@amd.com \
    --to=jan.vesely-5c7gfcevmho@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.