Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp557868pxy; Wed, 21 Apr 2021 09:14:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgkyF3LhxDZUXIIFJckDevmo/bAQcJXAW/RMi3NVZ0UpScygQ7CUVUe1lqNuQEybdrry8v X-Received: by 2002:a63:9e02:: with SMTP id s2mr14249516pgd.134.1619021663537; Wed, 21 Apr 2021 09:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619021663; cv=none; d=google.com; s=arc-20160816; b=HlI/UlD6AvELxtF7TOrF3xoecZBcmkYitR1AMVMYB1iEfjsNTQWBlIrs7lCIIWuTYd lwAXxNomgpVbFhWZcAciEcd7RMO/r5Y+wfubxUjZ5ZD73vm2P9D+Sw5EfWBwpIwsu8qP M6bKfd2MCrdmKG1ZBU+PmmwMRgPI3v3osLKow32ioYbL6l+SDT1fbpJDWqKgi86OeiDZ Fcob3cu5Z562+T6aRs29NCeV8l16IJaa3JDmU0ZLfgiztQjj06nUGOTCQZIZZqs8Xb5+ 2Os180ou4wV2akxr0ILcGbrOrsMF6FoTJMLzrwrDe8b8/NrQ53LRmBh/uZxD2Db5iH6m h0PQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eFJ5BVwITT672bkmP0yfcvGQ5RlMAOz9HhNB+8MSkNQ=; b=aigsaw2YKGTMNxrqV6Y6uRq4+xTG8LSHoOYnPZblqdmdTWiVV3xSNRXSRK9uFFsa/s z/Oh85mUu6x31cEAu0nw8cySzulbRLOwKes7kMn41kgIsKhzFPu1zizDnbQBA/LTBRgf y9ztGQWfiQhaDxcU4wEwlI5EPaxYLzpYeRlCG1gVyDWKBwrUpNzvROcTLsJLXkdQLYk3 X+24n/BBOEn07I5nv8s9lbCG9Yt2HQZeAxe3Whiovtibm/2Phzltx3qUFNFms7kV0wiI lBR2UcGtlhkvAn9D3ArmvNqg0aDV7ru8Qm+iWzW8/pESss7olkPma0iKyHzq9shKNS5p OUpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pukQ2+J5; 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 90si33949plf.119.2021.04.21.09.14.03; Wed, 21 Apr 2021 09:14:23 -0700 (PDT) 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=pukQ2+J5; 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 S242247AbhDUNJ6 (ORCPT + 99 others); Wed, 21 Apr 2021 09:09:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:49136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240157AbhDUNHQ (ORCPT ); Wed, 21 Apr 2021 09:07:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 058276144B; Wed, 21 Apr 2021 13:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619010402; bh=WkM5OqGDtqhj2vez0uEmj2CADFldwYZrt7aOxxWbg1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pukQ2+J5Dp+5bSKloNntBKOUczLImurBcZzovWczlKPBeGalGVCAbE/QXMD0MsAAb LXQb7G7etyDhsN6SHoGkl2+o7pJvi3+/F5p05ksyhbyYrfmFZulQ61zCWSLHCFQy38 W5WttRmnZyzDt4S60WWsY0c1KeE6ZIwcC34Joo8w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Aditya Pakki , Mark Brown Subject: [PATCH 124/190] Revert "spi : spi-topcliff-pch: Fix to handle empty DMA buffers" Date: Wed, 21 Apr 2021 14:59:59 +0200 Message-Id: <20210421130105.1226686-125-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210421130105.1226686-1-gregkh@linuxfoundation.org> References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit f37d8e67f39e6d3eaf4cc5471e8a3d21209843c6. Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota). Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase. Cc: Aditya Pakki Cc: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-topcliff-pch.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c index b459e369079f..12d749e9436b 100644 --- a/drivers/spi/spi-topcliff-pch.c +++ b/drivers/spi/spi-topcliff-pch.c @@ -1290,27 +1290,18 @@ static void pch_free_dma_buf(struct pch_spi_board_data *board_dat, dma->rx_buf_virt, dma->rx_buf_dma); } -static int pch_alloc_dma_buf(struct pch_spi_board_data *board_dat, +static void pch_alloc_dma_buf(struct pch_spi_board_data *board_dat, struct pch_spi_data *data) { struct pch_spi_dma_ctrl *dma; - int ret; dma = &data->dma; - ret = 0; /* Get Consistent memory for Tx DMA */ dma->tx_buf_virt = dma_alloc_coherent(&board_dat->pdev->dev, PCH_BUF_SIZE, &dma->tx_buf_dma, GFP_KERNEL); - if (!dma->tx_buf_virt) - ret = -ENOMEM; - /* Get Consistent memory for Rx DMA */ dma->rx_buf_virt = dma_alloc_coherent(&board_dat->pdev->dev, PCH_BUF_SIZE, &dma->rx_buf_dma, GFP_KERNEL); - if (!dma->rx_buf_virt) - ret = -ENOMEM; - - return ret; } static int pch_spi_pd_probe(struct platform_device *plat_dev) @@ -1387,9 +1378,7 @@ static int pch_spi_pd_probe(struct platform_device *plat_dev) if (use_dma) { dev_info(&plat_dev->dev, "Use DMA for data transfers\n"); - ret = pch_alloc_dma_buf(board_dat, data); - if (ret) - goto err_spi_register_master; + pch_alloc_dma_buf(board_dat, data); } ret = spi_register_master(master); -- 2.31.1