From patchwork Fri Jan 17 08:46:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 23299 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E928D20540 for ; Fri, 17 Jan 2014 08:47:06 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id jw12sf6395329veb.11 for ; Fri, 17 Jan 2014 00:47:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=UlDhU1wtpq+mb+TpF7kkIZn+yfccdjeGhDqwAb9boo8=; b=kcQbtotKSYBBEgZ5A0ckcQL+ggNQmAeZjhp94qqx/aK2+Rh7AwLWpNEN7brIg2/7DZ xbfLXZ3cYXKVWvs4cn9UHF1nQ6NxnYPQNqkCbD4Goe6PG4n+JuMgoV9R/byB9Xs/2UTC zHNwRu4okzZMWjdZlmDma+wok1MGCV77GE9KdnVmCbxbkzcaDA1QKQv0FbcIRBNoOVol 4qG2qLpfD9otUDobZ9nFoQ8d5lPfRCB5Bs09uB+KZWKhog+7n2TM8dTDQVC0mvdzdeU+ fINUWbsIlMofkN6M6mhaq3Atvk70lhnvKJvQoKfgLK9aJm0LlhmYXoHE8mNkNZbtv6gl PqOw== X-Gm-Message-State: ALoCoQmypjWXP12lxc7Q7ZEHP1oULqN1ieQBGJrIS+8utpZid7KDNFlQ5obDr/BJpMeFW/WHHKik X-Received: by 10.58.218.40 with SMTP id pd8mr149910vec.39.1389948425970; Fri, 17 Jan 2014 00:47:05 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.16.145 with SMTP id 17ls405302qgb.58.gmail; Fri, 17 Jan 2014 00:47:05 -0800 (PST) X-Received: by 10.220.95.139 with SMTP id d11mr284383vcn.21.1389948425833; Fri, 17 Jan 2014 00:47:05 -0800 (PST) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id q1si4588975vcm.77.2014.01.17.00.47.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:47:05 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id w20so1408554vbb.41 for ; Fri, 17 Jan 2014 00:47:05 -0800 (PST) X-Received: by 10.58.208.130 with SMTP id me2mr293739vec.13.1389948425757; Fri, 17 Jan 2014 00:47:05 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp3889ved; Fri, 17 Jan 2014 00:47:05 -0800 (PST) X-Received: by 10.68.231.169 with SMTP id th9mr668087pbc.113.1389948424872; Fri, 17 Jan 2014 00:47:04 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si9548060pbb.144.2014.01.17.00.47.04; Fri, 17 Jan 2014 00:47:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752064AbaAQIqz (ORCPT + 26 others); Fri, 17 Jan 2014 03:46:55 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:9423 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbaAQIqc (ORCPT ); Fri, 17 Jan 2014 03:46:32 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MZJ00IWAF1IO050@mailout4.samsung.com>; Fri, 17 Jan 2014 17:46:30 +0900 (KST) X-AuditID: cbfee61a-b7fb26d00000724f-fe-52d8ede63e3d Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 6D.F5.29263.6EDE8D25; Fri, 17 Jan 2014 17:46:30 +0900 (KST) Received: from amdc1339.mshome.net ([106.116.147.30]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MZJ001LCF1BFDJ0@mmp1.samsung.com>; Fri, 17 Jan 2014 17:46:30 +0900 (KST) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , Hiroshi Doyu , stable@vger.kernel.org Subject: [PATCH] ARM: dma-mapping: fix GFP_ATOMIC macro usage Date: Fri, 17 Jan 2014 09:46:16 +0100 Message-id: <1389948376-26298-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBJMWRmVeSWpSXmKPExsVy+t9jAd1nb28EGezdYGrx8fJsZotNj6+x WlzeNYfNYu2Ru+wWCzY+YnRg9di8pN6jt/kdm0ffllWMHp83yQWwRHHZpKTmZJalFunbJXBl 9Oy+wFbQxF6xa0ULYwPjE9YuRk4OCQETibfHpjNB2GISF+6tZ+ti5OIQEljEKDHzz0N2kISQ QCuTRFNXJojNJmAo0fW2iw3EFhFwk/i37hCYzSyQJfF49ntGEFtYwFbi+tnbQHEODhYBVYm1 J5JBTF4BD4nzrxRATAkBBYk5k2wmMHIvYGRYxSiaWpBcUJyUnmuoV5yYW1yal66XnJ+7iRHs /2dSOxhXNlgcYhTgYFTi4ZUQvxEkxJpYVlyZe4hRgoNZSYR3602gEG9KYmVValF+fFFpTmrx IUZpDhYlcd4DrdaBQgLpiSWp2ampBalFMFkmDk6pBsalfwVfr5/vHHdZvzmc0VO+MMSpy6LT 7e9J9jW8N7LffvQyY7jhXfDDt0iWfdWn5xZ1tnf3Kealry5++vx15TzRVXqXbH5sNTY+JJ52 5mxi/g17swOMxpek+EXvS2g/n/bb/8yWzJ+yTeaWPOnNRmJhOvxW/b8atgce8GQ63MmmKSI4 ec3qg0osxRmJhlrMRcWJALeh4Un7AQAA Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 CC: stable@vger.kernel.org --- arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index f61a570..5fe4d72 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -1358,7 +1358,7 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size, *handle = DMA_ERROR_CODE; size = PAGE_ALIGN(size); - if (gfp & GFP_ATOMIC) + if (!(gfp & __GFP_WAIT)) return __iommu_alloc_atomic(dev, size, handle); /*