Message ID | 20240222-stmmac_xdp-v2-1-4beee3a037e4@linutronix.de (mailing list archive) |
---|---|
State | Accepted |
Commit | f72a1994698ebe1a9eeadba7bfe2aa01afcde0a4 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v2] net: stmmac: Complete meta data only when enabled | expand |
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <kuba@kernel.org>: On Sun, 25 Feb 2024 12:38:37 +0100 you wrote: > Currently using plain XDP/ZC sockets on stmmac results in a kernel crash: > > |[ 255.822584] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 > |[...] > |[ 255.822764] Call trace: > |[ 255.822766] stmmac_tx_clean.constprop.0+0x848/0xc38 > > [...] Here is the summary with links: - [net,v2] net: stmmac: Complete meta data only when enabled https://git.kernel.org/netdev/net/c/f72a1994698e You are awesome, thank you!
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index e80d77bd9f1f..8b77c0952071 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2672,7 +2672,8 @@ static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue, } if (skb) { stmmac_get_tx_hwtstamp(priv, p, skb); - } else { + } else if (tx_q->xsk_pool && + xp_tx_metadata_enabled(tx_q->xsk_pool)) { struct stmmac_xsk_tx_complete tx_compl = { .priv = priv, .desc = p,