This is a note to let you know that I've just added the patch titled
x86/amd-iommu: Fix 3 possible endless loops
to the 2.6.33-longterm tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.33.git;a=summary
The filename of the patch is:
x86-amd-iommu-fix-3-possible-endless-loops.patch
and it can be found in the queue-2.6.33 subdirectory.
If you, or anyone else, feels it should not be added to the 2.6.33 longterm
tree,
please let <[email protected]> know about it.
>From 0de66d5b35ee148455e268b2782873204ffdef4b Mon Sep 17 00:00:00 2001
From: Joerg Roedel <[email protected]>
Date: Mon, 6 Jun 2011 16:04:02 +0200
Subject: x86/amd-iommu: Fix 3 possible endless loops
From: Joerg Roedel <[email protected]>
commit 0de66d5b35ee148455e268b2782873204ffdef4b upstream.
The driver contains several loops counting on an u16 value
where the exit-condition is checked against variables that
can have values up to 0xffff. In this case the loops will
never exit. This patch fixed 3 such loops.
Signed-off-by: Joerg Roedel <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/x86/kernel/amd_iommu_init.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -646,8 +646,8 @@ static void __init init_iommu_from_acpi(
{
u8 *p = (u8 *)h;
u8 *end = p, flags = 0;
- u16 dev_i, devid = 0, devid_start = 0, devid_to = 0;
- u32 ext_flags = 0;
+ u16 devid = 0, devid_start = 0, devid_to = 0;
+ u32 dev_i, ext_flags = 0;
bool alias = false;
struct ivhd_entry *e;
@@ -802,7 +802,7 @@ static void __init init_iommu_from_acpi(
/* Initializes the device->iommu mapping for the driver */
static int __init init_iommu_devices(struct amd_iommu *iommu)
{
- u16 i;
+ u32 i;
for (i = iommu->first_device; i <= iommu->last_device; ++i)
set_iommu_for_device(iommu, i);
@@ -1088,7 +1088,7 @@ static int __init init_memory_definition
*/
static void init_device_table(void)
{
- u16 devid;
+ u32 devid;
for (devid = 0; devid <= amd_iommu_last_bdf; ++devid) {
set_dev_entry_bit(devid, DEV_ENTRY_VALID);
Patches currently in longterm-queue-2.6.33 which might be from
[email protected] are
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/x86-amd-iommu-fix-3-possible-endless-loops.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/x86-amd-iommu-use-only-per-device-dma_ops.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/x86-amd-use-_safe-msr-access-for-garttlbwlk-disable-code.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/x86-amd-iommu-fix-boot-crash-with-hidden-pci-devices.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable