Linux 5.2.4
Greg KH
maintainerI'm announcing the release of the 5.2.4 kernel.
All users of the 5.2 kernel series must upgrade.
The updated 5.2.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.2.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/mips/jz4740/board-qi_lb60.c | 16 - arch/x86/include/asm/kvm_host.h | 7 arch/x86/kvm/vmx/nested.c | 10 arch/x86/kvm/x86.c | 4 block/blk-zoned.c | 46 ++-- drivers/dma-buf/dma-buf.c | 1 drivers/dma-buf/reservation.c | 4 drivers/gpio/gpio-davinci.c | 5 drivers/gpio/gpiolib-of.c | 10 drivers/net/caif/caif_hsi.c | 2 drivers/net/dsa/mv88e6xxx/chip.c | 2 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 57 ++--- drivers/net/ethernet/marvell/sky2.c | 7 drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 10 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 7 drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 5 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 7 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 9 drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 23 -- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 16 - drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 10 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 drivers/net/ethernet/realtek/r8169.c | 137 +++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 28 +- drivers/net/hyperv/netvsc_drv.c | 1 drivers/net/macsec.c | 6 drivers/net/phy/sfp.c | 2 drivers/net/vrf.c | 58 +++-- drivers/scsi/sd_zbc.c | 104 +++++++-- fs/ext4/dir.c | 19 - fs/ext4/ext4_jbd2.h | 12 - fs/ext4/file.c | 4 fs/ext4/inode.c | 24 +- fs/ext4/ioctl.c | 46 ++++ fs/ext4/move_extent.c | 3 fs/ext4/namei.c | 45 +++- fs/jbd2/commit.c | 23 +- fs/jbd2/journal.c | 4 fs/jbd2/transaction.c | 49 ++-- include/linux/blkdev.h | 5 include/linux/fs.h | 2 include/linux/jbd2.h | 22 ++ include/linux/mlx5/mlx5_ifc.h | 3 include/linux/perf_event.h | 5 include/net/dst.h | 5 include/net/tcp.h | 8 include/net/tls.h | 1 kernel/events/core.c | 83 +++++-- mm/filemap.c | 22 ++ net/bridge/br_input.c | 8 net/bridge/br_multicast.c | 23 +- net/bridge/br_stp_bpdu.c | 3 net/core/filter.c | 2 net/core/neighbour.c | 2 net/ipv4/devinet.c | 8 net/ipv4/igmp.c | 8 net/ipv4/tcp.c | 6 net/ipv4/tcp_cong.c | 6 net/ipv4/tcp_output.c | 13 + net/ipv6/ip6_fib.c | 18 + net/ipv6/route.c | 2 net/netfilter/nf_queue.c | 6 net/netrom/af_netrom.c | 4 net/nfc/nci/data.c | 2 net/openvswitch/actions.c | 6 net/rxrpc/af_rxrpc.c | 4 net/sched/cls_api.c | 3 net/sched/sch_fq_codel.c | 2 net/sched/sch_sfq.c | 2 net/sctp/socket.c | 24 -- net/sctp/stream.c | 9 net/tls/tls_device.c | 10 net/tls/tls_main.c | 4 net/tls/tls_sw.c | 3 tools/perf/builtin-script.c | 3 tools/testing/selftests/net/txring_overwrite.c | 2 82 files changed, 851 insertions(+), 334 deletions(-)
Alexander Shishkin (1):
perf/core: Fix exclusive events' grouping
Andreas Steinmetz (2):
macsec: fix use-after-free of skb during RX
macsec: fix checksumming after decryption
Andrew Lunn (1):
net: phy: sfp: hwmon: Fix scaling of RX power
Aya Levin (3):
net/mlx5e: IPoIB, Add error path in mlx5_rdma_setup_rn net/mlx5e: Fix return value from timeout recover function net/mlx5e: Fix error flow in tx reporter diagnose
Baruch Siach (1):
net: dsa: mv88e6xxx: wait after reset deactivation
Brian King (1):
bnx2x: Prevent load reordering in tx completion processing
Chris Wilson (1):
dma-buf: Discard old fence_excl on retrying get_fences_rcu for realloc
Christoph Paasch (1):
tcp: Reset bytes_acked and bytes_received when disconnecting
Cong Wang (3):
net_sched: unset TCQ_F_CAN_BYPASS when adding filters
netrom: fix a memory leak in nr_rx_frame()
netrom: hold sock when setting skb->destructor
Damien Le Moal (2):
sd_zbc: Fix report zones buffer allocation
block: Limit zone array allocation size
Darrick J. Wong (1):
ext4: don't allow any modifications to an immutable file
David Ahern (1):
ipv6: rt6_check should return NULL if 'from' is NULL
David Howells (1):
rxrpc: Fix send on a connected, but unbound socket
Eli Britstein (1):
net/mlx5e: Fix port tunnel GRE entropy control
Eric Dumazet (3):
igmp: fix memory leak in igmpv3_del_delrec()
tcp: be more careful in tcp_fragment()
tcp: fix tcp_set_congestion_control() use from bpf hook
Florian Westphal (1):
net: make skb_dst_force return true when dst is refcounted
Frank de Brabander (1):
selftests: txring_overwrite: fix incorrect test of mmap() return value
Greg Kroah-Hartman (1):
Linux 5.2.4
Haiyang Zhang (1):
hv_netvsc: Fix extra rcu_read_unlock in netvsc_recv_callback()
Heiner Kallweit (1):
r8169: fix issue with confused RX unit after PHY power-down on RTL8411b
Ido Schimmel (2):
ipv6: Unlink sibling route in case of failure
mlxsw: spectrum: Do not process learned records with a dummy FID
Jakub Kicinski (3):
net/tls: make sure offload also gets the keys wiped net/tls: fix poll ignoring partially copied records net/tls: reject offload of TLS 1.3
Jan Kiszka (1):
KVM: nVMX: Clear pending KVM_REQ_GET_VMCS12_PAGES when leaving nested
John Hurley (1):
net: openvswitch: fix csum updates for MPLS actions
Jose Abreu (1):
net: stmmac: Re-work the queue selection for TSO packets
Justin Chen (1):
net: bcmgenet: use promisc for unsupported filters
Jérôme Glisse (1):
dma-buf: balance refcount inbalance
Keerthy (1):
gpio: davinci: silence error prints in case of EPROBE_DEFER
Linus Walleij (1):
Revert "gpio/spi: Fix spi-gpio regression on active high CS"
Lorenzo Bianconi (1):
net: neigh: fix multiple neigh timer scheduling
Maor Gottlieb (1):
net/mlx5: E-Switch, Fix default encap mode
Marcelo Ricardo Leitner (1):
sctp: fix error handling on stream scheduler initialization
Matteo Croce (1):
ipv4: don't set IPv6 only flags to IPv4 addresses
Michael Chan (1):
bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips.
Nikolay Aleksandrov (4):
net: bridge: mcast: fix stale nsrcs pointer in igmp3/mld2 report handling
net: bridge: mcast: fix stale ipv6 hdr pointer when handling v6 query
net: bridge: don't cache ether dest pointer on input
net: bridge: stp: don't cache eth dest pointer before skb pull
Nishka Dasgupta (1):
gpiolib: of: fix a memory leak in of_gpio_flags_quirks()
Paolo Bonzini (2):
KVM: nVMX: do not use dangling shadow VMCS after guest reset Revert "kvm: x86: Use task structs fpu field for user"
Paul Cercueil (1):
MIPS: lb60: Fix pin mappings
Peter Kosyh (1):
vrf: make sure skb->data contains ip header to make routing
Peter Zijlstra (1):
perf/core: Fix race between close() and fork()
Petr Machata (1):
mlxsw: spectrum_dcb: Configure DSCP map as the last rule is removed
Ross Zwisler (3):
mm: add filemap_fdatawait_range_keep_errors()
jbd2: introduce jbd2_inode dirty range scoping
ext4: use jbd2_inode dirty range scoping
Saeed Mahameed (1):
net/mlx5e: Rx, Fix checksum calculation for new hardware
Song Liu (1):
perf script: Assume native_arch for pipe mode
Taehee Yoo (1):
caif-hsi: fix possible deadlock in cfhsi_exit_module()
Takashi Iwai (1):
sky2: Disable MSI on ASUS P6T
Theodore Ts'o (2):
ext4: enforce the immutable flag on open files
ext4: allow directory holes
Vlad Buslov (1):
net: sched: verify that q!=NULL before setting q->flags
Xin Long (1):
sctp: not bind the socket in sctp_connect
Yang Wei (1):
nfc: fix potential illegal memory access
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 2 -SUBLEVEL = 3 +SUBLEVEL = 4 EXTRAVERSION = NAME = Bobtail Squid
arch/mips/jz4740/board-qi_lb60.c +8 -8
@@ -466,27 +466,27 @@ static unsigned long pin_cfg_bias_disable[] = {static struct pinctrl_map pin_map[]__initdata = {/* NAND pin configuration */ PIN_MAP_MUX_GROUP_DEFAULT ("jz4740-nand" , -"10010000.jz4740-pinctrl" ,"nand" ,"nand-cs1" ), +"10010000.pin-controller" ,"nand-cs1" ,"nand" ),/* fbdev pin configuration */ PIN_MAP_MUX_GROUP ("jz4740-fb" ,PINCTRL_STATE_DEFAULT , -"10010000.jz4740-pinctrl" ,"lcd" ,"lcd-8bit" ), +"10010000.pin-controller" ,"lcd-8bit" ,"lcd" ),PIN_MAP_MUX_GROUP ("jz4740-fb" ,PINCTRL_STATE_SLEEP , -"10010000.jz4740-pinctrl" ,"lcd" ,"lcd-no-pins" ), +"10010000.pin-controller" ,"lcd-no-pins" ,"lcd" ),/* MMC pin configuration */ PIN_MAP_MUX_GROUP_DEFAULT ("jz4740-mmc.0" , -"10010000.jz4740-pinctrl" ,"mmc" ,"mmc-1bit" ), +"10010000.pin-controller" ,"mmc-1bit" ,"mmc" ),PIN_MAP_MUX_GROUP_DEFAULT ("jz4740-mmc.0" , -"10010000.jz4740-pinctrl" ,"mmc" ,"mmc-4bit" ), +"10010000.pin-controller" ,"mmc-4bit" ,"mmc" ),PIN_MAP_CONFIGS_PIN_DEFAULT ("jz4740-mmc.0" , -"10010000.jz4740-pinctrl" ,"PD0" , pin_cfg_bias_disable), +"10010000.pin-controller" ,"PD0" , pin_cfg_bias_disable),PIN_MAP_CONFIGS_PIN_DEFAULT ("jz4740-mmc.0" , -"10010000.jz4740-pinctrl" ,"PD2" , pin_cfg_bias_disable), +"10010000.pin-controller" ,"PD2" , pin_cfg_bias_disable),/* PWM pin configuration */ PIN_MAP_MUX_GROUP_DEFAULT ("jz4740-pwm" , -"10010000.jz4740-pinctrl" ,"pwm4" ,"pwm4" ), +"10010000.pin-controller" ,"pwm4" ,"pwm4" ), };
arch/x86/include/asm/kvm_host.h +4 -3
@@ -607,15 +607,16 @@ struct kvm_vcpu_arch {/* * QEMU userspace and the guest each have their own FPU state. -* In vcpu_run, we switch between the user, maintained in the -* task_struct struct, and guest FPU contexts. While running a VCPU, -* the VCPU thread will have the guest FPU context. +* In vcpu_run, we switch between the user and guest FPU contexts. +* While running a VCPU, the VCPU thread will have the guest FPU +* context. * * Note that while the PKRU state lives inside the fpu registers, * it is switched out separately at VMENTER and VMEXIT time. The * "guest_fpu" state here contains the guest FPU context, with the * host PRKU bits. */ +struct fpu user_fpu;struct fpu *guest_fpu;u64 xcr0;
arch/x86/kvm/vmx/nested.c +9 -1
@@ -184,6 +184,7 @@ static void vmx_disable_shadow_vmcs(struct vcpu_vmx *vmx) {vmcs_clear_bits (SECONDARY_VM_EXEC_CONTROL ,SECONDARY_EXEC_SHADOW_VMCS );vmcs_write64 (VMCS_LINK_POINTER ,-1ull ); + vmx->nested.need_vmcs12_sync = false; }static inline void nested_release_evmcs (struct kvm_vcpu *vcpu)
@@ -209,6 +210,8 @@ static void free_nested(struct kvm_vcpu *vcpu)if (!vmx->nested.vmxon && !vmx->nested.smm.vmxon)return ; +kvm_clear_request (KVM_REQ_GET_VMCS12_PAGES , vcpu); + vmx->nested.vmxon = false; vmx->nested.smm.vmxon = false;free_vpid (vmx->nested.vpid02);
@@ -1321,6 +1324,9 @@ static void copy_shadow_to_vmcs12(struct vcpu_vmx *vmx)u64 field_value;struct vmcs *shadow_vmcs = vmx->vmcs01.shadow_vmcs; +if (WARN_ON (!shadow_vmcs)) +return ; +preempt_disable ();vmcs_load (shadow_vmcs);
@@ -1359,6 +1365,9 @@ static void copy_vmcs12_to_shadow(struct vcpu_vmx *vmx)u64 field_value =0 ;struct vmcs *shadow_vmcs = vmx->vmcs01.shadow_vmcs; +if (WARN_ON (!shadow_vmcs)) +return ; +vmcs_load (shadow_vmcs);for (q =0 ; q <ARRAY_SIZE (fields); q++) {
@@ -4300,7 +4309,6 @@ static inline void nested_release_vmcs12(struct kvm_vcpu *vcpu)/* copy to memory all shadowed fields in case they were modified */ copy_shadow_to_vmcs12 (vmx); - vmx->nested.need_vmcs12_sync = false;vmx_disable_shadow_vmcs (vmx); } vmx->nested.posted_intr_nv =-1 ;
arch/x86/kvm/x86.c +2 -2
@@ -8219,7 +8219,7 @@ static void kvm_load_guest_fpu(struct kvm_vcpu *vcpu) {fpregs_lock (); -copy_fpregs_to_fpstate (¤t->thread.fpu); +copy_fpregs_to_fpstate (&vcpu->arch.user_fpu);/* PKRU is separately restored in kvm_x86_ops->run. */ __copy_kernel_to_fpregs (&vcpu->arch.guest_fpu->state, ~XFEATURE_MASK_PKRU );
@@ -8236,7 +8236,7 @@ static void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)fpregs_lock ();copy_fpregs_to_fpstate (vcpu->arch.guest_fpu); -copy_kernel_to_fpregs (¤t->thread.fpu.state); +copy_kernel_to_fpregs (&vcpu->arch.user_fpu.state);fpregs_mark_activate ();fpregs_unlock ();
block/blk-zoned.c +30 -16
85 lines not on this page · raw message
drivers/dma-buf/dma-buf.c +1 -0
@@ -1057,6 +1057,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused) fence->ops->get_driver_name (fence), fence->ops->get_timeline_name (fence), dma_fence_is_signaled(fence) ? "" : "un"); +dma_fence_put (fence); }rcu_read_unlock ();
drivers/dma-buf/reservation.c +4 -0
@@ -365,6 +365,10 @@ int reservation_object_get_fences_rcu(struct reservation_object *obj, GFP_NOWAIT | __GFP_NOWARN);if (!nshared) {rcu_read_unlock (); + +dma_fence_put (fence_excl); + fence_excl =NULL ; + nshared =krealloc (shared, sz,GFP_KERNEL );if (nshared) { shared = nshared;
drivers/gpio/gpio-davinci.c +3 -2
@@ -238,8 +238,9 @@ static int davinci_gpio_probe(struct platform_device *pdev)for (i =0 ; i < nirq; i++) { chips->irqs[i] =platform_get_irq (pdev, i);if (chips->irqs[i] <0 ) { -dev_info (dev,"IRQ not populated, err = %d\n" , - chips->irqs[i]); +if (chips->irqs[i] != -EPROBE_DEFER ) +dev_info (dev,"IRQ not populated, err = %d\n" , + chips->irqs[i]);return chips->irqs[i]; } }
drivers/gpio/gpiolib-of.c +2 -8
@@ -118,15 +118,8 @@ static void of_gpio_flags_quirks(struct device_node *np,* Legacy handling of SPI active high chip select. If we have a * property named "cs-gpios" we need to inspect the child node * to determine if the flags should have inverted semantics. -* -* This does not apply to an SPI device named "spi-gpio", because -* these have traditionally obtained their own GPIOs by parsing -* the device tree directly and did not respect any "spi-cs-high" -* property on the SPI bus children. */ -if (IS_ENABLED (CONFIG_SPI_MASTER ) && - !strcmp (propname,"cs-gpios" ) && - !of_device_is_compatible (np,"spi-gpio" ) && +if (IS_ENABLED (CONFIG_SPI_MASTER ) && !strcmp (propname,"cs-gpios" ) &&of_property_read_bool (np,"cs-gpios" )) {struct device_node *child;u32 cs;
@@ -161,6 +154,7 @@ static void of_gpio_flags_quirks(struct device_node *np, of_node_full_name(child)); *flags |=OF_GPIO_ACTIVE_LOW ; } +of_node_put (child);break ; } }
drivers/net/caif/caif_hsi.c +1 -1
@@ -1455,7 +1455,7 @@ static void __exit cfhsi_exit_module(void)rtnl_lock ();list_for_each_safe (list_node, n, &cfhsi_list) { cfhsi = list_entry(list_node, struct cfhsi, list); -unregister_netdev (cfhsi->ndev); +unregister_netdevice (cfhsi->ndev); }rtnl_unlock (); }
drivers/net/dsa/mv88e6xxx/chip.c +2 -0
@@ -4711,6 +4711,8 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev) err =PTR_ERR (chip->reset); goto out; } +if (chip->reset) +usleep_range (1000 ,2000 ); err =mv88e6xxx_detect (chip);if (err)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +3 -0
@@ -285,6 +285,9 @@ int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata) hw_cons =le16_to_cpu (*txdata->tx_cons_sb); sw_cons = txdata->tx_pkt_cons; +/* Ensure subsequent loads occur after hw_cons */ +smp_rmb (); +while (sw_cons != hw_cons) {u16 pkt_cons;
drivers/net/ethernet/broadcom/bnxt/bnxt.c +5 -2
@@ -3022,7 +3022,7 @@ static int bnxt_alloc_vnics(struct bnxt *bp)int num_vnics =1 ;#ifdef CONFIG_RFS_ACCEL -if (bp->flags &BNXT_FLAG_RFS ) +if ((bp->flags & (BNXT_FLAG_RFS |BNXT_FLAG_CHIP_P5 )) ==BNXT_FLAG_RFS ) num_vnics += bp->rx_nr_rings;#endif
@@ -7133,6 +7133,9 @@ static int bnxt_alloc_rfs_vnics(struct bnxt *bp)#ifdef CONFIG_RFS_ACCEL int i, rc =0 ; +if (bp->flags &BNXT_FLAG_CHIP_P5 ) +return 0 ; +for (i =0 ; i < bp->rx_nr_rings; i++) {struct bnxt_vnic_info *vnic;u16 vnic_id = i +1 ;
@@ -9592,7 +9595,7 @@ int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs,return -ENOMEM ; vnics =1 ; -if (bp->flags &BNXT_FLAG_RFS ) +if ((bp->flags & (BNXT_FLAG_RFS |BNXT_FLAG_CHIP_P5 )) ==BNXT_FLAG_RFS ) vnics += rx_rings;if (bp->flags &BNXT_FLAG_AGG_RINGS )
drivers/net/ethernet/broadcom/genet/bcmgenet.c +26 -31
97 lines not on this page · raw message
drivers/net/ethernet/marvell/sky2.c +7 -0
@@ -4917,6 +4917,13 @@ static const struct dmi_system_id msi_blacklist[] = { DMI_MATCH(DMI_PRODUCT_NAME, "P-79"), }, }, + { + .ident = "ASUS P6T", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), + DMI_MATCH(DMI_BOARD_NAME, "P6T"), + }, + }, {} };
drivers/net/ethernet/mellanox/mlx5/core/en.h +1 -0
@@ -294,6 +294,7 @@ enum {MLX5E_RQ_STATE_ENABLED ,MLX5E_RQ_STATE_AM ,MLX5E_RQ_STATE_NO_CSUM_COMPLETE , + MLX5E_RQ_STATE_CSUM_FULL, /* cqe_csum_full hw bit is set */ }; struct mlx5e_cq {
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +4 -6
@@ -142,22 +142,20 @@ static int mlx5e_tx_reporter_timeout_recover(struct mlx5e_txqsq *sq) {struct mlx5_eq_comp *eq = sq->cq.mcq.eq;u32 eqe_count; -int ret;netdev_err (sq->channel->netdev,"EQ 0x%x: Cons = 0x%x, irqn = 0x%x\n" , eq->core.eqn, eq->core.cons_index, eq->core.irqn); eqe_count =mlx5_eq_poll_irq_disabled (eq); - ret = eqe_count ? false : true;if (!eqe_count) {clear_bit (MLX5E_SQ_STATE_ENABLED , &sq->state); -return ret; +return -EIO ; }netdev_err (sq->channel->netdev,"Recover %d eqes on EQ 0x%x\n" , eqe_count, eq->core.eqn); sq->channel->stats->eq_rearm++; -return ret; +return 0 ; }int mlx5e_tx_reporter_timeout (struct mlx5e_txqsq *sq)
@@ -264,13 +262,13 @@ static int mlx5e_tx_reporter_diagnose(struct devlink_health_reporter *reporter, err =mlx5_core_query_sq_state (priv->mdev, sq->sqn, &state);if (err) -break ; + goto unlock; err =mlx5e_tx_reporter_build_diagnose_output (fmsg, sq->sqn, state,netif_xmit_stopped (sq->txq));if (err) -break ; + goto unlock; } err =devlink_fmsg_arr_pair_nest_end (fmsg);if (err)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +3 -0
@@ -855,6 +855,9 @@ static int mlx5e_open_rq(struct mlx5e_channel *c,if (err) goto err_destroy_rq; +if (MLX5_CAP_ETH (c->mdev, cqe_checksum_full)) +__set_bit (MLX5E_RQ_STATE_CSUM_FULL , &c->rq.state); +if (params->rx_dim_enabled)__set_bit (MLX5E_RQ_STATE_AM , &c->rq.state);
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +6 -1
@@ -873,8 +873,14 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,if (unlikely (get_ip_proto (skb, network_depth, proto) ==IPPROTO_SCTP )) goto csum_unnecessary; + stats->csum_complete++; skb->ip_summed =CHECKSUM_COMPLETE ; skb->csum =csum_unfold ((__force __sum16 )cqe->check_sum); + +if (test_bit (MLX5E_RQ_STATE_CSUM_FULL , &rq->state)) +return ;/* CQE csum covers all received bytes */ + +/* csum might need some fixups ...*/ if (network_depth >ETH_HLEN )/* CQE csum is calculated from the IP header and does * not cover VLAN headers (if present). This will add
@@ -885,7 +891,6 @@ static inline void mlx5e_handle_csum(struct net_device *netdev, skb->csum);mlx5e_skb_padding_csum (skb, network_depth, proto, stats); - stats->csum_complete++;return ; }
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +0 -5
@@ -1882,11 +1882,6 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev) esw->enabled_vports =0 ; esw->mode =SRIOV_NONE ; esw->offloads.inline_mode =MLX5_INLINE_MODE_NONE ; -if (MLX5_CAP_ESW_FLOWTABLE_FDB (dev, reformat) && -MLX5_CAP_ESW_FLOWTABLE_FDB (dev, decap)) - esw->offloads.encap =DEVLINK_ESWITCH_ENCAP_MODE_BASIC ; -else - esw->offloads.encap =DEVLINK_ESWITCH_ENCAP_MODE_NONE ; dev->priv.eswitch = esw;return 0 ;
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +7 -0
@@ -1840,6 +1840,12 @@ int esw_offloads_init(struct mlx5_eswitch *esw, int vf_nvports, {int err; +if (MLX5_CAP_ESW_FLOWTABLE_FDB (esw->dev, reformat) && +MLX5_CAP_ESW_FLOWTABLE_FDB (esw->dev, decap)) + esw->offloads.encap =DEVLINK_ESWITCH_ENCAP_MODE_BASIC ; +else + esw->offloads.encap =DEVLINK_ESWITCH_ENCAP_MODE_NONE ; + err =esw_offloads_steering_init (esw, vf_nvports, total_nvports);if (err)return err;
@@ -1901,6 +1907,7 @@ void esw_offloads_cleanup(struct mlx5_eswitch *esw)esw_offloads_devcom_cleanup (esw);esw_offloads_unload_all_reps (esw, num_vfs);esw_offloads_steering_cleanup (esw); + esw->offloads.encap =DEVLINK_ESWITCH_ENCAP_MODE_NONE ; }static int esw_mode_from_devlink (u16 mode,u16 *mlx5_mode)
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c +8 -1
@@ -698,7 +698,9 @@ static int mlx5_rdma_setup_rn(struct ib_device *ibdev, u8 port_num, prof->init (mdev, netdev, prof, ipriv); -mlx5e_attach_netdev (epriv); + err =mlx5e_attach_netdev (epriv); +if (err) + goto detach;netif_carrier_off (netdev);/* set rdma_netdev func pointers */
@@ -714,6 +716,11 @@ static int mlx5_rdma_setup_rn(struct ib_device *ibdev, u8 port_num,return 0 ; +detach: + prof->cleanup (epriv); +if (ipriv->sub_interface) +return err; +mlx5e_destroy_mdev_resources (mdev); destroy_ht:mlx5i_pkey_qpn_ht_cleanup (netdev);return err;
drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c +4 -19
@@ -98,27 +98,12 @@ static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,*/ if (entropy_flags.gre_calc_supported && reformat_type ==MLX5_REFORMAT_TYPE_L2_TO_NVGRE ) { -/* Other applications may change the global FW entropy -* calculations settings. Check that the current entropy value -* is the negative of the updated value. -*/ -if (entropy_flags.force_enabled && - enable == entropy_flags.gre_calc_enabled) { -mlx5_core_warn (tun_entropy->mdev, -"Unexpected GRE entropy calc setting - expected %d" , - !entropy_flags.gre_calc_enabled); -return -EOPNOTSUPP ; - } - err =mlx5_set_port_gre_tun_entropy_calc (tun_entropy->mdev, enable, - entropy_flags.force_supported); +if (!entropy_flags.force_supported) +return 0 ; + err =mlx5_set_port_gre_tun_entropy_calc (tun_entropy->mdev, + enable, !enable);if (err)return err; -/* if we turn on the entropy we don't need to force it anymore */ -if (entropy_flags.force_supported && enable) { - err =mlx5_set_port_gre_tun_entropy_calc (tun_entropy->mdev,1 ,0 ); -if (err) -return err; - } }else if (entropy_flags.calc_supported) {/* Other applications may change the global FW entropy * calculations settings. Check that the current entropy value
drivers/net/ethernet/mellanox/mlxsw/spectrum.h +1 -0
@@ -805,6 +805,7 @@ int mlxsw_sp_setup_tc_prio(struct mlxsw_sp_port *mlxsw_sp_port, struct tc_prio_qopt_offload *p);/* spectrum_fid.c */ +bool mlxsw_sp_fid_is_dummy (struct mlxsw_sp *mlxsw_sp,u16 fid_index);bool mlxsw_sp_fid_lag_vid_valid (const struct mlxsw_sp_fid *fid);struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index (struct mlxsw_sp *mlxsw_sp,u16 fid_index);
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c +8 -8
@@ -408,14 +408,6 @@ static int mlxsw_sp_port_dcb_app_update(struct mlxsw_sp_port *mlxsw_sp_port) have_dscp =mlxsw_sp_port_dcb_app_prio_dscp_map (mlxsw_sp_port, &prio_map); -if (!have_dscp) { - err =mlxsw_sp_port_dcb_toggle_trust (mlxsw_sp_port, -MLXSW_REG_QPTS_TRUST_STATE_PCP ); -if (err) -netdev_err (mlxsw_sp_port->dev,"Couldn't switch to trust L2\n" ); -return err; - } -mlxsw_sp_port_dcb_app_dscp_prio_map (mlxsw_sp_port, default_prio, &dscp_map); err = mlxsw_sp_port_dcb_app_update_qpdpm(mlxsw_sp_port,
@@ -432,6 +424,14 @@ static int mlxsw_sp_port_dcb_app_update(struct mlxsw_sp_port *mlxsw_sp_port)return err; } +if (!have_dscp) { + err =mlxsw_sp_port_dcb_toggle_trust (mlxsw_sp_port, +MLXSW_REG_QPTS_TRUST_STATE_PCP ); +if (err) +netdev_err (mlxsw_sp_port->dev,"Couldn't switch to trust L2\n" ); +return err; + } + err =mlxsw_sp_port_dcb_toggle_trust (mlxsw_sp_port,MLXSW_REG_QPTS_TRUST_STATE_DSCP );if (err) {
drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c +10 -0
@@ -126,6 +126,16 @@ static const int *mlxsw_sp_packet_type_sfgc_types[] = { [MLXSW_SP_FLOOD_TYPE_MC] = mlxsw_sp_sfgc_mc_packet_types, }; +bool mlxsw_sp_fid_is_dummy (struct mlxsw_sp *mlxsw_sp,u16 fid_index) +{ +enum mlxsw_sp_fid_type fid_type =MLXSW_SP_FID_TYPE_DUMMY ; +struct mlxsw_sp_fid_family *fid_family; + + fid_family = mlxsw_sp->fid_core->fid_family_arr[fid_type]; + +return fid_family->start_index == fid_index; +} +bool mlxsw_sp_fid_lag_vid_valid (const struct mlxsw_sp_fid *fid) {return fid->fid_family->lag_vid_valid;
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +6 -0
@@ -2468,6 +2468,9 @@ static void mlxsw_sp_fdb_notify_mac_process(struct mlxsw_sp *mlxsw_sp, goto just_remove; } +if (mlxsw_sp_fid_is_dummy (mlxsw_sp, fid)) + goto just_remove; + mlxsw_sp_port_vlan =mlxsw_sp_port_vlan_find_by_fid (mlxsw_sp_port, fid);if (!mlxsw_sp_port_vlan) {netdev_err (mlxsw_sp_port->dev,"Failed to find a matching {Port, VID} following FDB notification\n" );
@@ -2527,6 +2530,9 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp, goto just_remove; } +if (mlxsw_sp_fid_is_dummy (mlxsw_sp, fid)) + goto just_remove; + mlxsw_sp_port_vlan =mlxsw_sp_port_vlan_find_by_fid (mlxsw_sp_port, fid);if (!mlxsw_sp_port_vlan) {netdev_err (mlxsw_sp_port->dev,"Failed to find a matching {Port, VID} following FDB notification\n" );
drivers/net/ethernet/realtek/r8169.c +137 -0
143 lines not on this page · raw message
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +18 -10
@@ -3048,17 +3048,8 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)/* Manage oversized TCP frames for GMAC4 device */ if (skb_is_gso (skb) && priv->tso) { -if (skb_shinfo (skb)->gso_type & (SKB_GSO_TCPV4 |SKB_GSO_TCPV6 )) { -/* -* There is no way to determine the number of TSO -* capable Queues. Let's use always the Queue 0 -* because if TSO is supported then at least this -* one will be capable. -*/ -skb_set_queue_mapping (skb,0 ); - +if (skb_shinfo (skb)->gso_type & (SKB_GSO_TCPV4 |SKB_GSO_TCPV6 ))return stmmac_tso_xmit (skb, dev); - } }if (unlikely (stmmac_tx_avail (priv, queue) < nfrags +1 )) {
@@ -3875,6 +3866,22 @@ static int stmmac_setup_tc(struct net_device *ndev, enum tc_setup_type type, } } +static u16 stmmac_select_queue (struct net_device *dev,struct sk_buff *skb, +struct net_device *sb_dev) +{ +if (skb_shinfo (skb)->gso_type & (SKB_GSO_TCPV4 |SKB_GSO_TCPV6 )) { +/* +* There is no way to determine the number of TSO +* capable Queues. Let's use always the Queue 0 +* because if TSO is supported then at least this +* one will be capable. +*/ +return 0 ; + } + +return netdev_pick_tx (dev, skb,NULL ) % dev->real_num_tx_queues; +} +static int stmmac_set_mac_address (struct net_device *ndev,void *addr) {struct stmmac_priv *priv =netdev_priv (ndev);
@@ -4091,6 +4098,7 @@ static const struct net_device_ops stmmac_netdev_ops = { .ndo_tx_timeout = stmmac_tx_timeout, .ndo_do_ioctl = stmmac_ioctl, .ndo_setup_tc = stmmac_setup_tc, + .ndo_select_queue = stmmac_select_queue,#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = stmmac_poll_controller,#endif
drivers/net/hyperv/netvsc_drv.c +0 -1
@@ -836,7 +836,6 @@ int netvsc_recv_callback(struct net_device *net,if (unlikely (!skb)) { ++net_device_ctx->eth_stats.rx_no_memory; -rcu_read_unlock ();return NVSP_STAT_FAIL ; }
drivers/net/macsec.c +3 -3
@@ -865,6 +865,7 @@ static void macsec_reset_skb(struct sk_buff *skb, struct net_device *dev)static void macsec_finalize_skb (struct sk_buff *skb,u8 icv_len,u8 hdr_len) { + skb->ip_summed =CHECKSUM_NONE ;memmove (skb->data + hdr_len, skb->data,2 *ETH_ALEN );skb_pull (skb, hdr_len);pskb_trim_unique (skb, skb->len - icv_len);
@@ -1099,10 +1100,9 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb) } skb =skb_unshare (skb,GFP_ATOMIC ); -if (!skb) { - *pskb =NULL ; + *pskb = skb; +if (!skb)return RX_HANDLER_CONSUMED ; - } pulled_sci =pskb_may_pull (skb,macsec_extra_len (true));if (!pulled_sci) {
drivers/net/phy/sfp.c +1 -1
@@ -515,7 +515,7 @@ static int sfp_hwmon_read_sensor(struct sfp *sfp, int reg, long *value)static void sfp_hwmon_to_rx_power (long *value) { - *value =DIV_ROUND_CLOSEST (*value,100 ); + *value =DIV_ROUND_CLOSEST (*value,10 ); } static void sfp_hwmon_calibrate(struct sfp *sfp, unsigned int slope, int offset,
drivers/net/vrf.c +35 -23
79 lines not on this page · raw message
drivers/scsi/sd_zbc.c +75 -29
196 lines not on this page · raw message
fs/ext4/dir.c +9 -10
@@ -109,7 +109,6 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)struct inode *inode =file_inode (file);struct super_block *sb = inode->i_sb;struct buffer_head *bh =NULL ; -int dir_has_error =0 ;struct fscrypt_str fstr =FSTR_INIT (NULL ,0 );if (IS_ENCRYPTED (inode)) {
@@ -145,8 +144,6 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)return err; } - offset = ctx->pos & (sb->s_blocksize -1 ); -while (ctx->pos < inode->i_size) {struct ext4_map_blocks map;
@@ -155,9 +152,18 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx) goto errout; }cond_resched (); + offset = ctx->pos & (sb->s_blocksize -1 ); map.m_lblk = ctx->pos >>EXT4_BLOCK_SIZE_BITS (sb); map.m_len =1 ; err =ext4_map_blocks (NULL , inode, &map,0 ); +if (err ==0 ) { +/* m_len should never be zero but let's avoid +* an infinite loop if it somehow is */ +if (map.m_len ==0 ) + map.m_len =1 ; + ctx->pos += map.m_len * sb->s_blocksize; +continue ; + }if (err >0 ) {pgoff_t index = map.m_pblk >> (PAGE_SHIFT - inode->i_blkbits);
@@ -176,13 +182,6 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx) }if (!bh) { -if (!dir_has_error) { -EXT4_ERROR_FILE (file,0 , -"directory contains a " -"hole at offset %llu" , - (unsigned long long ) ctx->pos); - dir_has_error =1 ; - }/* corrupt size? Maybe no more blocks to read */ if (ctx->pos > inode->i_blocks <<9 )break ;
fs/ext4/ext4_jbd2.h +6 -6
@@ -361,20 +361,20 @@ static inline int ext4_journal_force_commit(journal_t *journal) }static inline int ext4_jbd2_inode_add_write (handle_t *handle, -struct inode *inode) +struct inode *inode,loff_t start_byte,loff_t length) {if (ext4_handle_valid (handle)) -return jbd2_journal_inode_add_write (handle, -EXT4_I (inode)->jinode); +return jbd2_journal_inode_ranged_write (handle, +EXT4_I (inode)->jinode, start_byte, length);return 0 ; }static inline int ext4_jbd2_inode_add_wait (handle_t *handle, -struct inode *inode) +struct inode *inode,loff_t start_byte,loff_t length) {if (ext4_handle_valid (handle)) -return jbd2_journal_inode_add_wait (handle, -EXT4_I (inode)->jinode); +return jbd2_journal_inode_ranged_wait (handle, +EXT4_I (inode)->jinode, start_byte, length);return 0 ; }
fs/ext4/file.c +4 -0
@@ -165,6 +165,10 @@ static ssize_t ext4_write_checks(struct kiocb *iocb, struct iov_iter *from) ret =generic_write_checks (iocb, from);if (ret <=0 )return ret; + +if (unlikely (IS_IMMUTABLE (inode))) +return -EPERM ; +/* * If we have encountered a bitmap-format file, the size limit * is smaller than s_maxbytes, which is for extent-mapped files.
fs/ext4/inode.c +21 -3
@@ -731,10 +731,16 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode, !(flags & EXT4_GET_BLOCKS_ZERO) && !ext4_is_quota_file(inode) && ext4_should_order_data(inode)) { +loff_t start_byte = + (loff_t )map->m_lblk << inode->i_blkbits; +loff_t length = (loff_t )map->m_len << inode->i_blkbits; +if (flags &EXT4_GET_BLOCKS_IO_SUBMIT ) - ret =ext4_jbd2_inode_add_wait (handle, inode); + ret =ext4_jbd2_inode_add_wait (handle, inode, + start_byte, length);else - ret =ext4_jbd2_inode_add_write (handle, inode); + ret =ext4_jbd2_inode_add_write (handle, inode, + start_byte, length);if (ret)return ret; }
@@ -4085,7 +4091,8 @@ static int __ext4_block_zero_page_range(handle_t *handle, err =0 ;mark_buffer_dirty (bh);if (ext4_should_order_data (inode)) - err =ext4_jbd2_inode_add_write (handle, inode); + err =ext4_jbd2_inode_add_write (handle, inode, from, + length); } unlock:
@@ -5520,6 +5527,14 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)if (unlikely (ext4_forced_shutdown (EXT4_SB (inode->i_sb))))return -EIO ; +if (unlikely (IS_IMMUTABLE (inode))) +return -EPERM ; + +if (unlikely (IS_APPEND (inode) && + (ia_valid & (ATTR_MODE |ATTR_UID | +ATTR_GID |ATTR_TIMES_SET )))) +return -EPERM ; + error =setattr_prepare (dentry, attr);if (error)return error;
@@ -6190,6 +6205,9 @@ vm_fault_t ext4_page_mkwrite(struct vm_fault *vmf)get_block_t *get_block;int retries =0 ; +if (unlikely (IS_IMMUTABLE (inode))) +return VM_FAULT_SIGBUS ; +sb_start_pagefault (inode->i_sb);file_update_time (vma->vm_file);
fs/ext4/ioctl.c +45 -1
70 lines not on this page · raw message
fs/ext4/move_extent.c +2 -1
@@ -390,7 +390,8 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode,/* Even in case of data=writeback it is reasonable to pin * inode to transaction, to prevent unexpected data loss */ - *err =ext4_jbd2_inode_add_write (handle, orig_inode); + *err =ext4_jbd2_inode_add_write (handle, orig_inode, + (loff_t )orig_page_offset <<PAGE_SHIFT , replaced_size); unlock_pages:unlock_page (pagep[0 ]);
fs/ext4/namei.c +37 -8
109 lines not on this page · raw message
fs/jbd2/commit.c +17 -6
@@ -187,14 +187,15 @@ static int journal_wait_on_commit_record(journal_t *journal,* use writepages() because with dealyed allocation we may be doing * block allocation in writepages(). */ -static int journal_submit_inode_data_buffers (struct address_space *mapping) +static int journal_submit_inode_data_buffers (struct address_space *mapping, +loff_t dirty_start,loff_t dirty_end) {int ret;struct writeback_control wbc = { .sync_mode =WB_SYNC_ALL , .nr_to_write = mapping->nrpages *2 , - .range_start =0 , - .range_end =i_size_read (mapping->host), + .range_start = dirty_start, + .range_end = dirty_end, }; ret =generic_writepages (mapping, &wbc);
@@ -218,6 +219,9 @@ static int journal_submit_data_buffers(journal_t *journal,spin_lock (&journal->j_list_lock);list_for_each_entry (jinode, &commit_transaction->t_inode_list, i_list) { +loff_t dirty_start = jinode->i_dirty_start; +loff_t dirty_end = jinode->i_dirty_end; +if (!(jinode->i_flags &JI_WRITE_DATA ))continue ; mapping = jinode->i_vfs_inode->i_mapping;
@@ -230,7 +234,8 @@ static int journal_submit_data_buffers(journal_t *journal,* only allocated blocks here. */ trace_jbd2_submit_inode_data (jinode->i_vfs_inode); - err =journal_submit_inode_data_buffers (mapping); + err =journal_submit_inode_data_buffers (mapping, dirty_start, + dirty_end);if (!ret) ret = err;spin_lock (&journal->j_list_lock);
@@ -257,12 +262,16 @@ static int journal_finish_inode_data_buffers(journal_t *journal,/* For locking, see the comment in journal_submit_data_buffers() */ spin_lock (&journal->j_list_lock);list_for_each_entry (jinode, &commit_transaction->t_inode_list, i_list) { +loff_t dirty_start = jinode->i_dirty_start; +loff_t dirty_end = jinode->i_dirty_end; +if (!(jinode->i_flags &JI_WAIT_DATA ))continue ; jinode->i_flags |=JI_COMMIT_RUNNING ;spin_unlock (&journal->j_list_lock); - err =filemap_fdatawait_keep_errors ( - jinode->i_vfs_inode->i_mapping); + err =filemap_fdatawait_range_keep_errors ( + jinode->i_vfs_inode->i_mapping, dirty_start, + dirty_end);if (!ret) ret = err;spin_lock (&journal->j_list_lock);
@@ -282,6 +291,8 @@ static int journal_finish_inode_data_buffers(journal_t *journal, &jinode->i_transaction->t_inode_list); }else { jinode->i_transaction =NULL ; + jinode->i_dirty_start =0 ; + jinode->i_dirty_end =0 ; } }spin_unlock (&journal->j_list_lock);
fs/jbd2/journal.c +4 -0
@@ -94,6 +94,8 @@ EXPORT_SYMBOL(jbd2_journal_try_to_free_buffers);EXPORT_SYMBOL (jbd2_journal_force_commit);EXPORT_SYMBOL (jbd2_journal_inode_add_write);EXPORT_SYMBOL (jbd2_journal_inode_add_wait); +EXPORT_SYMBOL (jbd2_journal_inode_ranged_write); +EXPORT_SYMBOL (jbd2_journal_inode_ranged_wait);EXPORT_SYMBOL (jbd2_journal_init_jbd_inode);EXPORT_SYMBOL (jbd2_journal_release_jbd_inode);EXPORT_SYMBOL (jbd2_journal_begin_ordered_truncate);
@@ -2574,6 +2576,8 @@ void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode) jinode->i_next_transaction =NULL ; jinode->i_vfs_inode = inode; jinode->i_flags =0 ; + jinode->i_dirty_start =0 ; + jinode->i_dirty_end =0 ;INIT_LIST_HEAD (&jinode->i_list); }
fs/jbd2/transaction.c +28 -21
73 lines not on this page · raw message
include/linux/blkdev.h +5 -0
@@ -344,6 +344,11 @@ struct queue_limits {#ifdef CONFIG_BLK_DEV_ZONED +/* +* Maximum number of zones to report with a single report zones command. +*/ +#define BLK_ZONED_REPORT_MAX_ZONES 8192U +extern unsigned int blkdev_nr_zones (struct block_device *bdev); extern int blkdev_report_zones(struct block_device *bdev, sector_t sector, struct blk_zone *zones,
include/linux/fs.h +2 -0
@@ -2712,6 +2712,8 @@ extern int filemap_flush(struct address_space *);extern int filemap_fdatawait_keep_errors (struct address_space *mapping);extern int filemap_fdatawait_range (struct address_space *,loff_t lstart,loff_t lend); +extern int filemap_fdatawait_range_keep_errors (struct address_space *mapping, +loff_t start_byte,loff_t end_byte);static inline int filemap_fdatawait (struct address_space *mapping) {
include/linux/jbd2.h +22 -0
@@ -451,6 +451,22 @@ struct jbd2_inode {* @i_flags: Flags of inode [j_list_lock] */ unsigned long i_flags; + +/** +* @i_dirty_start: +* +* Offset in bytes where the dirty range for this inode starts. +* [j_list_lock] +*/ +loff_t i_dirty_start; + +/** +* @i_dirty_end: +* +* Inclusive offset in bytes where the dirty range for this inode +* ends. [j_list_lock] +*/ +loff_t i_dirty_end; };struct jbd2_revoke_table_s ;
@@ -1397,6 +1413,12 @@ extern int jbd2_journal_force_commit(journal_t *);extern int jbd2_journal_force_commit_nested (journal_t *);extern int jbd2_journal_inode_add_write (handle_t *handle,struct jbd2_inode *inode);extern int jbd2_journal_inode_add_wait (handle_t *handle,struct jbd2_inode *inode); +extern int jbd2_journal_inode_ranged_write (handle_t *handle, +struct jbd2_inode *inode,loff_t start_byte, +loff_t length); +extern int jbd2_journal_inode_ranged_wait (handle_t *handle, +struct jbd2_inode *inode,loff_t start_byte, +loff_t length);extern int jbd2_journal_begin_ordered_truncate (journal_t *journal,struct jbd2_inode *inode,loff_t new_size);extern void jbd2_journal_init_jbd_inode (struct jbd2_inode *jinode,struct inode *inode);
include/linux/mlx5/mlx5_ifc.h +2 -1
@@ -749,7 +749,8 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits {u8 swp[0x1 ];u8 swp_csum[0x1 ];u8 swp_lso[0x1 ]; -u8 reserved_at_23[0xd ]; +u8 cqe_checksum_full[0x1 ]; +u8 reserved_at_24[0xc ];u8 max_vxlan_udp_ports[0x8 ];u8 reserved_at_38[0x6 ];u8 max_geneve_opt_len[0x1 ];
include/linux/perf_event.h +5 -0
@@ -1049,6 +1049,11 @@ static inline int in_software_context(struct perf_event *event)return event->ctx->pmu->task_ctx_nr == perf_sw_context; } +static inline int is_exclusive_pmu (struct pmu *pmu) +{ +return pmu->capabilities &PERF_PMU_CAP_EXCLUSIVE ; +} +extern struct static_key perf_swevent_enabled[PERF_COUNT_SW_MAX ];extern void ___perf_sw_event (u32 ,u64 ,struct pt_regs *,u64 );
include/net/dst.h +4 -1
@@ -302,8 +302,9 @@ static inline bool dst_hold_safe(struct dst_entry *dst)* @skb: buffer * * If dst is not yet refcounted and not destroyed, grab a ref on it. +* Returns true if dst is refcounted. */ -static inline void skb_dst_force (struct sk_buff *skb) +static inline bool skb_dst_force (struct sk_buff *skb) {if (skb_dst_is_noref (skb)) {struct dst_entry *dst =skb_dst (skb);
@@ -314,6 +315,8 @@ static inline void skb_dst_force(struct sk_buff *skb) skb->_skb_refdst = (unsigned long )dst; } + +return skb->_skb_refdst !=0UL ; }
include/net/tcp.h +7 -1
@@ -1063,7 +1063,8 @@ void tcp_get_default_congestion_control(struct net *net, char *name);void tcp_get_available_congestion_control (char *buf,size_t len);void tcp_get_allowed_congestion_control (char *buf,size_t len);int tcp_set_allowed_congestion_control (char *allowed); -int tcp_set_congestion_control (struct sock *sk,const char *name,bool load,bool reinit); +int tcp_set_congestion_control (struct sock *sk,const char *name,bool load, +bool reinit,bool cap_net_admin);u32 tcp_slow_start (struct tcp_sock *tp,u32 acked);void tcp_cong_avoid_ai (struct tcp_sock *tp,u32 w,u32 acked);
@@ -1675,6 +1676,11 @@ static inline struct sk_buff *tcp_rtx_queue_head(const struct sock *sk)return skb_rb_first (&sk->tcp_rtx_queue); } +static inline struct sk_buff *tcp_rtx_queue_tail (const struct sock *sk) +{ +return skb_rb_last (&sk->tcp_rtx_queue); +} +static inline struct sk_buff *tcp_write_queue_head (const struct sock *sk) {return skb_peek (&sk->sk_write_queue);
include/net/tls.h +1 -0
@@ -313,6 +313,7 @@ struct tls_offload_context_rx { (ALIGN (sizeof (struct tls_offload_context_rx ),sizeof (void *)) + \ TLS_DRIVER_STATE_SIZE) +void tls_ctx_free (struct tls_context *ctx);int wait_on_pending_writer (struct sock *sk,long *timeo);int tls_sk_query (struct sock *sk,int optname,char __user *optval,int __user *optlen);
kernel/events/core.c +63 -20
167 lines not on this page · raw message
mm/filemap.c +22 -0
@@ -549,6 +549,28 @@ int filemap_fdatawait_range(struct address_space *mapping, loff_t start_byte, }EXPORT_SYMBOL (filemap_fdatawait_range); +/** +* filemap_fdatawait_range_keep_errors - wait for writeback to complete +* @mapping: address space structure to wait for +* @start_byte: offset in bytes where the range starts +* @end_byte: offset in bytes where the range ends (inclusive) +* +* Walk the list of under-writeback pages of the given address space in the +* given range and wait for all of them. Unlike filemap_fdatawait_range(), +* this function does not clear error status of the address space. +* +* Use this function if callers don't handle errors themselves. Expected +* call sites are system-wide / filesystem-wide data flushers: e.g. sync(2), +* fsfreeze(8) +*/ +int filemap_fdatawait_range_keep_errors (struct address_space *mapping, +loff_t start_byte,loff_t end_byte) +{ +__filemap_fdatawait_range (mapping, start_byte, end_byte); +return filemap_check_and_keep_errors (mapping); +} +EXPORT_SYMBOL (filemap_fdatawait_range_keep_errors); +/** * file_fdatawait_range - wait for writeback to complete * @file: file pointing to address space structure to wait for
net/bridge/br_input.c +3 -5
@@ -74,7 +74,6 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skbstruct net_bridge_fdb_entry *dst =NULL ;struct net_bridge_mdb_entry *mdst;bool local_rcv, mcast_hit = false; -const unsigned char *dest;struct net_bridge *br;u16 vid =0 ;
@@ -92,10 +91,9 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skbbr_fdb_update (br, p,eth_hdr (skb)->h_source, vid, false); local_rcv = !!(br->dev->flags &IFF_PROMISC ); - dest =eth_hdr (skb)->h_dest; -if (is_multicast_ether_addr (dest)) { +if (is_multicast_ether_addr (eth_hdr (skb)->h_dest)) {/* by definition the broadcast is also a multicast address */ -if (is_broadcast_ether_addr (dest)) { +if (is_broadcast_ether_addr (eth_hdr (skb)->h_dest)) { pkt_type =BR_PKT_BROADCAST ; local_rcv = true; }else {
@@ -145,7 +143,7 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb }break ;case BR_PKT_UNICAST : - dst =br_fdb_find_rcu (br, dest, vid); + dst =br_fdb_find_rcu (br,eth_hdr (skb)->h_dest, vid);default :break ; }
net/bridge/br_multicast.c +13 -10
@@ -911,6 +911,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge *br,int type;int err =0 ;__be32 group; +u16 nsrcs; ih =igmpv3_report_hdr (skb); num =ntohs (ih->ngrec);
@@ -924,8 +925,9 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge *br, grec = (void *)(skb->data + len -sizeof (*grec)); group = grec->grec_mca; type = grec->grec_type; + nsrcs =ntohs (grec->grec_nsrcs); - len +=ntohs (grec->grec_nsrcs) *4 ; + len += nsrcs *4 ;if (!ip_mc_may_pull (skb, len))return -EINVAL ;
@@ -946,7 +948,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge *br, src =eth_hdr (skb)->h_source;if ((type ==IGMPV3_CHANGE_TO_INCLUDE || type ==IGMPV3_MODE_IS_INCLUDE ) && -ntohs (grec->grec_nsrcs) ==0 ) { + nsrcs ==0 ) {br_ip4_multicast_leave_group (br, port, group, vid, src); }else { err = br_ip4_multicast_add_group(br, port, group, vid,
@@ -983,7 +985,8 @@ static int br_ip6_multicast_mld2_report(struct net_bridge *br, len =skb_transport_offset (skb) +sizeof (*icmp6h);for (i =0 ; i < num; i++) { -__be16 *nsrcs, _nsrcs; +__be16 *_nsrcs, __nsrcs; +u16 nsrcs; nsrcs_offset = len + offsetof(struct mld2_grec , grec_nsrcs);
@@ -991,12 +994,13 @@ static int br_ip6_multicast_mld2_report(struct net_bridge *br, nsrcs_offset + sizeof(_nsrcs))return -EINVAL ; - nsrcs =skb_header_pointer (skb, nsrcs_offset, -sizeof (_nsrcs), &_nsrcs); -if (!nsrcs) + _nsrcs =skb_header_pointer (skb, nsrcs_offset, +sizeof (__nsrcs), &__nsrcs); +if (!_nsrcs)return -EINVAL ; - grec_len =struct_size (grec, grec_src,ntohs (*nsrcs)); + nsrcs =ntohs (*_nsrcs); + grec_len =struct_size (grec, grec_src, nsrcs);if (!ipv6_mc_may_pull (skb, len + grec_len))return -EINVAL ;
@@ -1021,7 +1025,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge *br, src =eth_hdr (skb)->h_source;if ((grec->grec_type ==MLD2_CHANGE_TO_INCLUDE || grec->grec_type ==MLD2_MODE_IS_INCLUDE ) && -ntohs (*nsrcs) ==0 ) { + nsrcs ==0 ) {br_ip6_multicast_leave_group (br, port, &grec->grec_mca, vid, src); }else {
@@ -1275,7 +1279,6 @@ static int br_ip6_multicast_query(struct net_bridge *br, u16 vid) {unsigned int transport_len =ipv6_transport_len (skb); -const struct ipv6hdr *ip6h =ipv6_hdr (skb);struct mld_msg *mld;struct net_bridge_mdb_entry *mp;struct mld2_query *mld2q;
@@ -1319,7 +1322,7 @@ static int br_ip6_multicast_query(struct net_bridge *br,if (is_general_query) { saddr.proto =htons (ETH_P_IPV6 ); - saddr.u.ip6 = ip6h->saddr; + saddr.u.ip6 =ipv6_hdr (skb)->saddr;br_multicast_query_received (br, port, &br->ip6_other_query, &saddr, max_delay);
net/bridge/br_stp_bpdu.c +1 -2
@@ -143,7 +143,6 @@ void br_send_tcn_bpdu(struct net_bridge_port *p)void br_stp_rcv (const struct stp_proto *proto,struct sk_buff *skb,struct net_device *dev) { -const unsigned char *dest =eth_hdr (skb)->h_dest;struct net_bridge_port *p;struct net_bridge *br;const unsigned char *buf;
@@ -172,7 +171,7 @@ void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb,if (p->state ==BR_STATE_DISABLED ) goto out; -if (!ether_addr_equal (dest, br->group_addr)) +if (!ether_addr_equal (eth_hdr (skb)->h_dest, br->group_addr)) goto out;if (p->flags &BR_BPDU_GUARD ) {
net/core/filter.c +1 -1
@@ -4332,7 +4332,7 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock, TCP_CA_NAME_MAX-1)); name[TCP_CA_NAME_MAX -1 ] =0 ; ret =tcp_set_congestion_control (sk, name, false, - reinit); + reinit, true); }else {struct tcp_sock *tp =tcp_sk (sk);
net/core/neighbour.c +2 -0
@@ -1122,6 +1122,7 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)atomic_set (&neigh->probes,NEIGH_VAR (neigh->parms,UCAST_PROBES )); +neigh_del_timer (neigh); neigh->nud_state =NUD_INCOMPLETE ; neigh->updated = now; next = now + max(NEIGH_VAR(neigh->parms, RETRANS_TIME),
@@ -1138,6 +1139,7 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) } }else if (neigh->nud_state &NUD_STALE ) {neigh_dbg (2 ,"neigh %p is delayed\n" , neigh); +neigh_del_timer (neigh); neigh->nud_state =NUD_DELAY ; neigh->updated = jiffies; neigh_add_timer(neigh, jiffies +
net/ipv4/devinet.c +8 -0
@@ -62,6 +62,11 @@#include <net/net_namespace.h> #include <net/addrconf.h> +#define IPV6ONLY_FLAGS \ + (IFA_F_NODAD | IFA_F_OPTIMISTIC | IFA_F_DADFAILED | \ + IFA_F_HOMEADDRESS | IFA_F_TENTATIVE | \ + IFA_F_MANAGETEMPADDR | IFA_F_STABLE_PRIVACY) +static struct ipv4_devconf ipv4_devconf = { .data = { [IPV4_DEVCONF_ACCEPT_REDIRECTS -1 ] =1 ,
@@ -468,6 +473,9 @@ static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh, ifa->ifa_flags &= ~IFA_F_SECONDARY ; last_primary = &in_dev->ifa_list; +/* Don't set IPv6 only flags to IPv4 addresses */ + ifa->ifa_flags &= ~IPV6ONLY_FLAGS ; +for (ifap = &in_dev->ifa_list; (ifa1 = *ifap) !=NULL ; ifap = &ifa1->ifa_next) { if (!(ifa1->ifa_flags & IFA_F_SECONDARY) &&
net/ipv4/igmp.c +2 -6
@@ -1228,12 +1228,8 @@ static void igmpv3_del_delrec(struct in_device *in_dev, struct ip_mc_list *im)if (pmc) { im->interface = pmc->interface;if (im->sfmode ==MCAST_INCLUDE ) { - im->tomb = pmc->tomb; - pmc->tomb =NULL ; - - im->sources = pmc->sources; - pmc->sources =NULL ; - +swap (im->tomb, pmc->tomb); +swap (im->sources, pmc->sources);for (psf = im->sources; psf; psf = psf->sf_next) psf->sf_crcount = in_dev->mr_qrv ?: net->ipv4.sysctl_igmp_qrv; }else {
net/ipv4/tcp.c +5 -1
@@ -2614,6 +2614,8 @@ int tcp_disconnect(struct sock *sk, int flags)tcp_saved_syn_free (tp); tp->compressed_ack =0 ; tp->bytes_sent =0 ; + tp->bytes_acked =0 ; + tp->bytes_received =0 ; tp->bytes_retrans =0 ; tp->duplicate_sack[0 ].start_seq =0 ; tp->duplicate_sack[0 ].end_seq =0 ;
@@ -2768,7 +2770,9 @@ static int do_tcp_setsockopt(struct sock *sk, int level, name[val] =0 ;lock_sock (sk); - err =tcp_set_congestion_control (sk, name, true, true); + err =tcp_set_congestion_control (sk, name, true, true, +ns_capable (sock_net (sk)->user_ns, +CAP_NET_ADMIN ));release_sock (sk);return err; }
net/ipv4/tcp_cong.c +3 -3
@@ -333,7 +333,8 @@ int tcp_set_allowed_congestion_control(char *val)* tcp_reinit_congestion_control (if the current congestion control was * already initialized. */ -int tcp_set_congestion_control (struct sock *sk,const char *name,bool load,bool reinit) +int tcp_set_congestion_control (struct sock *sk,const char *name,bool load, +bool reinit,bool cap_net_admin) {struct inet_connection_sock *icsk =inet_csk (sk);const struct tcp_congestion_ops *ca;
@@ -369,8 +370,7 @@ int tcp_set_congestion_control(struct sock *sk, const char *name, bool load, boo }else { err = -EBUSY ; } - }else if (!((ca->flags &TCP_CONG_NON_RESTRICTED ) || -ns_capable (sock_net (sk)->user_ns,CAP_NET_ADMIN ))) { + }else if (!((ca->flags &TCP_CONG_NON_RESTRICTED ) || cap_net_admin)) { err = -EPERM ; }else if (!try_module_get (ca->owner)) { err = -EBUSY ;
net/ipv4/tcp_output.c +11 -2
@@ -1286,6 +1286,7 @@ int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue,struct tcp_sock *tp =tcp_sk (sk);struct sk_buff *buff;int nsize, old_factor; +long limit;int nlen;u8 flags;
@@ -1296,8 +1297,16 @@ int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue,if (nsize <0 ) nsize =0 ; -if (unlikely ((sk->sk_wmem_queued >>1 ) > sk->sk_sndbuf && - tcp_queue !=TCP_FRAG_IN_WRITE_QUEUE )) { +/* tcp_sendmsg() can overshoot sk_wmem_queued by one full size skb. +* We need some allowance to not penalize applications setting small +* SO_SNDBUF values. +* Also allow first and last skb in retransmit queue to be split. +*/ + limit = sk->sk_sndbuf +2 *SKB_TRUESIZE (GSO_MAX_SIZE ); +if (unlikely ((sk->sk_wmem_queued >>1 ) > limit && + tcp_queue !=TCP_FRAG_IN_WRITE_QUEUE && + skb !=tcp_rtx_queue_head (sk) && + skb !=tcp_rtx_queue_tail (sk))) {NET_INC_STATS (sock_net (sk),LINUX_MIB_TCPWQUEUETOOBIG );return -ENOMEM ; }
net/ipv6/ip6_fib.c +17 -1
@@ -1104,8 +1104,24 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct fib6_info *rt, err =call_fib6_entry_notifiers (info->nl_net,FIB_EVENT_ENTRY_ADD , rt, extack); -if (err) +if (err) { +struct fib6_info *sibling, *next_sibling; + +/* If the route has siblings, then it first +* needs to be unlinked from them. +*/ +if (!rt->fib6_nsiblings) +return err; + +list_for_each_entry_safe (sibling, next_sibling, + &rt->fib6_siblings, + fib6_siblings) + sibling->fib6_nsiblings--; + rt->fib6_nsiblings =0 ; +list_del_init (&rt->fib6_siblings); +rt6_multipath_rebalance (next_sibling);return err; + }rcu_assign_pointer (rt->fib6_next, iter);fib6_info_hold (rt);
net/ipv6/route.c +1 -1
@@ -2215,7 +2215,7 @@ static struct dst_entry *rt6_check(struct rt6_info *rt, {u32 rt_cookie =0 ; -if ((from && !fib6_get_cookie_safe (from, &rt_cookie)) || +if (!from || !fib6_get_cookie_safe (from, &rt_cookie) || rt_cookie != cookie)return NULL ;
net/netfilter/nf_queue.c +5 -1
@@ -190,6 +190,11 @@ static int __nf_queue(struct sk_buff *skb, const struct nf_hook_state *state, goto err; } +if (!skb_dst_force (skb) && state->hook !=NF_INET_PRE_ROUTING ) { + status = -ENETDOWN ; + goto err; + } + *entry = (struct nf_queue_entry ) { .skb = skb, .state = *state,
@@ -198,7 +203,6 @@ static int __nf_queue(struct sk_buff *skb, const struct nf_hook_state *state, };nf_queue_entry_get_refs (entry); -skb_dst_force (skb);switch (entry->state.pf) {case AF_INET :
net/netrom/af_netrom.c +3 -1
@@ -869,7 +869,7 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)unsigned short frametype, flags, window, timeout;int ret; - skb->sk =NULL ;/* Initially we don't know who it's for */ +skb_orphan (skb);/* * skb->data points to the netrom frame start
@@ -967,7 +967,9 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev) window = skb->data[20 ]; +sock_hold (make); skb->sk = make; + skb->destructor = sock_efree; make->sk_state =TCP_ESTABLISHED ;/* Fill in his circuit details */
net/nfc/nci/data.c +1 -1
@@ -107,7 +107,7 @@ static int nci_queue_tx_data_frags(struct nci_dev *ndev, conn_info =nci_get_conn_info_by_conn_id (ndev, conn_id);if (!conn_info) { rc = -EPROTO ; - goto free_exit; + goto exit; }__skb_queue_head_init (&frags_q);
net/openvswitch/actions.c +2 -4
@@ -166,8 +166,7 @@ static void update_ethertype(struct sk_buff *skb, struct ethhdr *hdr,if (skb->ip_summed ==CHECKSUM_COMPLETE ) {__be16 diff[] = { ~(hdr->h_proto), ethertype }; - skb->csum = ~csum_partial ((char *)diff,sizeof (diff), - ~skb->csum); + skb->csum =csum_partial ((char *)diff,sizeof (diff), skb->csum); } hdr->h_proto = ethertype;
@@ -259,8 +258,7 @@ static int set_mpls(struct sk_buff *skb, struct sw_flow_key *flow_key,if (skb->ip_summed ==CHECKSUM_COMPLETE ) {__be32 diff[] = { ~(stack->label_stack_entry), lse }; - skb->csum = ~csum_partial ((char *)diff,sizeof (diff), - ~skb->csum); + skb->csum =csum_partial ((char *)diff,sizeof (diff), skb->csum); } stack->label_stack_entry = lse;
net/rxrpc/af_rxrpc.c +2 -2
@@ -545,6 +545,7 @@ static int rxrpc_sendmsg(struct socket *sock, struct msghdr *m, size_t len)switch (rx->sk.sk_state) {case RXRPC_UNBOUND : +case RXRPC_CLIENT_UNBOUND : rx->srx.srx_family =AF_RXRPC ; rx->srx.srx_service =0 ; rx->srx.transport_type =SOCK_DGRAM ;
@@ -569,10 +570,9 @@ static int rxrpc_sendmsg(struct socket *sock, struct msghdr *m, size_t len) } rx->local = local; - rx->sk.sk_state =RXRPC_CLIENT_UNBOUND ; + rx->sk.sk_state =RXRPC_CLIENT_BOUND ;/* Fall through */ -case RXRPC_CLIENT_UNBOUND :case RXRPC_CLIENT_BOUND :if (!m->msg_name &&test_bit (RXRPC_SOCK_CONNECTED , &rx->flags)) {
net/sched/cls_api.c +3 -0
@@ -2160,6 +2160,9 @@ static int tc_new_tfilter(struct sk_buff *skb, struct nlmsghdr *n,tfilter_notify (net, skb, n, tp, block, q, parent, fh,RTM_NEWTFILTER , false, rtnl_held);tfilter_put (tp, fh); +/* q pointer is NULL for shared blocks */ +if (q) + q->flags &= ~TCQ_F_CAN_BYPASS ; } errout:
net/sched/sch_fq_codel.c +0 -2
@@ -596,8 +596,6 @@ static unsigned long fq_codel_find(struct Qdisc *sch, u32 classid)static unsigned long fq_codel_bind (struct Qdisc *sch,unsigned long parent,u32 classid) { -/* we cannot bypass queue discipline anymore */ - sch->flags &= ~TCQ_F_CAN_BYPASS ;return 0 ; }
net/sched/sch_sfq.c +0 -2
@@ -824,8 +824,6 @@ static unsigned long sfq_find(struct Qdisc *sch, u32 classid)static unsigned long sfq_bind (struct Qdisc *sch,unsigned long parent,u32 classid) { -/* we cannot bypass queue discipline anymore */ - sch->flags &= ~TCQ_F_CAN_BYPASS ;return 0 ; }
net/sctp/socket.c +3 -21
@@ -4816,35 +4816,17 @@ static int sctp_setsockopt(struct sock *sk, int level, int optname,static int sctp_connect (struct sock *sk,struct sockaddr *addr,int addr_len,int flags) { -struct inet_sock *inet =inet_sk (sk);struct sctp_af *af; -int err =0 ; +int err = -EINVAL ;lock_sock (sk); -pr_debug ("%s: sk:%p, sockaddr:%p, addr_len:%d\n" , __func__, sk, addr, addr_len); -/* We may need to bind the socket. */ -if (!inet->inet_num) { -if (sk->sk_prot->get_port (sk,0 )) { -release_sock (sk); -return -EAGAIN ; - } - inet->inet_sport =htons (inet->inet_num); - } -/* Validate addr_len before calling common connect/connectx routine. */ - af = addr_len < offsetofend(struct sockaddr, sa_family) ? NULL : -sctp_get_af_specific (addr->sa_family); -if (!af || addr_len < af->sockaddr_len) { - err = -EINVAL ; - }else { -/* Pass correct addr len to common routine (so it knows there -* is only one address being passed. -*/ + af =sctp_get_af_specific (addr->sa_family); +if (af && addr_len >= af->sockaddr_len) err =__sctp_connect (sk, addr, af->sockaddr_len, flags,NULL ); - }release_sock (sk);return err;
net/sctp/stream.c +8 -1
@@ -153,13 +153,20 @@ int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt,int sctp_stream_init_ext (struct sctp_stream *stream,__u16 sid) {struct sctp_stream_out_ext *soute; +int ret; soute =kzalloc (sizeof (*soute),GFP_KERNEL );if (!soute)return -ENOMEM ;SCTP_SO (stream, sid)->ext = soute; -return sctp_sched_init_sid (stream, sid,GFP_KERNEL ); + ret =sctp_sched_init_sid (stream, sid,GFP_KERNEL ); +if (ret) { +kfree (SCTP_SO (stream, sid)->ext); +SCTP_SO (stream, sid)->ext =NULL ; + } + +return ret; }void sctp_stream_free (struct sctp_stream *stream)
net/tls/tls_device.c +9 -1
@@ -61,7 +61,7 @@ static void tls_device_free_ctx(struct tls_context *ctx)if (ctx->rx_conf ==TLS_HW )kfree (tls_offload_ctx_rx (ctx)); -kfree (ctx); +tls_ctx_free (ctx); }static void tls_device_gc_task (struct work_struct *work)
@@ -742,6 +742,11 @@ int tls_set_device_offload(struct sock *sk, struct tls_context *ctx) } crypto_info = &ctx->crypto_send.info; +if (crypto_info->version !=TLS_1_2_VERSION ) { + rc = -EOPNOTSUPP ; + goto free_offload_ctx; + } +switch (crypto_info->cipher_type) {case TLS_CIPHER_AES_GCM_128 : nonce_size =TLS_CIPHER_AES_GCM_128_IV_SIZE ;
@@ -876,6 +881,9 @@ int tls_set_device_offload_rx(struct sock *sk, struct tls_context *ctx)struct net_device *netdev;int rc =0 ; +if (ctx->crypto_recv.info.version !=TLS_1_2_VERSION ) +return -EOPNOTSUPP ; +/* We support starting offload on multiple sockets * concurrently, so we only need a read lock here. * This lock must precede get_netdev_for_sock to prevent races between
net/tls/tls_main.c +2 -2
@@ -251,7 +251,7 @@ static void tls_write_space(struct sock *sk) ctx->sk_write_space (sk); } -static void tls_ctx_free (struct tls_context *ctx) +void tls_ctx_free (struct tls_context *ctx) {if (!ctx)return ;
@@ -643,7 +643,7 @@ static void tls_hw_sk_destruct(struct sock *sk) ctx->sk_destruct (sk);/* Free ctx */ -kfree (ctx); +tls_ctx_free (ctx); icsk->icsk_ulp_data =NULL ; }
net/tls/tls_sw.c +2 -1
@@ -1958,7 +1958,8 @@ bool tls_sw_stream_read(const struct sock *sk) ingress_empty =list_empty (&psock->ingress_msg);rcu_read_unlock (); -return !ingress_empty || ctx->recv_pkt; +return !ingress_empty || ctx->recv_pkt || + !skb_queue_empty (&ctx->rx_list); }static int tls_read_size (struct strparser *strp,struct sk_buff *skb)
tools/perf/builtin-script.c +2 -1
@@ -3669,7 +3669,8 @@ int cmd_script(int argc, const char **argv) goto out_delete;uname (&uts); -if (!strcmp (uts.machine, session->header.env.arch) || +if (data.is_pipe ||/* assume pipe_mode indicates native_arch */ + !strcmp (uts.machine, session->header.env.arch) || (!strcmp (uts.machine,"x86_64" ) && !strcmp (session->header.env.arch,"i386" ))) native_arch = true;
tools/testing/selftests/net/txring_overwrite.c +1 -1
@@ -113,7 +113,7 @@ static int setup_tx(char **ring) *ring =mmap (0 , req.tp_block_size * req.tp_block_nr,PROT_READ |PROT_WRITE ,MAP_SHARED , fdt,0 ); -if (!*ring) +if (*ring ==MAP_FAILED )error (1 , errno,"mmap" );return fdt;
Thanks, a bunch Greg! :)
Quoted 267 lines · Greg KH
I'm announcing the release of the 5.2.4 kernel.
All users of the 5.2 kernel series must upgrade.
The updated 5.2.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitlinux-5.2.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summarythanks,
greg k-h
------------
Makefile | 2 arch/mips/jz4740/board-qi_lb60.c | 16 - arch/x86/include/asm/kvm_host.h | 7 arch/x86/kvm/vmx/nested.c | 10 arch/x86/kvm/x86.c | 4 block/blk-zoned.c | 46 ++-- drivers/dma-buf/dma-buf.c | 1 drivers/dma-buf/reservation.c | 4 drivers/gpio/gpio-davinci.c | 5 drivers/gpio/gpiolib-of.c | 10 drivers/net/caif/caif_hsi.c | 2 drivers/net/dsa/mv88e6xxx/chip.c | 2 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 57 ++--- drivers/net/ethernet/marvell/sky2.c | 7 drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 10 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 7 drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 5 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 7 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 9 drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 23 -- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 16 - drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 10 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 drivers/net/ethernet/realtek/r8169.c | 137 +++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 28 +- drivers/net/hyperv/netvsc_drv.c | 1 drivers/net/macsec.c | 6 drivers/net/phy/sfp.c | 2 drivers/net/vrf.c | 58 +++-- drivers/scsi/sd_zbc.c | 104 +++++++-- fs/ext4/dir.c | 19 - fs/ext4/ext4_jbd2.h | 12 - fs/ext4/file.c | 4 fs/ext4/inode.c | 24 +- fs/ext4/ioctl.c | 46 ++++ fs/ext4/move_extent.c | 3 fs/ext4/namei.c | 45 +++- fs/jbd2/commit.c | 23 +- fs/jbd2/journal.c | 4 fs/jbd2/transaction.c | 49 ++-- include/linux/blkdev.h | 5 include/linux/fs.h | 2 include/linux/jbd2.h | 22 ++ include/linux/mlx5/mlx5_ifc.h | 3 include/linux/perf_event.h | 5 include/net/dst.h | 5 include/net/tcp.h | 8 include/net/tls.h | 1 kernel/events/core.c | 83 +++++-- mm/filemap.c | 22 ++ net/bridge/br_input.c | 8 net/bridge/br_multicast.c | 23 +- net/bridge/br_stp_bpdu.c | 3 net/core/filter.c | 2 net/core/neighbour.c | 2 net/ipv4/devinet.c | 8 net/ipv4/igmp.c | 8 net/ipv4/tcp.c | 6 net/ipv4/tcp_cong.c | 6 net/ipv4/tcp_output.c | 13 + net/ipv6/ip6_fib.c | 18 + net/ipv6/route.c | 2 net/netfilter/nf_queue.c | 6 net/netrom/af_netrom.c | 4 net/nfc/nci/data.c | 2 net/openvswitch/actions.c | 6 net/rxrpc/af_rxrpc.c | 4 net/sched/cls_api.c | 3 net/sched/sch_fq_codel.c | 2 net/sched/sch_sfq.c | 2 net/sctp/socket.c | 24 -- net/sctp/stream.c | 9 net/tls/tls_device.c | 10 net/tls/tls_main.c | 4 net/tls/tls_sw.c | 3 tools/perf/builtin-script.c | 3 tools/testing/selftests/net/txring_overwrite.c | 2 82 files changed, 851 insertions(+), 334 deletions(-)Alexander Shishkin (1):
perf/core: Fix exclusive events' groupingAndreas Steinmetz (2):
macsec: fix use-after-free of skb during RX
macsec: fix checksumming after decryptionAndrew Lunn (1):
net: phy: sfp: hwmon: Fix scaling of RX powerAya Levin (3):
net/mlx5e: IPoIB, Add error path inmlx5_rdma_setup_rnnet/mlx5e: Fix return value from timeout recover function net/mlx5e: Fix error flow in tx reporter diagnoseBaruch Siach (1):
net: dsa: mv88e6xxx: wait after reset deactivationBrian King (1):
bnx2x: Prevent load reordering in tx completion processingChris Wilson (1):
dma-buf: Discard oldfence_exclon retryingget_fences_rcufor reallocChristoph Paasch (1):
tcp: Resetbytes_ackedandbytes_receivedwhen disconnectingCong Wang (3):
net_sched: unsetTCQ_F_CAN_BYPASSwhen adding filters
netrom: fix a memory leak innr_rx_frame()
netrom: hold sock when settingskb->destructorDamien Le Moal (2):
sd_zbc: Fix report zones buffer allocation
block: Limit zone array allocation sizeDarrick J. Wong (1):
ext4: don't allow any modifications to an immutable fileDavid Ahern (1):
ipv6:rt6_checkshould return NULL if 'from' is NULLDavid Howells (1):
rxrpc: Fix send on a connected, but unbound socketEli Britstein (1):
net/mlx5e: Fix port tunnel GRE entropy controlEric Dumazet (3):
igmp: fix memory leak inigmpv3_del_delrec()
tcp: be more careful intcp_fragment()
tcp: fixtcp_set_congestion_control()use from bpf hookFlorian Westphal (1):
net: makeskb_dst_forcereturn true when dst is refcountedFrank de Brabander (1):
selftests:txring_overwrite: fix incorrect test ofmmap()return valueGreg Kroah-Hartman (1):
Linux 5.2.4Haiyang Zhang (1):
hv_netvsc: Fix extrarcu_read_unlockinnetvsc_recv_callback()Heiner Kallweit (1):
r8169: fix issue with confused RX unit after PHY power-down on RTL8411bIdo Schimmel (2):
ipv6: Unlink sibling route in case of failure
mlxsw: spectrum: Do not process learned records with a dummy FIDJakub Kicinski (3):
net/tls: make sure offload also gets the keys wiped net/tls: fix poll ignoring partially copied records net/tls: reject offload of TLS 1.3Jan Kiszka (1):
KVM: nVMX: Clear pendingKVM_REQ_GET_VMCS12_PAGESwhen leaving nestedJohn Hurley (1):
net: openvswitch: fix csum updates for MPLS actionsJose Abreu (1):
net: stmmac: Re-work the queue selection for TSO packetsJustin Chen (1):
net: bcmgenet: use promisc for unsupported filtersJérôme Glisse (1):
dma-buf: balance refcount inbalanceKeerthy (1):
gpio: davinci: silence error prints in case ofEPROBE_DEFERLinus Walleij (1):
Revert "gpio/spi: Fix spi-gpio regression on active high CS"Lorenzo Bianconi (1):
net: neigh: fix multiple neigh timer schedulingMaor Gottlieb (1):
net/mlx5: E-Switch, Fix default encap modeMarcelo Ricardo Leitner (1):
sctp: fix error handling on stream scheduler initializationMatteo Croce (1):
ipv4: don't set IPv6 only flags to IPv4 addressesMichael Chan (1):
bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips.Nikolay Aleksandrov (4):
net: bridge: mcast: fix stale nsrcs pointer in igmp3/mld2 report handling
net: bridge: mcast: fix stale ipv6 hdr pointer when handling v6 query
net: bridge: don't cache ether dest pointer on input
net: bridge: stp: don't cache eth dest pointer before skb pullNishka Dasgupta (1):
gpiolib: of: fix a memory leak inof_gpio_flags_quirks()Paolo Bonzini (2):
KVM: nVMX: do not use dangling shadow VMCS after guest reset Revert "kvm: x86: Use task structs fpu field for user"Paul Cercueil (1):
MIPS: lb60: Fix pin mappingsPeter Kosyh (1):
vrf: make sure skb->data contains ip header to make routingPeter Zijlstra (1):
perf/core: Fix race betweenclose()andfork()Petr Machata (1):
mlxsw:spectrum_dcb: Configure DSCP map as the last rule is removedRoss Zwisler (3):
mm: addfilemap_fdatawait_range_keep_errors()
jbd2: introducejbd2_inodedirty range scoping
ext4: usejbd2_inodedirty range scopingSaeed Mahameed (1):
net/mlx5e: Rx, Fix checksum calculation for new hardwareSong Liu (1):
perf script: Assumenative_archfor pipe modeTaehee Yoo (1):
caif-hsi: fix possible deadlock incfhsi_exit_module()Takashi Iwai (1):
sky2: Disable MSI on ASUS P6TTheodore Ts'o (2):
ext4: enforce the immutable flag on open files
ext4: allow directory holesVlad Buslov (1):
net: sched: verify that q!=NULL before setting q->flagsXin Long (1):
sctp: not bind the socket insctp_connectYang Wei (1):
nfc: fix potential illegal memory access