summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Bommarito <michael.bommarito@gmail.com>2026-07-11 11:19:34 -0400
committerJakub Kicinski <kuba@kernel.org>2026-07-22 07:51:42 -0700
commit53969d704fa5b7c1751e277fac96bfc22b435eac (patch)
tree847ef4651db8e5eca9dcd1cea9491c6dc00fb4d5 /include
parent3656a79f94c471827a08f2cacce5f94ad5e52c24 (diff)
amt: make the head writable before rewriting the L2 header
amt_multicast_data_handler(), amt_membership_query_handler() and amt_update_handler() rewrite the ethernet header of the decapsulated skb in place (eth->h_proto, eth->h_dest and, for the query, also eth->h_source) before handing it up the stack. The skb head may be shared, for example when a packet tap has cloned it on the underlay interface, so writing through it corrupts the other reader's copy. Call skb_cow_head() before the rewrite so the head is private. It is placed before the pointers into the head are (re-)derived, so a reallocation caused by the copy is picked up by those derivations. Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface") Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Taehee Yoo <ap420073@gmail.com> Link: https://patch.msgid.link/20260711151934.2955226-3-michael.bommarito@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions