Linux 4.19.1
Greg KH
maintainerI'm announcing the release of the 4.19.1 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.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
------------
Makefile | 2 arch/sparc/include/asm/switch_to_64.h | 3 - arch/sparc/kernel/process_64.c | 25 ++++++-- arch/sparc/kernel/rtrap_64.S | 1 arch/sparc/kernel/signal32.c | 12 +++- arch/sparc/kernel/signal_64.c | 6 +- arch/sparc/kernel/systbls_64.S | 4 - arch/sparc/mm/init_64.c | 1 crypto/af_alg.c | 2 drivers/net/bonding/bond_netlink.c | 3 - drivers/net/ethernet/emulex/benet/be.h | 1 drivers/net/ethernet/emulex/benet/be_main.c | 6 -- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 45 +++------------ drivers/net/ethernet/mellanox/mlxsw/core.c | 24 +++++--- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 drivers/net/ethernet/realtek/r8169.c | 9 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 drivers/vhost/vhost.c | 2 include/net/sock.h | 12 +++- net/atm/common.c | 2 net/bridge/br_multicast.c | 9 ++- net/caif/caif_socket.c | 2 net/core/datagram.c | 7 +- net/core/dev.c | 1 net/core/rtnetlink.c | 10 +++ net/dccp/proto.c | 2 net/ipv4/ip_fragment.c | 12 ++-- net/ipv4/tcp.c | 2 net/ipv4/udp.c | 20 ++++++ net/ipv6/ip6_checksum.c | 20 ++++++ net/ipv6/ndisc.c | 3 - net/ipv6/route.c | 2 net/iucv/af_iucv.c | 2 net/nfc/llcp_sock.c | 2 net/openvswitch/flow_netlink.c | 4 - net/rxrpc/af_rxrpc.c | 2 net/sched/sch_gred.c | 2 net/sctp/socket.c | 8 +- net/smc/af_smc.c | 2 net/smc/smc_core.c | 25 ++++---- net/tipc/socket.c | 2 net/unix/af_unix.c | 4 - tools/testing/selftests/net/fib-onlink-tests.sh | 14 ++-- 43 files changed, 199 insertions(+), 122 deletions(-)
Cong Wang (1):
net: drop skb on failure in ip_check_defrag()
David Ahern (1):
net/ipv6: Allow onlink routes to have a device mismatch if it is the default route
David Miller (1):
sparc64: Make corrupted user stacks more debuggable.
David S. Miller (3):
net: Properly unlink GRO packets on overflow.
sparc64: Export __node_distance.
sparc64: Wire up compat getpeername and getsockname.
Eric Dumazet (1):
net/mlx5e: fix csum adjustments caused by RXFCS
Greg Kroah-Hartman (1):
Linux 4.19.1
Hangbin Liu (1):
bridge: do not add port to router list when receives query with source 0.0.0.0
Heiner Kallweit (1):
r8169: fix broken Wake-on-LAN from S5 (poweroff)
Ido Schimmel (1):
rtnetlink: Disallow FDB configuration for non-Ethernet device
Ivan Vecera (1):
Revert "be2net: remove desc field from be_eq_obj"
Jaime Caamaño Ruiz (1):
openvswitch: Fix push/pop ethernet validation
Jakub Kicinski (1):
net: sched: gred: pass the right attribute to gred_change_table_def()
Jason Wang (1):
vhost: Fix Spectre V1 vulnerability
Karsten Graul (2):
Revert "net: simplify sock_poll_wait" net/smc: fix smc_buf_unuse to use the lgr pointer
Niklas Cassel (1):
net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules
Nikolay Aleksandrov (1):
net: bridge: remove ipv6 zero address check in mcast queries
Petr Machata (1):
mlxsw: spectrum_switchdev: Don't ignore deletions of learned MACs
Sean Tranchetti (1):
net: udp: fix handling of CHECKSUM_COMPLETE packets
Shalom Toledo (1):
mlxsw: core: Fix devlink unregister flow
Stefano Brivio (1):
ipv6/ndisc: Preserve IPv6 control buffer if protocol error handlers are called
Tobias Jungel (1):
bonding: fix length of actor system
Xin Long (1):
sctp: check policy more carefully when getting pr status
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 0 +SUBLEVEL = 1 EXTRAVERSION = NAME = "People's Front"
arch/sparc/include/asm/switch_to_64.h +2 -1
@@ -67,6 +67,7 @@ do { save_and_clear_fpu(); \ } while(0) void synchronize_user_stack(void); -void fault_in_user_windows (void ); +struct pt_regs ; +void fault_in_user_windows (struct pt_regs *);#endif /* __SPARC64_SWITCH_TO_64_H */
arch/sparc/kernel/process_64.c +19 -6
@@ -36,6 +36,7 @@#include <linux/sysrq.h> #include <linux/nmi.h> #include <linux/context_tracking.h> +#include <linux/signal.h> #include <linux/uaccess.h> #include <asm/page.h>
@@ -521,7 +522,12 @@ static void stack_unaligned(unsigned long sp)force_sig_fault (SIGBUS ,BUS_ADRALN , (void __user *) sp,0 , current); } -void fault_in_user_windows (void ) +static const char uwfault32[] =KERN_INFO \ +"%s[%d]: bad register window fault: SP %08lx (orig_sp %08lx) TPC %08lx O7 %08lx\n" ; +static const char uwfault64[] =KERN_INFO \ +"%s[%d]: bad register window fault: SP %016lx (orig_sp %016lx) TPC %08lx O7 %016lx\n" ; + +void fault_in_user_windows (struct pt_regs *regs) {struct thread_info *t =current_thread_info ();unsigned long window;
@@ -534,9 +540,9 @@ void fault_in_user_windows(void) do { struct reg_window *rwin = &t->reg_window[window]; int winsize = sizeof(struct reg_window); - unsigned long sp; + unsigned long sp, orig_sp; - sp = t->rwbuf_stkptrs[window]; + orig_sp = sp = t->rwbuf_stkptrs[window]; if (test_thread_64bit_stack(sp)) sp += STACK_BIAS;
@@ -547,8 +553,16 @@ void fault_in_user_windows(void)stack_unaligned (sp);if (unlikely (copy_to_user ((char __user *)sp, - rwin, winsize))) + rwin, winsize))) { +if (show_unhandled_signals) +printk_ratelimited (is_compat_task () ? + uwfault32 : uwfault64, + current->comm, current->pid, + sp, orig_sp, + regs->tpc, + regs->u_regs[UREG_I7 ]); goto barf; + } }while (window--); }set_thread_wsaved (0 );
@@ -556,8 +570,7 @@ void fault_in_user_windows(void) barf:set_thread_wsaved (window +1 ); -user_exit (); -do_exit (SIGILL ); +force_sig (SIGSEGV , current); } asmlinkage long sparc_do_fork(unsigned long clone_flags,
arch/sparc/kernel/rtrap_64.S +1 -0
@@ -39,6 +39,7 @@ __handle_preemption: wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate __handle_user_windows: + add %sp, PTREGS_OFF, %o0 call fault_in_user_windows 661: wrpr %g0, RTRAP_PSTATE, %pstate /* If userspace is using ADI, it could potentially pass
arch/sparc/kernel/signal32.c +10 -2
@@ -371,7 +371,11 @@ static int setup_frame32(struct ksignal *ksig, struct pt_regs *regs,get_sigframe (ksig, regs, sigframe_size);if (invalid_frame_pointer (sf, sigframe_size)) { -do_exit (SIGILL ); +if (show_unhandled_signals) +pr_info ("%s[%d] bad frame in setup_frame32: %08lx TPC %08lx O7 %08lx\n" , + current->comm, current->pid, (unsigned long )sf, + regs->tpc, regs->u_regs[UREG_I7 ]); +force_sigsegv (ksig->sig, current);return -EINVAL ; }
@@ -501,7 +505,11 @@ static int setup_rt_frame32(struct ksignal *ksig, struct pt_regs *regs,get_sigframe (ksig, regs, sigframe_size);if (invalid_frame_pointer (sf, sigframe_size)) { -do_exit (SIGILL ); +if (show_unhandled_signals) +pr_info ("%s[%d] bad frame in setup_rt_frame32: %08lx TPC %08lx O7 %08lx\n" , + current->comm, current->pid, (unsigned long )sf, + regs->tpc, regs->u_regs[UREG_I7 ]); +force_sigsegv (ksig->sig, current);return -EINVAL ; }
arch/sparc/kernel/signal_64.c +5 -1
@@ -370,7 +370,11 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs)get_sigframe (ksig, regs, sf_size);if (invalid_frame_pointer (sf)) { -do_exit (SIGILL );/* won't return, actually */ +if (show_unhandled_signals) +pr_info ("%s[%d] bad frame in setup_rt_frame: %016lx TPC %016lx O7 %016lx\n" , + current->comm, current->pid, (unsigned long )sf, + regs->tpc, regs->u_regs[UREG_I7 ]); +force_sigsegv (ksig->sig, current);return -EINVAL ; }
arch/sparc/kernel/systbls_64.S +2 -2
@@ -47,9 +47,9 @@ sys_call_table32: .word sys_recvfrom, sys_setreuid16, sys_setregid16, sys_rename, compat_sys_truncate /*130*/ .word compat_sys_ftruncate, sys_flock, compat_sys_lstat64, sys_sendto, sys_shutdown .word sys_socketpair, sys_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 -/*140*/ .word sys_sendfile64, sys_nis_syscall, compat_sys_futex, sys_gettid, compat_sys_getrlimit +/*140*/ .word sys_sendfile64, sys_getpeername, compat_sys_futex, sys_gettid, compat_sys_getrlimit .word compat_sys_setrlimit, sys_pivot_root, sys_prctl, sys_pciconfig_read, sys_pciconfig_write -/*150*/ .word sys_nis_syscall, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64 +/*150*/ .word sys_getsockname, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64 .word compat_sys_fcntl64, sys_inotify_rm_watch, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount /*160*/ .word compat_sys_sched_setaffinity, compat_sys_sched_getaffinity, sys_getdomainname, sys_setdomainname, sys_nis_syscall .word sys_quotactl, sys_set_tid_address, compat_sys_mount, compat_sys_ustat, sys_setxattr
arch/sparc/mm/init_64.c +1 -0
@@ -1383,6 +1383,7 @@ int __node_distance(int from, int to) }return numa_latency[from][to]; } +EXPORT_SYMBOL (__node_distance);static int __init find_best_numa_node_for_mlgroup (struct mdesc_mlgroup *grp) {
crypto/af_alg.c +1 -1
@@ -1071,7 +1071,7 @@ __poll_t af_alg_poll(struct file *file, struct socket *sock,struct af_alg_ctx *ctx = ask->private;__poll_t mask; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait); mask =0 ;if (!ctx->more || ctx->used)
drivers/net/bonding/bond_netlink.c +1 -2
@@ -638,8 +638,7 @@ static int bond_fill_info(struct sk_buff *skb, goto nla_put_failure;if (nla_put (skb,IFLA_BOND_AD_ACTOR_SYSTEM , -sizeof (bond->params.ad_actor_system), - &bond->params.ad_actor_system)) +ETH_ALEN , &bond->params.ad_actor_system)) goto nla_put_failure; }if (!bond_3ad_get_active_agg_info (bond, &info)) {
drivers/net/ethernet/emulex/benet/be.h +1 -0
@@ -185,6 +185,7 @@ static inline void queue_tail_inc(struct be_queue_info *q)struct be_eq_obj {struct be_queue_info q; +char desc[32 ];struct be_adapter *adapter;struct napi_struct napi;
drivers/net/ethernet/emulex/benet/be_main.c +2 -4
@@ -3488,11 +3488,9 @@ static int be_msix_register(struct be_adapter *adapter)int status, i, vec; for_all_evt_queues(adapter, eqo, i) { -char irq_name[IFNAMSIZ +4 ]; - -snprintf (irq_name,sizeof (irq_name),"%s-q%d" , netdev->name, i); +sprintf (eqo->desc,"%s-q%d" , netdev->name, i); vec =be_msix_vec_get (adapter, eqo); - status =request_irq (vec, be_msix,0 , irq_name, eqo); + status =request_irq (vec, be_msix,0 , eqo->desc, eqo);if (status) goto err_msix;
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +9 -36
60 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlxsw/core.c +17 -7
@@ -943,8 +943,8 @@ static int mlxsw_devlink_core_bus_device_reload(struct devlink *devlink, mlxsw_core->bus, mlxsw_core->bus_priv, true, devlink); -if (err) - mlxsw_core->reload_fail = true; + mlxsw_core->reload_fail = !!err; +return err; }
@@ -1083,8 +1083,15 @@ void mlxsw_core_bus_device_unregister(struct mlxsw_core *mlxsw_core, {struct devlink *devlink =priv_to_devlink (mlxsw_core); -if (mlxsw_core->reload_fail) - goto reload_fail; +if (mlxsw_core->reload_fail) { +if (!reload) +/* Only the parts that were not de-initialized in the +* failed reload attempt need to be de-initialized. +*/ + goto reload_fail_deinit; +else +return ; + }if (mlxsw_core->driver->fini) mlxsw_core->driver->fini (mlxsw_core);
@@ -1098,9 +1105,12 @@ void mlxsw_core_bus_device_unregister(struct mlxsw_core *mlxsw_core,if (!reload)devlink_resources_unregister (devlink,NULL ); mlxsw_core->bus->fini (mlxsw_core->bus_priv); -if (reload) -return ; -reload_fail: + +return ; + +reload_fail_deinit: +devlink_unregister (devlink); +devlink_resources_unregister (devlink,NULL );devlink_free (devlink); }EXPORT_SYMBOL (mlxsw_core_bus_device_unregister);
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +0 -2
@@ -2317,8 +2317,6 @@ static void mlxsw_sp_switchdev_event_work(struct work_struct *work)break ;case SWITCHDEV_FDB_DEL_TO_DEVICE : fdb_info = &switchdev_work->fdb_info; -if (!fdb_info->added_by_user) -break ;mlxsw_sp_port_fdb_set (mlxsw_sp_port, fdb_info, false);break ;case SWITCHDEV_FDB_ADD_TO_BRIDGE :/* fall through */
drivers/net/ethernet/realtek/r8169.c +7 -2
@@ -4175,10 +4175,15 @@ static void rtl_wol_suspend_quirk(struct rtl8169_private *tp)static bool rtl_wol_pll_power_down (struct rtl8169_private *tp) { -if (!netif_running (tp->dev) || !__rtl8169_get_wol (tp)) +struct phy_device *phydev; + +if (!__rtl8169_get_wol (tp))return false; -phy_speed_down (tp->dev->phydev, false); +/* phydev may not be attached to netdevice */ + phydev =mdiobus_get_phy (tp->mii_bus,0 ); + +phy_speed_down (phydev, false);rtl_wol_suspend_quirk (tp);return true;
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +1 -1
@@ -243,7 +243,7 @@ static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg,*/ int stmmac_mdio_reset (struct mii_bus *bus) { -#if defined(CONFIG_STMMAC_PLATFORM ) +#if IS_ENABLED (CONFIG_STMMAC_PLATFORM )struct net_device *ndev = bus->priv;struct stmmac_priv *priv =netdev_priv (ndev);unsigned int mii_address = priv->hw->mii.addr;
drivers/vhost/vhost.c +2 -0
@@ -30,6 +30,7 @@#include <linux/sched/mm.h> #include <linux/sched/signal.h> #include <linux/interval_tree_generic.h> +#include <linux/nospec.h> #include "vhost.h"
@@ -1397,6 +1398,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argif (idx >= d->nvqs)return -ENOBUFS ; + idx =array_index_nospec (idx, d->nvqs); vq = d->vqs[idx];mutex_lock (&vq->mutex);
include/net/sock.h +9 -3
@@ -2057,14 +2057,20 @@ static inline bool skwq_has_sleeper(struct socket_wq *wq)/** * sock_poll_wait - place memory barrier behind the poll_wait call. * @filp: file +* @sock: socket to wait on * @p: poll_table * * See the comments in the wq_has_sleeper function. +* +* Do not derive sock from filp->private_data here. An SMC socket establishes +* an internal TCP socket that is used in the fallback case. All socket +* operations on the SMC socket are then forwarded to the TCP socket. In case of +* poll, the filp->private_data pointer references the SMC socket because the +* TCP socket has no file assigned. */ -static inline void sock_poll_wait (struct file *filp,poll_table *p) +static inline void sock_poll_wait (struct file *filp,struct socket *sock, +poll_table *p) { -struct socket *sock = filp->private_data; -if (!poll_does_not_wait (p)) {poll_wait (filp, &sock->wq->wait, p);/* We need to be sure we are in sync with the
net/atm/common.c +1 -1
@@ -653,7 +653,7 @@ __poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait)struct atm_vcc *vcc;__poll_t mask; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait); mask =0 ; vcc =ATM_SD (sock);
net/bridge/br_multicast.c +8 -1
@@ -1420,7 +1420,14 @@ static void br_multicast_query_received(struct net_bridge *br,return ;br_multicast_update_query_timer (br, query, max_delay); -br_multicast_mark_router (br, port); + +/* Based on RFC4541, section 2.1.1 IGMP Forwarding Rules, +* the arrival port for IGMP Queries where the source address +* is 0.0.0.0 should not be added to router port list. +*/ +if ((saddr->proto ==htons (ETH_P_IP ) && saddr->u.ip4) || + saddr->proto ==htons (ETH_P_IPV6 )) +br_multicast_mark_router (br, port); } static void br_ip4_multicast_query(struct net_bridge *br,
net/caif/caif_socket.c +1 -1
@@ -941,7 +941,7 @@ static __poll_t caif_poll(struct file *file,__poll_t mask; struct caifsock *cf_sk = container_of(sk, struct caifsock, sk); -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait); mask =0 ;/* exceptional events? */
net/core/datagram.c +4 -3
@@ -808,8 +808,9 @@ int skb_copy_and_csum_datagram_msg(struct sk_buff *skb,return -EINVAL ; } -if (unlikely (skb->ip_summed ==CHECKSUM_COMPLETE )) -netdev_rx_csum_fault (skb->dev); +if (unlikely (skb->ip_summed ==CHECKSUM_COMPLETE ) && + !skb->csum_complete_sw) +netdev_rx_csum_fault (NULL ); }return 0 ; fault:
@@ -837,7 +838,7 @@ __poll_t datagram_poll(struct file *file, struct socket *sock,struct sock *sk = sock->sk;__poll_t mask; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait); mask =0 ;/* exceptional events? */
net/core/dev.c +1 -0
@@ -5431,6 +5431,7 @@ static void gro_flush_oldest(struct list_head *head)* SKB to the chain. */ list_del (&oldest->list); + oldest->next =NULL ;napi_gro_complete (oldest); }
net/core/rtnetlink.c +10 -0
@@ -3530,6 +3530,11 @@ static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh,return -EINVAL ; } +if (dev->type !=ARPHRD_ETHER ) { +NL_SET_ERR_MSG (extack,"FDB delete only supported for Ethernet devices" ); +return -EINVAL ; + } + addr =nla_data (tb[NDA_LLADDR ]); err =fdb_vid_parse (tb[NDA_VLAN ], &vid, extack);
@@ -3634,6 +3639,11 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh,return -EINVAL ; } +if (dev->type !=ARPHRD_ETHER ) { +NL_SET_ERR_MSG (extack,"FDB add only supported for Ethernet devices" ); +return -EINVAL ; + } + addr =nla_data (tb[NDA_LLADDR ]); err =fdb_vid_parse (tb[NDA_VLAN ], &vid, extack);
net/dccp/proto.c +1 -1
@@ -325,7 +325,7 @@ __poll_t dccp_poll(struct file *file, struct socket *sock,__poll_t mask;struct sock *sk = sock->sk; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait);if (sk->sk_state ==DCCP_LISTEN )return inet_csk_listen_poll (sk);
net/ipv4/ip_fragment.c +8 -4
@@ -720,10 +720,14 @@ struct sk_buff *ip_check_defrag(struct net *net, struct sk_buff *skb, u32 user)if (ip_is_fragment (&iph)) { skb =skb_share_check (skb,GFP_ATOMIC );if (skb) { -if (!pskb_may_pull (skb, netoff + iph.ihl *4 )) -return skb; -if (pskb_trim_rcsum (skb, netoff + len)) -return skb; +if (!pskb_may_pull (skb, netoff + iph.ihl *4 )) { +kfree_skb (skb); +return NULL ; + } +if (pskb_trim_rcsum (skb, netoff + len)) { +kfree_skb (skb); +return NULL ; + }memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm ));if (ip_defrag (net, skb, user))return NULL ;
net/ipv4/tcp.c +1 -1
@@ -507,7 +507,7 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)const struct tcp_sock *tp =tcp_sk (sk);int state; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait); state =inet_sk_state_load (sk);if (state ==TCP_LISTEN )
net/ipv4/udp.c +18 -2
@@ -2120,8 +2120,24 @@ static inline int udp4_csum_init(struct sk_buff *skb, struct udphdr *uh,/* Note, we are only interested in != 0 or == 0, thus the * force to int. */ -return (__force int )skb_checksum_init_zero_check (skb, proto, uh->check, - inet_compute_pseudo); + err = (__force int )skb_checksum_init_zero_check (skb, proto, uh->check, + inet_compute_pseudo); +if (err) +return err; + +if (skb->ip_summed ==CHECKSUM_COMPLETE && !skb->csum_valid) { +/* If SW calculated the value, we know it's bad */ +if (skb->csum_complete_sw) +return 1 ; + +/* HW says the value is bad. Let's validate that. +* skb->csum is no longer the full packet checksum, +* so don't treat it as such. +*/ +skb_checksum_complete_unset (skb); + } + +return 0 ; }/* wrapper for udp_queue_rcv_skb tacking care of csum conversion and
net/ipv6/ip6_checksum.c +18 -2
@@ -88,8 +88,24 @@ int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto)* Note, we are only interested in != 0 or == 0, thus the * force to int. */ -return (__force int )skb_checksum_init_zero_check (skb, proto, uh->check, - ip6_compute_pseudo); + err = (__force int )skb_checksum_init_zero_check (skb, proto, uh->check, + ip6_compute_pseudo); +if (err) +return err; + +if (skb->ip_summed ==CHECKSUM_COMPLETE && !skb->csum_valid) { +/* If SW calculated the value, we know it's bad */ +if (skb->csum_complete_sw) +return 1 ; + +/* HW says the value is bad. Let's validate that. +* skb->csum is no longer the full packet checksum, +* so don't treat is as such. +*/ +skb_checksum_complete_unset (skb); + } + +return 0 ; }EXPORT_SYMBOL (udp6_csum_init);
net/ipv6/ndisc.c +1 -2
@@ -1732,10 +1732,9 @@ int ndisc_rcv(struct sk_buff *skb)return 0 ; } -memset (NEIGH_CB (skb),0 ,sizeof (struct neighbour_cb )); -switch (msg->icmph.icmp6_type) {case NDISC_NEIGHBOUR_SOLICITATION : +memset (NEIGH_CB (skb),0 ,sizeof (struct neighbour_cb ));ndisc_recv_ns (skb);break ;
net/ipv6/route.c +2 -0
@@ -2799,6 +2799,8 @@ static int ip6_route_check_nh_onlink(struct net *net, grt =ip6_nh_lookup_table (net, cfg, gw_addr, tbid,0 );if (grt) {if (!grt->dst.error && +/* ignore match if it is the default route */ + grt->from && !ipv6_addr_any (&grt->from->fib6_dst.addr) && (grt->rt6i_flags & flags || dev != grt->dst.dev)) {NL_SET_ERR_MSG (extack,"Nexthop has invalid gateway or device mismatch" );
net/iucv/af_iucv.c +1 -1
@@ -1505,7 +1505,7 @@ __poll_t iucv_sock_poll(struct file *file, struct socket *sock,struct sock *sk = sock->sk;__poll_t mask =0 ; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait);if (sk->sk_state ==IUCV_LISTEN )return iucv_accept_poll (sk);
net/nfc/llcp_sock.c +1 -1
@@ -556,7 +556,7 @@ static __poll_t llcp_sock_poll(struct file *file, struct socket *sock,pr_debug ("%p\n" , sk); -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait);if (sk->sk_state ==LLCP_LISTEN )return llcp_accept_poll (sk);
net/openvswitch/flow_netlink.c +2 -2
@@ -3030,7 +3030,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,* is already present */ if (mac_proto !=MAC_PROTO_NONE )return -EINVAL ; - mac_proto =MAC_PROTO_NONE ; + mac_proto =MAC_PROTO_ETHERNET ;break ;case OVS_ACTION_ATTR_POP_ETH :
@@ -3038,7 +3038,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,return -EINVAL ;if (vlan_tci &htons (VLAN_TAG_PRESENT ))return -EINVAL ; - mac_proto =MAC_PROTO_ETHERNET ; + mac_proto =MAC_PROTO_NONE ;break ;case OVS_ACTION_ATTR_PUSH_NSH :
net/rxrpc/af_rxrpc.c +1 -1
@@ -741,7 +741,7 @@ static __poll_t rxrpc_poll(struct file *file, struct socket *sock,struct rxrpc_sock *rx =rxrpc_sk (sk);__poll_t mask; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait); mask =0 ;/* the socket is readable if there are any messages waiting on the Rx
net/sched/sch_gred.c +1 -1
@@ -413,7 +413,7 @@ static int gred_change(struct Qdisc *sch, struct nlattr *opt,if (tb[TCA_GRED_PARMS ] ==NULL && tb[TCA_GRED_STAB ] ==NULL ) {if (tb[TCA_GRED_LIMIT ] !=NULL ) sch->limit =nla_get_u32 (tb[TCA_GRED_LIMIT ]); -return gred_change_table_def (sch, opt); +return gred_change_table_def (sch, tb[TCA_GRED_DPS ]); } if (tb[TCA_GRED_PARMS] == NULL ||
net/sctp/socket.c +5 -3
@@ -7101,14 +7101,15 @@ static int sctp_getsockopt_pr_assocstatus(struct sock *sk, int len, } policy = params.sprstat_policy; -if (!policy || (policy & ~(SCTP_PR_SCTP_MASK |SCTP_PR_SCTP_ALL ))) +if (!policy || (policy & ~(SCTP_PR_SCTP_MASK |SCTP_PR_SCTP_ALL )) || + ((policy &SCTP_PR_SCTP_ALL ) && (policy &SCTP_PR_SCTP_MASK ))) goto out; asoc =sctp_id2assoc (sk, params.sprstat_assoc_id);if (!asoc) goto out; -if (policy &SCTP_PR_SCTP_ALL ) { +if (policy ==SCTP_PR_SCTP_ALL ) { params.sprstat_abandoned_unsent =0 ; params.sprstat_abandoned_sent =0 ;for (policy =0 ; policy <=SCTP_PR_INDEX (MAX ); policy++) {
@@ -7160,7 +7161,8 @@ static int sctp_getsockopt_pr_streamstatus(struct sock *sk, int len, } policy = params.sprstat_policy; -if (!policy || (policy & ~(SCTP_PR_SCTP_MASK |SCTP_PR_SCTP_ALL ))) +if (!policy || (policy & ~(SCTP_PR_SCTP_MASK |SCTP_PR_SCTP_ALL )) || + ((policy &SCTP_PR_SCTP_ALL ) && (policy &SCTP_PR_SCTP_MASK ))) goto out; asoc =sctp_id2assoc (sk, params.sprstat_assoc_id);
net/smc/af_smc.c +1 -1
@@ -1543,7 +1543,7 @@ static __poll_t smc_poll(struct file *file, struct socket *sock, mask |=EPOLLERR ; }else {if (sk->sk_state !=SMC_CLOSED ) -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait);if (sk->sk_err) mask |=EPOLLERR ; if ((sk->sk_shutdown == SHUTDOWN_MASK) ||
net/smc/smc_core.c +12 -13
@@ -122,22 +122,17 @@ static void __smc_lgr_unregister_conn(struct smc_connection *conn)sock_put (&smc->sk);/* sock_hold in smc_lgr_register_conn() */ } -/* Unregister connection and trigger lgr freeing if applicable +/* Unregister connection from lgr */ static void smc_lgr_unregister_conn (struct smc_connection *conn) {struct smc_link_group *lgr = conn->lgr; -int reduced =0 ;write_lock_bh (&lgr->conns_lock);if (conn->alert_token_local) { - reduced =1 ;__smc_lgr_unregister_conn (conn); }write_unlock_bh (&lgr->conns_lock); -if (!reduced || lgr->conns_num) -return ; -smc_lgr_schedule_free_work (lgr); }/* Send delete link, either as client to request the initiation
@@ -291,7 +286,8 @@ static int smc_lgr_create(struct smc_sock *smc, bool is_smcd,return rc; } -static void smc_buf_unuse (struct smc_connection *conn) +static void smc_buf_unuse (struct smc_connection *conn, +struct smc_link_group *lgr) {if (conn->sndbuf_desc) conn->sndbuf_desc->used =0 ;
@@ -301,8 +297,6 @@ static void smc_buf_unuse(struct smc_connection *conn) conn->rmb_desc->used =0 ; }else {/* buf registration failed, reuse not possible */ -struct smc_link_group *lgr = conn->lgr; -write_lock_bh (&lgr->rmbs_lock);list_del (&conn->rmb_desc->list);write_unlock_bh (&lgr->rmbs_lock);
@@ -315,16 +309,21 @@ static void smc_buf_unuse(struct smc_connection *conn)/* remove a finished connection from its link group */ void smc_conn_free (struct smc_connection *conn) { -if (!conn->lgr) +struct smc_link_group *lgr = conn->lgr; + +if (!lgr)return ; -if (conn->lgr->is_smcd) { +if (lgr->is_smcd) {smc_ism_unset_conn (conn);tasklet_kill (&conn->rx_tsklet); }else {smc_cdc_tx_dismiss_slots (conn); } -smc_lgr_unregister_conn (conn); -smc_buf_unuse (conn); +smc_lgr_unregister_conn (conn);/* unsets conn->lgr */ +smc_buf_unuse (conn, lgr);/* allow buffer reuse */ + +if (!lgr->conns_num) +smc_lgr_schedule_free_work (lgr); }static void smc_link_clear (struct smc_link *lnk)
net/tipc/socket.c +1 -1
@@ -715,7 +715,7 @@ static __poll_t tipc_poll(struct file *file, struct socket *sock,struct tipc_sock *tsk =tipc_sk (sk);__poll_t revents =0 ; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait);if (sk->sk_shutdown &RCV_SHUTDOWN ) revents |=EPOLLRDHUP |EPOLLIN |EPOLLRDNORM ;
net/unix/af_unix.c +2 -2
@@ -2640,7 +2640,7 @@ static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wastruct sock *sk = sock->sk;__poll_t mask; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait); mask =0 ;/* exceptional events? */
@@ -2677,7 +2677,7 @@ static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,unsigned int writable;__poll_t mask; -sock_poll_wait (file, wait); +sock_poll_wait (file, sock, wait); mask =0 ;/* exceptional events? */
tools/testing/selftests/net/fib-onlink-tests.sh +7 -7
@@ -167,8 +167,8 @@ setup() # add vrf table ip li add ${VRF} type vrf table ${VRF_TABLE} ip li set ${VRF} up - ip ro add table ${VRF_TABLE} unreachable default - ip -6 ro add table ${VRF_TABLE} unreachable default + ip ro add table ${VRF_TABLE} unreachable default metric 8192 + ip -6 ro add table ${VRF_TABLE} unreachable default metric 8192 # create test interfaces ip li add ${NETIFS[p1]} type veth peer name ${NETIFS[p2]}
@@ -185,20 +185,20 @@ setup() for n in 1 3 5 7; do ip li set ${NETIFS[p${n}]} up ip addr add ${V4ADDRS[p${n}]}/24 dev ${NETIFS[p${n}]} - ip addr add ${V6ADDRS[p${n}]}/64 dev ${NETIFS[p${n}]} + ip addr add ${V6ADDRS[p${n}]}/64 dev ${NETIFS[p${n}]} nodad done # move peer interfaces to namespace and add addresses for n in 2 4 6 8; do ip li set ${NETIFS[p${n}]} netns ${PEER_NS} up ip -netns ${PEER_NS} addr add ${V4ADDRS[p${n}]}/24 dev ${NETIFS[p${n}]} - ip -netns ${PEER_NS} addr add ${V6ADDRS[p${n}]}/64 dev ${NETIFS[p${n}]} + ip -netns ${PEER_NS} addr add ${V6ADDRS[p${n}]}/64 dev ${NETIFS[p${n}]} nodad done - set +e + ip -6 ro add default via ${V6ADDRS[p3]/::[0-9]/::64} + ip -6 ro add table ${VRF_TABLE} default via ${V6ADDRS[p7]/::[0-9]/::64} - # let DAD complete - assume default of 1 probe - sleep 1 + set +e } cleanup()