[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200730.173610.1651631339985656912.davem@davemloft.net>
Date: Thu, 30 Jul 2020 17:36:10 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: xiongx18@...an.edu.cn
Cc: 3chas3@...il.com, linux-atm-general@...ts.sourceforge.net,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
xiyuyang19@...an.edu.cn, tanxin.ctf@...il.com,
yuanxzhang@...an.edu.cn
Subject: Re: [PATCH] atm: fix atm_dev refcnt leaks in
atmtcp_remove_persistent
From: Xin Xiong <xiongx18@...an.edu.cn>
Date: Wed, 29 Jul 2020 21:06:59 +0800
> atmtcp_remove_persistent() invokes atm_dev_lookup(), which returns a
> reference of atm_dev with increased refcount or NULL if fails.
>
> The refcount leaks issues occur in two error handling paths. If
> dev_data->persist is zero or PRIV(dev)->vcc isn't NULL, the function
> returns 0 without decreasing 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 <xiongx18@...an.edu.cn>
> Signed-off-by: Xiyu Yang <xiyuyang19@...an.edu.cn>
> Signed-off-by: Xin Tan <tanxin.ctf@...il.com>
Applied, thank you.
Powered by blists - more mailing lists