aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorWillem de Bruijn <[email protected]>2018-05-24 18:10:30 -0400
committerDavid S. Miller <[email protected]>2018-05-24 21:55:20 -0400
commit9aad13b087ab0a588cd68259de618f100053360e (patch)
tree3b8aa031c4bbfe2fe07021e9aa7de0805c63e926 /tools/perf/util/scripting-engines/trace-event-python.c
parentd546b67cda015fb92bfee93d5dc0ceadb91deaee (diff)
packet: fix reserve calculation
Commit b84bbaf7a6c8 ("packet: in packet_snd start writing at link layer allocation") ensures that packet_snd always starts writing the link layer header in reserved headroom allocated for this purpose. This is needed because packets may be shorter than hard_header_len, in which case the space up to hard_header_len may be zeroed. But that necessary padding is not accounted for in skb->len. The fix, however, is buggy. It calls skb_push, which grows skb->len when moving skb->data back. But in this case packet length should not change. Instead, call skb_reserve, which moves both skb->data and skb->tail back, without changing length. Fixes: b84bbaf7a6c8 ("packet: in packet_snd start writing at link layer allocation") Reported-by: Tariq Toukan <[email protected]> Signed-off-by: Willem de Bruijn <[email protected]> Acked-by: Soheil Hassas Yeganeh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions