From patchwork Thu May 9 02:30:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 163656 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp362562ilr; Wed, 8 May 2019 19:30:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyf5rCQRER9+vy4olPVXileWuMyo8xTrzHs39QBhvmzqk+rd4eRDKFNH4PUlfFy8dvnvXQ3 X-Received: by 2002:a62:2ec4:: with SMTP id u187mr1572358pfu.84.1557369023579; Wed, 08 May 2019 19:30:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557369023; cv=none; d=google.com; s=arc-20160816; b=TVsTdIhgFykwnGKMIH5YR9TUdpQGdr3/huKuDFa1H8g10x1d6qf8xHPayT+4DaIuHu sE2M+4b69wQIH3M8RS5h1QDAzO3dH2tYYkIYJJ9FJvbxgFxP0IQdMM59E/Fq5LESMqhk MwdliDSsyGzgDlUb3du0gZ47EamUI/9g/RWGMxilxDbYVUiZHqmX9Qc8B35BgTYAO6Ry xAzXM4LDm2jCRXtPrhuT7JBXV7KAQN9Ekvrq5cIvKCbnm4pf7jrsMcollKDuBOofPxJa V76S7jfVx37ZIkDhEvNwrZOD5LYbP1V/cA0F6saR4K+ZEPmgout9knB57UmOoret8DeF IYiA== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ex0qKgiOTe6Vg9vk/qKVNw3/6lYKgjLD06DnzhbEcqM=; b=j5KwApBZFZcxW7Djli76oWfWEurBTe6iJzyyGh0m+Z8W+l73S6Tl20iaPzhG/Fif6X 0T6xuuMZ9okapWTyhSSCN274PiOYHGwyGBWLYzqCPTBieUd7mLqut6FDHeX6tHPAH6Hf HOa/spwu9EeWBg7bLe7M1wRNm5MtoESqqcNsZaFIpTH8TKUYj0O088Nw8J7fclrgUEDC 76a1Ssmzh+48nltlKptm6//i96hEciHKbY6SE2aFdSFk9w17uznV1l3yqefE5t+c6vOT XexAIVPsVZ07V098RaTgQ/Ze1TQeNkKvXHCCiNoKRnc/ApBzkWz80dx4lqKxpmhpHvM5 YQ8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=b4naVgpS; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d65si1160779pgc.330.2019.05.08.19.30.23; Wed, 08 May 2019 19:30:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=b4naVgpS; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726438AbfEICaX (ORCPT + 1 other); Wed, 8 May 2019 22:30:23 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:54786 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbfEICaX (ORCPT ); Wed, 8 May 2019 22:30:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ex0qKgiOTe6Vg9vk/qKVNw3/6lYKgjLD06DnzhbEcqM=; b=b4naVgpS98tlkDVyu69qK8HrR Z/0r9hkqDoPegvIKE32iZfNI/0xQzsF68o18fCjcDrH2F0g3FbEUnxc4rscfHCW8s+WGpqTjn3GY5 TIFrUvTweBXs2T8gwpgZcNtCv7qMaOf4/L9VmbCnGJx8GkJUjBdj+nOFsi28x2y0k0API=; Received: from [2001:268:c0e3:9e6d:fb20:4124:5afd:9c02] (helo=finisterre.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hOYp4-0001Qt-VG; Thu, 09 May 2019 02:30:15 +0000 Received: by finisterre.sirena.org.uk (Postfix, from userid 1000) id 684B544000C; Thu, 9 May 2019 03:30:10 +0100 (BST) From: Mark Brown To: =?utf-8?q?Noralf_Tr=C3=B8nnes?= , Nicolas Saenz Julienne , Stefan Wahren , Martin Sperl Cc: linux-spi@vger.kernel.org, Mark Brown Subject: [PATCH] spi: Fix Raspberry Pi breakage Date: Thu, 9 May 2019 11:30:05 +0900 Message-Id: <20190509023005.19290-1-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org This reverts commit c9ba7a16d0f1 (Release spi_res after finalizing message) which causes races during cleanup. Reported-by: Nicolas Saenz Julienne Signed-off-by: Mark Brown --- drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 5e75944ad5d1..8eb7460dd744 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1181,10 +1181,10 @@ static int spi_transfer_one_message(struct spi_controller *ctlr, if (msg->status && ctlr->handle_err) ctlr->handle_err(ctlr, msg); - spi_finalize_current_message(ctlr); - spi_res_release(ctlr, msg); + spi_finalize_current_message(ctlr); + return ret; }