Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2929650imm; Tue, 4 Sep 2018 12:17:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbTiPOQvBz/btiU0Zp49z0s0ey9UJuBB5MPwh/3E+8DtwH4h9StpmXxCMzaUTXFfMHsfzSE X-Received: by 2002:a63:4306:: with SMTP id q6-v6mr31559324pga.181.1536088679175; Tue, 04 Sep 2018 12:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536088679; cv=none; d=google.com; s=arc-20160816; b=QpWnTVIyRB0CVvkJfOKF2P2P1n6jHpfdsDsRCNqV7TQNADbNu8LSrGkUOYY9ZSnM54 gbletHmHZJmsME/Ggfq2pEjcWh/FEU6hJwZjolu6l9wtKGxu9mKr8LcwsZj+odI8Fsaj G8ZsVtqyv0L+7ufUTeCGVI7WpZGVmpDqODYQMnIhiliuD1lI+Lv+lnmt23sZvDqxzo/S pDPmwl/77TN74BzT9ExYLiOAjIs27aUMkzGU+hvvurUmXZB/b5zi+XCTHkg2DPuaf5Vv XAzJ0ik1ycaM9tRXE8X9DAxCUn6N4genPQxkRKh0X+DeOs2dQJZ4/K/HyMiYOUoDlA3n tBwg== 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 :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=DzlK2rowdBSKmEmMLK4tO/27NvJsyWGcR26wFPuiz34=; b=Gpy1m7NAMtF3O1fl+Dip1QG+beoYiv3jAhcZ4ZLDhskhr4jp9c5WjSMpU/fF/WEbo2 IYHJWmYrk3ccyMOFas4k7NmincH4qdPWVoyhb7EFqjqb3/iwcSELl6LJqq7e5mNBqGA0 oE0UPDAtvb7XGRDmACu3mucEWjhdh2alwbxcsRtpVlG6KBvp0v0H0hpTmga8u0VxuM+q AH/UrsP0tDQauF/0fwidju+UTsA8EmmeBRxv7GjYr7kcfn4p6KCBHpbs3RlSaKsiGUAy AZve4VUwDQIAs4bZyWOEWYxLnOHSCx6RgnAuveVaBFvOv5ePakphUivVUjUpopdMkhP8 Pu5g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5-v6si20182978pgw.343.2018.09.04.12.17.43; Tue, 04 Sep 2018 12:17:59 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727972AbeIDXnF (ORCPT + 99 others); Tue, 4 Sep 2018 19:43:05 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:33306 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727586AbeIDXnF (ORCPT ); Tue, 4 Sep 2018 19:43:05 -0400 Received: from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net [74.93.104.98]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 1C3B8108E6F59; Tue, 4 Sep 2018 12:16:36 -0700 (PDT) Date: Tue, 04 Sep 2018 12:16:35 -0700 (PDT) Message-Id: <20180904.121635.1652475457526472991.davem@davemloft.net> To: stefan.wahren@i2se.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] net: qca_spi: Fix race condition in spi transfers From: David Miller In-Reply-To: <1535978657-2880-1-git-send-email-stefan.wahren@i2se.com> References: <1535978657-2880-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 04 Sep 2018 12:16:36 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Wahren Date: Mon, 3 Sep 2018 14:44:17 +0200 > With performance optimization the spi transfer and messages from basic > register operations like qcaspi_read_register moved into the private > driver structure. But they weren't protected against mutual access > (e.g. between driver kthread and ethtool). So dumping the QCA7000 > register via ethtool during network traffic could make spi_sync > hang forever, because the completion in spi_message is overwritten. > > So revert the optimization completely. > > Signed-off-by: Stefan Wahren > --- > drivers/net/ethernet/qualcomm/qca_7k.c | 84 ++++++++++++------------ > drivers/net/ethernet/qualcomm/qca_spi.c | 110 +++++++++++++++++--------------- > drivers/net/ethernet/qualcomm/qca_spi.h | 5 -- > 3 files changed, 97 insertions(+), 102 deletions(-) > > Changes in V2: > - explain race in commit log more in detail Ok, I want one more change. Please repost this with an appropriate Fixes: tag added. Thank you.