lkml.org 
[lkml]   [2014]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.13 015/172] ARM: dma-mapping: fix GFP_ATOMIC macro usage
    Date
    3.13-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Marek Szyprowski <m.szyprowski@samsung.com>

    commit 10c8562f932d89c030083e15f9279971ed637136 upstream.

    GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other
    flags and LACK of __GFP_WAIT flag. To check if caller wanted to perform an
    atomic allocation, the code must test __GFP_WAIT flag presence. This patch
    fixes the issue introduced in v3.6-rc5

    Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    arch/arm/mm/dma-mapping.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/arch/arm/mm/dma-mapping.c
    +++ b/arch/arm/mm/dma-mapping.c
    @@ -1358,7 +1358,7 @@ static void *arm_iommu_alloc_attrs(struc
    *handle = DMA_ERROR_CODE;
    size = PAGE_ALIGN(size);

    - if (gfp & GFP_ATOMIC)
    + if (!(gfp & __GFP_WAIT))
    return __iommu_alloc_atomic(dev, size, handle);

    /*



    \
     
     \ /
      Last update: 2014-03-05 00:42    [W:6.671 / U:0.592 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site