Re: [PATCH net] l2tp: fix a sock refcnt leak in l2tp_tunnel_register

2018-11-14 Thread David Miller
From: Xin Long Date: Tue, 13 Nov 2018 01:08:25 +0800 > This issue happens when trying to add an existent tunnel. It > doesn't call sock_put() before returning -EEXIST to release > the sock refcnt that was held by calling sock_hold() before > the existence check. > > This patch is to fix it by

Re: [PATCH net] l2tp: fix a sock refcnt leak in l2tp_tunnel_register

2018-11-13 Thread Guillaume Nault
On Tue, Nov 13, 2018 at 01:08:25AM +0800, Xin Long wrote: > This issue happens when trying to add an existent tunnel. It > doesn't call sock_put() before returning -EEXIST to release > the sock refcnt that was held by calling sock_hold() before > the existence check. > > This patch is to fix it

[PATCH net] l2tp: fix a sock refcnt leak in l2tp_tunnel_register

2018-11-12 Thread Xin Long
This issue happens when trying to add an existent tunnel. It doesn't call sock_put() before returning -EEXIST to release the sock refcnt that was held by calling sock_hold() before the existence check. This patch is to fix it by holding the sock after doing the existence check. Fixes: