lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1b9ade5b-bfa9-4bcd-9bc4-6457dffcd887@redhat.com>
Date: Thu, 4 Dec 2025 10:25:04 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Xiaolei Wang <xiaolei.wang@...driver.com>, nicolas.ferre@...rochip.com,
 claudiu.beznea@...on.dev, andrew+netdev@...n.ch, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, Kexin.Hao@...driver.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [net PATCH] net: macb: Relocate mog_init_rings() callback from
 macb_mac_link_up() to macb_open()

On 11/28/25 11:36 AM, Xiaolei Wang wrote:
> In the non-RT kernel, local_bh_disable() merely disables preemption,
> whereas it maps to an actual spin lock in the RT kernel. Consequently,
> when attempting to refill RX buffers via netdev_alloc_skb() in
> macb_mac_link_up(), a deadlock scenario arises as follows:
>   The dependency chain caused by macb_mac_link_up():
>   &bp->lock --> (softirq_ctrl.lock) --> _xmit_ETHER#2

I'm sorry, but I can't see how this dependency chain is caused by
mog_init_rings(), please extend the above info pin pointing the
function/code effectively acquiring the lock and how it's reached.

>   The dependency chain caused by macb_start_xmit():
>   _xmit_ETHER#2 --> &bp->lock
> 
> Notably, invoking the mog_init_rings() callback upon link establishment
> is unnecessary. Instead, we can exclusively call mog_init_rings() within
> the ndo_open() callback. This adjustment resolves the deadlock issue.
> Given that mog_init_rings() is only applicable to
> non-MACB_CAPS_MACB_IS_EMAC cases, we can simply move it to macb_open()
> and simultaneously eliminate the MACB_CAPS_MACB_IS_EMAC check.
> 
> Suggested-by: Kevin Hao <kexin.hao@...driver.com>
> Signed-off-by: Xiaolei Wang <xiaolei.wang@...driver.com>

Please include a suitable fixes tag.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ