We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afec62c commit 3c8ffcdCopy full SHA for 3c8ffcd
net/ipv6/route.c
@@ -3196,13 +3196,18 @@ static unsigned int ip6_default_advmss(const struct dst_entry *dst)
3196
{
3197
struct net_device *dev = dst->dev;
3198
unsigned int mtu = dst_mtu(dst);
3199
- struct net *net = dev_net(dev);
+ struct net *net;
3200
3201
mtu -= sizeof(struct ipv6hdr) + sizeof(struct tcphdr);
3202
3203
+ rcu_read_lock();
3204
+
3205
+ net = dev_net_rcu(dev);
3206
if (mtu < net->ipv6.sysctl.ip6_rt_min_advmss)
3207
mtu = net->ipv6.sysctl.ip6_rt_min_advmss;
3208
3209
+ rcu_read_unlock();
3210
3211
/*
3212
* Maximal non-jumbo IPv6 payload is IPV6_MAXPLEN and
3213
* corresponding MSS is IPV6_MAXPLEN - tcp_header_size.
0 commit comments