[PATCH v2] net/mlx5e: fix bpf_prog reference count leaks in mlx5e_alloc_rq

2020-07-30 Thread Xin Xiong
objects for different RQ types") Signed-off-by: Xin Xiong Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- v1 -> v2: - Amended parts of wording to be better understood - Added Fixes tag --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent

2020-07-29 Thread Xin Xiong
easing the refcount kept by a local variable, resulting in refcount leaks. Fix the issue by adding atm_dev_put() before returning 0 both when dev_data->persist is zero or PRIV(dev)->vcc isn't NULL. Signed-off-by: Xin Xiong Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- drivers/atm/a

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

2020-07-29 Thread Xin Xiong
he error code and forgets to drop the refcount increased earlier, causing a refcount leak of "rq->xdp_prog". Fix this issue by jumping to the error handling path err_rq_wq_destroy when either function fails. Signed-off-by: Xin Xiong Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan

[PATCH] tty: fix pid refcount leak in tty_signal_session_leader

2020-07-25 Thread Xin Xiong
s, which causes refcount leaks. Fix the issue by decreasing the current refcount of the local variable tty_pgrp before assigning new objects to it. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan Signed-off-by: Xin Xiong --- drivers/tty/tty_jobctrl.c | 2 ++ 1 file changed, 2 insertions

[PATCH] fork: fix pid refcount leaks when destroying file

2020-07-25 Thread Xin Xiong
file, the function only invokes fput() to destroy pidfile, in which the increased refcount won't be decreased, resulting in a refcount leak. Fix this issue by adding put_pid() in the error handling path bad_fork_put_pidfd. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan Signed-off-by: Xin X

[PATCH] drm: fix drm_dp_mst_port refcount leaks in drm_dp_mst_allocate_vcpi

2020-07-19 Thread Xin Xiong
_init_vcpi() returns a negative value. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan Signed-off-by: Xin Xiong --- drivers/gpu/drm/drm_dp_mst_topology.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_