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 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D6E4EE01E9 for ; Tue, 10 Sep 2024 22:03:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0BC3381187; Tue, 10 Sep 2024 22:03:43 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id iPikwam5zjDY; Tue, 10 Sep 2024 22:03:42 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 81E2F81182 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1726005822; bh=PzQFPylOTxHxVwUQHfpOzdHLlNxmEkVABXtTOakffuw=; h=Date:From:To:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=pBGEw3uhIi/S4nCUEBOD+uJ7jbUhIXK9mNmkmiOmirOl07ztyxRwQj3NqgAe5Y7FQ qSzgSaF0YM1ICQ4V2C2UQ8p5loWSvyuiGur7yoKOc8wc4fLUGJPng5HSJp7pwDuOKm a7YyuZRT6RlACHzXwczTWUfPLCqu+Xjs0yhE1RuK0b4oMByZEq9dFmHuL5Md+kVqrl wW4dO2nGQqiNlRxKRrix8SPpBkl1YyVyS3bhmGh4GECqvRvsi5E6NlcXdXGEuFal0R xn9CsYkDTM7nqhduKb+qV/rYwFm8SMrA43RLgDiO3GxQ57Aq3dXIJAV9KZYi949eai KcGfB9WLfrKzw== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 81E2F81182; Tue, 10 Sep 2024 22:03:42 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 990621BF2CE for ; Tue, 10 Sep 2024 22:03:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8531C4078F for ; Tue, 10 Sep 2024 22:03:41 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id LB_OiHbuNN5s for ; Tue, 10 Sep 2024 22:03:40 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=kuba@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org B022B40733 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B022B40733 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp4.osuosl.org (Postfix) with ESMTPS id B022B40733 for ; Tue, 10 Sep 2024 22:03:40 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id F31645C0325; Tue, 10 Sep 2024 22:03:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CF2FC4CEC3; Tue, 10 Sep 2024 22:03:38 +0000 (UTC) Date: Tue, 10 Sep 2024 15:03:37 -0700 From: Jakub Kicinski To: Paolo Abeni Message-ID: <20240910150337.6c397227@kernel.org> In-Reply-To: <6c6b03fca7cc58658d47e0f3da68bbbcda4ae1ec.1725919039.git.pabeni@redhat.com> References: <6c6b03fca7cc58658d47e0f3da68bbbcda4ae1ec.1725919039.git.pabeni@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726005819; bh=sfENmLrwlWzvAOD+5XYnB6P0qhJUFGqNql3IOwc8uH8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Nu9yfT52CBf8EpHW3/x8hc+x4TEsNJt3RBAgA5+R5xuXiIwBgBpqFqu730gMGZAsb LEla0lCFWkE3xZX8SuJPAtyyoWQiVAsLwkv4eja95BwOJjqStcx7bqQA9bjSjnLEds JXCjVEtQzktNQaoDB/U/fiLi4914CKHAuXj87HqX3D6yNA0P11Sdcd25jySUqWZMj5 eosJ4sEvcdXdRKsJrgXXfBZATKMOcCR7w0BLB+sYY0PNssy3kloTX1TuF+v/enOUtC eYb6mD8Od2ovSgElA9WK5r/4ATJ46eaG6Uo+10pHzdGhTIjAvgHpa6b+lYGdzj7ikH ifHnX6Lk7gp+w== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Nu9yfT52 Subject: Re: [Intel-wired-lan] [PATCH v7 net-next 14/15] iavf: Add net_shaper_ops support X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiri Pirko , netdev@vger.kernel.org, John Fastabend , Jamal Hadi Salim , edumazet@google.com, Madhu Chittim , anthony.l.nguyen@intel.com, Simon Horman , Sridhar Samudrala , Donald Hunter , intel-wired-lan@lists.osuosl.org, przemyslaw.kitszel@intel.com, Sunil Kovvuri Goutham Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Tue, 10 Sep 2024 00:10:08 +0200 Paolo Abeni wrote: > + if (adapter->netdev->reg_state == NETREG_REGISTERED) { > + mutex_lock(&adapter->netdev->lock); > + devlock = true; > + } This leads to a false positive in cocci. Any concerns about moving the mutex_init() / _destroy() into alloc_netdev_mqs() / free_netdev()? I guess one could argue that narrower scope of the lock being valid may help catching errors, but I think we'll instead end up with more checks like the above sprinkled around than bugs caught?