]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.arch/x2APIC_PATCH_02_228324076234ca6a8cd34be89be78022773459f1
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.arch / x2APIC_PATCH_02_228324076234ca6a8cd34be89be78022773459f1
CommitLineData
00e5a55c
BS
1From: Suresh Siddha <suresh.b.siddha@intel.com>
2Subject: dmar: use list_for_each_entry_safe() in dmar_dev_scope_init()
3References: fate #303948 and fate #303984
4Patch-Mainline: queued for .28
5Commit-ID: 228324076234ca6a8cd34be89be78022773459f1
6
7Signed-off-by: Thomas Renninger <trenn@suse.de>
8
9In dmar_dev_scope_init(), functions called under for_each_drhd_unit()/
10for_each_rmrr_units() can delete the list entry under some error conditions.
11
12So we should use list_for_each_entry_safe() for safe traversal.
13
14Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
15Acked-by: Yinghai Lu <yhlu.kernel@gmail.com>
16Signed-off-by: Ingo Molnar <mingo@elte.hu>
17
18---
19 drivers/pci/dmar.c | 8 ++++----
20 1 file changed, 4 insertions(+), 4 deletions(-)
21
22Index: linux-2.6.26/drivers/pci/dmar.c
23===================================================================
24--- linux-2.6.26.orig/drivers/pci/dmar.c
25+++ linux-2.6.26/drivers/pci/dmar.c
26@@ -373,10 +373,10 @@ dmar_find_matched_drhd_unit(struct pci_d
27
28 int __init dmar_dev_scope_init(void)
29 {
30- struct dmar_drhd_unit *drhd;
31+ struct dmar_drhd_unit *drhd, *drhd_n;
32 int ret = -ENODEV;
33
34- for_each_drhd_unit(drhd) {
35+ list_for_each_entry_safe(drhd, drhd_n, &dmar_drhd_units, list) {
36 ret = dmar_parse_dev(drhd);
37 if (ret)
38 return ret;
39@@ -384,8 +384,8 @@ int __init dmar_dev_scope_init(void)
40
41 #ifdef CONFIG_DMAR
42 {
43- struct dmar_rmrr_unit *rmrr;
44- for_each_rmrr_units(rmrr) {
45+ struct dmar_rmrr_unit *rmrr, *rmrr_n;
46+ list_for_each_entry_safe(rmrr, rmrr_n, &dmar_rmrr_units, list) {
47 ret = rmrr_parse_dev(rmrr);
48 if (ret)
49 return ret;