Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2936804rdb; Wed, 4 Oct 2023 17:01:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEy2Rc2lqRrHfNqtYjOKKa6ZcUY/gbed5lbwLCPUOSRB0Mb8qivyIXE1Iri2KWuRPEyZwEE X-Received: by 2002:a17:902:f688:b0:1c6:3228:c2ca with SMTP id l8-20020a170902f68800b001c63228c2camr4875514plg.29.1696464095998; Wed, 04 Oct 2023 17:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696464095; cv=none; d=google.com; s=arc-20160816; b=GI88yf5+w5vn2f3KJKhbPl2aQq0arSP5xMnMtO1e3J5IyDpvvBiyRZMTjO7CPgg3S1 nRu3UxmnFl6IDWgaR0XIZGC3LYFuYYa9gK15ezMKjBF9hqJYT+Bwe3Kbw2q3yR2pHnCU v+WufJIMTHDgCzqPdvtqsb5XT3+nyMeBFzS6ok8tw4d2Lo5h8gzw1Quk+m/k6Ss+tXwz 5vU5Ql1vgDMVGIBv7wuzFD7buUhak985eAIc9QIN/z6prTQK3NkFvsIzpJ0xcw0o+Xw5 9Fg/EYeDrIfgmSX/sS7SyDkctn0w2YJytS2UZfYnW/I5h8SDy3djJT2YahgBnAFZoDVS rCbQ== 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:subject:cc:to:from:date :dkim-signature; bh=3IdbSEH5VJw5xA3p5bQwqKu+oAvdqFmYvSpj449b+eg=; fh=1Snr+Pa6leyx+eTbN2WIDBPo+sfrmIqapR3Nh1iqVwU=; b=kEo0CJn9RiysgekGJblieIOY5QcjgRez6Mt4c7b/nKTjcJ1d1Zn+tbXzbiW+S4eFpK OwQfWf950w61tZFI9reg/be9HmkT8GddErWoJtOQrqwqsu0poQkASWV2fhGr4zz1a3bJ VR+zrjnnQJtx+l9F11bdRPqzMdiZLj3wjslszVRAvY0zf7WtyP8y7Bj7X8FuBB3k56ka wWA7zFwI+3Afcu9xhAo3DA/T/jl+AlXlXFzHKd9NGliHNMR6V0gA1UZMR+oemPuGuux4 +L5AcCRtmSCqRfmvl8H39fxDx1SWZLfjaVTykG/1ge4vk7QtjVodBQ2LWVye47xyDYPb JkRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JRd87dnO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id b13-20020a170902d50d00b001c4749ee72csi296304plg.503.2023.10.04.17.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 17:01:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JRd87dnO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5E2088534663; Wed, 4 Oct 2023 17:01:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243761AbjJEAB3 (ORCPT + 99 others); Wed, 4 Oct 2023 20:01:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241171AbjJEABZ (ORCPT ); Wed, 4 Oct 2023 20:01:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 401839E for ; Wed, 4 Oct 2023 17:01:22 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69215C433C7; Thu, 5 Oct 2023 00:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696464081; bh=pT9bmZ/bh9lBQv3geI9gE4cnZuBHmmOmTxUsClrb6Fc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JRd87dnOFadg5OvUjak2dHXVko0c6jmwa6+NDYsPZVf4pdl4xVij21I48MK4Ub96A ewuuo/fsKr+1izHtrClBss4FJM58CPItamH8YToY1tF3WhWDi9jg+XU2+fxn2UFzD7 Fa2TWVeDy0UmYIfUXwdA9Coltz8+jLxgb10U8yoJBdQJIojur7FLv2fRCqcsUiuXWw Axr3Udy/gPKlyvgXanCdlWnsc83jvhEqeKW1+rDdED1BuHAxrOEo1NW8IfQqt4zqSL tD22Ab1ciklntJQ+V5mi8MOy344z9iAXedkpgKRyUPQyrMqQWQpNs0ukT9k+wbtHVU G2g7K0ht1ILYA== Date: Wed, 4 Oct 2023 17:01:20 -0700 From: Jakub Kicinski To: Chengfeng Ye Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net/sched: use spin_lock_bh() on &gact->tcf_lock Message-ID: <20231004170120.1c80b3b4@kernel.org> In-Reply-To: <20230926182625.72475-1-dg573847474@gmail.com> References: <20230926182625.72475-1-dg573847474@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 17:01:31 -0700 (PDT) On Tue, 26 Sep 2023 18:26:25 +0000 Chengfeng Ye wrote: > I find tcf_gate_act() acquires &gact->tcf_lock without disable > bh explicitly, as gact->tcf_lock is acquired inside timer under > softirq context, if tcf_gate_act() is not called with bh disable > by default or under softirq context(which I am not sure as I cannot > find corresponding documentation), then it could be the following > deadlocks. > > tcf_gate_act() > --> spin_loc(&gact->tcf_lock) > > --> gate_timer_func() > --> spin_lock(&gact->tcf_lock) This is a TC action, I don't think it can run without BH being already disabled, can it? -- pw-bot: cr