Re: [PATCH] net: xdp: fix error return code of xsk_generic_xmit()

2021-03-05 Thread Magnus Karlsson
On Fri, Mar 5, 2021 at 10:28 AM Jia-Ju Bai wrote: > > When err is zero but xskq_prod_reserve() fails, no error return code of > xsk_generic_xmit() is assigned. > To fix this bug, err is assigned with the return value of > xskq_prod_reserve(), and then err is checked. This error is ignored by

[PATCH] net: xdp: fix error return code of xsk_generic_xmit()

2021-03-05 Thread Jia-Ju Bai
When err is zero but xskq_prod_reserve() fails, no error return code of xsk_generic_xmit() is assigned. To fix this bug, err is assigned with the return value of xskq_prod_reserve(), and then err is checked. The spinlock is only used to protect the call to xskq_prod_reserve(). Reported-by: TOTE