Re: [PATCH net] virtio_net: fix memory leak inside XPD_TX with mergeable

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 2:33 PM Xuan Zhuo wrote: > > When we call xdp_convert_buff_to_frame() to get xdpf, if it returns > NULL, we should check if xdp_page was allocated by xdp_linearize_page(). > If it is newly allocated, it should be freed here alone. Just like any > other "goto err_xdp". > >

[PATCH net] virtio_net: fix memory leak inside XPD_TX with mergeable

2022-08-04 Thread Xuan Zhuo
When we call xdp_convert_buff_to_frame() to get xdpf, if it returns NULL, we should check if xdp_page was allocated by xdp_linearize_page(). If it is newly allocated, it should be freed here alone. Just like any other "goto err_xdp". Fixes: 44fa2dbd4759 ("xdp: transition into using xdp_frame for