diff options
author | Alex Shi <alex.shi@linaro.org> | 2018-02-01 12:01:59 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2018-02-01 12:01:59 +0800 |
commit | 4e5a5112cc603d1dcfe7247723e1c08b8ffbc7ff (patch) | |
tree | 0eafc6ed77e008065ece3acd9ea83cc1a19a4122 /net/ipv6/ip6_output.c | |
parent | 05eda3c7aedbe06e9692a4a1ca511c6ab3d72de5 (diff) | |
parent | 90aaf2f25609f99b63fcbed280716f80b4bc5f56 (diff) |
Merge tag 'v3.18.93' into linux-linaro-lsk-v3.18lsk-v3.18-18.02
This is the 3.18.93 stable release
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 6db1f8ad8ac3..8aeedb1fed89 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -1214,14 +1214,16 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, np->cork.tclass = tclass; if (rt->dst.flags & DST_XFRM_TUNNEL) mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ? - rt->dst.dev->mtu : dst_mtu(&rt->dst); + READ_ONCE(rt->dst.dev->mtu) : dst_mtu(&rt->dst); else mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ? - rt->dst.dev->mtu : dst_mtu(rt->dst.path); + READ_ONCE(rt->dst.dev->mtu) : dst_mtu(rt->dst.path); if (np->frag_size < mtu) { if (np->frag_size) mtu = np->frag_size; } + if (mtu < IPV6_MIN_MTU) + return -EINVAL; cork->fragsize = mtu; if (dst_allfrag(rt->dst.path)) cork->flags |= IPCORK_ALLFRAG; |