Thread (4 messages) 4 messages, 4 authors, 2025-05-22

Re: [PATCH net-next] eth: bnxt: fix deadlock when xdp is attached or detached

flat view

From: Michael Chan <michael.chan@broadcom.com>
Date: 2025-05-20 18:15:17
Also in: bpf

On Tue, May 20, 2025 at 12:12 AM Taehee Yoo [off-list ref] wrote:
When xdp is attached or detached, dev->ndo_bpf() is called by
do_setlink(), and it acquires netdev_lock() if needed.
Unlike other drivers, the bnxt driver is protected by netdev_lock while
xdp is attached/detached because it sets dev->request_ops_lock to true.

So, the bnxt_xdp(), that is callback of ->ndo_bpf should not acquire
netdev_lock().
But the xdp_features_{set | clear}_redirect_target() was changed to
acquire netdev_lock() internally.
It causes a deadlock.
To fix this problem, bnxt driver should use
xdp_features_{set | clear}_redirect_target_locked() instead.
Thanks.
Reviewed-by: Michael Chan <michael.chan@broadcom.com>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help