Subject: Re: [PATCH net 2/2] net: ti: am65-cpsw-nuss: Fix NULL pointer dereference at module removal

From: Jakub Kicinski <[email-masked]>
Date: Sat, 18 Nov 2023 20:44:24 -0800

On Thu, 16 Nov 2023 13:09:30 +0200 Roger Quadros wrote:
> The NULL pointer derefernce error seems to come from the
> list_for_each_entry_safe() helper in free_netdev(). It looks like
> the napi pointers are stale contents but I coudn't figure out why.

Some interplay with am65_cpsw_nuss_free_tx_chns()?
It does:

	memset(tx_chn, 0, sizeof(*tx_chn));

which will wipe the NAPI instance, including its struct list_head.

AFAICT the patch as posted misses free_netdev() on some error paths.
-- 
pw-bot: cr