Skip to content
Commit d903ec77 authored by Andy Spencer's avatar Andy Spencer Committed by David S. Miller
Browse files

gianfar: simplify FCS handling and fix memory leak



Previously, buffer descriptors containing only the frame check sequence
(FCS) were skipped and not added to the skb. However, the page reference
count was still incremented, leading to a memory leak.

Fixing this inside gfar_add_rx_frag() is difficult due to reserved
memory handling and page reuse. Instead, move the FCS handling to
gfar_process_frame() and trim off the FCS before passing the skb up the
networking stack.

Signed-off-by: default avatarAndy Spencer <aspencer@spacex.com>
Signed-off-by: default avatarJim Gruen <jgruen@spacex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ca79bec2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment