* [PATCH net v2] net: sparx5: do not refer to skb after passing it on
@ 2022-02-02 8:30 Steen Hegelund
2022-02-02 17:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Steen Hegelund @ 2022-02-02 8:30 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski, UNGLinuxDriver, netdev,
linux-arm-kernel, linux-kernel, Dan Carpenter
Cc: Steen Hegelund, kernel test robot
Do not try to use any SKB fields after the packet has been passed up in the
receive stack.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
---
drivers/net/ethernet/microchip/sparx5/sparx5_packet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c b/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c
index dc7e5ea6ec15..148d431fcde4 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c
@@ -145,9 +145,9 @@ static void sparx5_xtr_grp(struct sparx5 *sparx5, u8 grp, bool byte_swap)
skb_put(skb, byte_cnt - ETH_FCS_LEN);
eth_skb_pad(skb);
skb->protocol = eth_type_trans(skb, netdev);
- netif_rx(skb);
netdev->stats.rx_bytes += skb->len;
netdev->stats.rx_packets++;
+ netif_rx(skb);
}
static int sparx5_inject(struct sparx5 *sparx5,
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net v2] net: sparx5: do not refer to skb after passing it on
2022-02-02 8:30 [PATCH net v2] net: sparx5: do not refer to skb after passing it on Steen Hegelund
@ 2022-02-02 17:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-02 17:20 UTC (permalink / raw)
To: Steen Hegelund
Cc: davem, kuba, UNGLinuxDriver, netdev, linux-arm-kernel,
linux-kernel, dan.carpenter, lkp
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 2 Feb 2022 09:30:39 +0100 you wrote:
> Do not try to use any SKB fields after the packet has been passed up in the
> receive stack.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
>
> [...]
Here is the summary with links:
- [net,v2] net: sparx5: do not refer to skb after passing it on
https://git.kernel.org/netdev/net/c/81eb8b0b1878
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-02 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-02 8:30 [PATCH net v2] net: sparx5: do not refer to skb after passing it on Steen Hegelund
2022-02-02 17:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox