Subject: Re: [PATCH net v2] net: fix stack overflow when LRO is disabled for virtual interfaces

From: Jakub Kicinski <[email-masked]>
Date: Fri, 19 May 2023 14:31:58 -0700

On Fri, 19 May 2023 15:25:12 +0900 Taehee Yoo wrote:
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 6b12d8a9d463..f051c293ffaa 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -9758,6 +9758,9 @@ int __netdev_update_features(struct net_device *dev)
>                  return -1;
>          }
> 
> +       if (netif_is_bond_master(dev) || netif_is_team_master(dev))
> +               dev->features = features;
> +
>          /* some features must be disabled on lower devices when disabled
>           * on an upper device (think: bonding master or bridge)
>           */
> 
> It fixes the stack overflow problem, but I'm not sure whether updating 
> it before netdev_sync_lower_features() is safe or not.

Indeed, I don't think we can do this, udp_tunnel_drop_rx_info()
will get confused for example. Let me just apply the patch as is..