From patchwork Fri Jan 17 08:46:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 23300 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 295BC20540 for ; Fri, 17 Jan 2014 08:47:31 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id w20sf1588185vbb.11 for ; Fri, 17 Jan 2014 00:47:30 -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=bI0JvwDIjmiJzyGPHrhL5vqqAdAHxL0oPotj+WdXi/Q=; b=aj/OPkysB2qGv9AHLTRUfQ7CEbpcYkwljkcckWbAkbLR4TRXdZQLw0hWjD02rCW9yC 4kgeWGHKvPUsBC2i0HK6Cbvf42B8u3p7xGtiLg5E0H9IBOhSspuRzBFrjbBQxM80WsI4 2T54pA0oAChZaPogQX0RQMV1B0Smx6TjyRRUCrGDT7Nf62e8OH7W37dAeKt/7Vs2FVA0 AnGTFp3/o9Bb1cX26LeCJuUGYClQEL0qiazupzK+7JCry7sWEfc5EbIB2DvCEeOEM2Wa o6moIxM2mk002fOotvOGdBoMST2N8DPzLCMlne7viFbsGCvixVlbvl3ZrO+NV16Y/+qP iszQ== X-Gm-Message-State: ALoCoQklve6EYpwsukIflhME0rp5b2sBVQ9Cy4XnkvJdxUHYHgudlUfvPCXW472HhLloI/NLFyhE X-Received: by 10.58.48.129 with SMTP id l1mr188180ven.40.1389948450371; Fri, 17 Jan 2014 00:47:30 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.76 with SMTP id k70ls348290qgk.30.gmail; Fri, 17 Jan 2014 00:47:30 -0800 (PST) X-Received: by 10.220.97.145 with SMTP id l17mr280248vcn.35.1389948449984; Fri, 17 Jan 2014 00:47:29 -0800 (PST) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id xt2si4596863vcb.33.2014.01.17.00.47.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:47:29 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.53 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.53; Received: by mail-vb0-f53.google.com with SMTP id p17so1405110vbe.40 for ; Fri, 17 Jan 2014 00:47:29 -0800 (PST) X-Received: by 10.220.174.200 with SMTP id u8mr332165vcz.6.1389948449817; Fri, 17 Jan 2014 00:47:29 -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 ey3csp3907ved; Fri, 17 Jan 2014 00:47:29 -0800 (PST) X-Received: by 10.68.130.169 with SMTP id of9mr687215pbb.79.1389948448904; Fri, 17 Jan 2014 00:47:28 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qv10si9545866pbb.82.2014.01.17.00.47.28; Fri, 17 Jan 2014 00:47:28 -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 S1752140AbaAQIrL (ORCPT + 26 others); Fri, 17 Jan 2014 03:47:11 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:9540 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbaAQIrI (ORCPT ); Fri, 17 Jan 2014 03:47:08 -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 <0MZJ00MYLF239U00@mailout4.samsung.com>; Fri, 17 Jan 2014 17:46:51 +0900 (KST) X-AuditID: cbfee61a-b7fb26d00000724f-7a-52d8edfb1f0a Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 0F.06.29263.BFDE8D25; Fri, 17 Jan 2014 17:46:51 +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 <0MZJ001STF1UULJ0@mmp1.samsung.com>; Fri, 17 Jan 2014 17:46:51 +0900 (KST) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Marek Szyprowski , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , stable@vger.kernel.org Subject: [PATCH] x86: dma-mapping: fix GFP_ATOMIC macro usage Date: Fri, 17 Jan 2014 09:46:38 +0100 Message-id: <1389948399-26344-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t9jAd3fb28EGfw6y2UxbaO4xeVdc9gs 1h65y25x6cACJosFGx8xWmzeNJXZ4seGx6wO7B6bVnWyebw7d47d4/2+q2wefVtWMXp83iTn caLlC2sAWxSXTUpqTmZZapG+XQJXRs+jDWwF59gr9i/kaWBcydbFyMkhIWAi0fdwMyOELSZx 4d56oDgXh5DAIkaJx4+bmEESQgKtTBIHn6qB2GwChhJdb7vAmkUEDCSWnpnEBNLALLCZUeLu 2RcsIAlhAVuJo4fusYLYLAKqEk/OnwSzeQU8JHYcmQBkcwBtU5CYM8lmAiP3AkaGVYyiqQXJ BcVJ6bmGesWJucWleel6yfm5mxjBofJMagfjygaLQ4wCHIxKPLwS4jeChFgTy4orcw8xSnAw K4nwbr0JFOJNSaysSi3Kjy8qzUktPsQozcGiJM57oNU6UEggPbEkNTs1tSC1CCbLxMEp1cB4 4Wb0Mt/XXlNe/ok5bRMZ3xp4/WngrRX/gmYYinFM3TLDRGH3TLu378rkfef1+0RfYbpu9WUp R/udx++iuZ42FRrF/N9aL1FiVlt77dGG0zPKauaozF4Q+vF1qUmAtPTfHqFHwafnvU0LWam9 7K5AS/ZkEc3ay4/dVgp3FPIavV9+9Mn7tbWWSizFGYmGWsxFxYkA++bryRECAAA= 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.53 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.5-rc1 CC: stable@vger.kernel.org Signed-off-by: Marek Szyprowski --- arch/x86/kernel/pci-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 872079a..32a81c9 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@ -100,7 +100,7 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size, flag |= __GFP_ZERO; again: page = NULL; - if (!(flag & GFP_ATOMIC)) + if (flag & __GFP_WAIT) page = dma_alloc_from_contiguous(dev, count, get_order(size)); if (!page) page = alloc_pages_node(dev_to_node(dev), flag, get_order(size));