mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
l2tp: device MTU setup, tunnel socket needs a lock
The MTU overhead calculation in L2TP device set-up
merged via commit b784e7ebfc
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 <[email protected]>
Tested-by: Guillaume Nault <[email protected]>
Signed-off-by: R. Parameswaran <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
4a6e3c5def
commit
57240d0078
3 changed files with 4 additions and 2 deletions
|
|
@ -225,7 +225,9 @@ static void l2tp_eth_adjust_mtu(struct l2tp_tunnel *tunnel,
|
|||
dev->needed_headroom += session->hdr_len;
|
||||
return;
|
||||
}
|
||||
lock_sock(tunnel->sock);
|
||||
l3_overhead = kernel_sock_ip_overhead(tunnel->sock);
|
||||
release_sock(tunnel->sock);
|
||||
if (l3_overhead == 0) {
|
||||
/* L3 Overhead couldn't be identified, this could be
|
||||
* because tunnel->sock was NULL or the socket's
|
||||
|
|
|
|||
Loading…
Reference in a new issue