Re: [PATCH net-next] net: move replay logic to tc_modify_qdisc

From: Eric Dumazet
Date: Tue Mar 25 2025 - 14:02:55 EST


On Tue, Mar 25, 2025 at 6:54 PM Stanislav Fomichev <sdf@xxxxxxxxxxx> wrote:
>
> Eric reports that by the time we call netdev_lock_ops after
> rtnl_unlock/rtnl_lock, the dev might point to an invalid device.
> As suggested by Jakub in [0], move rtnl lock/unlock and request_module
> outside of qdisc_create. This removes extra complexity with relocking
> the netdev.
>
> 0: https://lore.kernel.org/netdev/20250325032803.1542c15e@xxxxxxxxxx/
>
> Fixes: a0527ee2df3f ("net: hold netdev instance lock during qdisc ndo_setup_tc")
> Reported-by: Eric Dumazet <edumazet@xxxxxxxxxx>
> Link: https://lore.kernel.org/netdev/20250305163732.2766420-1-sdf@xxxxxxxxxxx/T/#me8dfd778ea4c4463acab55644e3f9836bc608771
> Signed-off-by: Stanislav Fomichev <sdf@xxxxxxxxxxx>

Nice, thank you !

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>