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 A876D8833 for ; Fri, 11 Aug 2023 22:14:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B4A8C433C8; Fri, 11 Aug 2023 22:14:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691792044; bh=ij7a71/93P/g8NWn3Yd2f9267DUpu7Im83IKmaelYjk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=B/yHjJrdYgQ4RPQS0xfdOYpCvSVK4ViiJhjxsWcWOJ3inOge8CcbzAJ/zvDC6TRlw gV2nkA5T1UuDYvnPLbkHx3OLudpnnNmmX3ib0JtlsWZwvs8nWHVnsNISiKNBqhtSL4 tJ3UNy1C1DSc+PFSgucj6WGcqLzRkbOe58nQqYlS2yVeiAHjESIarAX557NpzpKtAh bQkKe7BocFK37GYctu4GPM4dxjmFa1nIDI3ayWoNlGkOrUs2OZ5D8XMs/reNMjSsAE IaUOONRp6Wrg2/42mWttZEw+mE7YCL1uP3oF0DTdai8A+KGcR8xUUxCOEx5imUP/yv 3/7TUul2wQzfA== Date: Fri, 11 Aug 2023 15:14:03 -0700 From: Jakub Kicinski To: Jiri Pirko Cc: Shay Drory , netdev@vger.kernel.org, pabeni@redhat.com, davem@davemloft.net, edumazet@google.com, Jiri Pirko Subject: Re: [PATCH net v2] devlink: Delay health recover notification until devlink registered Message-ID: <20230811151403.127c8755@kernel.org> In-Reply-To: <20230811144231.0cea3205@kernel.org> References: <20230809203521.1414444-1-shayd@nvidia.com> <20230810103300.186b42c8@kernel.org> <20230811144231.0cea3205@kernel.org> 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 Fri, 11 Aug 2023 14:42:31 -0700 Jakub Kicinski wrote: > > Limiting the creation of health reporter only when instance is > > registered does not seem like a good solution to me. > > > > As with any other object, we postpone the notifications only after > > register is done, that sounds fine, doesn't it? > > No, it doesn't. Registering health reporters on a semi-initialized > device is a major foot gun, we should not allow this unless really > necessary. FWIW I mean that the recovery may race with the init and try to access things which aren't set up yet. Could lead to deadlocks or crashes at worst and sprinkling of "if (!initialized) return;" at best. All the same problems we had before reload was put under the instance lock basically.