From: Xin Long <[email protected]>
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 holding the sock after doing the
> existence check.
>
> Fixes: f6cd651b056f ("l2tp: fix race in duplicate tunnel detection")
> Reported-by: Jianlin Shi <[email protected]>
> Signed-off-by: Xin Long <[email protected]>
Applied and queued up for -stable.