]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: don't close sessions in l2tp_tunnel_destruct()
authorGuillaume Nault <g.nault@alphalink.fr>
Wed, 8 Nov 2017 23:29:52 +0000 (08:29 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Nov 2017 10:05:17 +0000 (19:05 +0900)
commit6c55731306095f5d609059fca7948e072a02ac23
treec83a3254af4dced8b31585362f310efd579a01c4
parent3e15f8e54a99b2ba847bf720ae4e35a94ba8216a
l2tp: don't close sessions in l2tp_tunnel_destruct()

Sessions are already removed by the proto ->destroy() handlers, and
since commit d8ed3de79acb ("l2tp: prevent creation of sessions on terminated tunnels"),
we're guaranteed that no new session can be created afterwards.

Furthermore, l2tp_tunnel_closeall() can sleep when there are sessions
left to close. So we really shouldn't call it in a ->sk_destruct()
handler, as it can be used from atomic context.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c