lkml.org 
[lkml]   [2008]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 19/23] AMD IOMMU: free domain bitmap with its allocation order
    Date
    The amd_iommu_pd_alloc_bitmap is allocated with a calculated order and
    freed with order 1. This is not a bug since the calculated order always
    evaluates to 1, but its unclean code. So replace the 1 with the
    calculation in the release path.

    Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
    ---
    arch/x86/kernel/amd_iommu_init.c | 3 ++-
    1 files changed, 2 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
    index d8c1a45..a307cf6 100644
    --- a/arch/x86/kernel/amd_iommu_init.c
    +++ b/arch/x86/kernel/amd_iommu_init.c
    @@ -1145,7 +1145,8 @@ out:
    return ret;

    free:
    - free_pages((unsigned long)amd_iommu_pd_alloc_bitmap, 1);
    + free_pages((unsigned long)amd_iommu_pd_alloc_bitmap,
    + get_order(MAX_DOMAIN_ID/8));

    free_pages((unsigned long)amd_iommu_pd_table,
    get_order(rlookup_table_size));
    --
    1.5.6.4



    \
     
     \ /
      Last update: 2008-09-17 19:05    [W:0.029 / U:0.012 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site