From: Jerry Hoemann <jerry.hoemann-VXdhtT5mjnY@public.gmane.org>
To: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Myron Stowe <mstowe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Subject: Re: [PATCH 2/2] iommu/vt-d: Remove dead code in device_notifier
Date: Wed, 17 Dec 2014 14:41:44 -0700 [thread overview]
Message-ID: <20141217214144.GB11569@anatevka.fc.hp.com> (raw)
In-Reply-To: <1418813017-24888-2-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
On Wed, Dec 17, 2014 at 11:43:37AM +0100, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
>
> This code only runs when action == BUS_NOTIFY_REMOVED_DEVICE,
> so it can't be BUS_NOTIFY_DEL_DEVICE.
>
> Signed-off-by: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
> ---
> drivers/iommu/intel-iommu.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> index 7610121..40dfbc0 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -4029,14 +4029,6 @@ static int device_notifier(struct notifier_block *nb,
> if (action != BUS_NOTIFY_REMOVED_DEVICE)
> return 0;
>
> - /*
> - * If the device is still attached to a device driver we can't
> - * tear down the domain yet as DMA mappings may still be in use.
> - * Wait for the BUS_NOTIFY_UNBOUND_DRIVER event to do that.
> - */
> - if (action == BUS_NOTIFY_DEL_DEVICE && dev->driver != NULL)
> - return 0;
> -
> domain = find_domain(dev);
> if (!domain)
> return 0;
> --
> 1.9.1
Joerg,
Tested this along w/ other patch of the set.
Instrumentation showed that the removed code wouldn't have been executed
during VM power on/power off.
Thanks!
Tested-by: Jerry Hoemann <jerry.hoemann-VXdhtT5mjnY@public.gmane.org>
--
----------------------------------------------------------------------------
Jerry Hoemann Software Engineer Hewlett-Packard
3404 E Harmony Rd. MS 36 phone: (970) 898-1022
Ft. Collins, CO 80528 FAX: (970) 898-0707
email: jerry.hoemann-VXdhtT5mjnY@public.gmane.org
----------------------------------------------------------------------------
next prev parent reply other threads:[~2014-12-17 21:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 10:43 [PATCH 1/2] iommu/vt-d: Fix dmar_domain leak in iommu_attach_device Joerg Roedel
[not found] ` <1418813017-24888-1-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-12-17 10:43 ` [PATCH 2/2] iommu/vt-d: Remove dead code in device_notifier Joerg Roedel
[not found] ` <1418813017-24888-2-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-12-17 21:41 ` Jerry Hoemann [this message]
2014-12-17 21:37 ` [PATCH 1/2] iommu/vt-d: Fix dmar_domain leak in iommu_attach_device Jerry Hoemann
[not found] ` <20141217213747.GA11569-dMAi7lA+vBPDUbYHzcRnttBPR1lH4CV8@public.gmane.org>
2015-01-05 10:59 ` 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=20141217214144.GB11569@anatevka.fc.hp.com \
--to=jerry.hoemann-vxdhtt5mjny@public.gmane.org \
--cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
--cc=jroedel-l3A5Bk7waGM@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mstowe-H+wXaHxf7aLQT0dZR+AlfA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox