Merge android11-5.4.226+ (2af3bdf) into msm-5.4

* refs/heads/tmp-2af3bdf:
  UPSTREAM: ext4: add inode table check in __ext4_get_inode_loc to aovid possible infinite loop
  UPSTREAM: net_sched: reject TCF_EM_SIMPLE case for complex ematch module
  UPSTREAM: ipv6: ensure sane device mtu in tunnels
  BACKPORT: iommu: Avoid races around device probe
  BACKPORT: mac80211_hwsim: notify wmediumd of used MAC addresses
  FROMGIT: mac80211_hwsim: add concurrent channels scanning support over virtio
  ANDROID: ABI: Cuttlefish Symbol update
  UPSTREAM: media: dvb-core: Fix UAF due to refcount races at releasing

Change-Id: I92cded046f502ab95484e44ecc3d01337a065d87
Signed-off-by: kamasali Satyanarayan <[email protected]>
This commit is contained in:
kamasali Satyanarayan 2023-03-06 10:20:17 +05:30
commit f8d95e3d28
12 changed files with 853 additions and 362 deletions

View file

@ -1137,14 +1137,16 @@ static void ip6gre_tnl_link_config_route(struct ip6_tnl *t, int set_mtu,
dev->needed_headroom = dst_len;
if (set_mtu) {
dev->mtu = rt->dst.dev->mtu - t_hlen;
if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
dev->mtu -= 8;
if (dev->type == ARPHRD_ETHER)
dev->mtu -= ETH_HLEN;
int mtu = rt->dst.dev->mtu - t_hlen;
if (dev->mtu < IPV6_MIN_MTU)
dev->mtu = IPV6_MIN_MTU;
if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
mtu -= 8;
if (dev->type == ARPHRD_ETHER)
mtu -= ETH_HLEN;
if (mtu < IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;
WRITE_ONCE(dev->mtu, mtu);
}
}
ip6_rt_put(rt);

View file

@ -1430,6 +1430,7 @@ static void ip6_tnl_link_config(struct ip6_tnl *t)
struct __ip6_tnl_parm *p = &t->parms;
struct flowi6 *fl6 = &t->fl.u.ip6;
int t_hlen;
int mtu;
memcpy(dev->dev_addr, &p->laddr, sizeof(struct in6_addr));
memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr));
@ -1472,12 +1473,13 @@ static void ip6_tnl_link_config(struct ip6_tnl *t)
dev->hard_header_len = rt->dst.dev->hard_header_len +
t_hlen;
dev->mtu = rt->dst.dev->mtu - t_hlen;
mtu = rt->dst.dev->mtu - t_hlen;
if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
dev->mtu -= 8;
mtu -= 8;
if (dev->mtu < IPV6_MIN_MTU)
dev->mtu = IPV6_MIN_MTU;
if (mtu < IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;
WRITE_ONCE(dev->mtu, mtu);
}
ip6_rt_put(rt);
}

View file

@ -1083,10 +1083,12 @@ static void ipip6_tunnel_bind_dev(struct net_device *dev)
if (tdev && !netif_is_l3_master(tdev)) {
int t_hlen = tunnel->hlen + sizeof(struct iphdr);
int mtu;
dev->mtu = tdev->mtu - t_hlen;
if (dev->mtu < IPV6_MIN_MTU)
dev->mtu = IPV6_MIN_MTU;
mtu = tdev->mtu - t_hlen;
if (mtu < IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;
WRITE_ONCE(dev->mtu, mtu);
}
}