mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-28 19:20:30 +00:00
l2tp: convert l2tp_tunnel_list to idr
[ Upstream commitc4d48a58f3] l2tp uses l2tp_tunnel_list to track all registered tunnels and to allocate tunnel ID's. IDR can do the same job. More importantly, with IDR we can hold the ID before a successful registration so that we don't need to worry about late error handling, it is not easy to rollback socket changes. This is a preparation for the following fix. Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Guillaume Nault <gnault@redhat.com> Cc: Jakub Sitnicki <jakub@cloudflare.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Tom Parkin <tparkin@katalix.com> Signed-off-by: Cong Wang <cong.wang@bytedance.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Stable-dep-of:0b2c59720e("l2tp: close all race conditions in l2tp_tunnel_register()") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d3b2d2820a
commit
bf47eb2cc5
1 changed files with 42 additions and 43 deletions
Loading…
Add table
Add a link
Reference in a new issue