Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3654612pxb; Mon, 24 Jan 2022 14:32:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJya2RHyEjb712OlzVrlCSmAHXil8hc7yqJqbhl10FaTBjOn5IiLvCNCQzrP42OdI+HdBdtc X-Received: by 2002:a63:7983:: with SMTP id u125mr13103029pgc.569.1643063568311; Mon, 24 Jan 2022 14:32:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063568; cv=none; d=google.com; s=arc-20160816; b=rcvpcyFnoev1n8fjNAY0nJHfAT3+BawMZPyan4l7MwU8GlobtuwQcLzWnuW34rkZxf qExD8/kZRzjpANytFh2ChpJmgf2TgGDgGkxvok8KGRad8SbeJG0B7kFJaOe1TKy+Tbsm 9XXYMblxx8xt2sd/DpD3skRyT9e6hSeDV/E8Zmjl2yqR7fx7nxKwRV87iENQAyA1jZMH 8wI/zOn7nrXPEY/EdmvrjJ+jKtjkwyyRG0ZBtEu+gkcWVl7vw+QZVxgwRw5nfGuw/E/f t6EXzW6g+CBWMAwrmVVQ4e5+zaBTS7tHvS0p3enFqScosPmy5P7zuKxf29R0O+Sp1Tue 3h5Q== 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=vZr6itBcCoM3N6s7fYgcw4KwP5pYzjNUGBpDsMdAU5g=; b=zbUwfU45JBh8DadWo6hy76L4oHaM5n+j/aM6Gecoch16Ub98mtT7vg0iIMbG4Qdy8A AXzpsJRDzo++sC2XLTlYfNF3JYy99ZjkrKtHye8UIWnMCH+8HxYrWGPbI4fVN2vz9vjW 8Z8iteV5/bItQkbS8AAC5WIXSOJFreHSvIgospruTuk9qDHpKjqL/13nMIe4JUZki0Qb FmV+W8yhWVFrcnLoO2tncoRWznGz7m4yHqjjdxZXPrj8Qi8H7LA4Vf6IddG6CXw41clG l0AubFlDEKivXnCuU9Lnsgy9mIE4iTyxeLL3PutCwP+voZ/W1btVQtgmsA2vtLaDRqLe cr5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="KBUWlY4/"; 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 p4si13648877pgn.760.2022.01.24.14.32.35; Mon, 24 Jan 2022 14:32:48 -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="KBUWlY4/"; 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 S1586812AbiAXW1W (ORCPT + 99 others); Mon, 24 Jan 2022 17:27:22 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:45714 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1454060AbiAXVbn (ORCPT ); Mon, 24 Jan 2022 16:31:43 -0500 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 767F1B81142; Mon, 24 Jan 2022 21:31:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0981C340E4; Mon, 24 Jan 2022 21:31:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059895; bh=hiKltHgWQoklyviP7j9xJYA49jfJQ7EKWXU3uv1sDos=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KBUWlY4/7Jk6gq2+RLWMyPiMoP33/lvSUAMAL+JeXELANNO7sJNJyIOjYB1U7hz4s 9UT2LRN8Idaz+5HVHvrJdOLTfsGhvhjJUnhX3PUI4p3dn/gAm61e74efrvp9xEiVcG u6H0CeW2HAJ1i0n0iqW/T7CZd+39h7nlEj89cmcU= 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.16 0771/1039] scsi: sr: Dont use GFP_DMA Date: Mon, 24 Jan 2022 19:42:40 +0100 Message-Id: <20220124184151.223382877@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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 8e4af111c0787..f5a2eed543452 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -856,7 +856,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