Re: [PATCH 2/2] l2tp: fix possible use-after-free

From: Paolo Abeni
Date: Mon Jun 06 2022 - 04:10:14 EST


Hello,

On Sun, 2022-06-05 at 19:54 +0800, Xiaohui Zhang wrote:
> From: xiaohuizhang98 <ruc_zhangxiaohui@xxxxxxx>
>
> We detected a suspected bug with our code clone detection tool.
>
> Similar to the handling of l2tp_tunnel_get in commit a622b40035d1
> ("l2ip: fix possible use-after-free"), we thought a patch might
> be needed here as well.
>
> Before taking a refcount on a rcu protected structure,
> we need to make sure the refcount is not zero.
>
> Signed-off-by: xiaohuizhang98 <ruc_zhangxiaohui@xxxxxxx>

It looks like series this did not make to patchwork, due to a typo in
the ML address, please fix it and resend: netdev@xxxxxxxxxxxxxx ->
netdev@xxxxxxxxxxxxxxx

Thanks,

Paolo