Skip to content

Commit 0192e7d

Browse files
Zong Lidavem330
authored andcommitted
net: Change the layout of structure trace_event_raw_fib_table_lookup
There is an unalignment access about the structure 'trace_event_raw_fib_table_lookup'. In include/trace/events/fib.h, there is a memory operation which casting the 'src' data member to a pointer, and then store a value to this pointer point to. p32 = (__be32 *) __entry->src; *p32 = flp->saddr; The offset of 'src' in structure trace_event_raw_fib_table_lookup is not four bytes alignment. On some architectures, they don't permit the unalignment access, it need to pay the price to handle this situation in exception handler. Adjust the layout of structure to avoid this case. Fixes: 9f32397 ("net/ipv4: Udate fib_table_lookup tracepoint") Signed-off-by: Zong Li <[email protected]> Acked-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a72ce9a commit 0192e7d

File tree

1 file changed

+1
-1
lines changed
  • include/trace/events

1 file changed

+1
-1
lines changed

include/trace/events/fib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ TRACE_EVENT(fib_table_lookup,
2222
__field( int, err )
2323
__field( int, oif )
2424
__field( int, iif )
25+
__field( u8, proto )
2526
__field( __u8, tos )
2627
__field( __u8, scope )
2728
__field( __u8, flags )
@@ -31,7 +32,6 @@ TRACE_EVENT(fib_table_lookup,
3132
__array( __u8, saddr, 4 )
3233
__field( u16, sport )
3334
__field( u16, dport )
34-
__field( u8, proto )
3535
__dynamic_array(char, name, IFNAMSIZ )
3636
),
3737

0 commit comments

Comments
 (0)