Subject: Re: [RFC 3/7] net: ethernet: mtk_eth_soc: implement flow offloading to WED devices

From: Pablo Neira Ayuso <[email-masked]>
Date: Tue, 13 Jul 2021 20:40:02 +0200

On Tue, Jul 13, 2021 at 06:07:41PM +0200, Felix Fietkau wrote:
[...]
> diff --git a/net/core/dev.c b/net/core/dev.c
> index c253c2aafe97..7ea6a1db0338 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -885,6 +885,10 @@ int dev_fill_forward_path(const struct net_device *dev, const u8 *daddr,
>  		if (WARN_ON_ONCE(last_dev == ctx.dev))
>  			return -1;
>  	}
> +
> +	if (!ctx.dev)
> +		return ret;

This is not a safety check, right? After this update ctx.dev might be NULL?

> +
>  	path = dev_fwd_path(stack);
>  	if (!path)
>  		return -1;
> -- 
> 2.30.1
>