From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F115AC433B4 for ; Tue, 20 Apr 2021 14:58:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B64F86024A for ; Tue, 20 Apr 2021 14:58:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232828AbhDTO6z (ORCPT ); Tue, 20 Apr 2021 10:58:55 -0400 Received: from mail.netfilter.org ([217.70.188.207]:39510 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232768AbhDTO6v (ORCPT ); Tue, 20 Apr 2021 10:58:51 -0400 Received: from us.es (unknown [90.77.255.23]) by mail.netfilter.org (Postfix) with ESMTPSA id A1DC563E82; Tue, 20 Apr 2021 16:57:47 +0200 (CEST) Date: Tue, 20 Apr 2021 16:58:16 +0200 From: Pablo Neira Ayuso To: Frank Wunderlich Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, john@phrozen.org, nbd@nbd.name, sean.wang@mediatek.com, Mark-MC.Lee@mediatek.com, dqfext@gmail.com Subject: Re: [PATCH net-next 2/3] net: ethernet: mtk_eth_soc: missing mutex Message-ID: <20210420145816.GA27083@salvia> References: <20210418211145.21914-1-pablo@netfilter.org> <20210418211145.21914-3-pablo@netfilter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Apr 20, 2021 at 01:51:07PM +0200, Frank Wunderlich wrote: > Am 18. April 2021 23:11:44 MESZ schrieb Pablo Neira Ayuso : > >Patch 2ed37183abb7 ("netfilter: flowtable: separate replace, destroy > >and > >stats to different workqueues") splits the workqueue per event type. > >Add > >a mutex to serialize updates. > > > >Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading > >support") > >Reported-by: Frank Wunderlich > >Signed-off-by: Pablo Neira Ayuso > > Hi Pablo, > > As far we tested it, the mutex does not avoid the hang. It looks a bit better,but at the end it was fixed by this Patch > > https://patchwork.kernel.org/project/linux-mediatek/patch/20210417072905.207032-1-dqfext@gmail.com/ > > Alex did some tests without the lock here and it still looks stable. > So it looks like it is not needed It might be hard to trigger the race, but it's needed. There are several workqueues racing to add and delete entries from the driver flowtable representation which has no locks.