Received: by 10.213.65.68 with SMTP id h4csp1613695imn; Thu, 29 Mar 2018 07:54:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx48as/LiWejOI95tqg031sOQm7TOTDZlGdi/iPmV727NX2d6pjh0xelqGqkG2cgOiiKBteab X-Received: by 10.101.75.202 with SMTP id p10mr5799559pgr.339.1522335251924; Thu, 29 Mar 2018 07:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522335251; cv=none; d=google.com; s=arc-20160816; b=gIc+PrJUFqaB0E6mC52xuk3lcuG9LXoRVKYRCuaYcC9bT4/jq2vz4O1grjkfpHefrM b6R+f1GxSQZieOFWfUZIFhCbMg87e1XN7UhxQkswbOZvr3cAIZ9YnKGqCXaV2YnJLHfU Fs0lZ7xMf1EL9kEqpUQ7no+fV2eyXslighJ4GUXEz9OOUqNI5hGfGw2akpblge3+Pumw TUqF1LLfvYUcWZUAYuUqxi8FIMsU2JaGaCxc5v4FYQxmQYCX57fw/vbs73fgYw7fz7XY 3xwrzKBnILl6lg+HMMHTR1gON5HOTnhfDr7roSMHo0tHEbsZFQ4Nn1JJNYugLHnJ5DFz bBiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:to:arc-authentication-results; bh=Umb8tbbXSmQQk9Fe+BsAOo/5UhlfZPJ9otvfCJDmjjI=; b=Z+WGwsrKx9FYPTu3Yz4SeI2dQZhfZfzMcKmyydsnl44i2tSFemv0NhoogwgEczrC6x 2sH3l8+q2PdnMZZpas5cNa/PyLXMpd+6QSGPqy51eiqlYb8xNGZ1tWClKd+kh3mdIxu1 /FCJ7W8EfFFI5jGvBcLC+W8yrUy9dYNTgB+CJ3991KpOLQAJ7bXYZL2Jop1xv4F+ZzbH IA6aDQOJk03Gs/mhk49goM+Ez7/zbn3EL9EwU1Ss9HIJSgUKLn8Y+F30cUJKxudJZoaw YJOP4zI6MnleVVdzC2khnoxAweC4tehMs/Ww/7MRt35bedDylLI29VapTWKXBuPGBZyK ospA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si4471052pff.253.2018.03.29.07.53.55; Thu, 29 Mar 2018 07:54:11 -0700 (PDT) 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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223AbeC2Ovc (ORCPT + 99 others); Thu, 29 Mar 2018 10:51:32 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38200 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884AbeC2Ovb (ORCPT ); Thu, 29 Mar 2018 10:51:31 -0400 Received: by mail-wm0-f51.google.com with SMTP id l16so12186821wmh.3 for ; Thu, 29 Mar 2018 07:51:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=Umb8tbbXSmQQk9Fe+BsAOo/5UhlfZPJ9otvfCJDmjjI=; b=JX9GK5PrdTx0BM64Zo6E07538DU8vMFpOlyHbaO+nlDgdSH3dSWXOqKE7vBk3fDXk+ 2uFfomQWFcDC8dhHm7bje9JR9euDAxW13QiqkRkbNUocmkpzoCRGH6TF133ZDHnnRfPm e+IFHZYoY85ESn3KhdVFYWSHOp65xUuUeRXFCxPMzcnnnI/io4tq7VgFtItMTPDprk11 QTYANmGEChQn7lhdM9HaU3+zC2Y1KaLixeBjxD+CZEqnG/KVz8XgjabweubrPLfyJfP1 KT/wpTjHShClpJDh/l0wJvRIOAFPPcPHNSGvYU8l/wKF4yXQc50AOzwS9qH6GLF6d44A h5jg== X-Gm-Message-State: AElRT7FP8jHwLriKpMPVTZP7M6Kx9IXaVQWVcHb0m4CkYjWXbkuzgl5Y h4RHOeZ4DtXWg4kAJnf1YjNwMmJX3UI= X-Received: by 10.28.190.1 with SMTP id o1mr6016962wmf.21.1522335089778; Thu, 29 Mar 2018 07:51:29 -0700 (PDT) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id l131sm4477761wmb.36.2018.03.29.07.51.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 07:51:29 -0700 (PDT) To: Adaptec OEM Raid Solutions , "James E.J. Bottomley" , "Martin K. Petersen" , SCSI development list , Linux Kernel Mailing List From: Hans de Goede Subject: aacraid code passes GFP_DMA32 to kmalloc this will not work Message-ID: <258be5fa-f930-bc5e-d8a0-3d6b5bee0a8b@redhat.com> Date: Thu, 29 Mar 2018 16:51:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, Since I made the same mistake myself I've done a quick grep for GFP_DMA32 in the kernel and drivers/scsi/aacraid/commctrl.c came up as a result of this grep, it does: p = kmalloc(sg_count[i], GFP_KERNEL|GFP_DMA32); But kmalloc always returns memory from the normal memory-zone, if you need memory from a specific memory-zone like the DMA32 zone, you must use the dma allocation functions (which from a quick glance at the code seems appropriate here) or directly call alloc_page or __get_free_page. Regards, Hans