summaryrefslogtreecommitdiff
path: root/lib/nlattr.c
diff options
context:
space:
mode:
authorHoratiu Vultur <horatiu.vultur@microchip.com>2022-10-31 14:34:21 +0100
committerJakub Kicinski <kuba@kernel.org>2022-11-01 21:20:30 -0700
commitfc57062f98b0b0ae52bc584d8fd5ac77c50df607 (patch)
tree619a2ab4c1e58bbe6c327e77bacda5f4915a4ae8 /lib/nlattr.c
parent70644f722f0d297ca3c7664939f0bd3595eec14b (diff)
net: lan966x: Fix unmapping of received frames using FDMA
When lan966x was receiving a frame, then it was building the skb and after that it was calling dma_unmap_single with frame size as the length. This actually has 2 issues: 1. It is using a length to map and a different length to unmap. 2. When the unmap was happening, the data was sync for cpu but it could be that this will overwrite what build_skb was initializing. The fix for these two problems is to change the order of operations. First to sync the frame for cpu, then to build the skb and in the end to unmap using the correct size but without sync the frame again for cpu. Fixes: c8349639324a ("net: lan966x: Add FDMA functionality") Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Link: https://lore.kernel.org/r/20221031133421.1283196-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib/nlattr.c')
0 files changed, 0 insertions, 0 deletions