From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78B3918DB03 for ; Fri, 16 May 2025 15:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747408965; cv=none; b=slfzW69hzcMw2dxvm5Mm+bRtY046CKDwdu4BC+cR7sUZoj+vsgbHZwDGtxUU0hqJEKK2LX1zS8tbXtuyfGMZWw6G7PcBzlOgZCf5iOBUUI60fpYEkzsYAchXqRTjE0SUNgEgweXEStNfPU6BkM7n9Bzl4MxWAiwQ8VNxvROEdSc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747408965; c=relaxed/simple; bh=SorwpczT7rZnyPHu8UoDaQwRHmLrJBq3kaASvXN0ri8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PX1j+qKbR9EH632ZVTJjUNz1OPVTqLFfb+Umx12bK4Huk9kH8Hjd/Jr35TPCe0+60Bx6zy0IjQ+fj0tPUXyZx5Kfd6095OjFyObidCi2zjrr65up/G4zEfzd/3Fk5iJsoyIS8z1eyKQUHu6JulWMhw6B5qU2osMaBqGUTpMaCD4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b7QsErVR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b7QsErVR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5AF5C4CEE4; Fri, 16 May 2025 15:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747408964; bh=SorwpczT7rZnyPHu8UoDaQwRHmLrJBq3kaASvXN0ri8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=b7QsErVRkyqIspAN8ZHnJtY8QpmMQVAr/SUc6BMjU1siEf/LpzB/WksK29L64K0WG fc9qxwNhMzXEq4OqOobbeygDUlF/0i5GfVCE9MMdr2PCzhb87oXVwwKJY7KEVrhcwn vTAZIFxaIRULeBuwHLTcL7cvjmgByPyfk0gjhnz45ZzKCraFSixlh0DtavfHLE3IRw UGlgCOXZyLtTrKmixM0mBP0h0FWikO23fndKYxxpSgD8f8ip3pp9rH/qGu4KqaJhd5 KuQF2zpUPeKTyCyhfxw/66XuTgkICCzLWTpwaRDk9QqS4dbg2hylrJ05dS7rDQ7C2o g+b1ywkg9jWDg== Date: Fri, 16 May 2025 08:22:43 -0700 From: Jakub Kicinski To: Kuniyuki Iwashima Cc: , , , , , , Subject: Re: [PATCH net-next] net: let lockdep compare instance locks Message-ID: <20250516082243.1befa6f4@kernel.org> In-Reply-To: <20250516030000.48858-1-kuniyu@amazon.com> References: <20250515193609.3da84ac3@kernel.org> <20250516030000.48858-1-kuniyu@amazon.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 15 May 2025 19:59:41 -0700 Kuniyuki Iwashima wrote: > > Is the thinking that once the big rtnl lock disappears in cleanup_net > > the devices are safe to destroy without any locking because there can't > > be any live users trying to access them? > > I hope yes, but removing VF via sysfs and removing netns might > race and need some locking ? I think we should take the small lock around default_device_exit_net() and then we'd be safe? Either a given VF gets moved to init_net first or the sysfs gets to it and unregisters it safely in the old netns.