]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: hold socket before dropping lock in l2tp_ip{, 6}_recv()
authorGuillaume Nault <g.nault@alphalink.fr>
Tue, 29 Nov 2016 12:09:45 +0000 (13:09 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 19:14:07 +0000 (14:14 -0500)
commitf8aaa64c679371a4f088028d13acf4dbb3f47201
treeeeca3ead29ffaf135c31d9a11b29b082766b22cc
parent6cc1be1e90d66ec578db6c259e8eb05a607e4fd5
l2tp: hold socket before dropping lock in l2tp_ip{, 6}_recv()

Socket must be held while under the protection of the l2tp lock; there
is no guarantee that sk remains valid after the read_unlock_bh() call.

Same issue for l2tp_ip and l2tp_ip6.

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