diff options
author | Gavin Shan | 2013-07-24 04:24:56 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt | 2013-07-24 06:18:47 +0200 |
commit | 9feed42e93d2625db86423cedf8b4b2bed00779e (patch) | |
tree | b0b7601fdd59bacaa9bbfb84b941eefe0ba1043b /arch/powerpc/include | |
parent | powerpc/eeh: Keep PE during hotplug (diff) | |
download | kernel-qcow2-linux-9feed42e93d2625db86423cedf8b4b2bed00779e.tar.gz kernel-qcow2-linux-9feed42e93d2625db86423cedf8b4b2bed00779e.tar.xz kernel-qcow2-linux-9feed42e93d2625db86423cedf8b4b2bed00779e.zip |
powerpc/eeh: Use safe list traversal when walking EEH devices
Currently, we're trasversing the EEH devices list using list_for_each_entry().
That's not safe enough because the EEH devices might be removed from
its parent PE while doing iteration. The patch replaces that with
list_for_each_entry_safe().
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/eeh.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index 2ce22d7b71a0..e8c411b63caf 100644 --- a/arch/powerpc/include/asm/eeh.h +++ b/arch/powerpc/include/asm/eeh.h @@ -74,8 +74,8 @@ struct eeh_pe { struct list_head child; /* Child PEs */ }; -#define eeh_pe_for_each_dev(pe, edev) \ - list_for_each_entry(edev, &pe->edevs, list) +#define eeh_pe_for_each_dev(pe, edev, tmp) \ + list_for_each_entry_safe(edev, tmp, &pe->edevs, list) /* * The struct is used to trace EEH state for the associated |