[PATCH] batman-adv: Fix orig node refcnt leak when creating neigh node

2020-09-17 Thread Xiyu Yang
unt of orig_node object during the initialization and adding corresponding batadv_orig_node_put() in batadv_neigh_node_release(). Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- net/batman-adv/originator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/batman-adv/originator.c b/net

[PATCH] ipv6: Fix nexthop refcnt leak when creating ipv6 route info

2020-07-25 Thread Xiyu Yang
routing. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- net/ipv6/route.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 82cbb46a2a4f..427ecd7032bd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -3682,14 +3682

[PATCH] tty: serial_core: Fix uart_state refcnt leak when the port startup

2020-06-13 Thread Xiyu Yang
ct to the return value of uart_port_lock() when invoking uart_port_lock(). Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- drivers/tty/serial/serial_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c

[PATCH] tty: serial_core: Fix uart_state leak when port shutdown

2020-06-13 Thread Xiyu Yang
he return value of uart_port_lock() when invoking uart_port_lock(). Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- drivers/tty/serial/serial_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c

[PATCH] sctp: Fix sk_buff leak when receiving a datagram

2020-06-13 Thread Xiyu Yang
f the "skb" object and directly return it, causing a potential memory leak in the caller function. Fix this issue by calling refcount_inc after __skb_dequeue() successfully executed. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- net/sctp/socket.c | 2 ++ 1 file changed, 2 insertions(

[PATCH] drm/ttm: Fix dma_fence refcnt leak when adding move fence

2020-06-13 Thread Xiyu Yang
t_gpu flag is equals to true. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- drivers/gpu/drm/ttm/ttm_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index f73b81c2576e..0f20e14a4cfd 100644 --- a/drivers/

[PATCH] drm/ttm: Fix dma_fence refcnt leak in ttm_bo_vm_fault_reserved

2020-06-13 Thread Xiyu Yang
ak. Fix this issue by calling dma_fence_put() when no_wait_gpu flag is equals to true. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index a43

[PATCH] cifs: Fix cached_fid refcnt leak in open_shroot

2020-06-13 Thread Xiyu Yang
ncreased refcount will not be balanced outside the function, causing a refcnt leak. Fix this issue by setting the value of "rc" to 0 before jumping to "oshr_free" label. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- fs/cifs/smb2ops.c | 1 + 1 file changed, 1 insertion(+) dif

[PATCH] SUNRPC: Remove unreachable error condition in rpcb_getport_async()

2020-05-25 Thread Xiyu Yang
rpcb_getport_async() invokes rpcb_call_async(), which return the value of rpc_run_task() to "child". Since rpc_run_task() is impossible to return an ERR pointer, there is no need to add the IS_ERR() condition on "child" here. So we need to remove it. Signed-off-by: Xiyu Yang

[PATCH] scsi: lpfc: Fix lpfc_nodelist leak when processing unsolicited event

2020-05-25 Thread Xiyu Yang
nlp_init() or lpfc_enable_node() or lpfc_nlp_get(), causing a refcnt leak. Fix this issue by calling lpfc_nlp_put() when "ndlp" in DEV_LOSS. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- drivers/scsi/lpfc/lpfc_els.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/

[PATCH] nfsd: Fix svc_xprt refcnt leak when setup callback client failed

2020-05-25 Thread Xiyu Yang
cnt increased by svc_xprt_get(), causing a refcnt leak. Fix this issue by calling svc_xprt_put() when setup callback client failed. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- fs/nfsd/nfs4callback.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4cal

[PATCH] dax: Fix dax_region refcnt leak when creating dev_dax

2020-05-25 Thread Xiyu Yang
o decrease the refcnt increased by kref_get(), causing a refcnt leak. Fix this issue by calling kref_put() when those error scenarios occur. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- drivers/dax/bus.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dax/bus.c b/d

[PATCH] ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failed

2020-05-25 Thread Xiyu Yang
arams(). When config DMA channel failed for Back-End, the function forgets to decrease the refcnt increased by dma_request_channel() or fsl_asrc_get_dma_channel(), causing a refcnt leak. Fix this issue by calling dma_release_channel() when config DMA channel failed. Signed-off-by: Xiyu Yang Signe

[PATCH] afs: Fix afs_cb_interest refcnt leak in afs_select_fileserver()

2020-05-25 Thread Xiyu Yang
rror occurred in afs_wait_for_fs_probes(), the function forgets to decrease the refcnt increased by afs_get_cb_interest(), causing a refcnt leak. Fix this issue by calling afs_put_cb_interest() when error occurred in afs_wait_for_fs_probes(). Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan --- fs/afs/rotate.c | 4