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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE838C352A1 for ; Wed, 7 Dec 2022 01:24:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229866AbiLGBYd (ORCPT ); Tue, 6 Dec 2022 20:24:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbiLGBYc (ORCPT ); Tue, 6 Dec 2022 20:24:32 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 664B63E09D for ; Tue, 6 Dec 2022 17:24:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id A638CCE1AC2 for ; Wed, 7 Dec 2022 01:24:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56499C433C1; Wed, 7 Dec 2022 01:24:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670376267; bh=FPdfUOVq71widnt/rP5bz8etf16EdqYElslpYiElRrE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gDTQhVdcwUpsUQNRZRp0lDiK1wnybP7LNLHIt0JBjkhSc0w10Tvd6mfIu7+wCNRg7 RE9UFt0EcEZl+mntSxxB7p93dX0EeMUzbIkiKNmNOTa99ZMROwAYdvBzVQQWYsSsdH wVWVvL7/SYqEUCFb2tcnnZZ525qbQ5pmfyqyu4DYKCwOPXihPw2S5cUGFwWd/qFZzR 6sVSYEFCzN2aH31KZvrG78kd7PtmCYhiPes+kIb/GCzkpea8vWOtIvYeYe7euEhHqy y6hSOOBPyqqlWnhQGJdyeROCg/ljvJdA8J7eJD0YVTCXfVXYTAKuCpWBN9HioAF1XK 74glwHapxtWiw== Date: Tue, 6 Dec 2022 17:24:26 -0800 From: Jakub Kicinski To: Lorenzo Bianconi Cc: Leon Romanovsky , netdev@vger.kernel.org, nbd@nbd.name, john@phrozen.org, sean.wang@mediatek.com, Mark-MC.Lee@mediatek.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, matthias.bgg@gmail.com, linux-mediatek@lists.infradead.org, lorenzo.bianconi@redhat.com Subject: Re: [PATCH net-next] net: ethernet: mtk_wed: fix possible deadlock if mtk_wed_wo_init fails Message-ID: <20221206172426.7e7cf3bf@kernel.org> In-Reply-To: References: <20221205174441.30741550@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 7 Dec 2022 00:52:28 +0100 Lorenzo Bianconi wrote: > > FWIW, that does seem slightly better to me as well. > > Also - aren't you really fixing multiple issues here > > (even if on the same error path)? The locking, > > the null-checking and the change in mtk_wed_wo_reset()? > > wo NULL pointer issue was not hit before for the deadlock one (so I fixed them > in the same patch). > Do you prefer to split them in two patches? (wo null pointer fix first). Yes, I think they are different issues even if once "covers" the other. I think it'd make the review / judgment easier. > I have posted v2 addressing Leon's comments but I need to post a v3 to add > missing WARN_ON.