From: Joerg Roedel <joro@8bytes.org>
To: Greg Edwards <gedwards@ddn.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/vt-d: fix race between free_irte() and get_irte()
Date: Wed, 23 Jul 2014 17:10:40 +0200 [thread overview]
Message-ID: <20140723151040.GB14017@8bytes.org> (raw)
In-Reply-To: <20140723144917.GA26986@psuche.datadirectnet.com>
On Wed, Jul 23, 2014 at 08:49:17AM -0600, Greg Edwards wrote:
> On Wed, Jul 23, 2014 at 04:40:24PM +0200, Joerg Roedel wrote:
> > On Tue, Jul 22, 2014 at 08:27:19AM -0600, Greg Edwards wrote:
> >> get_irte() can race with free_irte() and dereference a NULL iommu
> >> pointer.
> >
> > Have you seen any real occurance of this race? Get_irte is called in the
> > set_affinity path, how can that race with the irq being freed?
>
> Yes, that's how we hit it. A process was setting the CPU affinity while
> QEMU was releasing the IRQ. We have a CI stress test that turned this
> up.
Can you update the commit message with the details of how this race can
be triggered, ideally with a stack-trace of a real crash you triggered
because of this issue?
Thanks,
Joerg
WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Greg Edwards <gedwards-LfVdkaOWEx8@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] iommu/vt-d: fix race between free_irte() and get_irte()
Date: Wed, 23 Jul 2014 17:10:40 +0200 [thread overview]
Message-ID: <20140723151040.GB14017@8bytes.org> (raw)
In-Reply-To: <20140723144917.GA26986-+5IcJesBrg1QnCaYh1JbbuXjVpU8mP+x@public.gmane.org>
On Wed, Jul 23, 2014 at 08:49:17AM -0600, Greg Edwards wrote:
> On Wed, Jul 23, 2014 at 04:40:24PM +0200, Joerg Roedel wrote:
> > On Tue, Jul 22, 2014 at 08:27:19AM -0600, Greg Edwards wrote:
> >> get_irte() can race with free_irte() and dereference a NULL iommu
> >> pointer.
> >
> > Have you seen any real occurance of this race? Get_irte is called in the
> > set_affinity path, how can that race with the irq being freed?
>
> Yes, that's how we hit it. A process was setting the CPU affinity while
> QEMU was releasing the IRQ. We have a CI stress test that turned this
> up.
Can you update the commit message with the details of how this race can
be triggered, ideally with a stack-trace of a real crash you triggered
because of this issue?
Thanks,
Joerg
next prev parent reply other threads:[~2014-07-23 15:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 14:27 [PATCH] iommu/vt-d: fix race between free_irte() and get_irte() Greg Edwards
2014-07-22 14:27 ` Greg Edwards
2014-07-23 14:40 ` Joerg Roedel
2014-07-23 14:40 ` Joerg Roedel
2014-07-23 14:49 ` Greg Edwards
2014-07-23 14:49 ` Greg Edwards
2014-07-23 15:10 ` Joerg Roedel [this message]
2014-07-23 15:10 ` Joerg Roedel
2014-07-23 16:13 ` [PATCH v2] iommu/vt-d: race setting IRQ CPU affinity while freeing IRQ Greg Edwards
2014-07-23 16:13 ` Greg Edwards
2014-07-29 10:45 ` Joerg Roedel
2014-07-29 10:45 ` Joerg Roedel
2014-07-29 17:21 ` Greg Edwards
2014-07-29 17:21 ` Greg Edwards
2014-07-31 11:49 ` Joerg Roedel
2014-07-31 11:49 ` Joerg Roedel
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=20140723151040.GB14017@8bytes.org \
--to=joro@8bytes.org \
--cc=dwmw2@infradead.org \
--cc=gedwards@ddn.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.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.