Re: [PATCH v3 1/1] xdp: avoid calling kfree twice

2020-12-11 Thread Rain River
On Fri, Dec 11, 2020 at 11:53 PM Daniel Borkmann wrote: > > On 12/11/20 5:26 AM, Zhu Yanjun wrote: > > In the function xdp_umem_pin_pages, if npgs != umem->npgs and > > npgs >= 0, the function xdp_umem_unpin_pages is called. In this > > function, kfree is called to handle umem->pgs, and then in th

Re: [PATCH v3 1/1] xdp: avoid calling kfree twice

2020-12-10 Thread Daniel Borkmann
On 12/11/20 5:26 AM, Zhu Yanjun wrote: In the function xdp_umem_pin_pages, if npgs != umem->npgs and npgs >= 0, the function xdp_umem_unpin_pages is called. In this function, kfree is called to handle umem->pgs, and then in the function xdp_umem_pin_pages, kfree is called again to handle umem->pg

[PATCH v3 1/1] xdp: avoid calling kfree twice

2020-12-09 Thread Zhu Yanjun
In the function xdp_umem_pin_pages, if npgs != umem->npgs and npgs >= 0, the function xdp_umem_unpin_pages is called. In this function, kfree is called to handle umem->pgs, and then in the function xdp_umem_pin_pages, kfree is called again to handle umem->pgs. Eventually, to umem->pgs, kfree is cal