Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2735085pxb; Mon, 1 Nov 2021 00:14:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze4E6y0K1HtOn7m4hfX2A/Kps1CrTiBaSNbpAV214AzxMeEspUKDgGiLzBgMyyXu08aSBT X-Received: by 2002:a05:6638:4090:: with SMTP id m16mr20473081jam.147.1635750856542; Mon, 01 Nov 2021 00:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635750856; cv=none; d=google.com; s=arc-20160816; b=cRiuv8l4Bv2Hg9wP+3Ifhp13DhoEUplz3pPUVr5vthldnKA29ftJQrp1b9GPvOOR3E xvEOH4xZQEfQRJ8IIUbQeZBidvW3Uja0JW58N2JG0dsOC2aYoCNvw7occK4w1vMYQ9ok MLP/WzNUfJchztl75u+zxBQ4heZU8tb/ce5Nvk2viewNudWNOknRLe4F755PYN6WEler tacSgwGn8j2T1hWEiw85q4oXRHMzJFwyzVA6idDSV2NVydbwdy2zJ6farmd7s/mLlwGx hW4S8BTfDGhE2bkOrLTnNPT9OFpSS40e3vqsqu4yTE3YNEUvlS+yCamI0rtS4S09tK8Q EFog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4fX8NRAOk+O/aWbcdEs/lDF3SUCga+DQgKNNX9Asy+k=; b=ir2mTczFDJgWlmuJ9YTY/AB1BPvEzr9zC3fnky758aYY7NFNBq9q2P3Ao0pW0W4TZI BnadaYcZqHZiZHN19t4V+ZHnJCfkCquBiSXSA0Myd2rSoDD5DCn4FFpiGPrn62olpeaY gr1si2sOKukDARdqpmSwQOCZ+i50KvpqjN8qBQVo2Ac6Fs6R+mW582Wum7t6GJ9q87Gk M9gpjCdLZnXoL7ZiruPykCZeGwzI/f+awPJuh8Kw8X71uzKNO1DC/l2eCEakZz2fJ+um X0YW0wUIZrW+zG7Isq6E8Y0iUnLjKI+Bu72YreYY43Nb91+99jh5LR0bIAk7PjIDMOqX +J1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=WrD29iuv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k8si16873141iov.8.2021.11.01.00.14.05; Mon, 01 Nov 2021 00:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=WrD29iuv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbhKAHO6 (ORCPT + 99 others); Mon, 1 Nov 2021 03:14:58 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:56425 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbhKAHOz (ORCPT ); Mon, 1 Nov 2021 03:14:55 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 16EB55C00EF; Mon, 1 Nov 2021 03:12:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 01 Nov 2021 03:12:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=4fX8NR AOk+O/aWbcdEs/lDF3SUCga+DQgKNNX9Asy+k=; b=WrD29iuvdGgIiCLcZrAV22 DZDvpymUWj3uUjONZw76XYgiMjrl+x/Qx0kIUGsdHEJQWamoN8ExtbCekst77wwt pLQ297XkWE2V64B7dBtzmHvl32gGEp997CJwaim9OCIAFtp9kcsf4KqWpw417+/3 e6HPDhdt4s0WMtaBpdn8RCjVZua9sj6B6y45CArJGsfrFwmB3bGuSFPjJE65ua7V 1HLHztjE8aco98+u6ZV8chRp5GGSToeoUyN3JzRNCzPY53FWym9XMBRe7+WAPAbB IKt5jmdgsJ3M+ICZBq0hYXthqXNXVDPzSyBlihostsrVbwLHab9/6bYVKW7cE5mA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdehuddguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepkfguohcu ufgthhhimhhmvghluceoihguohhstghhsehiughoshgthhdrohhrgheqnecuggftrfgrth htvghrnheptdffkeekfeduffevgeeujeffjefhtefgueeugfevtdeiheduueeukefhudeh leetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepih guohhstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 1 Nov 2021 03:12:21 -0400 (EDT) Date: Mon, 1 Nov 2021 09:12:17 +0200 From: Ido Schimmel To: Leon Romanovsky , davem@davemloft.net, kuba@kernel.org Cc: Leon Romanovsky , Jiri Pirko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, edwin.peer@broadcom.com Subject: Re: [PATCH net-next] devlink: Require devlink lock during device reload Message-ID: References: <9716f9a13e217a0a163b745b6e92e02d40973d2c.1635701665.git.leonro@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9716f9a13e217a0a163b745b6e92e02d40973d2c.1635701665.git.leonro@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 31, 2021 at 07:35:56PM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky > > Devlink reload was implemented as a special command which does _SET_ > operation, but doesn't take devlink->lock, while recursive devlink > calls that were part of .reload_up()/.reload_down() sequence took it. > > This fragile flow was possible due to holding a big devlink lock > (devlink_mutex), which effectively stopped all devlink activities, > even unrelated to reloaded devlink. > > So let's make sure that devlink reload behaves as other commands and > use special nested locking primitives with a depth of 1. Such change > opens us to a venue of removing devlink_mutex completely, while keeping > devlink locking complexity in devlink.c. Jakub/Dave, I will be mostly unavailable until later this week, but I have applied this patch to our queue and can report testing results tomorrow. I would appreciate it if you could hold off on applying it until then. Thanks