Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3694542pxb; Mon, 24 Jan 2022 15:34:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGYUM09g9QY9qyyPKICrvRAubgC8R7pTzWMvOzBZH38ngYCy0cMyouC0NZS/dIg0mVebcm X-Received: by 2002:a17:903:120a:b0:149:8b16:ee19 with SMTP id l10-20020a170903120a00b001498b16ee19mr16961986plh.11.1643067279248; Mon, 24 Jan 2022 15:34:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643067279; cv=none; d=google.com; s=arc-20160816; b=HBa6nV3rZUOOBdPD03Dr/VWRd99yN8IF3hf6b0cRavyd4WYbcBvV/J9Ze9ez/SacWu wf3XPxQ95FusHAgPl2PSi3aZn0QjHUVGkt5Ond5uoyZYNWFPCe5vrcWin38qicW2YORo NF6bOh+xhiVxWgZpzys0XhEUzTwamYE+dlWX70+wLw9ZCPhFVi9X/5vbLC3bIlLGld2b nNsokRDd+rqoiuaPhG7+JIuS90rB0yTGiCjE6sQkN11r+Y+NMqBk+j4TI371wV3OtAJD dQRDB2bzC5mPvU+SUBBYlsLGdGHGB9TY3D5ZzchHWXcavdOv2htRxeul2Zc2xpwH+0+o Yykw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4G6qQXcCaImAIgNkgq/BVDoTou5sLSTChUawGb30Wwk=; b=IYUyEgkI4aeSaFf4yIZ4EMTzPmwYRdhrS5gCoDfU1RKVM513BXUo+UsoYEIPU1ouhc SiuKR+dZCHbTee348T05Dy3G+AzwkS93IYylst6hFL0xPHpIvMPbVHAeuP2jaaQr/vP+ OX+qk9XL16/Sw8YQCays/Gq+sNrny2dObI8TdlDDLKKw29YLAd63M0ifpGxo+K6+cjk9 a66dYVcmpsRIyH7ySNizl6Fb/9ZDsf1on2+QDk7fqNZeB4hOPa0jGPY9apxbDQo/7Dsp jifzCyJLu5k0Dn8i1ZxVY5rRMwd16cl/+x2Tfsrq3+TsqTzRzimUq6xcg2293bjE2mlZ Fg2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O0y9Ybpj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 3si2448571pll.54.2022.01.24.15.34.27; Mon, 24 Jan 2022 15:34:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O0y9Ybpj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1850821AbiAXXaz (ORCPT + 99 others); Mon, 24 Jan 2022 18:30:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380561AbiAXWHF (ORCPT ); Mon, 24 Jan 2022 17:07:05 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46A1CC046E06; Mon, 24 Jan 2022 12:42:37 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 03077B815A6; Mon, 24 Jan 2022 20:42:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 945DBC340E5; Mon, 24 Jan 2022 20:42:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056954; bh=VffSaQeFa9LtkWe5JdScSFvdlZGz2Hde+F96tYEm9vU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O0y9Ybpjvr3Q/8yrsmwJq0hfY/p+zab6cATaBytSX8burLudjEtTJGzykmIJwn6Wj mhreiL8d5VcwcPQcA1hxtEGqY5HYj/skAAISfRmqDfTv35e7rQZnpQlr1JXL2qMKwg M3c+dcr/FuVhVq8mVZD3BYafmM2YLgi0eZIrlHTY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baoquan He , Christoph Hellwig , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.15 655/846] scsi: sr: Dont use GFP_DMA Date: Mon, 24 Jan 2022 19:42:52 +0100 Message-Id: <20220124184123.635149982@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig [ Upstream commit d94d94969a4ba07a43d62429c60372320519c391 ] The allocated buffers are used as a command payload, for which the block layer and/or DMA API do the proper bounce buffering if needed. Link: https://lore.kernel.org/r/20211222090842.920724-1-hch@lst.de Reported-by: Baoquan He Reviewed-by: Baoquan He Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/sr.c | 2 +- drivers/scsi/sr_vendor.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 8b17b35283aa5..1203374828b97 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -851,7 +851,7 @@ static void get_capabilities(struct scsi_cd *cd) /* allocate transfer buffer */ - buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(512, GFP_KERNEL); if (!buffer) { sr_printk(KERN_ERR, cd, "out of memory.\n"); return; diff --git a/drivers/scsi/sr_vendor.c b/drivers/scsi/sr_vendor.c index 1f988a1b9166f..a61635326ae0a 100644 --- a/drivers/scsi/sr_vendor.c +++ b/drivers/scsi/sr_vendor.c @@ -131,7 +131,7 @@ int sr_set_blocklength(Scsi_CD *cd, int blocklength) if (cd->vendor == VENDOR_TOSHIBA) density = (blocklength > 2048) ? 0x81 : 0x83; - buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(512, GFP_KERNEL); if (!buffer) return -ENOMEM; @@ -179,7 +179,7 @@ int sr_cd_check(struct cdrom_device_info *cdi) if (cd->cdi.mask & CDC_MULTI_SESSION) return 0; - buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); + buffer = kmalloc(512, GFP_KERNEL); if (!buffer) return -ENOMEM; -- 2.34.1