]> git.baikalelectronics.ru Git - kernel.git/commit
net: Change the layout of structure trace_event_raw_fib_table_lookup
authorZong Li <zong@andestech.com>
Mon, 13 Aug 2018 02:26:52 +0000 (10:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Aug 2018 16:21:05 +0000 (09:21 -0700)
commit6a9dd407ccf866ca49d3d1c2f89a8a95ff7a0d05
treee79e552764d73bc2346f0ce4356536b03c75c293
parent240021e120a46545316baacd0d72b53bc32e5c47
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: e196a7350a51 ("net/ipv4: Udate fib_table_lookup tracepoint")
Signed-off-by: Zong Li <zong@andestech.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/trace/events/fib.h