netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: 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, kuba@kernel.org,
	pabeni@redhat.com, matthias.bgg@gmail.com,
	linux-mediatek@lists.infradead.org, lorenzo.bianconi@redhat.com,
	sujuan.chen@mediatek.com
Subject: Re: [PATCH v3 net-next 2/2] net: ethernet: mtk_wed: fix possible deadlock if mtk_wed_wo_init fails
Date: Thu, 8 Dec 2022 10:44:31 +0200	[thread overview]
Message-ID: <Y5Gj7y0412M9zNpD@unreal> (raw)
In-Reply-To: <b28b55a639002a56b77c0651a4122ebede041936.1670421354.git.lorenzo@kernel.org>

On Wed, Dec 07, 2022 at 03:04:55PM +0100, Lorenzo Bianconi wrote:
> Introduce __mtk_wed_detach() in order to avoid a deadlock in
> mtk_wed_attach routine if mtk_wed_wo_init fails since both
> mtk_wed_attach and mtk_wed_detach run holding hw_lock mutex.
> 
> Fixes: 4c5de09eb0d0 ("net: ethernet: mtk_wed: add configure wed wo support")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  drivers/net/ethernet/mediatek/mtk_wed.c | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c
> index 4ef23eadd69e..a6271449617f 100644
> --- a/drivers/net/ethernet/mediatek/mtk_wed.c
> +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
> @@ -577,12 +577,10 @@ mtk_wed_deinit(struct mtk_wed_device *dev)
>  }
>  

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

  reply	other threads:[~2022-12-08  8:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 14:04 [PATCH v3 net-next 0/2] fix possible deadlock during WED attach Lorenzo Bianconi
2022-12-07 14:04 ` [PATCH v3 net-next 1/2] net: ethernet: mtk_wed: fix some possible NULL pointer dereferences Lorenzo Bianconi
2022-12-08  8:44   ` Leon Romanovsky
2022-12-07 14:04 ` [PATCH v3 net-next 2/2] net: ethernet: mtk_wed: fix possible deadlock if mtk_wed_wo_init fails Lorenzo Bianconi
2022-12-08  8:44   ` Leon Romanovsky [this message]
2022-12-09  3:50 ` [PATCH v3 net-next 0/2] fix possible deadlock during WED attach patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5Gj7y0412M9zNpD@unreal \
    --to=leon@kernel.org \
    --cc=Mark-MC.Lee@mediatek.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=john@phrozen.org \
    --cc=kuba@kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    --cc=sujuan.chen@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).