Linux 4.17.1
Greg KH
maintainerI'm announcing the release of the 4.17.1 kernel.
All users of the 4.17 kernel series must upgrade.
The updated 4.17.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.17.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/networking/netdev-FAQ.txt | 9 ++++ Makefile | 2 - drivers/net/dsa/b53/b53_common.c | 15 +++++++ drivers/net/dsa/b53/b53_priv.h | 2 + drivers/net/dsa/b53/b53_srab.c | 4 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 2 - drivers/net/team/team.c | 3 + drivers/pci/host/pci-hyperv.c | 46 +++++++++++++++++------ include/linux/mroute_base.h | 10 ----- include/net/ipv6.h | 5 ++ net/core/flow_dissector.c | 2 - net/core/rtnetlink.c | 8 ++-- net/ipv4/fib_semantics.c | 4 ++ net/ipv4/ipmr_base.c | 8 ++-- net/ipv4/netfilter/nf_flow_table_ipv4.c | 5 +- net/ipv6/ip6_output.c | 3 + net/ipv6/ip6mr.c | 21 +++++++--- net/ipv6/ndisc.c | 6 +++ net/ipv6/netfilter/nf_flow_table_ipv6.c | 1 net/ipv6/route.c | 4 +- net/l2tp/l2tp_ppp.c | 35 ++++++++--------- net/packet/af_packet.c | 2 - net/sctp/transport.c | 2 - 23 files changed, 131 insertions(+), 68 deletions(-)
Arun Parameswaran (1):
net: dsa: b53: Fix for brcm tag issue in Cygnus SoC
Cong Wang (1):
netdev-FAQ: clarify DaveM's position for stable backports
Dan Carpenter (1):
team: use netdev_features_t instead of u32
Dexuan Cui (1):
PCI: hv: Do not wait forever on a device that has disappeared
Eric Dumazet (3):
net: metrics: add proper netlink validation net/packet: refine check for priv area size
rtnetlink: validate attributes in do_setlink()
Greg Kroah-Hartman (1):
Linux 4.17.1
Guillaume Nault (1):
l2tp: fix refcount leakage on PPPoL2TP sockets
Jason A. Donenfeld (1):
netfilter: nf_flow_table: attach dst to skbs
Julia Lawall (1):
bnx2x: use the right constant
Michal Kubecek (1):
ipv6: omit traffic class when calculating flow hash
Sabrina Dubroca (2):
ip6mr: only set ip6mr_table from setsockopt when ip6mr_new_table succeeds
ipmr: fix error path when ipmr_new_table fails
Stephen Suryaputra (1):
vrf: check the original netdevice for generating redirect
Xin Long (1):
sctp: not allow transport timeout value less than HZ/5 for hb_timer
Greg KH
maintainerDocumentation/networking/netdev-FAQ.txt +9 -0
@@ -179,6 +179,15 @@ A: No. See above answer. In short, if you think it really belongs in dash marker line as described in Documentation/process/submitting-patches.rst to temporarily embed that information into the patch that you send. +Q: Are all networking bug fixes backported to all stable releases? + +A: Due to capacity, Dave could only take care of the backports for the last + 2 stable releases. For earlier stable releases, each stable branch maintainer + is supposed to take care of them. If you find any patch is missing from an + earlier stable branch, please notify [email protected] with either a + commit ID or a formal patch backported, and CC Dave and other relevant + networking developers. + Q: Someone said that the comment style and coding convention is different for the networking content. Is this true?
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 17 -SUBLEVEL = 0 +SUBLEVEL = 1 EXTRAVERSION = NAME = Merciless Moray
drivers/net/dsa/b53/b53_common.c +14 -1
@@ -684,7 +684,8 @@ static int b53_switch_reset(struct b53_device *dev)* still use this driver as a library and need to perform the reset * earlier. */ -if (dev->chip_id ==BCM58XX_DEVICE_ID ) { +if (dev->chip_id ==BCM58XX_DEVICE_ID || + dev->chip_id ==BCM583XX_DEVICE_ID ) {b53_read8 (dev,B53_CTRL_PAGE ,B53_SOFTRESET , ®); reg |=SW_RST |EN_SW_RST |EN_CH_RST ;b53_write8 (dev,B53_CTRL_PAGE ,B53_SOFTRESET , reg);
@@ -1879,6 +1880,18 @@ static const struct b53_chip_data b53_switch_chips[] = { .jumbo_pm_reg = B53_JUMBO_PORT_MASK, .jumbo_size_reg = B53_JUMBO_MAX_SIZE, }, + { + .chip_id = BCM583XX_DEVICE_ID, + .dev_name = "BCM583xx/11360", + .vlans = 4096, + .enabled_ports = 0x103, + .arl_entries = 4, + .cpu_port = B53_CPU_PORT, + .vta_regs = B53_VTA_REGS, + .duplex_reg = B53_DUPLEX_STAT_GE, + .jumbo_pm_reg = B53_JUMBO_PORT_MASK, + .jumbo_size_reg = B53_JUMBO_MAX_SIZE, + }, { .chip_id = BCM7445_DEVICE_ID, .dev_name = "BCM7445",
drivers/net/dsa/b53/b53_priv.h +2 -0
@@ -62,6 +62,7 @@ enum {BCM53018_DEVICE_ID =0x53018 ,BCM53019_DEVICE_ID =0x53019 ,BCM58XX_DEVICE_ID =0x5800 , +BCM583XX_DEVICE_ID =0x58300 ,BCM7445_DEVICE_ID =0x7445 , BCM7278_DEVICE_ID = 0x7278, };
@@ -181,6 +182,7 @@ static inline int is5301x(struct b53_device *dev)static inline int is58xx (struct b53_device *dev) {return dev->chip_id ==BCM58XX_DEVICE_ID || + dev->chip_id ==BCM583XX_DEVICE_ID || dev->chip_id ==BCM7445_DEVICE_ID || dev->chip_id ==BCM7278_DEVICE_ID ; }
drivers/net/dsa/b53/b53_srab.c +2 -2
@@ -364,7 +364,7 @@ static const struct of_device_id b53_srab_of_match[] = { { .compatible = "brcm,bcm53018-srab" }, { .compatible = "brcm,bcm53019-srab" }, { .compatible = "brcm,bcm5301x-srab" }, - { .compatible = "brcm,bcm11360-srab", .data = (void *)BCM58XX_DEVICE_ID }, + { .compatible = "brcm,bcm11360-srab", .data = (void *)BCM583XX_DEVICE_ID }, { .compatible = "brcm,bcm58522-srab", .data = (void *)BCM58XX_DEVICE_ID }, { .compatible = "brcm,bcm58525-srab", .data = (void *)BCM58XX_DEVICE_ID }, { .compatible = "brcm,bcm58535-srab", .data = (void *)BCM58XX_DEVICE_ID },
@@ -372,7 +372,7 @@ static const struct of_device_id b53_srab_of_match[] = { { .compatible = "brcm,bcm58623-srab", .data = (void *)BCM58XX_DEVICE_ID }, { .compatible = "brcm,bcm58625-srab", .data = (void *)BCM58XX_DEVICE_ID }, { .compatible = "brcm,bcm88312-srab", .data = (void *)BCM58XX_DEVICE_ID }, - { .compatible = "brcm,cygnus-srab", .data = (void *)BCM58XX_DEVICE_ID }, + { .compatible = "brcm,cygnus-srab", .data = (void *)BCM583XX_DEVICE_ID }, { .compatible = "brcm,nsp-srab", .data = (void *)BCM58XX_DEVICE_ID }, { /* sentinel */ }, };
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +1 -1
@@ -588,7 +588,7 @@ static void bnx2x_ets_e3b0_nig_disabled(const struct link_params *params,* slots for the highest priority. */ REG_WR (bp, (port) ?NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS : -NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS ,0x100 ); +NIG_REG_P0_TX_ARB_NUM_STRICT_ARB_SLOTS ,0x100 );/* Mapping between the CREDIT_WEIGHT registers and actual client * numbers */
drivers/net/team/team.c +2 -1
@@ -1004,7 +1004,8 @@ static void team_port_disable(struct team *team,static void __team_compute_features (struct team *team) {struct team_port *port; -u32 vlan_features =TEAM_VLAN_FEATURES &NETIF_F_ALL_FOR_ALL ; +netdev_features_t vlan_features =TEAM_VLAN_FEATURES & +NETIF_F_ALL_FOR_ALL ;netdev_features_t enc_features =TEAM_ENC_FEATURES ;unsigned short max_hard_header_len =ETH_HLEN ; unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE |
drivers/pci/host/pci-hyperv.c +34 -12
95 lines not on this page · raw message
include/linux/mroute_base.h +0 -10
@@ -307,16 +307,6 @@ static inline void vif_device_init(struct vif_device *v, { } -static inline void * -mr_table_alloc (struct net *net,u32 id, -struct mr_table_ops *ops, -void (*expire_func)(struct timer_list *t), -void (*table_set)(struct mr_table *mrt, -struct net *net)) -{ -return NULL ; -} -static inline void *mr_mfc_find_parent (struct mr_table *mrt,void *hasharg,int parent) {
include/net/ipv6.h +5 -0
@@ -906,6 +906,11 @@ static inline __be32 ip6_make_flowinfo(unsigned int tclass, __be32 flowlabel)return htonl (tclass <<IPV6_TCLASS_SHIFT ) | flowlabel; } +static inline __be32 flowi6_get_flowlabel (const struct flowi6 *fl6) +{ +return fl6->flowlabel &IPV6_FLOWLABEL_MASK ; +} +/* * Prototypes exported by ipv6 */
net/core/flow_dissector.c +1 -1
@@ -1334,7 +1334,7 @@ __u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys) keys->ports.src = fl6->fl6_sport; keys->ports.dst = fl6->fl6_dport; keys->keyid.keyid = fl6->fl6_gre_key; - keys->tags.flow_label = (__force u32 )fl6->flowlabel; + keys->tags.flow_label = (__force u32 )flowi6_get_flowlabel (fl6); keys->basic.ip_proto = fl6->flowi6_proto;return flow_hash_from_keys (keys);
net/core/rtnetlink.c +4 -4
@@ -2256,6 +2256,10 @@ static int do_setlink(const struct sk_buff *skb,const struct net_device_ops *ops = dev->netdev_ops;int err; + err =validate_linkmsg (dev, tb); +if (err <0 ) +return err; +if (tb[IFLA_NET_NS_PID ] || tb[IFLA_NET_NS_FD ] || tb[IFLA_IF_NETNSID ]) {struct net *net =rtnl_link_get_net_capable (skb,dev_net (dev), tb,CAP_NET_ADMIN );
@@ -2619,10 +2623,6 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, goto errout; } - err =validate_linkmsg (dev, tb); -if (err <0 ) - goto errout; - err =do_setlink (skb, dev, ifm, extack, tb, ifname,0 ); errout:return err;
net/ipv4/fib_semantics.c +4 -0
@@ -717,6 +717,8 @@ bool fib_metrics_match(struct fib_config *cfg, struct fib_info *fi)nla_strlcpy (tmp, nla,sizeof (tmp)); val =tcp_ca_get_key_by_name (fi->fib_net, tmp, &ecn_ca); }else { +if (nla_len (nla) !=sizeof (u32)) +return false; val =nla_get_u32 (nla); }
@@ -1043,6 +1045,8 @@ fib_convert_metrics(struct fib_info *fi, const struct fib_config *cfg)if (val ==TCP_CA_UNSPEC )return -EINVAL ; }else { +if (nla_len (nla) !=sizeof (u32)) +return -EINVAL ; val =nla_get_u32 (nla); }if (type ==RTAX_ADVMSS && val >65535 -40 )
net/ipv4/ipmr_base.c +5 -3
@@ -35,17 +35,19 @@ mr_table_alloc(struct net *net, u32 id, struct net *net)) {struct mr_table *mrt; +int err; mrt =kzalloc (sizeof (*mrt),GFP_KERNEL );if (!mrt) -return NULL ; +return ERR_PTR (-ENOMEM ); mrt->id = id;write_pnet (&mrt->net, net); mrt->ops = *ops; -if (rhltable_init (&mrt->mfc_hash, mrt->ops.rht_params)) { + err =rhltable_init (&mrt->mfc_hash, mrt->ops.rht_params); +if (err) {kfree (mrt); -return NULL ; +return ERR_PTR (err); }INIT_LIST_HEAD (&mrt->mfc_cache_list);INIT_LIST_HEAD (&mrt->mfc_unres_queue);
net/ipv4/netfilter/nf_flow_table_ipv4.c +3 -2
@@ -213,7 +213,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,enum flow_offload_tuple_dir dir;struct flow_offload *flow;struct net_device *outdev; -const struct rtable *rt; +struct rtable *rt;struct iphdr *iph;__be32 nexthop;
@@ -234,7 +234,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb, dir = tuplehash->tuple.dir; flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]); - rt = (const struct rtable *)flow->tuplehash[dir].tuple.dst_cache; + rt = (struct rtable *)flow->tuplehash[dir].tuple.dst_cache;if (unlikely (nf_flow_exceeds_mtu (skb, rt)))return NF_ACCEPT ;
@@ -251,6 +251,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb, skb->dev = outdev; nexthop =rt_nexthop (rt, flow->tuplehash[!dir].tuple.src_v4.s_addr); +skb_dst_set_noref (skb, &rt->dst);neigh_xmit (NEIGH_ARP_TABLE , outdev, &nexthop, skb);return NF_STOLEN ;
net/ipv6/ip6_output.c +2 -1
@@ -507,7 +507,8 @@ int ip6_forward(struct sk_buff *skb)send redirects to source routed frames. We don't send redirects to frames decapsulated from IPsec. */ -if (skb->dev == dst->dev && opt->srcrt ==0 && !skb_sec_path (skb)) { +if (IP6CB (skb)->iif == dst->dev->ifindex && + opt->srcrt ==0 && !skb_sec_path (skb)) {struct in6_addr *target =NULL ;struct inet_peer *peer;struct rt6_info *rt;
net/ipv6/ip6mr.c +14 -7
@@ -227,8 +227,8 @@ static int __net_init ip6mr_rules_init(struct net *net)INIT_LIST_HEAD (&net->ipv6.mr6_tables); mrt =ip6mr_new_table (net,RT6_TABLE_DFLT ); -if (!mrt) { - err = -ENOMEM ; +if (IS_ERR (mrt)) { + err =PTR_ERR (mrt); goto err1; }
@@ -301,8 +301,13 @@ static int ip6mr_fib_lookup(struct net *net, struct flowi6 *flp6,static int __net_init ip6mr_rules_init (struct net *net) { - net->ipv6.mrt6 =ip6mr_new_table (net,RT6_TABLE_DFLT ); -return net->ipv6.mrt6 ?0 : -ENOMEM ; +struct mr_table *mrt; + + mrt =ip6mr_new_table (net,RT6_TABLE_DFLT ); +if (IS_ERR (mrt)) +return PTR_ERR (mrt); + net->ipv6.mrt6 = mrt; +return 0 ; } static void __net_exit ip6mr_rules_exit(struct net *net)
@@ -1757,9 +1762,11 @@ int ip6_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, unsrtnl_lock (); ret =0 ; -if (!ip6mr_new_table (net, v)) - ret = -ENOMEM ; -raw6_sk (sk)->ip6mr_table = v; + mrt =ip6mr_new_table (net, v); +if (IS_ERR (mrt)) + ret =PTR_ERR (mrt); +else +raw6_sk (sk)->ip6mr_table = v;rtnl_unlock ();return ret; }
net/ipv6/ndisc.c +6 -0
@@ -1576,6 +1576,12 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target) ops_data_buf[NDISC_OPS_REDIRECT_DATA_SPACE ], *ops_data =NULL ;bool ret; +if (netif_is_l3_master (skb->dev)) { + dev =__dev_get_by_index (dev_net (skb->dev),IPCB (skb)->iif); +if (!dev) +return ; + } +if (ipv6_get_lladdr (dev, &saddr_buf,IFA_F_TENTATIVE )) {ND_PRINTK (2 , warn,"Redirect: no link-local address on %s\n" , dev->name);
net/ipv6/netfilter/nf_flow_table_ipv6.c +1 -0
@@ -243,6 +243,7 @@ nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb, skb->dev = outdev; nexthop =rt6_nexthop (rt, &flow->tuplehash[!dir].tuple.src_v6); +skb_dst_set_noref (skb, &rt->dst);neigh_xmit (NEIGH_ND_TABLE , outdev, nexthop, skb);return NF_STOLEN ;
net/ipv6/route.c +2 -2
@@ -1868,7 +1868,7 @@ static void ip6_multipath_l3_keys(const struct sk_buff *skb, }else { keys->addrs.v6addrs.src = key_iph->saddr; keys->addrs.v6addrs.dst = key_iph->daddr; - keys->tags.flow_label =ip6_flowinfo (key_iph); + keys->tags.flow_label =ip6_flowlabel (key_iph); keys->basic.ip_proto = key_iph->nexthdr; } }
@@ -1889,7 +1889,7 @@ u32 rt6_multipath_hash(const struct net *net, const struct flowi6 *fl6, }else { hash_keys.addrs.v6addrs.src = fl6->saddr; hash_keys.addrs.v6addrs.dst = fl6->daddr; - hash_keys.tags.flow_label = (__force u32 )fl6->flowlabel; + hash_keys.tags.flow_label = (__force u32 )flowi6_get_flowlabel (fl6); hash_keys.basic.ip_proto = fl6->flowi6_proto; }break ;
net/l2tp/l2tp_ppp.c +17 -18
@@ -428,16 +428,6 @@ static void pppol2tp_put_sk(struct rcu_head *head)*/ static void pppol2tp_session_close (struct l2tp_session *session) { -struct pppol2tp_session *ps; - - ps =l2tp_session_priv (session); -mutex_lock (&ps->sk_lock); - ps->__sk =rcu_dereference_protected (ps->sk, -lockdep_is_held (&ps->sk_lock)); -RCU_INIT_POINTER (ps->sk,NULL ); -if (ps->__sk) -call_rcu (&ps->rcu, pppol2tp_put_sk); -mutex_unlock (&ps->sk_lock); }/* Really kill the session socket. (Called from sock_put() if
@@ -480,15 +470,24 @@ static int pppol2tp_release(struct socket *sock)sock_orphan (sk); sock->sk =NULL ; -/* If the socket is associated with a session, -* l2tp_session_delete will call pppol2tp_session_close which -* will drop the session's ref on the socket. -*/ session =pppol2tp_sock_to_session (sk);if (session) { +struct pppol2tp_session *ps; +l2tp_session_delete (session); -/* drop the ref obtained by pppol2tp_sock_to_session */ -sock_put (sk); + + ps =l2tp_session_priv (session); +mutex_lock (&ps->sk_lock); + ps->__sk =rcu_dereference_protected (ps->sk, +lockdep_is_held (&ps->sk_lock)); +RCU_INIT_POINTER (ps->sk,NULL ); +mutex_unlock (&ps->sk_lock); +call_rcu (&ps->rcu, pppol2tp_put_sk); + +/* Rely on the sock_put() call at the end of the function for +* dropping the reference held by pppol2tp_sock_to_session(). +* The last reference will be dropped by pppol2tp_put_sk(). +*/ }release_sock (sk);
@@ -742,7 +741,8 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,*/ mutex_lock (&ps->sk_lock);if (rcu_dereference_protected (ps->sk, -lockdep_is_held (&ps->sk_lock))) { +lockdep_is_held (&ps->sk_lock)) || + ps->__sk) {mutex_unlock (&ps->sk_lock); error = -EEXIST ; goto end;
@@ -803,7 +803,6 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr, out_no_ppp:/* This is how we get the session context from the socket. */ -sock_hold (sk); sk->sk_user_data = session;rcu_assign_pointer (ps->sk, sk);mutex_unlock (&ps->sk_lock);
net/packet/af_packet.c +1 -1
@@ -4282,7 +4282,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u, goto out;if (po->tp_version >=TPACKET_V3 && req->tp_block_size <= -BLK_PLUS_PRIV ((u64 )req_u->req3.tp_sizeof_priv)) +BLK_PLUS_PRIV ((u64 )req_u->req3.tp_sizeof_priv) +sizeof (struct tpacket3_hdr )) goto out;if (unlikely (req->tp_frame_size < po->tp_hdrlen + po->tp_reserve))
net/sctp/transport.c +1 -1
@@ -634,7 +634,7 @@ unsigned long sctp_transport_timeout(struct sctp_transport *trans) trans->state != SCTP_PF) timeout += trans->hbinterval; -return timeout; + return max_t(unsigned long, timeout, HZ / 5); }/* Reset transport variables to their initial values */