]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.arch/x2APIC_PATCH_02_228324076234ca6a8cd34be89be78022773459f1
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / x2APIC_PATCH_02_228324076234ca6a8cd34be89be78022773459f1
1 From: Suresh Siddha <suresh.b.siddha@intel.com>
2 Subject: dmar: use list_for_each_entry_safe() in dmar_dev_scope_init()
3 References: fate #303948 and fate #303984
4 Patch-Mainline: queued for .28
5 Commit-ID: 228324076234ca6a8cd34be89be78022773459f1
6
7 Signed-off-by: Thomas Renninger <trenn@suse.de>
8
9 In dmar_dev_scope_init(), functions called under for_each_drhd_unit()/
10 for_each_rmrr_units() can delete the list entry under some error conditions.
11
12 So we should use list_for_each_entry_safe() for safe traversal.
13
14 Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
15 Acked-by: Yinghai Lu <yhlu.kernel@gmail.com>
16 Signed-off-by: Ingo Molnar <mingo@elte.hu>
17
18 ---
19 drivers/pci/dmar.c | 8 ++++----
20 1 file changed, 4 insertions(+), 4 deletions(-)
21
22 Index: 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;