Linux 5.15.109
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.109 kernel.
All users of the 5.15 kernel series must upgrade.
The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.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
------------
Documentation/kernel-hacking/locking.rst | 2 Documentation/translations/it_IT/kernel-hacking/locking.rst | 2 Makefile | 2 arch/arm/boot/dts/rk3288.dtsi | 2 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 3 arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 2 arch/arm64/boot/dts/qcom/ipq8074-hk01.dts | 4 arch/mips/kernel/vmlinux.lds.S | 2 arch/s390/kernel/ptrace.c | 8 arch/x86/purgatory/Makefile | 3 drivers/counter/104-quad-8.c | 29 -- drivers/gpu/drm/i915/display/intel_dp_aux.c | 2 drivers/iio/adc/at91-sama5d2_adc.c | 2 drivers/iio/light/tsl2772.c | 1 drivers/input/serio/i8042-x86ia64io.h | 8 drivers/memstick/core/memstick.c | 5 drivers/mmc/host/sdhci_am654.c | 2 drivers/net/bonding/bond_main.c | 7 drivers/net/dsa/b53/b53_mmap.c | 14 + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 drivers/net/ethernet/intel/e1000e/netdev.c | 51 ++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 9 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c | 2 drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 2 drivers/net/ethernet/sfc/ef100_netdev.c | 6 drivers/net/ethernet/sfc/efx.c | 30 +- drivers/net/ethernet/sfc/efx_common.c | 12 - drivers/net/ethernet/sfc/efx_common.h | 6 drivers/net/ethernet/sfc/ethtool_common.c | 2 drivers/net/ethernet/sfc/net_driver.h | 50 ++++ drivers/net/virtio_net.c | 8 drivers/net/xen-netback/netback.c | 6 drivers/nvme/host/tcp.c | 46 ++-- drivers/platform/x86/gigabyte-wmi.c | 2 drivers/pwm/pwm-hibvt.c | 1 drivers/pwm/pwm-iqs620a.c | 1 drivers/pwm/pwm-meson.c | 7 drivers/regulator/fan53555.c | 13 - drivers/scsi/megaraid/megaraid_sas_base.c | 2 drivers/scsi/scsi.c | 11 - drivers/soc/sifive/sifive_l2_cache.c | 27 +- drivers/spi/spi-rockchip-sfc.c | 2 fs/fuse/dir.c | 9 fs/fuse/file.c | 31 +- fs/nilfs2/segment.c | 20 + include/linux/skbuff.h | 5 include/net/ipv6.h | 2 include/net/netfilter/nf_tables.h | 4 include/net/udp.h | 2 include/net/udplite.h | 8 include/trace/events/f2fs.h | 2 kernel/bpf/verifier.c | 15 + kernel/locking/rtmutex.c | 55 ++++- kernel/locking/rtmutex_api.c | 6 kernel/sched/core.c | 10 kernel/sched/fair.c | 128 ++++++++++-- kernel/sched/sched.h | 61 +++++ kernel/sys.c | 69 +++--- mm/khugepaged.c | 4 mm/page_alloc.c | 19 + net/bridge/br_netfilter_hooks.c | 17 + net/dccp/dccp.h | 1 net/dccp/ipv6.c | 15 - net/dccp/proto.c | 8 net/ipv4/udp.c | 9 net/ipv4/udplite.c | 8 net/ipv6/af_inet6.c | 15 + net/ipv6/ipv6_sockglue.c | 20 - net/ipv6/ping.c | 6 net/ipv6/raw.c | 2 net/ipv6/rpl.c | 3 net/ipv6/tcp_ipv6.c | 8 net/ipv6/udp.c | 17 + net/ipv6/udp_impl.h | 1 net/ipv6/udplite.c | 9 net/l2tp/l2tp_ip6.c | 2 net/mptcp/protocol.c | 7 net/netfilter/nf_tables_api.c | 67 +++++- net/netfilter/nft_lookup.c | 36 --- net/sched/sch_qfq.c | 13 - net/sctp/socket.c | 29 +- scripts/asn1_compiler.c | 2 sound/soc/fsl/fsl_asrc_dma.c | 11 - tools/testing/selftests/sigaltstack/current_stack_pointer.h | 23 ++ tools/testing/selftests/sigaltstack/sas.c | 7 85 files changed, 819 insertions(+), 365 deletions(-)
Aleksandr Loktionov (2):
i40e: fix accessing vsi->active_filters without holding lock
i40e: fix i40e_setup_misc_vector() error handling
Alexander Aring (1):
net: rpl: fix rpl header size calculation
Alyssa Ross (1):
purgatory: fix disabling debug info
Bhavya Kapoor (1):
mmc: sdhci_am654: Set HIGH_SPEED_ENA for SDR12 and SDR25
Brian Masney (1):
iio: light: tsl2772: fix reading proximity-diodes from device tree
Cristian Ciocaltea (2):
regulator: fan53555: Explicitly include bits header
regulator: fan53555: Fix wrong TCS_SLEW_MASK
Damien Le Moal (1):
scsi: core: Improve scsi_vpd_inquiry() checks
Dan Carpenter (1):
iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
Daniel Borkmann (1):
bpf: Fix incorrect verifier pruning due to missing register precision taints
Ding Hui (1):
sfc: Fix use-after-free due to selftest_work
Dmitry Baryshkov (1):
arm64: dts: qcom: ipq8074-hk01: enable QMP device, not the PHY node
Douglas Raillard (1):
f2fs: Fix f2fs_truncate_partial_nodes ftrace event
Ekaterina Orlova (1):
ASN.1: Fix check for strdup() success
Florian Westphal (2):
netfilter: br_netfilter: fix recent physdev match breakage
netfilter: nf_tables: fix ifdef to also consider nf_tables=m
Frank Crawford (1):
platform/x86 (gigabyte-wmi): Add support for A320M-S2H V2
Greg Kroah-Hartman (2):
memstick: fix memory leak if card device is never registered Linux 5.15.109
Gwangun Jung (1):
net: sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg
Hans de Goede (1):
platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE
Heiko Carstens (1):
s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling
Ido Schimmel (2):
bonding: Fix memory leak when changing bond type to Ethernet
mlxsw: pci: Fix possible crash during initialization
Jiachen Zhang (1):
fuse: always revalidate rename target dentry
Jianqun Xu (1):
ARM: dts: rockchip: fix a typo error for rk3288 spdif node
Jiaxun Yang (1):
MIPS: Define RUNTIME_DISCARD_EXIT in LD script
Jonathan Cooper (1):
sfc: Split STATE_READY in to STATE_NET_DOWN and STATE_NET_UP.
Jonathan Denose (1):
Input: i8042 - add quirk for Fujitsu Lifebook A574/H
Juergen Gross (1):
xen/netback: use same error messages for same errors
Kuniyuki Iwashima (5):
udp: Call inet6_destroy_sock() in setsockopt(IPV6_ADDRFORM).
tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct().
inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().
dccp: Call inet6_destroy_sock() via sk->sk_destruct().
sctp: Call inet6_destroy_sock() via sk->sk_destruct().Li Lanzhe (1):
spi: spi-rockchip: Fix missing unwind goto in rockchip_sfc_probe()
Marc Gonzalez (1):
arm64: dts: meson-g12-common: specify full DMC range
Mel Gorman (2):
rtmutex: Add acquire semantics for rtmutex lock acquisition slow path
mm: page_alloc: skip regions with hugetlbfs pages when allocating 1G pages
Michael Chan (1):
bnxt_en: Do not initialize PTP on older P3/P4 chips
Miklos Szeredi (2):
fuse: fix attr version comparison in fuse_read_update_size()
fuse: fix deadlock between atomic O_TRUNC and page invalidation
Nick Desaulniers (1):
selftests: sigaltstack: fix -Wuninitialized
Nikita Zhandarovich (2):
mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next()
ASoC: fsl_asrc_dma: fix potential null-ptr-deref
Ondrej Mosnacek (1):
kernel/sys.c: fix and improve control flow in __sys_setres[ug]id()
Pablo Neira Ayuso (2):
netfilter: nf_tables: validate catch-all set elements
netfilter: nf_tables: tighten netlink attribute requirements for catch-all elements
Peng Fan (1):
arm64: dts: imx8mm-evk: correct pmic clock source
Peter Xu (1):
mm/khugepaged: check again on anon uffd-wp during isolation
Qais Yousef (7):
sched/uclamp: Fix fits_capacity() check in feec()
sched/uclamp: Make cpu_overutilized() use util_fits_cpu() sched/uclamp: Cater for uclamp in find_energy_efficient_cpu()'s early exit condition sched/fair: Detect capacity inversion
sched/fair: Consider capacity inversion in util_fits_cpu() sched/uclamp: Fix a uninitialized variable warnings
sched/fair: Fixes for capacity inversion detection
Ryusuke Konishi (1):
nilfs2: initialize unused bytes in segment summary blocks
Sagi Grimberg (1):
nvme-tcp: fix a possible UAF when failing to allocate an io queue
Salvatore Bonaccorso (1):
docs: futex: Fix kernel-doc references after code split-up preparation
Sebastian Basierski (1):
e1000e: Disable TSO on i219-LM card to increase speed
Tetsuo Handa (1):
mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock
Tomas Henzl (1):
scsi: megaraid_sas: Fix fw_crash_buffer_show()
Uwe Kleine-König (3):
pwm: meson: Explicitly set .polarity in .get_state()
pwm: iqs620a: Explicitly set .polarity in .get_state()
pwm: hibvt: Explicitly set .polarity in .get_state()
Ville Syrjälä (1):
drm/i915: Fix fast wake AUX sync len
William Breathitt Gray (1):
counter: 104-quad-8: Fix race condition between FLAG and CNTR reads
Xuan Zhuo (1):
virtio_net: bugfix overflow inside xdp_linearize_page()
Yang Yingliang (3):
soc: sifive: l2_cache: fix missing iounmap() in error path in sifive_l2_init()
soc: sifive: l2_cache: fix missing free_irq() in error path in sifive_l2_init()
soc: sifive: l2_cache: fix missing of_node_put() in sifive_l2_init()
Álvaro Fernández Rojas (1):
net: dsa: b53: mmap: add phy ops
Greg Kroah-Hartman
maintainerDocumentation/kernel-hacking/locking.rst +1 -1
@@ -1352,7 +1352,7 @@ Mutex API reference Futex API reference =================== -.. kernel-doc:: kernel/futex.c +.. kernel-doc:: kernel/futex/core.c :internal: Further reading
Documentation/translations/it_IT/kernel-hacking/locking.rst +1 -1
@@ -1396,7 +1396,7 @@ Riferimento per l'API dei Mutex Riferimento per l'API dei Futex =============================== -.. kernel-doc:: kernel/futex.c +.. kernel-doc:: kernel/futex/core.c :internal: Approfondimenti
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 108 +SUBLEVEL = 109 EXTRAVERSION = NAME = Trick or Treat
arch/arm/boot/dts/rk3288.dtsi +1 -1
@@ -940,7 +940,7 @@ wdt: watchdog@ff800000 { status = "disabled"; }; - spdif: sound@ff88b0000 { + spdif: sound@ff8b0000 { compatible = "rockchip,rk3288-spdif", "rockchip,rk3066-spdif"; reg = <0x0 0xff8b0000 0x0 0x10000>; #sound-dai-cells = <0>;
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +1 -2
@@ -1610,10 +1610,9 @@ usb2_phy0: phy@36000 { dmc: bus@38000 { compatible = "simple-bus"; - reg = <0x0 0x38000 0x0 0x400>; #address-cells = <2>; #size-cells = <2>; - ranges = <0x0 0x0 0x0 0x38000 0x0 0x400>; + ranges = <0x0 0x0 0x0 0x38000 0x0 0x2000>; canvas: video-lut@48 { compatible = "amlogic,canvas";
arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +1 -1
@@ -136,7 +136,7 @@ pmic@4b { rohm,reset-snvs-powered; #clock-cells = <0>; - clocks = <&osc_32k 0>; + clocks = <&osc_32k>; clock-output-names = "clk-32k-out"; regulators {
arch/arm64/boot/dts/qcom/ipq8074-hk01.dts +2 -2
@@ -60,11 +60,11 @@ &pcie1 { perst-gpio = <&tlmm 58 0x1>; }; -&pcie_phy0 { +&pcie_qmp0 { status = "okay"; }; -&pcie_phy1 { +&pcie_qmp1 { status = "okay"; };
arch/mips/kernel/vmlinux.lds.S +2 -0
@@ -15,6 +15,8 @@ #define EMITS_PT_NOTE #endif +#define RUNTIME_DISCARD_EXIT + #include <asm-generic/vmlinux.lds.h> #undef mips
arch/s390/kernel/ptrace.c +2 -6
@@ -481,9 +481,7 @@ long arch_ptrace(struct task_struct *child, long request, }return 0 ;case PTRACE_GET_LAST_BREAK : -put_user (child->thread.last_break, - (unsigned long __user *) data); -return 0 ; +return put_user (child->thread.last_break, (unsigned long __user *)data);case PTRACE_ENABLE_TE :if (!MACHINE_HAS_TE )return -EIO ;
@@ -837,9 +835,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, }return 0 ;case PTRACE_GET_LAST_BREAK : -put_user (child->thread.last_break, - (unsigned int __user *) data); -return 0 ; +return put_user (child->thread.last_break, (unsigned int __user *)data); }return compat_ptrace_request (child, request, addr, data); }
arch/x86/purgatory/Makefile +1 -2
@@ -64,8 +64,7 @@ CFLAGS_sha256.o += $(PURGATORY_CFLAGS) CFLAGS_REMOVE_string.o += $(PURGATORY_CFLAGS_REMOVE) CFLAGS_string.o += $(PURGATORY_CFLAGS) -AFLAGS_REMOVE_setup-x86_$(BITS).o += -Wa,-gdwarf-2 -AFLAGS_REMOVE_entry64.o += -Wa,-gdwarf-2 +asflags-remove-y += -g -Wa,-gdwarf-2 $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE $(call if_changed,ld)
drivers/counter/104-quad-8.c +8 -21
@@ -61,10 +61,6 @@ struct quad8 {#define QUAD8_REG_CHAN_OP 0x11#define QUAD8_REG_INDEX_INPUT_LEVELS 0x16#define QUAD8_DIFF_ENCODER_CABLE_STATUS 0x17 -/* Borrow Toggle flip-flop */ -#define QUAD8_FLAG_BT BIT(0) -/* Carry Toggle flip-flop */ -#define QUAD8_FLAG_CT BIT(1)/* Error flag */ #define QUAD8_FLAG_E BIT(4)/* Up/Down flag */
@@ -97,6 +93,9 @@ struct quad8 {#define QUAD8_CMR_QUADRATURE_X2 0x10#define QUAD8_CMR_QUADRATURE_X4 0x18 +/* Each Counter is 24 bits wide */ +#define LS7267_CNTR_MAX GENMASK(23, 0) +static int quad8_signal_read (struct counter_device *counter,struct counter_signal *signal,enum counter_signal_level *level)
@@ -121,17 +120,9 @@ static int quad8_count_read(struct counter_device *counter, {struct quad8 *const priv = counter->priv;const int base_offset = priv->base +2 * count->id; -unsigned int flags; -unsigned int borrow; -unsigned int carry;int i; - flags =inb (base_offset +1 ); - borrow = flags &QUAD8_FLAG_BT ; - carry = !!(flags &QUAD8_FLAG_CT ); - -/* Borrow XOR Carry effectively doubles count range */ - *val = (unsigned long )(borrow ^ carry) <<24 ; + *val =0 ;mutex_lock (&priv->lock);
@@ -154,8 +145,7 @@ static int quad8_count_write(struct counter_device *counter,const int base_offset = priv->base +2 * count->id;int i; -/* Only 24-bit values are supported */ -if (val >0xFFFFFF ) +if (val >LS7267_CNTR_MAX )return -ERANGE ;mutex_lock (&priv->lock);
@@ -627,8 +617,7 @@ static int quad8_count_preset_write(struct counter_device *counter, {struct quad8 *const priv = counter->priv; -/* Only 24-bit values are supported */ -if (preset >0xFFFFFF ) +if (preset >LS7267_CNTR_MAX )return -ERANGE ;mutex_lock (&priv->lock);
@@ -654,8 +643,7 @@ static int quad8_count_ceiling_read(struct counter_device *counter, *ceiling = priv->preset[count->id];break ;default : -/* By default 0x1FFFFFF (25 bits unsigned) is maximum count */ - *ceiling =0x1FFFFFF ; + *ceiling =LS7267_CNTR_MAX ;break ; }
@@ -669,8 +657,7 @@ static int quad8_count_ceiling_write(struct counter_device *counter, {struct quad8 *const priv = counter->priv; -/* Only 24-bit values are supported */ -if (ceiling >0xFFFFFF ) +if (ceiling >LS7267_CNTR_MAX )return -ERANGE ;mutex_lock (&priv->lock);
drivers/gpu/drm/i915/display/intel_dp_aux.c +1 -1
@@ -167,7 +167,7 @@ static u32 skl_get_aux_send_ctl(struct intel_dp *intel_dp,DP_AUX_CH_CTL_TIME_OUT_MAX |DP_AUX_CH_CTL_RECEIVE_ERROR | (send_bytes <<DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT ) | -DP_AUX_CH_CTL_FW_SYNC_PULSE_SKL (32 ) | +DP_AUX_CH_CTL_FW_SYNC_PULSE_SKL (24 ) |DP_AUX_CH_CTL_SYNC_PULSE_SKL (32 ); if (intel_phy_is_tc(i915, phy) &&
drivers/iio/adc/at91-sama5d2_adc.c +1 -1
@@ -1000,7 +1000,7 @@ static struct iio_trigger *at91_adc_allocate_trigger(struct iio_dev *indio, trig =devm_iio_trigger_alloc (&indio->dev,"%s-dev%d-%s" , indio->name,iio_device_id (indio), trigger_name);if (!trig) -return NULL ; +return ERR_PTR (-ENOMEM ); trig->dev.parent = indio->dev.parent;iio_trigger_set_drvdata (trig, indio);
drivers/iio/light/tsl2772.c +1 -0
@@ -606,6 +606,7 @@ static int tsl2772_read_prox_diodes(struct tsl2772_chip *chip)return -EINVAL ; } } + chip->settings.prox_diode = prox_diode_mask;return 0 ; }
drivers/input/serio/i8042-x86ia64io.h +8 -0
@@ -601,6 +601,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { }, .driver_data = (void *)(SERIO_QUIRK_NOMUX) }, + { +/* Fujitsu Lifebook A574/H */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"FUJITSU" ), + DMI_MATCH(DMI_PRODUCT_NAME, "FMVA0501PZ"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX ) + }, {/* Gigabyte M912 */ .matches = {
drivers/memstick/core/memstick.c +4 -1
@@ -410,6 +410,7 @@ static struct memstick_dev *memstick_alloc_card(struct memstick_host *host)return card; err_out: host->card = old_card; +kfree_const (card->dev.kobj.name);kfree (card);return NULL ; }
@@ -468,8 +469,10 @@ static void memstick_check(struct work_struct *work)put_device (&card->dev); host->card =NULL ; } - }else + }else { +kfree_const (card->dev.kobj.name);kfree (card); + } } out_power_off:
drivers/mmc/host/sdhci_am654.c +0 -2
@@ -351,8 +351,6 @@ static void sdhci_am654_write_b(struct sdhci_host *host, u8 val, int reg)*/ case MMC_TIMING_SD_HS :case MMC_TIMING_MMC_HS : -case MMC_TIMING_UHS_SDR12 : -case MMC_TIMING_UHS_SDR25 : val &= ~SDHCI_CTRL_HISPD ; } }
drivers/net/bonding/bond_main.c +4 -3
@@ -1746,14 +1746,15 @@ void bond_lower_state_changed(struct slave *slave)/* The bonding driver uses ether_setup() to convert a master bond device * to ARPHRD_ETHER, that resets the target netdevice's flags so we always -* have to restore the IFF_MASTER flag, and only restore IFF_SLAVE if it was set +* have to restore the IFF_MASTER flag, and only restore IFF_SLAVE and IFF_UP +* if they were set */ static void bond_ether_setup (struct net_device *bond_dev) { -unsigned int slave_flag = bond_dev->flags &IFF_SLAVE ; +unsigned int flags = bond_dev->flags & (IFF_SLAVE |IFF_UP );ether_setup (bond_dev); - bond_dev->flags |=IFF_MASTER | slave_flag; + bond_dev->flags |=IFF_MASTER | flags; bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING ; }
drivers/net/dsa/b53/b53_mmap.c +14 -0
@@ -216,6 +216,18 @@ static int b53_mmap_write64(struct b53_device *dev, u8 page, u8 reg,return 0 ; } +static int b53_mmap_phy_read16 (struct b53_device *dev,int addr,int reg, +u16 *value) +{ +return -EIO ; +} + +static int b53_mmap_phy_write16 (struct b53_device *dev,int addr,int reg, +u16 value) +{ +return -EIO ; +} +static const struct b53_io_ops b53_mmap_ops = { .read8 = b53_mmap_read8, .read16 = b53_mmap_read16,
@@ -227,6 +239,8 @@ static const struct b53_io_ops b53_mmap_ops = { .write32 = b53_mmap_write32, .write48 = b53_mmap_write48, .write64 = b53_mmap_write64, + .phy_read16 = b53_mmap_phy_read16, + .phy_write16 = b53_mmap_phy_write16, }; static int b53_mmap_probe_of(struct platform_device *pdev,
drivers/net/ethernet/broadcom/bnxt/bnxt.c +1 -1
@@ -7437,7 +7437,7 @@ static int __bnxt_hwrm_ptp_qcfg(struct bnxt *bp)u8 flags;int rc; -if (bp->hwrm_spec_code <0x10801 ) { +if (bp->hwrm_spec_code <0x10801 || !BNXT_CHIP_P5_THOR (bp)) { rc = -ENODEV ; goto no_ptp; }
drivers/net/ethernet/intel/e1000e/netdev.c +26 -25
63 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_main.c +6 -3
@@ -10923,8 +10923,11 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired) pf->hw.aq.asq_last_status)); }/* reinit the misc interrupt */ -if (pf->flags &I40E_FLAG_MSIX_ENABLED ) +if (pf->flags &I40E_FLAG_MSIX_ENABLED ) { ret =i40e_setup_misc_vector (pf); +if (ret) + goto end_unlock; + }/* Add a filter to drop all Flow control frames from any VSI from being * transmitted. By doing so we stop a malicious VF from sending out
@@ -13945,15 +13948,15 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) vsi->id = ctxt.vsi_number; } - vsi->active_filters =0 ; -clear_bit (__I40E_VSI_OVERFLOW_PROMISC, vsi->state);spin_lock_bh (&vsi->mac_filter_hash_lock); + vsi->active_filters =0 ;/* If macvlan filters already exist, force them to get loaded */ hash_for_each_safe (vsi->mac_filter_hash, bkt, h, f, hlist) { f->state =I40E_FILTER_NEW ; f_count++; }spin_unlock_bh (&vsi->mac_filter_hash_lock); +clear_bit (__I40E_VSI_OVERFLOW_PROMISC, vsi->state);if (f_count) { vsi->flags |=I40E_VSI_FLAG_FILTER_CHANGED ;
drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c +2 -0
@@ -31,6 +31,8 @@ mlxfw_mfa2_tlv_next(const struct mlxfw_mfa2_file *mfa2_file,if (tlv->type ==MLXFW_MFA2_TLV_MULTI_PART ) { multi =mlxfw_mfa2_tlv_multi_get (mfa2_file, tlv); +if (!multi) +return NULL ; tlv_len =NLA_ALIGN (tlv_len +be16_to_cpu (multi->total_len)); }
drivers/net/ethernet/mellanox/mlxsw/pci_hw.h +1 -1
@@ -26,7 +26,7 @@#define MLXSW_PCI_CIR_TIMEOUT_MSECS 1000#define MLXSW_PCI_SW_RESET_TIMEOUT_MSECS 900000 -#define MLXSW_PCI_SW_RESET_WAIT_MSECS 200 +#define MLXSW_PCI_SW_RESET_WAIT_MSECS 400#define MLXSW_PCI_FW_READY 0xA1844#define MLXSW_PCI_FW_READY_MASK 0xFFFF#define MLXSW_PCI_FW_READY_MAGIC 0x5E
drivers/net/ethernet/sfc/ef100_netdev.c +5 -1
@@ -96,6 +96,8 @@ static int ef100_net_stop(struct net_device *net_dev)efx_mcdi_free_vis (efx);efx_remove_interrupts (efx); + efx->state =STATE_NET_DOWN ; +return 0 ; }
@@ -172,6 +174,8 @@ static int ef100_net_open(struct net_device *net_dev)efx_link_status_changed (efx);mutex_unlock (&efx->mac_lock); + efx->state =STATE_NET_UP ; +return 0 ; fail:
@@ -272,7 +276,7 @@ int ef100_register_netdev(struct efx_nic *efx)/* Always start with carrier off; PHY events will detect the link */ netif_carrier_off (net_dev); - efx->state =STATE_READY ; + efx->state =STATE_NET_DOWN ;rtnl_unlock ();efx_init_mcdi_logging (efx);
drivers/net/ethernet/sfc/efx.c +13 -17
@@ -105,14 +105,6 @@ static int efx_xdp(struct net_device *dev, struct netdev_bpf *xdp);static int efx_xdp_xmit (struct net_device *dev,int n,struct xdp_frame **xdpfs,u32 flags); -#define EFX_ASSERT_RESET_SERIALISED (efx) \ - do { \ - if ((efx->state == STATE_READY) || \ - (efx->state == STATE_RECOVERY) || \ - (efx->state == STATE_DISABLED)) \ - ASSERT_RTNL(); \ - } while (0) -/************************************************************************** * * Port handling
@@ -377,6 +369,8 @@ static int efx_probe_all(struct efx_nic *efx)if (rc) goto fail5; + efx->state =STATE_NET_DOWN ; +return 0 ; fail5:
@@ -543,7 +537,9 @@ int efx_net_open(struct net_device *net_dev)efx_start_all (efx);if (efx->state ==STATE_DISABLED || efx->reset_pending)netif_device_detach (efx->net_dev); -efx_selftest_async_start (efx); +else + efx->state =STATE_NET_UP ; +return 0 ; }
@@ -719,8 +715,6 @@ static int efx_register_netdev(struct efx_nic *efx)* already requested. If so, the NIC is probably hosed so we * abort. */ - efx->state =STATE_READY ; -smp_mb ();/* ensure we change state before checking reset_pending */ if (efx->reset_pending) {pci_err (efx->pci_dev,"aborting probe due to scheduled reset\n" ); rc = -EIO ;
@@ -747,6 +741,8 @@ static int efx_register_netdev(struct efx_nic *efx)efx_associate (efx); + efx->state =STATE_NET_DOWN ; +rtnl_unlock (); rc =device_create_file (&efx->pci_dev->dev, &dev_attr_phy_type);
@@ -848,7 +844,7 @@ static void efx_pci_remove_main(struct efx_nic *efx)/* Flush reset_work. It can no longer be scheduled since we * are not READY. */ -BUG_ON (efx->state ==STATE_READY ); +WARN_ON (efx_net_active (efx->state));efx_flush_reset_workqueue (efx);efx_disable_interrupts (efx);
@@ -1153,13 +1149,13 @@ static int efx_pm_freeze(struct device *dev)rtnl_lock (); -if (efx->state !=STATE_DISABLED ) { - efx->state =STATE_UNINIT ; - +if (efx_net_active (efx->state)) {efx_device_detach_sync (efx);efx_stop_all (efx);efx_disable_interrupts (efx); + + efx->state =efx_freeze (efx->state); }rtnl_unlock ();
@@ -1174,7 +1170,7 @@ static int efx_pm_thaw(struct device *dev)rtnl_lock (); -if (efx->state !=STATE_DISABLED ) { +if (efx_frozen (efx->state)) { rc =efx_enable_interrupts (efx);if (rc) goto fail;
@@ -1187,7 +1183,7 @@ static int efx_pm_thaw(struct device *dev)efx_device_attach_if_not_resetting (efx); - efx->state =STATE_READY ; + efx->state =efx_thaw (efx->state); efx->type->resume_wol (efx); }
drivers/net/ethernet/sfc/efx_common.c +7 -5
@@ -542,6 +542,8 @@ void efx_start_all(struct efx_nic *efx)/* Start the hardware monitor if there is one */ efx_start_monitor (efx); +efx_selftest_async_start (efx); +/* Link state detection is normally event-driven; we have * to poll now because we could have missed a change */
@@ -897,7 +899,7 @@ static void efx_reset_work(struct work_struct *data)* have changed by now. Now that we have the RTNL lock, * it cannot change again. */ -if (efx->state ==STATE_READY ) +if (efx_net_active (efx->state)) (void )efx_reset (efx, method);rtnl_unlock ();
@@ -907,7 +909,7 @@ void efx_schedule_reset(struct efx_nic *efx, enum reset_type type) {enum reset_type method; -if (efx->state ==STATE_RECOVERY ) { +if (efx_recovering (efx->state)) {netif_dbg (efx, drv, efx->net_dev,"recovering: skip scheduling %s reset\n" ,RESET_TYPE (type));
@@ -942,7 +944,7 @@ void efx_schedule_reset(struct efx_nic *efx, enum reset_type type)/* If we're not READY then just leave the flags set as the cue * to abort probing or reschedule the reset later. */ -if (READ_ONCE (efx->state) !=STATE_READY ) +if (!efx_net_active (READ_ONCE (efx->state)))return ;/* efx_process_channel() will no longer read events once a
@@ -1216,7 +1218,7 @@ static pci_ers_result_t efx_io_error_detected(struct pci_dev *pdev,rtnl_lock ();if (efx->state !=STATE_DISABLED ) { - efx->state =STATE_RECOVERY ; + efx->state =efx_recover (efx->state); efx->reset_pending =0 ;efx_device_detach_sync (efx);
@@ -1270,7 +1272,7 @@ static void efx_io_resume(struct pci_dev *pdev)netif_err (efx, hw, efx->net_dev,"efx_reset failed after PCI error (%d)\n" , rc); }else { - efx->state =STATE_READY ; + efx->state =efx_recovered (efx->state);netif_dbg (efx, hw, efx->net_dev,"Done resetting and resuming IO after PCI error.\n" ); }
drivers/net/ethernet/sfc/efx_common.h +2 -4
@@ -45,9 +45,7 @@ int efx_reconfigure_port(struct efx_nic *efx);#define EFX_ASSERT_RESET_SERIALISED (efx) \ do { \ - if ((efx->state == STATE_READY) || \ - (efx->state == STATE_RECOVERY) || \ - (efx->state == STATE_DISABLED)) \ + if (efx->state != STATE_UNINIT) \ ASSERT_RTNL(); \ } while (0)
@@ -64,7 +62,7 @@ void efx_port_dummy_op_void(struct efx_nic *efx);static inline int efx_check_disabled (struct efx_nic *efx) { -if (efx->state ==STATE_DISABLED || efx->state ==STATE_RECOVERY ) { +if (efx->state ==STATE_DISABLED ||efx_recovering (efx->state)) {netif_err (efx, drv, efx->net_dev,"device is disabled due to earlier errors\n" );return -EIO ;
drivers/net/ethernet/sfc/ethtool_common.c +1 -1
@@ -137,7 +137,7 @@ void efx_ethtool_self_test(struct net_device *net_dev,if (!efx_tests) goto fail; -if (efx->state !=STATE_READY ) { +if (!efx_net_active (efx->state)) { rc = -EBUSY ; goto out; }
drivers/net/ethernet/sfc/net_driver.h +46 -4
58 lines not on this page · raw message
drivers/net/virtio_net.c +6 -2
@@ -679,8 +679,13 @@ static struct page *xdp_linearize_page(struct receive_queue *rq,int page_off, unsigned int *len) { - struct page *page = alloc_page(GFP_ATOMIC); + int tailroom = SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); +struct page *page; +if (page_off + *len + tailroom >PAGE_SIZE ) +return NULL ; + + page =alloc_page (GFP_ATOMIC );if (!page)return NULL ;
@@ -688,7 +693,6 @@ static struct page *xdp_linearize_page(struct receive_queue *rq, page_off += *len;while (--*num_buf) { -int tailroom =SKB_DATA_ALIGN (sizeof (struct skb_shared_info ));unsigned int buflen;void *buf;int off;
drivers/net/xen-netback/netback.c +2 -4
@@ -996,10 +996,8 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,/* No crossing a page as the payload mustn't fragment. */ if (unlikely ((txreq.offset + txreq.size) >XEN_PAGE_SIZE )) { -netdev_err (queue->vif->dev, -"txreq.offset: %u, size: %u, end: %lu\n" , - txreq.offset, txreq.size, - (unsigned long )(txreq.offset&~XEN_PAGE_MASK ) + txreq.size); +netdev_err (queue->vif->dev,"Cross page boundary, txreq.offset: %u, size: %u\n" , + txreq.offset, txreq.size);xenvif_fatal_tx_err (queue->vif);break ; }
drivers/nvme/host/tcp.c +26 -20
83 lines not on this page · raw message
drivers/platform/x86/gigabyte-wmi.c +2 -0
@@ -140,6 +140,7 @@ static u8 gigabyte_wmi_detect_sensor_usability(struct wmi_device *wdev) }}static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = { +DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("A320M-S2H V2-CF" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B450M DS3H-CF" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B450M DS3H WIFI-CF" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B450M S2H V2" ),
@@ -155,6 +156,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("X570 GAMING X" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("X570 I AORUS PRO WIFI" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("X570 UD" ), +DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("X570S AORUS ELITE" ), DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z690M AORUS ELITE AX DDR4"), { } };
drivers/pwm/pwm-hibvt.c +1 -0
@@ -146,6 +146,7 @@ static void hibvt_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, value =readl (base +PWM_CTRL_ADDR (pwm->hwpwm)); state->enabled = (PWM_ENABLE_MASK & value); + state->polarity = (PWM_POLARITY_MASK & value) ?PWM_POLARITY_INVERSED :PWM_POLARITY_NORMAL ; } static int hibvt_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
drivers/pwm/pwm-iqs620a.c +1 -0
@@ -126,6 +126,7 @@ static void iqs620_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,mutex_unlock (&iqs620_pwm->lock); state->period =IQS620_PWM_PERIOD_NS ; + state->polarity =PWM_POLARITY_NORMAL ; } static int iqs620_pwm_notifier(struct notifier_block *notifier,
drivers/pwm/pwm-meson.c +7 -0
@@ -168,6 +168,12 @@ static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm, duty = state->duty_cycle; period = state->period; +/* +* Note this is wrong. The result is an output wave that isn't really +* inverted and so is wrongly identified by .get_state as normal. +* Fixing this needs some care however as some machines might rely on +* this. +*/ if (state->polarity ==PWM_POLARITY_INVERSED ) duty = period - duty;
@@ -366,6 +372,7 @@ static void meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, state->period =0 ; state->duty_cycle =0 ; } + state->polarity =PWM_POLARITY_NORMAL ; }static const struct pwm_ops meson_pwm_ops = {
drivers/regulator/fan53555.c +7 -6
@@ -8,18 +8,19 @@// Copyright (c) 2012 Marvell Technology Ltd. // Yunfan Zhang <[email protected]> +#include <linux/bits.h> +#include <linux/err.h> +#include <linux/i2c.h> #include <linux/module.h> +#include <linux/of_device.h> #include <linux/param.h> -#include <linux/err.h> #include <linux/platform_device.h> +#include <linux/regmap.h> #include <linux/regulator/driver.h> +#include <linux/regulator/fan53555.h> #include <linux/regulator/machine.h> #include <linux/regulator/of_regulator.h> -#include <linux/of_device.h> -#include <linux/i2c.h> #include <linux/slab.h> -#include <linux/regmap.h> -#include <linux/regulator/fan53555.h> /* Voltage setting */ #define FAN53555_VSEL0 0x00
@@ -60,7 +61,7 @@#define TCS_VSEL1_MODE (1 << 6)#define TCS_SLEW_SHIFT 3 -#define TCS_SLEW_MASK (0x3 < 3) +#define TCS_SLEW_MASK GENMASK(4, 3)enum fan53555_vendor {FAN53526_VENDOR_FAIRCHILD =0 ,
drivers/scsi/megaraid/megaraid_sas_base.c +1 -1
@@ -3302,7 +3302,7 @@ fw_crash_buffer_show(struct device *cdev,spin_lock_irqsave (&instance->crashdump_lock, flags); buff_offset = instance->fw_crash_buffer_offset; -if (!instance->crash_dump_buf && +if (!instance->crash_dump_buf || !((instance->fw_crash_state ==AVAILABLE ) || (instance->fw_crash_state ==COPYING ))) { dev_err(&instance->pdev->dev,
drivers/scsi/scsi.c +9 -2
@@ -323,11 +323,18 @@ static int scsi_vpd_inquiry(struct scsi_device *sdev, unsigned char *buffer,if (result)return -EIO ; -/* Sanity check that we got the page back that we asked for */ +/* +* Sanity check that we got the page back that we asked for and that +* the page size is not 0. +*/ if (buffer[1 ] != page)return -EIO ; -return get_unaligned_be16 (&buffer[2 ]) +4 ; + result =get_unaligned_be16 (&buffer[2 ]); +if (!result) +return -EIO ; + +return result +4 ; }/**
drivers/soc/sifive/sifive_l2_cache.c +21 -6
@@ -202,17 +202,22 @@ static int __init sifive_l2_init(void)if (!np)return -ENODEV ; -if (of_address_to_resource (np,0 , &res)) -return -ENODEV ; +if (of_address_to_resource (np,0 , &res)) { + rc = -ENODEV ; + goto err_node_put; + } l2_base =ioremap (res.start,resource_size (&res)); -if (!l2_base) -return -ENOMEM ; +if (!l2_base) { + rc = -ENOMEM ; + goto err_node_put; + } intr_num =of_property_count_u32_elems (np,"interrupts" );if (!intr_num) {pr_err ("L2CACHE: no interrupts property\n" ); -return -ENODEV ; + rc = -ENODEV ; + goto err_unmap; }for (i =0 ; i < intr_num; i++) {
@@ -220,9 +225,10 @@ static int __init sifive_l2_init(void) rc =request_irq (g_irq[i], l2_int_handler,0 ,"l2_ecc" ,NULL );if (rc) {pr_err ("L2CACHE: Could not request IRQ %d\n" , g_irq[i]); -return rc; + goto err_free_irq; } } +of_node_put (np);l2_config_read ();
@@ -233,5 +239,14 @@ static int __init sifive_l2_init(void)setup_sifive_debug ();#endif return 0 ; + +err_free_irq: +while (--i >=0 ) +free_irq (g_irq[i],NULL ); +err_unmap: +iounmap (l2_base); +err_node_put: +of_node_put (np); +return rc; }device_initcall (sifive_l2_init);
drivers/spi/spi-rockchip-sfc.c +1 -1
@@ -634,7 +634,7 @@ static int rockchip_sfc_probe(struct platform_device *pdev)if (ret) {dev_err (dev,"Failed to request irq\n" ); -return ret; + goto err_irq; } ret =rockchip_sfc_init (sfc);
fs/fuse/dir.c +7 -2
@@ -205,7 +205,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)if (inode &&fuse_is_bad (inode)) goto invalid;else if (time_before64 (fuse_dentry_time (entry),get_jiffies_64 ()) || - (flags & (LOOKUP_EXCL |LOOKUP_REVAL ))) { + (flags & (LOOKUP_EXCL |LOOKUP_REVAL |LOOKUP_RENAME_TARGET ))) {struct fuse_entry_out outarg;FUSE_ARGS (args);struct fuse_forget_link *forget;
@@ -476,6 +476,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,struct fuse_entry_out outentry;struct fuse_inode *fi;struct fuse_file *ff; +bool trunc = flags &O_TRUNC ;/* Userspace expects S_IFREG in create mode */ BUG_ON ((mode &S_IFMT ) !=S_IFREG );
@@ -500,7 +501,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, inarg.mode = mode; inarg.umask =current_umask (); -if (fm->fc->handle_killpriv_v2 && (flags &O_TRUNC ) && +if (fm->fc->handle_killpriv_v2 && trunc && !(flags &O_EXCL ) && !capable (CAP_FSETID )) { inarg.open_flags |=FUSE_OPEN_KILL_SUIDGID ; }
@@ -549,6 +550,10 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, }else { file->private_data = ff;fuse_finish_open (inode, file); +if (fm->fc->atomic_o_trunc && trunc) +truncate_pagecache (inode,0 ); +else if (!(ff->open_flags &FOPEN_KEEP_CACHE )) +invalidate_inode_pages2 (inode->i_mapping); }return err;
fs/fuse/file.c +18 -13
@@ -210,12 +210,9 @@ void fuse_finish_open(struct inode *inode, struct file *file) fi->attr_version =atomic64_inc_return (&fc->attr_version);i_size_write (inode,0 );spin_unlock (&fi->lock); -truncate_pagecache (inode,0 );fuse_invalidate_attr (inode);if (fc->writeback_cache)file_update_time (file); - }else if (!(ff->open_flags &FOPEN_KEEP_CACHE )) { -invalidate_inode_pages2 (inode->i_mapping); }if ((file->f_mode &FMODE_WRITE ) && fc->writeback_cache)
@@ -240,30 +237,38 @@ int fuse_open_common(struct inode *inode, struct file *file, bool isdir)if (err)return err; -if (is_wb_truncate || dax_truncate) { +if (is_wb_truncate || dax_truncate)inode_lock (inode); -fuse_set_nowrite (inode); - }if (dax_truncate) {filemap_invalidate_lock (inode->i_mapping); err =fuse_dax_break_layouts (inode,0 ,0 );if (err) - goto out; + goto out_inode_unlock; } +if (is_wb_truncate || dax_truncate) +fuse_set_nowrite (inode); + err =fuse_do_open (fm,get_node_id (inode), file, isdir);if (!err)fuse_finish_open (inode, file); -out: +if (is_wb_truncate || dax_truncate) +fuse_release_nowrite (inode); +if (!err) { +struct fuse_file *ff = file->private_data; + +if (fc->atomic_o_trunc && (file->f_flags &O_TRUNC )) +truncate_pagecache (inode,0 ); +else if (!(ff->open_flags &FOPEN_KEEP_CACHE )) +invalidate_inode_pages2 (inode->i_mapping); + }if (dax_truncate)filemap_invalidate_unlock (inode->i_mapping); - -if (is_wb_truncate | dax_truncate) { -fuse_release_nowrite (inode); +out_inode_unlock: +if (is_wb_truncate || dax_truncate)inode_unlock (inode); - }return err; }
@@ -793,7 +798,7 @@ static void fuse_read_update_size(struct inode *inode, loff_t size,struct fuse_inode *fi =get_fuse_inode (inode);spin_lock (&fi->lock); -if (attr_ver == fi->attr_version && size < inode->i_size && +if (attr_ver >= fi->attr_version && size < inode->i_size && !test_bit (FUSE_I_SIZE_UNSTABLE , &fi->state)) { fi->attr_version =atomic64_inc_return (&fc->attr_version);i_size_write (inode, size);
fs/nilfs2/segment.c +20 -0
@@ -430,6 +430,23 @@ static int nilfs_segctor_reset_segment_buffer(struct nilfs_sc_info *sci)return 0 ; } +/** +* nilfs_segctor_zeropad_segsum - zero pad the rest of the segment summary area +* @sci: segment constructor object +* +* nilfs_segctor_zeropad_segsum() zero-fills unallocated space at the end of +* the current segment summary block. +*/ +static void nilfs_segctor_zeropad_segsum (struct nilfs_sc_info *sci) +{ +struct nilfs_segsum_pointer *ssp; + + ssp = sci->sc_blk_cnt >0 ? &sci->sc_binfo_ptr : &sci->sc_finfo_ptr; +if (ssp->offset < ssp->bh->b_size) +memset (ssp->bh->b_data + ssp->offset,0 , + ssp->bh->b_size - ssp->offset); +} +static int nilfs_segctor_feed_segment (struct nilfs_sc_info *sci) { sci->sc_nblk_this_inc += sci->sc_curseg->sb_sum.nblocks;
@@ -438,6 +455,7 @@ static int nilfs_segctor_feed_segment(struct nilfs_sc_info *sci)* The current segment is filled up * (internal code) */ +nilfs_segctor_zeropad_segsum (sci); sci->sc_curseg =NILFS_NEXT_SEGBUF (sci->sc_curseg);return nilfs_segctor_reset_segment_buffer (sci); }
@@ -542,6 +560,7 @@ static int nilfs_segctor_add_file_block(struct nilfs_sc_info *sci, goto retry; }if (unlikely (required)) { +nilfs_segctor_zeropad_segsum (sci); err =nilfs_segbuf_extend_segsum (segbuf);if (unlikely (err)) goto failed;
@@ -1531,6 +1550,7 @@ static int nilfs_segctor_collect(struct nilfs_sc_info *sci, nadd =min_t (int, nadd <<1 ,SC_MAX_SEGDELTA ); sci->sc_stage = prev_stage; } +nilfs_segctor_zeropad_segsum (sci);nilfs_segctor_truncate_segments (sci, sci->sc_curseg, nilfs->ns_sufile);return 0 ;
include/linux/skbuff.h +3 -2
@@ -259,6 +259,7 @@ struct nf_bridge_info { u8 pkt_otherhost:1; u8 in_prerouting:1; u8 bridged_dnat:1; + u8 sabotage_in_done:1;__u16 frag_max_size;struct net_device *physindev;
@@ -4461,7 +4462,7 @@ static inline void nf_reset_ct(struct sk_buff *skb)static inline void nf_reset_trace (struct sk_buff *skb) { -#if IS_ENABLED (CONFIG_NETFILTER_XT_TARGET_TRACE ) || defined(CONFIG_NF_TABLES ) +#if IS_ENABLED (CONFIG_NETFILTER_XT_TARGET_TRACE ) ||IS_ENABLED (CONFIG_NF_TABLES ) skb->nf_trace =0 ;#endif }
@@ -4481,7 +4482,7 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src, dst->_nfct = src->_nfct;nf_conntrack_get (skb_nfct (src));#endif -#if IS_ENABLED (CONFIG_NETFILTER_XT_TARGET_TRACE ) || defined(CONFIG_NF_TABLES ) +#if IS_ENABLED (CONFIG_NETFILTER_XT_TARGET_TRACE ) ||IS_ENABLED (CONFIG_NF_TABLES )if (copy) dst->nf_trace = src->nf_trace;#endif
include/net/ipv6.h +2 -0
@@ -1118,6 +1118,8 @@ void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port,void ipv6_local_error (struct sock *sk,int err,struct flowi6 *fl6,u32 info);void ipv6_local_rxpmtu (struct sock *sk,struct flowi6 *fl6,u32 mtu); +void inet6_cleanup_sock (struct sock *sk); +void inet6_sock_destruct (struct sock *sk);int inet6_release (struct socket *sock);int inet6_bind (struct socket *sock,struct sockaddr *uaddr,int addr_len); int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
include/net/netfilter/nf_tables.h +4 -0
@@ -1030,6 +1030,10 @@ struct nft_chain { };int nft_chain_validate (const struct nft_ctx *ctx,const struct nft_chain *chain); +int nft_setelem_validate (const struct nft_ctx *ctx,struct nft_set *set, +const struct nft_set_iter *iter, +struct nft_set_elem *elem); +int nft_set_catchall_validate (const struct nft_ctx *ctx,struct nft_set *set);enum nft_chain_types {NFT_CHAIN_T_DEFAULT =0 ,
include/net/udp.h +1 -1
@@ -270,7 +270,7 @@ static inline bool udp_sk_bound_dev_eq(struct net *net, int bound_dev_if, }/* net/ipv4/udp.c */ -void udp_destruct_sock (struct sock *sk); +void udp_destruct_common (struct sock *sk);void skb_consume_udp (struct sock *sk,struct sk_buff *skb,int len);int __udp_enqueue_schedule_skb (struct sock *sk,struct sk_buff *skb);void udp_skb_destructor (struct sock *sk,struct sk_buff *skb);
include/net/udplite.h +0 -8
@@ -24,14 +24,6 @@ static __inline__ int udplite_getfrag(void *from, char *to, int offset,return copy_from_iter_full (to, len, &msg->msg_iter) ?0 : -EFAULT ; } -/* Designate sk as UDP-Lite socket */ -static inline int udplite_sk_init (struct sock *sk) -{ -udp_init_sock (sk); -udp_sk (sk)->pcflag =UDPLITE_BIT ; -return 0 ; -} -/* * Checksumming routines */
include/trace/events/f2fs.h +1 -1
@@ -513,7 +513,7 @@ TRACE_EVENT(f2fs_truncate_partial_nodes,TP_STRUCT__entry (__field (dev_t ,dev )__field (ino_t, ino) - __field(nid_t, nid[3]) +__array (nid_t, nid,3 )__field (int, depth)__field (int, err) ),
kernel/bpf/verifier.c +15 -0
@@ -2279,6 +2279,21 @@ static int backtrack_insn(struct bpf_verifier_env *env, int idx, } }else if (opcode ==BPF_EXIT ) {return -ENOTSUPP ; + }else if (BPF_SRC (insn->code) ==BPF_X ) { +if (!(*reg_mask & (dreg | sreg))) +return 0 ; +/* dreg <cond> sreg +* Both dreg and sreg need precision before +* this insn. If only sreg was marked precise +* before it would be equally necessary to +* propagate it to dreg. +*/ + *reg_mask |= (sreg | dreg); +/* else dreg <cond> K +* Only dreg still needs precision before +* this insn, so for the K-based conditional +* there is nothing new to be marked. +*/ } }else if (class ==BPF_LD ) {if (!(*reg_mask & dreg))
kernel/locking/rtmutex.c +46 -9
103 lines not on this page · raw message
kernel/locking/rtmutex_api.c +3 -3
@@ -245,7 +245,7 @@ void __sched rt_mutex_init_proxy_locked(struct rt_mutex_base *lock, void __sched rt_mutex_proxy_unlock(struct rt_mutex_base *lock) {debug_rt_mutex_proxy_unlock (lock); -rt_mutex_set_owner (lock,NULL ); +rt_mutex_clear_owner (lock); }/**
@@ -360,7 +360,7 @@ int __sched rt_mutex_wait_proxy_lock(struct rt_mutex_base *lock,* try_to_take_rt_mutex() sets the waiter bit unconditionally. We might * have to fix that up. */ -fixup_rt_mutex_waiters (lock); +fixup_rt_mutex_waiters (lock, true);raw_spin_unlock_irq (&lock->wait_lock);return ret;
@@ -416,7 +416,7 @@ bool __sched rt_mutex_cleanup_proxy_lock(struct rt_mutex_base *lock,* try_to_take_rt_mutex() sets the waiter bit unconditionally. We might * have to fix that up. */ -fixup_rt_mutex_waiters (lock); +fixup_rt_mutex_waiters (lock, false);raw_spin_unlock_irq (&lock->wait_lock);
kernel/sched/core.c +5 -5
@@ -1335,7 +1335,7 @@ static inline void uclamp_idle_reset(struct rq *rq, enum uclamp_id clamp_id,if (!(rq->uclamp_flags &UCLAMP_FLAG_IDLE ))return ; -WRITE_ONCE (rq->uclamp[clamp_id].value, clamp_value); +uclamp_rq_set (rq, clamp_id, clamp_value); } static inline
@@ -1513,8 +1513,8 @@ static inline void uclamp_rq_inc_id(struct rq *rq, struct task_struct *p,if (bucket->tasks ==1 || uc_se->value > bucket->value) bucket->value = uc_se->value; -if (uc_se->value >READ_ONCE (uc_rq->value)) -WRITE_ONCE (uc_rq->value, uc_se->value); +if (uc_se->value >uclamp_rq_get (rq, clamp_id)) +uclamp_rq_set (rq, clamp_id, uc_se->value); }/*
@@ -1580,7 +1580,7 @@ static inline void uclamp_rq_dec_id(struct rq *rq, struct task_struct *p,if (likely (bucket->tasks))return ; - rq_clamp =READ_ONCE (uc_rq->value); + rq_clamp =uclamp_rq_get (rq, clamp_id);/* * Defensive programming: this should never happen. If it happens, * e.g. due to future modification, warn and fixup the expected value.
@@ -1588,7 +1588,7 @@ static inline void uclamp_rq_dec_id(struct rq *rq, struct task_struct *p,SCHED_WARN_ON (bucket->value > rq_clamp);if (bucket->value >= rq_clamp) { bkt_clamp =uclamp_rq_max_value (rq, clamp_id, uc_se->value); -WRITE_ONCE (uc_rq->value, bkt_clamp); +uclamp_rq_set (rq, clamp_id, bkt_clamp); } }
kernel/sched/fair.c +111 -17
190 lines not on this page · raw message
kernel/sched/sched.h +58 -3
94 lines not on this page · raw message
kernel/sys.c +40 -29
100 lines not on this page · raw message
mm/khugepaged.c +4 -0
@@ -625,6 +625,10 @@ static int __collapse_huge_page_isolate(struct vm_area_struct *vma, result =SCAN_PTE_NON_PRESENT ; goto out; } +if (pte_uffd_wp (pteval)) { + result =SCAN_PTE_UFFD_WP ; + goto out; + } page =vm_normal_page (vma, address, pteval);if (unlikely (!page)) { result =SCAN_PAGE_NULL ;
mm/page_alloc.c +19 -0
@@ -6416,7 +6416,21 @@ static void __build_all_zonelists(void *data)int nid;int __maybe_unused cpu;pg_data_t *self = data; +unsigned long flags; +/* +* Explicitly disable this CPU's interrupts before taking seqlock +* to prevent any IRQ handler from calling into the page allocator +* (e.g. GFP_ATOMIC) that could hit zonelist_iter_begin and livelock. +*/ +local_irq_save (flags); +/* +* Explicitly disable this CPU's synchronous printk() before taking +* seqlock to prevent any printk() from trying to hold port->lock, for +* tty_insert_flip_string_and_push_buffer() on other CPU might be +* calling kmalloc(GFP_ATOMIC | __GFP_NOWARN) with port->lock held. +*/ +printk_deferred_enter ();write_seqlock (&zonelist_update_seq);#ifdef CONFIG_NUMA
@@ -6451,6 +6465,8 @@ static void __build_all_zonelists(void *data) }write_sequnlock (&zonelist_update_seq); +printk_deferred_exit (); +local_irq_restore (flags); }static noinline void__init
@@ -9239,6 +9255,9 @@ static bool pfn_range_valid_contig(struct zone *z, unsigned long start_pfn,if (PageReserved (page))return false; + +if (PageHuge (page)) +return false; }return true; }
net/bridge/br_netfilter_hooks.c +11 -6
@@ -868,12 +868,17 @@ static unsigned int ip_sabotage_in(void *priv, {struct nf_bridge_info *nf_bridge =nf_bridge_info_get (skb); -if (nf_bridge && !nf_bridge->in_prerouting && - !netif_is_l3_master (skb->dev) && - !netif_is_l3_slave (skb->dev)) { -nf_bridge_info_free (skb); - state->okfn (state->net, state->sk, skb); -return NF_STOLEN ; +if (nf_bridge) { +if (nf_bridge->sabotage_in_done) +return NF_ACCEPT ; + +if (!nf_bridge->in_prerouting && + !netif_is_l3_master (skb->dev) && + !netif_is_l3_slave (skb->dev)) { + nf_bridge->sabotage_in_done =1 ; + state->okfn (state->net, state->sk, skb); +return NF_STOLEN ; + } }return NF_ACCEPT ;
net/dccp/dccp.h +1 -0
@@ -283,6 +283,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,int dccp_rcv_established (struct sock *sk,struct sk_buff *skb,const struct dccp_hdr *dh,const unsigned int len); +void dccp_destruct_common (struct sock *sk);int dccp_init_sock (struct sock *sk,const __u8 ctl_sock_initialized);void dccp_destroy_sock (struct sock *sk);
net/dccp/ipv6.c +8 -7
@@ -1002,6 +1002,12 @@ static const struct inet_connection_sock_af_ops dccp_ipv6_mapped = { .sockaddr_len = sizeof(struct sockaddr_in6), }; +static void dccp_v6_sk_destruct (struct sock *sk) +{ +dccp_destruct_common (sk); +inet6_sock_destruct (sk); +} +/* NOTE: A lot of things set to zero explicitly by call to * sk_alloc() so need not be done here. */
@@ -1014,17 +1020,12 @@ static int dccp_v6_init_sock(struct sock *sk)if (unlikely (!dccp_v6_ctl_sock_initialized)) dccp_v6_ctl_sock_initialized =1 ;inet_csk (sk)->icsk_af_ops = &dccp_ipv6_af_ops; + sk->sk_destruct = dccp_v6_sk_destruct; }return err; } -static void dccp_v6_destroy_sock (struct sock *sk) -{ -dccp_destroy_sock (sk); -inet6_destroy_sock (sk); -} -static struct timewait_sock_ops dccp6_timewait_sock_ops = { .twsk_obj_size =sizeof (struct dccp6_timewait_sock ), };
@@ -1047,7 +1048,7 @@ static struct proto dccp_v6_prot = { .accept = inet_csk_accept, .get_port = inet_csk_get_port, .shutdown = dccp_shutdown, - .destroy = dccp_v6_destroy_sock, + .destroy = dccp_destroy_sock, .orphan_count = &dccp_orphan_count, .max_header = MAX_DCCP_HEADER, .obj_size = sizeof(struct dccp6_sock),
net/dccp/proto.c +7 -1
@@ -171,12 +171,18 @@ const char *dccp_packet_name(const int type)EXPORT_SYMBOL_GPL (dccp_packet_name); -static void dccp_sk_destruct (struct sock *sk) +void dccp_destruct_common (struct sock *sk) {struct dccp_sock *dp =dccp_sk (sk);ccid_hc_tx_delete (dp->dccps_hc_tx_ccid, sk); dp->dccps_hc_tx_ccid =NULL ; +} +EXPORT_SYMBOL_GPL (dccp_destruct_common); + +static void dccp_sk_destruct (struct sock *sk) +{ +dccp_destruct_common (sk);inet_sock_destruct (sk); }
net/ipv4/udp.c +6 -3
@@ -1596,7 +1596,7 @@ int __udp_enqueue_schedule_skb(struct sock *sk, struct sk_buff *skb) }EXPORT_SYMBOL_GPL (__udp_enqueue_schedule_skb); -void udp_destruct_sock (struct sock *sk) +void udp_destruct_common (struct sock *sk) {/* reclaim completely the forward allocated memory */ struct udp_sock *up =udp_sk (sk);
@@ -1609,10 +1609,14 @@ void udp_destruct_sock(struct sock *sk)kfree_skb (skb); }udp_rmem_release (sk, total,0 , true); +} +EXPORT_SYMBOL_GPL (udp_destruct_common); +static void udp_destruct_sock (struct sock *sk) +{ +udp_destruct_common (sk);inet_sock_destruct (sk); } -EXPORT_SYMBOL_GPL (udp_destruct_sock);int udp_init_sock (struct sock *sk) {
@@ -1620,7 +1624,6 @@ int udp_init_sock(struct sock *sk) sk->sk_destruct = udp_destruct_sock;return 0 ; } -EXPORT_SYMBOL_GPL (udp_init_sock);void skb_consume_udp (struct sock *sk,struct sk_buff *skb,int len) {
net/ipv4/udplite.c +8 -0
@@ -17,6 +17,14 @@struct udp_table udplite_table__read_mostly ;EXPORT_SYMBOL (udplite_table); +/* Designate sk as UDP-Lite socket */ +static int udplite_sk_init (struct sock *sk) +{ +udp_init_sock (sk); +udp_sk (sk)->pcflag =UDPLITE_BIT ; +return 0 ; +} +static int udplite_rcv (struct sk_buff *skb) {return __udp4_lib_rcv (skb, &udplite_table,IPPROTO_UDPLITE );
net/ipv6/af_inet6.c +14 -1
@@ -108,6 +108,13 @@ static __inline__ struct ipv6_pinfo *inet6_sk_generic(struct sock *sk)return (struct ipv6_pinfo *)(((u8 *)sk) + offset); } +void inet6_sock_destruct (struct sock *sk) +{ +inet6_cleanup_sock (sk); +inet_sock_destruct (sk); +} +EXPORT_SYMBOL_GPL (inet6_sock_destruct); +static int inet6_create (struct net *net,struct socket *sock,int protocol,int kern) {
@@ -200,7 +207,7 @@ static int inet6_create(struct net *net, struct socket *sock, int protocol, inet->hdrincl =1 ; } - sk->sk_destruct = inet_sock_destruct; + sk->sk_destruct = inet6_sock_destruct; sk->sk_family =PF_INET6 ; sk->sk_protocol = protocol;
@@ -507,6 +514,12 @@ void inet6_destroy_sock(struct sock *sk) }EXPORT_SYMBOL_GPL (inet6_destroy_sock); +void inet6_cleanup_sock (struct sock *sk) +{ +inet6_destroy_sock (sk); +} +EXPORT_SYMBOL_GPL (inet6_cleanup_sock); +/* * This does both peername and sockname. */
net/ipv6/ipv6_sockglue.c +8 -12
@@ -429,9 +429,6 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,if (optlen <sizeof (int )) goto e_inval;if (val ==PF_INET ) { -struct ipv6_txoptions *opt; -struct sk_buff *pktopt; -if (sk->sk_type ==SOCK_RAW )break ;
@@ -462,7 +459,6 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,break ; } -fl6_free_socklist (sk);__ipv6_sock_mc_close (sk);__ipv6_sock_ac_close (sk);
@@ -497,14 +493,14 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, sk->sk_socket->ops = &inet_dgram_ops; sk->sk_family =PF_INET ; } - opt =xchg ((__force struct ipv6_txoptions **)&np->opt, -NULL ); -if (opt) { -atomic_sub (opt->tot_len, &sk->sk_omem_alloc); -txopt_put (opt); - } - pktopt =xchg (&np->pktoptions,NULL ); -kfree_skb (pktopt); + +/* Disable all options not to allocate memory anymore, +* but there is still a race. See the lockless path +* in udpv6_sendmsg() and ipv6_local_rxpmtu(). +*/ + np->rxopt.all =0 ; + +inet6_cleanup_sock (sk);/* * ... and add it to the refcnt debug socks count
net/ipv6/ping.c +0 -6
@@ -22,11 +22,6 @@#include <linux/proc_fs.h> #include <net/ping.h> -static void ping_v6_destroy (struct sock *sk) -{ -inet6_destroy_sock (sk); -} -/* Compatibility glue so we can support IPv6 when it's compiled as a module */ static int dummy_ipv6_recv_error (struct sock *sk,struct msghdr *msg,int len,int *addr_len)
@@ -171,7 +166,6 @@ struct proto pingv6_prot = { .owner = THIS_MODULE, .init = ping_init_sock, .close = ping_close, - .destroy = ping_v6_destroy, .connect = ip6_datagram_connect_v6_only, .disconnect = __udp_disconnect, .setsockopt = ipv6_setsockopt,
net/ipv6/raw.c +0 -2
@@ -1211,8 +1211,6 @@ static void raw6_destroy(struct sock *sk)lock_sock (sk);ip6_flush_pending_frames (sk);release_sock (sk); - -inet6_destroy_sock (sk); }static int rawv6_init_sk (struct sock *sk)
net/ipv6/rpl.c +2 -1
@@ -32,7 +32,8 @@ static void *ipv6_rpl_segdata_pos(const struct ipv6_rpl_sr_hdr *hdr, int i)size_t ipv6_rpl_srh_size (unsigned char n,unsigned char cmpri,unsigned char cmpre) { -return (n *IPV6_PFXTAIL_LEN (cmpri)) +IPV6_PFXTAIL_LEN (cmpre); +return sizeof (struct ipv6_rpl_sr_hdr ) + (n *IPV6_PFXTAIL_LEN (cmpri)) + +IPV6_PFXTAIL_LEN (cmpre); } void ipv6_rpl_srh_decompress(struct ipv6_rpl_sr_hdr *outhdr,
net/ipv6/tcp_ipv6.c +1 -7
@@ -1972,12 +1972,6 @@ static int tcp_v6_init_sock(struct sock *sk)return 0 ; } -static void tcp_v6_destroy_sock (struct sock *sk) -{ -tcp_v4_destroy_sock (sk); -inet6_destroy_sock (sk); -} -#ifdef CONFIG_PROC_FS /* Proc filesystem TCPv6 sock list dumping. */ static void get_openreq6(struct seq_file *seq,
@@ -2170,7 +2164,7 @@ struct proto tcpv6_prot = { .accept = inet_csk_accept, .ioctl = tcp_ioctl, .init = tcp_v6_init_sock, - .destroy = tcp_v6_destroy_sock, + .destroy = tcp_v4_destroy_sock, .shutdown = tcp_shutdown, .setsockopt = tcp_setsockopt, .getsockopt = tcp_getsockopt,
net/ipv6/udp.c +14 -3
@@ -55,6 +55,19 @@#include <trace/events/skb.h> #include "udp_impl.h" +static void udpv6_destruct_sock (struct sock *sk) +{ +udp_destruct_common (sk); +inet6_sock_destruct (sk); +} + +int udpv6_init_sock (struct sock *sk) +{ +skb_queue_head_init (&udp_sk (sk)->reader_queue); + sk->sk_destruct = udpv6_destruct_sock; +return 0 ; +} + static u32 udp6_ehashfn(const struct net *net, const struct in6_addr *laddr, const u16 lport,
@@ -1636,8 +1649,6 @@ void udpv6_destroy_sock(struct sock *sk)udp_encap_disable (); } } - -inet6_destroy_sock (sk); }/*
@@ -1721,7 +1732,7 @@ struct proto udpv6_prot = { .connect = ip6_datagram_connect, .disconnect = udp_disconnect, .ioctl = udp_ioctl, - .init = udp_init_sock, + .init = udpv6_init_sock, .destroy = udpv6_destroy_sock, .setsockopt = udpv6_setsockopt, .getsockopt = udpv6_getsockopt,
net/ipv6/udp_impl.h +1 -0
@@ -12,6 +12,7 @@ int __udp6_lib_rcv(struct sk_buff *, struct udp_table *, int);int __udp6_lib_err (struct sk_buff *,struct inet6_skb_parm *,u8 ,u8 ,int ,__be32 ,struct udp_table *); +int udpv6_init_sock (struct sock *sk);int udp_v6_get_port (struct sock *sk,unsigned short snum);void udp_v6_rehash (struct sock *sk);
net/ipv6/udplite.c +8 -1
@@ -12,6 +12,13 @@#include <linux/proc_fs.h> #include "udp_impl.h" +static int udplitev6_sk_init (struct sock *sk) +{ +udpv6_init_sock (sk); +udp_sk (sk)->pcflag =UDPLITE_BIT ; +return 0 ; +} +static int udplitev6_rcv (struct sk_buff *skb) {return __udp6_lib_rcv (skb, &udplite_table,IPPROTO_UDPLITE );
@@ -38,7 +45,7 @@ struct proto udplitev6_prot = { .connect = ip6_datagram_connect, .disconnect = udp_disconnect, .ioctl = udp_ioctl, - .init = udplite_sk_init, + .init = udplitev6_sk_init, .destroy = udpv6_destroy_sock, .setsockopt = udpv6_setsockopt, .getsockopt = udpv6_getsockopt,
net/l2tp/l2tp_ip6.c +0 -2
@@ -255,8 +255,6 @@ static void l2tp_ip6_destroy_sock(struct sock *sk)if (tunnel)l2tp_tunnel_delete (tunnel); - -inet6_destroy_sock (sk); }static int l2tp_ip6_bind (struct sock *sk,struct sockaddr *uaddr,int addr_len)
net/mptcp/protocol.c +0 -7
@@ -3621,12 +3621,6 @@ static const struct proto_ops mptcp_v6_stream_ops = {static struct proto mptcp_v6_prot; -static void mptcp_v6_destroy (struct sock *sk) -{ -mptcp_destroy (sk); -inet6_destroy_sock (sk); -} -static struct inet_protosw mptcp_v6_protosw = { .type =SOCK_STREAM , .protocol =IPPROTO_MPTCP ,
@@ -3642,7 +3636,6 @@ int __init mptcp_proto_v6_init(void) mptcp_v6_prot = mptcp_prot;strcpy (mptcp_v6_prot.name,"MPTCPv6" ); mptcp_v6_prot.slab =NULL ; - mptcp_v6_prot.destroy = mptcp_v6_destroy; mptcp_v6_prot.obj_size =sizeof (struct mptcp6_sock ); err =proto_register (&mptcp_v6_prot,1 );
net/netfilter/nf_tables_api.c +60 -7
85 lines not on this page · raw message
net/netfilter/nft_lookup.c +4 -32
@@ -198,37 +198,6 @@ static int nft_lookup_dump(struct sk_buff *skb, const struct nft_expr *expr)return -1 ; } -static int nft_lookup_validate_setelem (const struct nft_ctx *ctx, -struct nft_set *set, -const struct nft_set_iter *iter, -struct nft_set_elem *elem) -{ -const struct nft_set_ext *ext =nft_set_elem_ext (set, elem->priv); -struct nft_ctx *pctx = (struct nft_ctx *)ctx; -const struct nft_data *data; -int err; - -if (nft_set_ext_exists (ext,NFT_SET_EXT_FLAGS ) && - *nft_set_ext_flags (ext) &NFT_SET_ELEM_INTERVAL_END ) -return 0 ; - - data =nft_set_ext_data (ext); -switch (data->verdict.code) { -case NFT_JUMP : -case NFT_GOTO : - pctx->level++; - err =nft_chain_validate (ctx, data->verdict.chain); -if (err <0 ) -return err; - pctx->level--; -break ; -default : -break ; - } - -return 0 ; -} -static int nft_lookup_validate (const struct nft_ctx *ctx,const struct nft_expr *expr,const struct nft_data **d)
@@ -244,9 +213,12 @@ static int nft_lookup_validate(const struct nft_ctx *ctx, iter.skip =0 ; iter.count =0 ; iter.err =0 ; - iter.fn = nft_lookup_validate_setelem; + iter.fn = nft_setelem_validate; priv->set->ops->walk (ctx, priv->set, &iter); +if (!iter.err) + iter.err =nft_set_catchall_validate (ctx, priv->set); +if (iter.err <0 )return iter.err;
net/sched/sch_qfq.c +7 -6
@@ -421,15 +421,16 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, }else weight =1 ; -if (tb[TCA_QFQ_LMAX ]) { +if (tb[TCA_QFQ_LMAX ]) lmax =nla_get_u32 (tb[TCA_QFQ_LMAX ]); -if (lmax <QFQ_MIN_LMAX || lmax > (1UL <<QFQ_MTU_SHIFT )) { -pr_notice ("qfq: invalid max length %u\n" , lmax); -return -EINVAL ; - } - }else +else lmax =psched_mtu (qdisc_dev (sch)); +if (lmax <QFQ_MIN_LMAX || lmax > (1UL <<QFQ_MTU_SHIFT )) { +pr_notice ("qfq: invalid max length %u\n" , lmax); +return -EINVAL ; + } + inv_w =ONE_FP / weight; weight =ONE_FP / inv_w;
net/sctp/socket.c +21 -8
@@ -5110,13 +5110,17 @@ static void sctp_destroy_sock(struct sock *sk) }/* Triggered when there are no references on the socket anymore */ -static void sctp_destruct_sock (struct sock *sk) +static void sctp_destruct_common (struct sock *sk) {struct sctp_sock *sp =sctp_sk (sk);/* Free up the HMAC transform. */ crypto_free_shash (sp->hmac); +} +static void sctp_destruct_sock (struct sock *sk) +{ +sctp_destruct_common (sk);inet_sock_destruct (sk); }
@@ -9443,7 +9447,7 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk,sctp_sk (newsk)->reuse = sp->reuse; newsk->sk_shutdown = sk->sk_shutdown; - newsk->sk_destruct = sctp_destruct_sock; + newsk->sk_destruct = sk->sk_destruct; newsk->sk_family = sk->sk_family; newsk->sk_protocol =IPPROTO_SCTP ; newsk->sk_backlog_rcv = sk->sk_prot->backlog_rcv;
@@ -9675,11 +9679,20 @@ struct proto sctp_prot = {#if IS_ENABLED (CONFIG_IPV6 ) -#include <net/transp_v6.h> -static void sctp_v6_destroy_sock (struct sock *sk) +static void sctp_v6_destruct_sock (struct sock *sk) +{ +sctp_destruct_common (sk); +inet6_sock_destruct (sk); +} + +static int sctp_v6_init_sock (struct sock *sk) { -sctp_destroy_sock (sk); -inet6_destroy_sock (sk); +int ret =sctp_init_sock (sk); + +if (!ret) + sk->sk_destruct = sctp_v6_destruct_sock; + +return ret; } struct proto sctpv6_prot = {
@@ -9689,8 +9702,8 @@ struct proto sctpv6_prot = { .disconnect = sctp_disconnect, .accept = sctp_accept, .ioctl = sctp_ioctl, - .init = sctp_init_sock, - .destroy = sctp_v6_destroy_sock, + .init = sctp_v6_init_sock, + .destroy = sctp_destroy_sock, .shutdown = sctp_shutdown, .setsockopt = sctp_setsockopt, .getsockopt = sctp_getsockopt,
scripts/asn1_compiler.c +1 -1
@@ -625,7 +625,7 @@ int main(int argc, char **argv) p =strrchr (argv[1 ],'/' ); p = p ? p +1 : argv[1 ]; grammar_name =strdup (p); -if (!p) { +if (!grammar_name) {perror (NULL );exit (1 ); }
sound/soc/fsl/fsl_asrc_dma.c +8 -3
@@ -208,14 +208,19 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component, be_chan =soc_component_to_pcm (component_be)->chan[substream->stream]; tmp_chan = be_chan; } -if (!tmp_chan) - tmp_chan =dma_request_slave_channel (dev_be, tx ?"tx" :"rx" ); +if (!tmp_chan) { + tmp_chan =dma_request_chan (dev_be, tx ?"tx" :"rx" ); +if (IS_ERR (tmp_chan)) { +dev_err (dev,"failed to request DMA channel for Back-End\n" ); +return -EINVAL ; + } + }/* * An EDMA DEV_TO_DEV channel is fixed and bound with DMA event of each * peripheral, unlike SDMA channel that is allocated dynamically. So no * need to configure dma_request and dma_request2, but get dma_chan of -* Back-End device directly via dma_request_slave_channel. +* Back-End device directly via dma_request_chan. */ if (!asrc->use_edma) {/* Get DMA request of Back-End */
tools/testing/selftests/sigaltstack/current_stack_pointer.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#if __alpha__ +registerunsigned long sp asm("$30" ); +#elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv +registerunsigned long sp asm("sp" ); +#elif __i386__ +registerunsigned long sp asm("esp" ); +#elif __loongarch64 +registerunsigned long sp asm("$sp" ); +#elif __ppc__ +registerunsigned long sp asm("r1" ); +#elif __s390x__ +registerunsigned long sp asm("%15" ); +#elif __sh__ +registerunsigned long sp asm("r15" ); +#elif __x86_64__ +registerunsigned long sp asm("rsp" ); +#elif __XTENSA__ +registerunsigned long sp asm("a1" ); +#else +#error "implement current_stack_pointer equivalent" +#endif
tools/testing/selftests/sigaltstack/sas.c +1 -6
@@ -20,6 +20,7 @@#include <sys/auxv.h> #include "../kselftest.h" +#include "current_stack_pointer.h" #ifndef SS_AUTODISARM #define SS_AUTODISARM (1U << 31)
@@ -46,12 +47,6 @@ void my_usr1(int sig, siginfo_t *si, void *u)stack_t stk;struct stk_data *p; -#if __s390x__ - registerunsigned long sp asm("%15" ); -#else - registerunsigned long sp asm("sp" ); -#endif -if (sp < (unsigned long )sstack || sp >= (unsigned long )sstack + stack_size) {ksft_exit_fail_msg ("SP is not on sigaltstack\n" );