diff options
author | Luiz Augusto von Dentz <[email protected]> | 2021-12-01 10:54:52 -0800 |
---|---|---|
committer | Marcel Holtmann <[email protected]> | 2021-12-07 17:05:38 +0100 |
commit | 13244cccc2b61ec715f0ac583d3037497004d4a5 (patch) | |
tree | a6f62154833573b637d1ce75ac7ca99b88311da2 /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | 561ae1d46a8ddcbc13162d5771f5ed6c8249e730 (diff) |
skbuff: introduce skb_pull_data
Like skb_pull but returns the original data pointer before pulling the
data after performing a check against sbk->len.
This allows to change code that does "struct foo *p = (void *)skb->data;"
which is hard to audit and error prone, to:
p = skb_pull_data(skb, sizeof(*p));
if (!p)
return;
Which is both safer and cleaner.
Acked-by: Jakub Kicinski <[email protected]>
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions