aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorNikita Yushchenko <[email protected]>2024-12-08 14:50:01 +0500
committerJakub Kicinski <[email protected]>2024-12-10 19:02:47 -0800
commit5cb099902b6b6292b3a85ffa1bb844e0ba195945 (patch)
treefd16a5f5fab4efd72f79a9f17a876a30781d3bca /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parentd02af27fa2e8156faf989a5ef7782e7b9a48e2de (diff)
net: renesas: rswitch: fix possible early skb release
When sending frame split into multiple descriptors, hardware processes descriptors one by one, including writing back DT values. The first descriptor could be already marked as completed when processing of next descriptors for the same frame is still in progress. Although only the last descriptor is configured to generate interrupt, completion of the first descriptor could be noticed by the driver when handling interrupt for the previous frame. Currently, driver stores skb in the entry that corresponds to the first descriptor. This results into skb could be unmapped and freed when hardware did not complete the send yet. This opens a window for corrupting the data being sent. Fix this by saving skb in the entry that corresponds to the last descriptor used to send the frame. Fixes: d2c96b9d5f83 ("net: rswitch: Add jumbo frames handling for TX") Signed-off-by: Nikita Yushchenko <[email protected]> Reviewed-by: Yoshihiro Shimoda <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions