l2tp: device MTU setup, tunnel socket needs a lock
authorR. Parameswaran <parameswaran.r7@gmail.com>
Thu, 13 Apr 2017 01:31:04 +0000 (18:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 14:42:00 +0000 (16:42 +0200)
commite6cfc1098ef08ba5d1398f1d9c21530538d9005b
tree52e31205298efb7db1fcffe4aaa41f3919d88120
parent6ec8ac2b45c0d92fb5650b60feb19d9c4c17b70d
l2tp: device MTU setup, tunnel socket needs a lock

commit 57240d007816486131bee88cd474c2a71f0fe224 upstream.

The MTU overhead calculation in L2TP device set-up
merged via commit b784e7ebfce8cfb16c6f95e14e8532d0768ab7ff
needs to be adjusted to lock the tunnel socket while
referencing the sub-data structures to derive the
socket's IP overhead.

Reported-by: Guillaume Nault <g.nault@alphalink.fr>
Tested-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: R. Parameswaran <rparames@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Giuliano Procida <gprocida@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/net.h
net/l2tp/l2tp_eth.c
net/socket.c