diff options
| author | Marco Elver <[email protected]> | 2021-02-01 17:04:20 +0100 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2021-02-02 17:36:12 -0800 |
| commit | 097b9146c0e26aabaa6ff3e5ea536a53f5254a79 (patch) | |
| tree | 15723ada024ebc1acff882732cd9b165eeee5266 /tools/perf/scripts/python | |
| parent | ec99a470c7d5517c97dee6dd7953275a92c63834 (diff) | |
net: fix up truesize of cloned skb in skb_prepare_for_shift()
Avoid the assumption that ksize(kmalloc(S)) == ksize(kmalloc(S)): when
cloning an skb, save and restore truesize after pskb_expand_head(). This
can occur if the allocator decides to service an allocation of the same
size differently (e.g. use a different size class, or pass the
allocation on to KFENCE).
Because truesize is used for bookkeeping (such as sk_wmem_queued), a
modified truesize of a cloned skb may result in corrupt bookkeeping and
relevant warnings (such as in sk_stream_kill_queues()).
Link: https://lkml.kernel.org/r/X9JR/[email protected]
Reported-by: [email protected]
Suggested-by: Eric Dumazet <[email protected]>
Signed-off-by: Marco Elver <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions