* Patch "iommu: Don't overwrite domain pointer when there is no default_domain" has been added to the 4.5-stable tree
@ 2016-04-17 11:50 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-17 11:50 UTC (permalink / raw)
To: jroedel, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
iommu: Don't overwrite domain pointer when there is no default_domain
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iommu-don-t-overwrite-domain-pointer-when-there-is-no-default_domain.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From eebb8034a5be8c2177cbf07ca2ecd2ff8a058958 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de>
Date: Mon, 4 Apr 2016 15:47:48 +0200
Subject: iommu: Don't overwrite domain pointer when there is no default_domain
From: Joerg Roedel <jroedel@suse.de>
commit eebb8034a5be8c2177cbf07ca2ecd2ff8a058958 upstream.
IOMMU drivers that do not support default domains, but make
use of the the group->domain pointer can get that pointer
overwritten with NULL on device add/remove.
Make sure this can't happen by only overwriting the domain
pointer when it is NULL.
Fixes: 1228236de5f9 ('iommu: Move default domain allocation to iommu_group_get_for_dev()')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/iommu/iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -848,7 +848,8 @@ struct iommu_group *iommu_group_get_for_
if (!group->default_domain) {
group->default_domain = __iommu_domain_alloc(dev->bus,
IOMMU_DOMAIN_DMA);
- group->domain = group->default_domain;
+ if (!group->domain)
+ group->domain = group->default_domain;
}
ret = iommu_group_add_device(group, dev);
Patches currently in stable-queue which might be from jroedel@suse.de are
queue-4.5/iommu-don-t-overwrite-domain-pointer-when-there-is-no-default_domain.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-17 11:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-17 11:50 Patch "iommu: Don't overwrite domain pointer when there is no default_domain" has been added to the 4.5-stable tree gregkh
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.