Re: [PATCH] net/mlx5e: fix bpf_prog refcnt leaks in mlx5e_alloc_rq

2020-07-29 Thread Saeed Mahameed
On Wed, 2020-07-29 at 13:28 -0700, David Miller wrote: > From: Saeed Mahameed > Date: Wed, 29 Jul 2020 19:02:15 + > > >> Fix this issue by jumping to the error handling path > >> err_rq_wq_destroy > >> when either function fails. > >> > > > > Fixes: 422d4c401edd ("net/mlx5e: RX, Split WQ ob

Re: [PATCH] net/mlx5e: fix bpf_prog refcnt leaks in mlx5e_alloc_rq

2020-07-29 Thread David Miller
From: Saeed Mahameed Date: Wed, 29 Jul 2020 19:02:15 + > On Wed, 2020-07-29 at 20:33 +0800, Xin Xiong wrote: >> The function invokes bpf_prog_inc(), which increases the refcount of >> a >> bpf_prog object "rq->xdp_prog" if the object isn't NULL. >> >> The refcount leak issues take place in t

Re: [PATCH] net/mlx5e: fix bpf_prog refcnt leaks in mlx5e_alloc_rq

2020-07-29 Thread Saeed Mahameed
On Wed, 2020-07-29 at 20:33 +0800, Xin Xiong wrote: > The function invokes bpf_prog_inc(), which increases the refcount of > a > bpf_prog object "rq->xdp_prog" if the object isn't NULL. > > The refcount leak issues take place in two error handling paths. When > mlx5_wq_ll_create() or mlx5_wq_cyc_c

[PATCH] net/mlx5e: fix bpf_prog refcnt leaks in mlx5e_alloc_rq

2020-07-29 Thread Xin Xiong
The function invokes bpf_prog_inc(), which increases the refcount of a bpf_prog object "rq->xdp_prog" if the object isn't NULL. The refcount leak issues take place in two error handling paths. When mlx5_wq_ll_create() or mlx5_wq_cyc_create() fails, the function simply returns the error code and fo