VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   30 Branches   50 Tags
author: Eric Dumazet <edumazet@google.com> 2023-07-01 02:48:24 +0000 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-07-19 16:36:46 +0200 commit: 58f9e88eb247263c74383b4ee8858abac15cdbe0 parent: ea08220190361ac35a4e77d40cff639c21c26f42
Commit Summary:
net: fix net_dev_start_xmit trace event vs skb_transport_offset()
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/include/trace/events/net.h b/include/trace/events/net.h
index da611a7aaf97..f667c76a3b02 100644
--- a/include/trace/events/net.h
+++ b/include/trace/events/net.h
@@ -51,7 +51,8 @@ TRACE_EVENT(net_dev_start_xmit,
 		__entry->network_offset = skb_network_offset(skb);
 		__entry->transport_offset_valid =
 			skb_transport_header_was_set(skb);
-		__entry->transport_offset = skb_transport_offset(skb);
+		__entry->transport_offset = skb_transport_header_was_set(skb) ?
+			skb_transport_offset(skb) : 0;
 		__entry->tx_flags = skb_shinfo(skb)->tx_flags;
 		__entry->gso_size = skb_shinfo(skb)->gso_size;
 		__entry->gso_segs = skb_shinfo(skb)->gso_segs;