Linux 7.0.14
Greg Kroah-Hartman
maintainerNote, this is the LAST 7.0.y kernel release that will happen, this kernel branch is now end-of-life. Please move to the 7.1.y branch at this point in time.
I'm announcing the release of the 7.0.14 kernel.
All users of the 7.0 kernel series must upgrade.
The updated 7.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-7.0.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/userspace-api/ioctl/ioctl-number.rst | 1 Makefile | 2 arch/arm64/kernel/entry-common.c | 29 + drivers/base/memory.c | 3 drivers/char/agp/amd64-agp.c | 2 drivers/crypto/intel/qat/qat_common/adf_cfg.c | 10 drivers/crypto/intel/qat/qat_common/adf_cfg.h | 1 drivers/crypto/intel/qat/qat_common/adf_cfg_common.h | 32 - drivers/crypto/intel/qat/qat_common/adf_cfg_user.h | 38 - drivers/crypto/intel/qat/qat_common/adf_common_drv.h | 3 drivers/crypto/intel/qat/qat_common/adf_ctl_drv.c | 404 ------------------- drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c | 70 --- drivers/firmware/samsung/exynos-acpm-dvfs.c | 12 drivers/firmware/samsung/exynos-acpm-pmic.c | 14 drivers/firmware/samsung/exynos-acpm.c | 109 +++-- drivers/firmware/samsung/exynos-acpm.h | 8 drivers/i2c/i2c-stub.c | 5 drivers/iio/adc/ti-ads1298.c | 7 drivers/iio/light/veml6075.c | 8 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 drivers/media/test-drivers/vidtv/vidtv_mux.c | 8 drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 8 drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 1 drivers/net/net_failover.c | 12 drivers/tty/serial/8250/8250_dw.c | 4 drivers/tty/serial/qcom_geni_serial.c | 9 drivers/tty/vt/vc_screen.c | 2 fs/fuse/dev.c | 19 fs/fuse/file.c | 8 fs/lockd/svc4proc.c | 13 fs/lockd/svclock.c | 4 fs/lockd/svcproc.c | 15 fs/lockd/svcsubs.c | 35 + fs/nfsd/export.c | 63 -- fs/nfsd/export.h | 7 fs/nfsd/nfsctl.c | 8 fs/smb/server/smb2pdu.c | 5 include/linux/irq-entry-common.h | 8 include/linux/lockd/lockd.h | 2 include/linux/rseq_entry.h | 19 include/net/rose.h | 12 io_uring/net.c | 36 - io_uring/opdef.c | 4 net/core/bpf_sk_storage.c | 13 net/core/dev.c | 1 net/core/failover.c | 6 net/rose/af_rose.c | 49 +- net/rose/rose_in.c | 6 net/rose/rose_loopback.c | 61 ++ net/rose/rose_timer.c | 83 +++ 50 files changed, 452 insertions(+), 829 deletions(-)
Bernard Pidoux (15):
rose: fix dev_put() leak in rose_loopback_timer()
rose: hold loopback neighbour reference across timer callback
rose: fix race between loopback timer and module removal
rose: clear neighbour pointer after rose_neigh_put() in state machines
rose: guard rose_neigh_put() against NULL in timer expiry
rose: fix netdev double-hold in rose_rx_call_request()
rose: fix notifier unregistered too early in rose_exit()
rose: set SOCK_DESTROY in rose_kill_by_device() for prompt cleanup
rose: disconnect orphaned STATE_2 sockets when device is gone
rose: fix netdev double-hold in rose_make_new()
rose: release netdev ref and destroy orphaned incoming sockets
rose: drop CALL_REQUEST in loopback timer when device is not running
rose: cancel neighbour timers in rose_neigh_put() before freeing
rose: clear neighbour pointer in rose_kill_by_device()
rose: don't free fd-owned sockets when reaping in the heartbeat
Faicker Mo (1):
net: net_failover: Fix the deadlock in slave register
Gabriel Krisman Bertazi (1):
io_uring/net: Avoid msghdr on op_connect/op_bind async data
Georgi Djakov (1):
drivers/base/memory: set mem->altmap after successful device registration
Gil Portnoy (1):
ksmbd: reject non-VALID session in compound request branch
Giovanni Cabiddu (1):
crypto: qat - remove unused character device and IOCTLs
Greg Kroah-Hartman (1):
Linux 7.0.14
Joanne Koong (1):
fuse: re-lock request before replacing page cache folio
Krzysztof Kozlowski (2):
firmware: exynos-acpm: Count number of commands in acpm_xfer
firmware: exynos-acpm: Count acpm_xfer buffers with __counted_by_ptr
Lord Ulf Henrik Holmberg (1):
RDMA/bnxt_re: zero shared page before exposing to userspace
Mark Rutland (1):
arm64/entry: Fix arm64-specific rseq brokenness
Mike Marciniszyn (Meta) (1):
net: export netif_open for self_test usage
Miklos Szeredi (1):
virtiofs: fix UAF on submount umount
Mingyu Wang (1):
agp/amd64: Fix broken error propagation in agp_amd64_probe()
NeilBrown (1):
lockd: fix TEST handling when not all permissions are available.
Ruslan Valiyev (1):
media: vidtv: fix NULL pointer dereference in vidtv_mux_push_si
Sam Daly (2):
iio: light: veml6075: add bounds check to veml6075_it_ms index
iio: adc: ti-ads1298: add bounds check to pga_settings index
Stepan Ionichev (1):
serial: 8250_dw: unregister 8250 port if clk_notifier_register() fails
Tudor Ambarus (3):
firmware: samsung: acpm: Fix cross-thread RX length corruption
firmware: samsung: acpm: Fix false timeouts and Use-After-Free in polling
firmware: samsung: acpm: Fix missing LKMM barriers in sequence allocator
Viken Dadhaniya (1):
serial: qcom_geni: Fix RX DMA stall when SE_DMA_RX_LEN_IN is zero
Weiming Shi (3):
bpf: Fix NULL pointer dereference in bpf_sk_storage_clone and diag paths
i2c: stub: Reject I2C block transfers with invalid length
net: qualcomm: rmnet: fix endpoint use-after-free in rmnet_dellink()
Yang Erkun (1):
Revert "NFSD: Defer sub-object cleanup in export put callbacks"
Yi Yang (1):
vc_screen: fix null-ptr-deref in vcs_notifier() during concurrent vcs_write
Greg Kroah-Hartman
maintainerDocumentation/userspace-api/ioctl/ioctl-number.rst +0 -1
@@ -229,7 +229,6 @@ Code Seq# Include File Comments <mailto:[email protected]> 'a' all linux/atm*.h, linux/sonet.h ATM on linux <http://lrcwww.epfl.ch/> -'a' 00-0F drivers/crypto/qat/qat_common/adf_cfg_common.h conflict! qat driver 'b' 00-FF conflict! bit3 vme host bridge <mailto:[email protected]> 'b' 00-0F linux/dma-buf.h conflict!
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 7 PATCHLEVEL = 0 -SUBLEVEL = 13 +SUBLEVEL = 14 EXTRAVERSION = NAME = Baby Opossum Posse
arch/arm64/kernel/entry-common.c +22 -7
@@ -58,6 +58,12 @@ static void noinstr exit_to_kernel_mode(struct pt_regs *regs,irqentry_exit (regs, state); } +static __always_inline void arm64_syscall_enter_from_user_mode(struct pt_regs *regs) +{ +enter_from_user_mode (regs); +mte_disable_tco_entry (current); +} +/* * Handle IRQ/context state management when entering from user mode. * Before this function is called it is not safe to call regular kernel code,
@@ -66,19 +72,28 @@ static void noinstr exit_to_kernel_mode(struct pt_regs *regs, static __always_inline void arm64_enter_from_user_mode(struct pt_regs *regs) {enter_from_user_mode (regs); +rseq_note_user_irq_entry ();mte_disable_tco_entry (current); } +static __always_inline void arm64_syscall_exit_to_user_mode(struct pt_regs *regs) +{ +local_irq_disable (); +syscall_exit_to_user_mode_prepare (regs); +local_daif_mask (); +mte_check_tfsr_exit (); +exit_to_user_mode (); +} +/* * Handle IRQ/context state management when exiting to user mode. * After this function returns it is not safe to call regular kernel code, * instrumentable code, or any code which may trigger an exception. */ - static __always_inline void arm64_exit_to_user_mode(struct pt_regs *regs) {local_irq_disable (); -exit_to_user_mode_prepare_legacy (regs); +irqentry_exit_to_user_mode_prepare (regs);local_daif_mask ();mte_check_tfsr_exit ();exit_to_user_mode ();
@@ -86,7 +101,7 @@ static __always_inline void arm64_exit_to_user_mode(struct pt_regs *regs) asmlinkage void noinstr asm_exit_to_user_mode(struct pt_regs *regs) { -arm64_exit_to_user_mode (regs); +arm64_syscall_exit_to_user_mode (regs); }/*
@@ -717,12 +732,12 @@ static void noinstr el0_brk64(struct pt_regs *regs, unsigned long esr) static void noinstr el0_svc(struct pt_regs *regs) { -arm64_enter_from_user_mode (regs); +arm64_syscall_enter_from_user_mode (regs);cortex_a76_erratum_1463225_svc_handler ();fpsimd_syscall_enter ();local_daif_restore (DAIF_PROCCTX );do_el0_svc (regs); -arm64_exit_to_user_mode (regs); +arm64_syscall_exit_to_user_mode (regs);fpsimd_syscall_exit (); }
@@ -869,11 +884,11 @@ static void noinstr el0_cp15(struct pt_regs *regs, unsigned long esr) static void noinstr el0_svc_compat(struct pt_regs *regs) { -arm64_enter_from_user_mode (regs); +arm64_syscall_enter_from_user_mode (regs);cortex_a76_erratum_1463225_svc_handler ();local_daif_restore (DAIF_PROCCTX );do_el0_svc_compat (regs); -arm64_exit_to_user_mode (regs); +arm64_syscall_exit_to_user_mode (regs); } static void noinstr el0_bkpt32(struct pt_regs *regs, unsigned long esr)
drivers/base/memory.c +2 -1
@@ -807,7 +807,6 @@ static int add_memory_block(unsigned long block_id, int nid, unsigned long state mem->start_section_nr = block_id * sections_per_block; mem->state = state; mem->nid = nid; - mem->altmap = altmap;INIT_LIST_HEAD (&mem->group_next);#ifndef CONFIG_NUMA
@@ -825,6 +824,8 @@ static int add_memory_block(unsigned long block_id, int nid, unsigned long stateif (ret)return ret; + mem->altmap = altmap; +if (group) { mem->group = group;list_add (&mem->group_next, &group->memory_blocks);
drivers/char/agp/amd64-agp.c +1 -1
@@ -546,7 +546,7 @@ static int agp_amd64_probe(struct pci_dev *pdev,/* Fill in the mode register */ pci_read_config_dword (pdev, bridge->capndx+PCI_AGP_STATUS , &bridge->mode); -if (cache_nbs (pdev, cap_ptr) ==-1 ) { +if (cache_nbs (pdev, cap_ptr) <0 ) {agp_put_bridge (bridge);return -ENODEV ; }
drivers/crypto/intel/qat/qat_common/adf_cfg.c +0 -10
@@ -103,16 +103,6 @@ static void adf_cfg_section_del_all(struct list_head *head);static void adf_cfg_section_del_all_except (struct list_head *head,const char *section_name); -void adf_cfg_del_all (struct adf_accel_dev *accel_dev) -{ -struct adf_cfg_device_data *dev_cfg_data = accel_dev->cfg; - -down_write (&dev_cfg_data->lock); -adf_cfg_section_del_all (&dev_cfg_data->sec_list); -up_write (&dev_cfg_data->lock); -clear_bit (ADF_STATUS_CONFIGURED , &accel_dev->status); -} -void adf_cfg_del_all_except (struct adf_accel_dev *accel_dev,const char *section_name) {
drivers/crypto/intel/qat/qat_common/adf_cfg.h +0 -1
@@ -34,7 +34,6 @@ void adf_cfg_dev_remove(struct adf_accel_dev *accel_dev);void adf_cfg_dev_dbgfs_add (struct adf_accel_dev *accel_dev);void adf_cfg_dev_dbgfs_rm (struct adf_accel_dev *accel_dev);int adf_cfg_section_add (struct adf_accel_dev *accel_dev,const char *name); -void adf_cfg_del_all (struct adf_accel_dev *accel_dev);void adf_cfg_del_all_except (struct adf_accel_dev *accel_dev,const char *section_name); int adf_cfg_add_key_value_param(struct adf_accel_dev *accel_dev,
drivers/crypto/intel/qat/qat_common/adf_cfg_common.h +0 -32
@@ -4,18 +4,11 @@#define ADF_CFG_COMMON_H_ #include <linux/types.h> -#include <linux/ioctl.h> #define ADF_CFG_MAX_STR_LEN 64#define ADF_CFG_MAX_KEY_LEN_IN_BYTES ADF_CFG_MAX_STR_LEN#define ADF_CFG_MAX_VAL_LEN_IN_BYTES ADF_CFG_MAX_STR_LEN#define ADF_CFG_MAX_SECTION_LEN_IN_BYTES ADF_CFG_MAX_STR_LEN -#define ADF_CFG_BASE_DEC 10 -#define ADF_CFG_BASE_HEX 16 -#define ADF_CFG_ALL_DEVICES 0xFE -#define ADF_CFG_NO_DEVICE 0xFF -#define ADF_CFG_AFFINITY_WHATEVER 0xFF -#define MAX_DEVICE_NAME_SIZE 32#define ADF_MAX_DEVICES (32 * 32)#define ADF_DEVS_ARRAY_SIZE BITS_TO_LONGS(ADF_MAX_DEVICES)
@@ -51,29 +44,4 @@ enum adf_device_type {DEV_420XX , DEV_6XXX, }; - -struct adf_dev_status_info { -enum adf_device_type type; -__u32 accel_id; -__u32 instance_id; -__u8 num_ae; -__u8 num_accel; -__u8 num_logical_accel; -__u8 banks_per_accel; -__u8 state; -__u8 bus; -__u8 dev; -__u8 fun; -char name[MAX_DEVICE_NAME_SIZE ]; -}; - -#define ADF_CTL_IOC_MAGIC 'a' -#define IOCTL_CONFIG_SYS_RESOURCE_PARAMETERS _IOW(ADF_CTL_IOC_MAGIC, 0, \ - struct adf_user_cfg_ctl_data) -#define IOCTL_STOP_ACCEL_DEV _IOW(ADF_CTL_IOC_MAGIC, 1, \ - struct adf_user_cfg_ctl_data) -#define IOCTL_START_ACCEL_DEV _IOW(ADF_CTL_IOC_MAGIC, 2, \ - struct adf_user_cfg_ctl_data) -#define IOCTL_STATUS_ACCEL_DEV _IOW(ADF_CTL_IOC_MAGIC, 3, __u32) -#define IOCTL_GET_NUM_DEVICES _IOW(ADF_CTL_IOC_MAGIC, 4, __s32)#endif
drivers/crypto/intel/qat/qat_common/adf_cfg_user.h deleted +0 -38
@@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) */ -/* Copyright(c) 2014 - 2020 Intel Corporation */ -#ifndef ADF_CFG_USER_H_ -#define ADF_CFG_USER_H_ - -#include "adf_cfg_common.h" -#include "adf_cfg_strings.h" - -struct adf_user_cfg_key_val { -char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES ]; -char val[ADF_CFG_MAX_VAL_LEN_IN_BYTES ]; -union { -struct adf_user_cfg_key_val *next; -__u64 padding3; - }; -enum adf_cfg_val_type type; -} __packed; - -struct adf_user_cfg_section { -char name[ADF_CFG_MAX_SECTION_LEN_IN_BYTES ]; -union { -struct adf_user_cfg_key_val *params; -__u64 padding1; - }; -union { -struct adf_user_cfg_section *next; -__u64 padding3; - }; -} __packed; - -struct adf_user_cfg_ctl_data { -union { -struct adf_user_cfg_section *config_section; -__u64 padding; - }; -__u8 device_id; -} __packed; -#endif
drivers/crypto/intel/qat/qat_common/adf_common_drv.h +0 -3
@@ -68,10 +68,7 @@ int adf_devmgr_add_dev(struct adf_accel_dev *accel_dev,void adf_devmgr_rm_dev (struct adf_accel_dev *accel_dev,struct adf_accel_dev *pf);struct list_head *adf_devmgr_get_head (void ); -struct adf_accel_dev *adf_devmgr_get_dev_by_id (u32 id);struct adf_accel_dev *adf_devmgr_pci_to_accel_dev (struct pci_dev *pci_dev); -int adf_devmgr_verify_id (u32 id); -void adf_devmgr_get_num_dev (u32 *num);int adf_devmgr_in_reset (struct adf_accel_dev *accel_dev);int adf_dev_started (struct adf_accel_dev *accel_dev);int adf_dev_restarting_notify (struct adf_accel_dev *accel_dev);
drivers/crypto/intel/qat/qat_common/adf_ctl_drv.c +1 -403
433 lines not on this page · raw message
drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c +0 -70
82 lines not on this page · raw message
drivers/firmware/samsung/exynos-acpm-dvfs.c +8 -4
@@ -5,6 +5,7 @@* Copyright 2025 Linaro Ltd. */ +#include <linux/array_size.h> #include <linux/bitfield.h> #include <linux/firmware/samsung/exynos-acpm-protocol.h> #include <linux/ktime.h>
@@ -24,12 +25,15 @@ static void acpm_dvfs_set_xfer(struct acpm_xfer *xfer, u32 *cmd, size_t cmdlen, unsigned int acpm_chan_id, bool response) { xfer->acpm_chan_id = acpm_chan_id; + xfer->txcnt = cmdlen; xfer->txd = cmd; - xfer->txlen = cmdlen;if (response) { + xfer->rxcnt = cmdlen; xfer->rxd = cmd; - xfer->rxlen = cmdlen; + }else { + xfer->rxcnt =0 ; + xfer->rxd =NULL ; } }
@@ -50,7 +54,7 @@ int acpm_dvfs_set_rate(struct acpm_handle *handle,u32 cmd[4 ];acpm_dvfs_init_set_rate_cmd (cmd, clk_id, rate); -acpm_dvfs_set_xfer (&xfer, cmd,sizeof (cmd), acpm_chan_id, false); +acpm_dvfs_set_xfer (&xfer, cmd,ARRAY_SIZE (cmd), acpm_chan_id, false);return acpm_do_xfer (handle, &xfer); }
@@ -70,7 +74,7 @@ unsigned long acpm_dvfs_get_rate(struct acpm_handle *handle,int ret;acpm_dvfs_init_get_rate_cmd (cmd, clk_id); -acpm_dvfs_set_xfer (&xfer, cmd,sizeof (cmd), acpm_chan_id, true); +acpm_dvfs_set_xfer (&xfer, cmd,ARRAY_SIZE (cmd), acpm_chan_id, true); ret =acpm_do_xfer (handle, &xfer);if (ret)
drivers/firmware/samsung/exynos-acpm-pmic.c +7 -7
@@ -63,8 +63,8 @@ static void acpm_pmic_set_xfer(struct acpm_xfer *xfer, u32 *cmd, size_t cmdlen, { xfer->txd = cmd; xfer->rxd = cmd; - xfer->txlen = cmdlen; - xfer->rxlen = cmdlen; + xfer->txcnt = cmdlen; + xfer->rxcnt = cmdlen; xfer->acpm_chan_id = acpm_chan_id; }
@@ -86,7 +86,7 @@ int acpm_pmic_read_reg(struct acpm_handle *handle,int ret;acpm_pmic_init_read_cmd (cmd, type, reg, chan); -acpm_pmic_set_xfer (&xfer, cmd,sizeof (cmd), acpm_chan_id); +acpm_pmic_set_xfer (&xfer, cmd,ARRAY_SIZE (cmd), acpm_chan_id); ret =acpm_do_xfer (handle, &xfer);if (ret)
@@ -119,7 +119,7 @@ int acpm_pmic_bulk_read(struct acpm_handle *handle,return -EINVAL ;acpm_pmic_init_bulk_read_cmd (cmd, type, reg, chan, count); -acpm_pmic_set_xfer (&xfer, cmd,sizeof (cmd), acpm_chan_id); +acpm_pmic_set_xfer (&xfer, cmd,ARRAY_SIZE (cmd), acpm_chan_id); ret =acpm_do_xfer (handle, &xfer);if (ret)
@@ -159,7 +159,7 @@ int acpm_pmic_write_reg(struct acpm_handle *handle,int ret;acpm_pmic_init_write_cmd (cmd, type, reg, chan, value); -acpm_pmic_set_xfer (&xfer, cmd,sizeof (cmd), acpm_chan_id); +acpm_pmic_set_xfer (&xfer, cmd,ARRAY_SIZE (cmd), acpm_chan_id); ret =acpm_do_xfer (handle, &xfer);if (ret)
@@ -199,7 +199,7 @@ int acpm_pmic_bulk_write(struct acpm_handle *handle,return -EINVAL ;acpm_pmic_init_bulk_write_cmd (cmd, type, reg, chan, count, buf); -acpm_pmic_set_xfer (&xfer, cmd,sizeof (cmd), acpm_chan_id); +acpm_pmic_set_xfer (&xfer, cmd,ARRAY_SIZE (cmd), acpm_chan_id); ret =acpm_do_xfer (handle, &xfer);if (ret)
@@ -229,7 +229,7 @@ int acpm_pmic_update_reg(struct acpm_handle *handle,int ret;acpm_pmic_init_update_cmd (cmd, type, reg, chan, value, mask); -acpm_pmic_set_xfer (&xfer, cmd,sizeof (cmd), acpm_chan_id); +acpm_pmic_set_xfer (&xfer, cmd,ARRAY_SIZE (cmd), acpm_chan_id); ret =acpm_do_xfer (handle, &xfer);if (ret)
drivers/firmware/samsung/exynos-acpm.c +71 -38
220 lines not on this page · raw message
drivers/firmware/samsung/exynos-acpm.h +4 -4
@@ -8,10 +8,10 @@#define __EXYNOS_ACPM_H__struct acpm_xfer { -const u32 *txd; -u32 *rxd; -size_t txlen; -size_t rxlen; + const u32 *txd __counted_by_ptr(txcnt); + u32 *rxd __counted_by_ptr(rxcnt); +size_t txcnt; +size_t rxcnt;unsigned int acpm_chan_id; };
drivers/i2c/i2c-stub.c +5 -0
@@ -214,6 +214,11 @@ static s32 stub_xfer(struct i2c_adapter *adap, u16 addr, unsigned short flags,* We ignore banks here, because banked chips don't use I2C * block transfers */ +if (data->block[0 ] ==0 || + data->block[0 ] >I2C_SMBUS_BLOCK_MAX ) { + ret = -EINVAL ; +break ; + }if (data->block[0 ] >256 - command)/* Avoid overrun */ data->block[0 ] =256 - command; len = data->block[0 ];
drivers/iio/adc/ti-ads1298.c +6 -1
@@ -279,6 +279,7 @@ static const u8 ads1298_pga_settings[] = { 6, 1, 2, 3, 4, 8, 12 };static int ads1298_get_scale (struct ads1298_private *priv,int channel,int *val,int *val2) { +unsigned int pga_idx;int ret;unsigned int regval;u8 gain;
@@ -302,7 +303,11 @@ static int ads1298_get_scale(struct ads1298_private *priv,if (ret)return ret; - gain = ads1298_pga_settings[FIELD_GET (ADS1298_MASK_CH_PGA , regval)]; + pga_idx =FIELD_GET (ADS1298_MASK_CH_PGA , regval); +if (pga_idx >=ARRAY_SIZE (ads1298_pga_settings)) +return -EINVAL ; + + gain = ads1298_pga_settings[pga_idx]; *val /= gain;/* Full scale is VREF / gain */ *val2 =ADS1298_BITS_PER_SAMPLE -1 ;/* Signed, hence the -1 */
drivers/iio/light/veml6075.c +6 -2
@@ -100,7 +100,7 @@ static const struct iio_chan_spec veml6075_channels[] = {static int veml6075_request_measurement (struct veml6075_data *data) { -int ret, conf, int_time; +int ret, conf, int_time, int_index; ret =regmap_read (data->regmap,VEML6075_CMD_CONF , &conf);if (ret <0 )
@@ -117,7 +117,11 @@ static int veml6075_request_measurement(struct veml6075_data *data)* time for all possible configurations. Using a 1.50 factor simplifies * operations and ensures reliability under all circumstances. */ - int_time = veml6075_it_ms[FIELD_GET (VEML6075_CONF_IT , conf)]; + int_index =FIELD_GET (VEML6075_CONF_IT , conf); +if (int_index >=ARRAY_SIZE (veml6075_it_ms)) +return -EINVAL ; + + int_time = veml6075_it_ms[int_index];msleep (int_time + (int_time /2 ));/* shutdown again, data registers are still accessible */
drivers/infiniband/hw/bnxt_re/ib_verbs.c +1 -1
@@ -4375,7 +4375,7 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *ctx, struct ib_udata *udata) uctx->rdev = rdev; - uctx->shpg = (void *)__get_free_page (GFP_KERNEL ); + uctx->shpg = (void *)get_zeroed_page (GFP_KERNEL );if (!uctx->shpg) { rc = -ENOMEM ; goto fail;
drivers/media/test-drivers/vidtv/vidtv_mux.c +7 -1
@@ -101,7 +101,8 @@ static int vidtv_mux_pid_ctx_init(struct vidtv_mux *m)/* add a ctx for all PMT sections */ while (p) { pid =vidtv_psi_get_pat_program_pid (p); -vidtv_mux_create_pid_ctx_once (m, pid); +if (!vidtv_mux_create_pid_ctx_once (m, pid)) + goto free; p = p->next; }
@@ -170,6 +171,9 @@ static u32 vidtv_mux_push_si(struct vidtv_mux *m) nit_ctx =vidtv_mux_get_pid_ctx (m,VIDTV_NIT_PID ); eit_ctx =vidtv_mux_get_pid_ctx (m,VIDTV_EIT_PID ); +if (!pat_ctx || !sdt_ctx || !nit_ctx || !eit_ctx) +return 0 ; + pat_args.offset = m->mux_buf_offset; pat_args.continuity_counter = &pat_ctx->cc;
@@ -186,6 +190,8 @@ static u32 vidtv_mux_push_si(struct vidtv_mux *m) } pmt_ctx =vidtv_mux_get_pid_ctx (m, pmt_pid); +if (!pmt_ctx) +continue ; pmt_args.offset = m->mux_buf_offset; pmt_args.pmt = m->si.pmt_secs[i];
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +4 -4
@@ -213,8 +213,8 @@ static void rmnet_dellink(struct net_device *dev, struct list_head *head) ep =rmnet_get_endpoint (real_port, mux_id);if (ep) {hlist_del_init_rcu (&ep->hlnode); -rmnet_vnd_dellink (mux_id, real_port, ep); -kfree (ep); + real_port->nr_rmnet_devs--; +kfree_rcu (ep, rcu); }netdev_upper_dev_unlink (real_dev, dev);
@@ -238,9 +238,9 @@ static void rmnet_force_unassociate_device(struct net_device *real_dev)hash_for_each_safe (port->muxed_ep, bkt_ep, tmp_ep, ep, hlnode) {unregister_netdevice_queue (ep->egress_dev, &list);netdev_upper_dev_unlink (real_dev, ep->egress_dev); -rmnet_vnd_dellink (ep->mux_id, port, ep);hlist_del_init_rcu (&ep->hlnode); -kfree (ep); + port->nr_rmnet_devs--; +kfree_rcu (ep, rcu); }rmnet_unregister_real_device (real_dev);unregister_netdevice_many (&list);
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h +1 -0
@@ -18,6 +18,7 @@ struct rmnet_endpoint {u8 mux_id;struct net_device *egress_dev;struct hlist_node hlnode; +struct rcu_head rcu; };struct rmnet_egress_agg_params {
drivers/net/net_failover.c +6 -6
@@ -502,7 +502,7 @@ static int net_failover_slave_register(struct net_device *slave_dev,/* Align MTU of slave with failover dev */ orig_mtu = slave_dev->mtu; - err =dev_set_mtu (slave_dev, failover_dev->mtu); + err =netif_set_mtu (slave_dev, failover_dev->mtu);if (err) {netdev_err (failover_dev,"unable to change mtu of %s to %u register failed\n" , slave_dev->name, failover_dev->mtu);
@@ -512,11 +512,11 @@ static int net_failover_slave_register(struct net_device *slave_dev,dev_hold (slave_dev);if (netif_running (failover_dev)) { - err =dev_open (slave_dev,NULL ); + err =netif_open (slave_dev,NULL );if (err && (err != -EBUSY )) {netdev_err (failover_dev,"Opening slave %s failed err:%d\n" , slave_dev->name, err); - goto err_dev_open; + goto err_netif_open; } }
@@ -562,10 +562,10 @@ static int net_failover_slave_register(struct net_device *slave_dev, err_vlan_add:dev_uc_unsync (slave_dev, failover_dev);dev_mc_unsync (slave_dev, failover_dev); -dev_close (slave_dev); -err_dev_open: +netif_close (slave_dev); +err_netif_open:dev_put (slave_dev); -dev_set_mtu (slave_dev, orig_mtu); +netif_set_mtu (slave_dev, orig_mtu); done:return err; }
drivers/tty/serial/8250/8250_dw.c +3 -1
@@ -850,8 +850,10 @@ static int dw8250_probe(struct platform_device *pdev)*/ if (data->clk) { err =clk_notifier_register (data->clk, &data->clk_notifier); -if (err) +if (err) { +serial8250_unregister_port (data->data.line);return dev_err_probe (dev, err,"Failed to set the clock notifier\n" ); + }queue_work (system_dfl_wq, &data->clk_work); }
drivers/tty/serial/qcom_geni_serial.c +3 -6
@@ -904,12 +904,9 @@ static void qcom_geni_serial_handle_rx_dma(struct uart_port *uport, bool drop) port->rx_dma_addr =0 ; rx_in =readl (uport->membase +SE_DMA_RX_LEN_IN ); -if (!rx_in) { -dev_warn (uport->dev,"serial engine reports 0 RX bytes in!\n" ); -return ; - } - -if (!drop) +if (!rx_in) +dev_warn_ratelimited (uport->dev,"serial engine reports 0 RX bytes in!\n" ); +else if (!drop)handle_rx_uart (uport, rx_in); ret = geni_se_rx_dma_prep(&port->se, port->rx_buf,
drivers/tty/vt/vc_screen.c +1 -1
@@ -686,7 +686,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) } *ppos += written; ret = written; -if (written) +if (written && vc)vcs_scr_updated (vc);return ret;
fs/fuse/dev.c +5 -14
@@ -1037,6 +1037,10 @@ static int fuse_try_move_folio(struct fuse_copy_state *cs, struct folio **foliopif (WARN_ON (folio_test_mlocked (oldfolio))) goto out_fallback_unlock; + err =lock_request (cs->req); +if (err) + goto out_fallback_unlock; +replace_page_cache_folio (oldfolio, newfolio);folio_get (newfolio);
@@ -1050,20 +1054,7 @@ static int fuse_try_move_folio(struct fuse_copy_state *cs, struct folio **foliop*/ pipe_buf_release (cs->pipe, buf); - err =0 ; -spin_lock (&cs->req->waitq.lock); -if (test_bit (FR_ABORTED , &cs->req->flags)) - err = -ENOENT ; -else - *foliop = newfolio; -spin_unlock (&cs->req->waitq.lock); - -if (err) { -folio_unlock (newfolio); -folio_put (newfolio); - goto out_put_old; - } - + *foliop = newfolio;folio_unlock (oldfolio);/* Drop ref for ap->pages[] array */ folio_put (oldfolio);
fs/fuse/file.c +7 -1
@@ -374,8 +374,14 @@ void fuse_file_release(struct inode *inode, struct fuse_file *ff,* aio and closes the fd before the aio completes. Since aio takes its * own ref to the file, the IO completion has to drop the ref, which is * how the fuse server can end up closing its clients' files. +* +* Exception is virtio-fs, which is not affected by the above (server is +* on host, cannot close open files in guest). Virtio-fs needs sync +* release, because the num_waiting mechanism to wait for all requests +* before commencing with fs shutdown doesn't work if submounts are +* used. */ -fuse_file_put (ff, false); +fuse_file_put (ff, ff->fm->fc->auto_submounts); }void fuse_release_common (struct file *file,bool isdir)
fs/lockd/svc4proc.c +10 -3
@@ -26,6 +26,8 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,struct nlm_host *host =NULL ;struct nlm_file *file =NULL ;struct nlm_lock *lock = &argp->lock; +bool is_test = (rqstp->rq_proc ==NLMPROC_TEST || + rqstp->rq_proc ==NLMPROC_TEST_MSG );__be32 error =0 ;/* nfsd callbacks must have been installed for this procedure */
@@ -46,15 +48,20 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,if (filp !=NULL ) {int mode =lock_to_openmode (&lock->fl); +if (is_test) + mode =O_RDWR ; + lock->fl.c.flc_flags =FL_POSIX ; - error =nlm_lookup_file (rqstp, &file, lock); + error =nlm_lookup_file (rqstp, &file, lock, mode);if (error) goto no_locks; *filp = file; -/* Set up the missing parts of the file_lock structure */ - lock->fl.c.flc_file = file->f_file[mode]; +if (is_test) + lock->fl.c.flc_file =nlmsvc_file_file (file); +else + lock->fl.c.flc_file = file->f_file[mode]; lock->fl.c.flc_pid = current->tgid; lock->fl.fl_start = (loff_t )lock->lock_start; lock->fl.fl_end = lock->lock_len ?
fs/lockd/svclock.c +1 -3
@@ -619,7 +619,6 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file, struct nlm_lock *conflock) {int error; -int mode;__be32 ret; dprintk("lockd: nlmsvc_testlock(%s/%ld, ty=%d, %Ld-%Ld)\n",
@@ -637,14 +636,13 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file, goto out; } - mode =lock_to_openmode (&lock->fl);locks_init_lock (&conflock->fl);/* vfs_test_lock only uses start, end, and owner, but tests flc_file */ conflock->fl.c.flc_file = lock->fl.c.flc_file; conflock->fl.fl_start = lock->fl.fl_start; conflock->fl.fl_end = lock->fl.fl_end; conflock->fl.c.flc_owner = lock->fl.c.flc_owner; - error =vfs_test_lock (file->f_file[mode], &conflock->fl); + error =vfs_test_lock (lock->fl.c.flc_file, &conflock->fl);if (error) { ret = nlm_lck_denied_nolocks; goto out;
fs/lockd/svcproc.c +12 -3
@@ -55,6 +55,8 @@ nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,struct nlm_host *host =NULL ;struct nlm_file *file =NULL ;struct nlm_lock *lock = &argp->lock; +bool is_test = (rqstp->rq_proc ==NLMPROC_TEST || + rqstp->rq_proc ==NLMPROC_TEST_MSG );int mode;__be32 error =0 ;
@@ -70,15 +72,22 @@ nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,/* Obtain file pointer. Not used by FREE_ALL call. */ if (filp !=NULL ) { - error =cast_status (nlm_lookup_file (rqstp, &file, lock)); + mode =lock_to_openmode (&lock->fl); + +if (is_test) + mode =O_RDWR ; + + error =cast_status (nlm_lookup_file (rqstp, &file, lock, mode));if (error !=0 ) goto no_locks; *filp = file;/* Set up the missing parts of the file_lock structure */ - mode =lock_to_openmode (&lock->fl); lock->fl.c.flc_flags =FL_POSIX ; - lock->fl.c.flc_file = file->f_file[mode]; +if (is_test) + lock->fl.c.flc_file =nlmsvc_file_file (file); +else + lock->fl.c.flc_file = file->f_file[mode]; lock->fl.c.flc_pid = current->tgid; lock->fl.fl_lmops = &nlmsvc_lock_operations;nlmsvc_locks_init_private (&lock->fl, host, (pid_t )lock->svid);
fs/lockd/svcsubs.c +25 -10
@@ -82,18 +82,35 @@ int lock_to_openmode(struct file_lock *lock)* * We have to make sure we have the right credential to open * the file. +* +* mode can be O_RDONLY(0), O_WRONLY(1) or O_RDWR(2). The latter +* means success can be achieved with EITHER O_RDONLY or O_WRONLY. +* It does NOT mean both read and write are required. */ static __be32 nlm_do_fopen (struct svc_rqst *rqstp,struct nlm_file *file,int mode) { -struct file **fp = &file->f_file[mode]; -__be32 nfserr; +__be32 nfserr = nlm_lck_denied_nolocks; +__be32 deferred =0 ; +struct file **fp; +int m; -if (*fp) -return 0 ; - nfserr = nlmsvc_ops->fopen (rqstp, &file->f_handle, fp, mode); -if (nfserr) -dprintk ("lockd: open failed (error %d)\n" , nfserr); +for (m =O_RDONLY ; m <=O_WRONLY ; m++) { +if (mode !=O_RDWR && mode != m) +continue ; + + fp = &file->f_file[m]; +if (*fp) +return 0 ; + nfserr = nlmsvc_ops->fopen (rqstp, &file->f_handle, fp, m); +if (!nfserr) +return 0 ; +if (nfserr == nlm_drop_reply) + deferred = nfserr; + } +if (deferred) +return deferred; +dprintk ("lockd: open failed (error %d)\n" ,ntohl (nfserr));return nfserr; }
@@ -103,17 +120,15 @@ static __be32 nlm_do_fopen(struct svc_rqst *rqstp,*/ __be32 nlm_lookup_file (struct svc_rqst *rqstp,struct nlm_file **result, -struct nlm_lock *lock) +struct nlm_lock *lock,int mode) {struct nlm_file *file;unsigned int hash;__be32 nfserr; -int mode;nlm_debug_print_fh ("nlm_lookup_file" , &lock->fh); hash =file_hash (&lock->fh); - mode =lock_to_openmode (&lock->fl);/* Lock file table */ mutex_lock (&nlm_file_mutex);
fs/nfsd/export.c +9 -54
105 lines not on this page · raw message
fs/nfsd/export.h +2 -5
@@ -7,7 +7,6 @@#include <linux/sunrpc/cache.h> #include <linux/percpu_counter.h> -#include <linux/workqueue.h> #include <uapi/linux/nfsd/export.h> #include <linux/nfs4.h>
@@ -76,7 +75,7 @@ struct svc_export {u32 ex_layout_types;struct nfsd4_deviceid_map *ex_devid_map;struct cache_detail *cd; -struct rcu_work ex_rwork; +struct rcu_head ex_rcu;unsigned long ex_xprtsec_modes;struct export_stats *ex_stats; };
@@ -93,7 +92,7 @@ struct svc_expkey {u32 ek_fsid[6 ];struct path ek_path; -struct rcu_work ek_rwork; +struct rcu_head ek_rcu; };#define EX_ISSYNC (exp) (!((exp)->ex_flags & NFSEXP_ASYNC))
@@ -111,8 +110,6 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp,/* * Function declarations */ -int nfsd_export_wq_init (void ); -void nfsd_export_wq_shutdown (void );int nfsd_export_init (struct net *);void nfsd_export_shutdown (struct net *);void nfsd_export_flush (struct net *);
fs/nfsd/nfsctl.c +1 -7
@@ -2269,12 +2269,9 @@ static int __init init_nfsd(void)if (retval) goto out_free_pnfs;nfsd_lockd_init ();/* lockd->nfsd callbacks */ - retval =nfsd_export_wq_init (); -if (retval) - goto out_free_lockd; retval =register_pernet_subsys (&nfsd_net_ops);if (retval <0 ) - goto out_free_export_wq; + goto out_free_lockd; retval =register_cld_notifier ();if (retval) goto out_free_subsys;
@@ -2303,8 +2300,6 @@ static int __init init_nfsd(void)unregister_cld_notifier (); out_free_subsys:unregister_pernet_subsys (&nfsd_net_ops); -out_free_export_wq: -nfsd_export_wq_shutdown (); out_free_lockd:nfsd_lockd_shutdown ();nfsd_drc_slab_free ();
@@ -2325,7 +2320,6 @@ static void __exit exit_nfsd(void)nfsd4_destroy_laundry_wq ();unregister_cld_notifier ();unregister_pernet_subsys (&nfsd_net_ops); -nfsd_export_wq_shutdown ();nfsd_drc_slab_free ();nfsd_lockd_shutdown ();nfsd4_free_slabs ();
fs/smb/server/smb2pdu.c +5 -0
@@ -614,6 +614,11 @@ int smb2_check_user_session(struct ksmbd_work *work) sess_id, work->sess->id);return -EINVAL ; } +if (work->sess->state !=SMB2_SESSION_VALID ) { +pr_err ("compound request on a non-valid session (state %d)\n" , + work->sess->state); +return -EINVAL ; + }return 1 ; }
include/linux/irq-entry-common.h +0 -8
@@ -236,14 +236,6 @@ static __always_inline void __exit_to_user_mode_validate(void)lockdep_sys_exit (); } -/* Temporary workaround to keep ARM64 alive */ -static __always_inline void exit_to_user_mode_prepare_legacy(struct pt_regs *regs) -{ -__exit_to_user_mode_prepare (regs); -rseq_exit_to_user_mode_legacy (); -__exit_to_user_mode_validate (); -} -/** * syscall_exit_to_user_mode_prepare - call exit_to_user_mode_loop() if required * @regs: Pointer to pt_regs on entry stack
include/linux/lockd/lockd.h +1 -1
@@ -294,7 +294,7 @@ void nlmsvc_locks_init_private(struct file_lock *, struct nlm_host *, pid_t);* File handling for the server personality */ __be32 nlm_lookup_file (struct svc_rqst *,struct nlm_file **, -struct nlm_lock *); +struct nlm_lock *,int );void nlm_release_file (struct nlm_file *);void nlmsvc_put_lockowner (struct nlm_lockowner *);void nlmsvc_release_lockowner (struct nlm_lock *);
include/linux/rseq_entry.h +0 -19
@@ -740,24 +740,6 @@ static __always_inline void rseq_irqentry_exit_to_user_mode(void) ev->events =0 ; } -/* Required to keep ARM64 working */ -static __always_inline void rseq_exit_to_user_mode_legacy(void) -{ -struct rseq_event *ev = ¤t->rseq.event; - -rseq_stat_inc (rseq_stats.exit); - -if (static_branch_unlikely (&rseq_debug_enabled)) -WARN_ON_ONCE (ev->sched_switch); - -/* -* Ensure that event (especially user_irq) is cleared when the -* interrupt did not result in a schedule and therefore the -* rseq processing did not clear it. -*/ - ev->events =0 ; -} -void __rseq_debug_syscall_return (struct pt_regs *regs); static __always_inline void rseq_debug_syscall_return(struct pt_regs *regs)
@@ -773,7 +755,6 @@ static inline bool rseq_exit_to_user_mode_restart(struct pt_regs *regs, unsigned }static inline void rseq_syscall_exit_to_user_mode (void ) { }static inline void rseq_irqentry_exit_to_user_mode (void ) { } -static inline void rseq_exit_to_user_mode_legacy (void ) { }static inline void rseq_debug_syscall_return (struct pt_regs *regs) { }static inline bool rseq_grant_slice_extension (bool work_pending) {return false; }#endif /* !CONFIG_RSEQ */
include/net/rose.h +12 -0
@@ -160,6 +160,18 @@ static inline void rose_neigh_hold(struct rose_neigh *rose_neigh)static inline void rose_neigh_put (struct rose_neigh *rose_neigh) {if (refcount_dec_and_test (&rose_neigh->use)) { +/* We are dropping the last reference, so we are about to free the +* neighbour. Its timers may still be armed -- t0timer in particular +* re-arms itself in rose_t0timer_expiry(). rose_remove_neigh() +* cancels them before its own put, but callers that drop the final +* reference without first calling rose_remove_neigh() (the socket +* heartbeat reaping path) would otherwise kfree() a neighbour with a +* live timer -> use-after-free. timer_delete_sync() (not the async +* variant) is required: it waits out a concurrently running handler +* and loops until the self-rearming timer stays stopped. +*/ +timer_delete_sync (&rose_neigh->ftimer); +timer_delete_sync (&rose_neigh->t0timer);if (rose_neigh->ax25)ax25_cb_put (rose_neigh->ax25);kfree (rose_neigh->digipeat);
io_uring/net.c +18 -18
@@ -1775,7 +1775,7 @@ int io_socket(struct io_kiocb *req, unsigned int issue_flags)int io_connect_prep (struct io_kiocb *req,const struct io_uring_sqe *sqe) { struct io_connect *conn = io_kiocb_to_cmd(req, struct io_connect); -struct io_async_msghdr *io; +struct sockaddr_storage *addr;if (sqe->len || sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in)return -EINVAL ;
@@ -1784,17 +1784,17 @@ int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) conn->addr_len =READ_ONCE (sqe->addr2); conn->in_progress = conn->seen_econnaborted = false; - io =io_msg_alloc_async (req); -if (unlikely (!io)) + addr =io_uring_alloc_async_data (NULL , req); +if (unlikely (!addr))return -ENOMEM ; -return move_addr_to_kernel (conn->addr, conn->addr_len, &io->addr); +return move_addr_to_kernel (conn->addr, conn->addr_len, addr); }int io_connect (struct io_kiocb *req,unsigned int issue_flags) { struct io_connect *connect = io_kiocb_to_cmd(req, struct io_connect); -struct io_async_msghdr *io = req->async_data; +struct sockaddr_storage *addr = req->async_data;unsigned file_flags;int ret;bool force_nonblock = issue_flags &IO_URING_F_NONBLOCK ;
@@ -1808,8 +1808,7 @@ int io_connect(struct io_kiocb *req, unsigned int issue_flags) file_flags = force_nonblock ?O_NONBLOCK :0 ; - ret =__sys_connect_file (req->file, &io->addr, connect->addr_len, - file_flags); + ret =__sys_connect_file (req->file, addr, connect->addr_len, file_flags);if ((ret == -EAGAIN || ret == -EINPROGRESS || ret == -ECONNABORTED ) && force_nonblock) {if (ret == -EINPROGRESS ) {
@@ -1838,7 +1837,6 @@ int io_connect(struct io_kiocb *req, unsigned int issue_flags) out:if (ret <0 )req_set_fail (req); -io_req_msg_cleanup (req, issue_flags);io_req_set_res (req, ret,0 );return IOU_COMPLETE ; }
@@ -1848,15 +1846,15 @@ int io_connect(struct io_kiocb *req, unsigned int issue_flags)* which in turn end up in mnt_want_write() which will grab the fs * percpu start write sem. This can trigger a lockdep warning. */ -static int io_bind_file_create (const struct io_async_msghdr *io,int addr_len) +static int io_bind_file_create (const struct sockaddr_storage *addr,int addr_len) {const struct sockaddr_un *sun; -if (io->addr.ss_family !=AF_UNIX ) +if (addr->ss_family !=AF_UNIX )return 0 ;if (addr_len <= offsetof(struct sockaddr_un , sun_path))return 0 ; - sun = (const struct sockaddr_un *) &io->addr; + sun = (const struct sockaddr_un *) addr;return sun->sun_path[0 ] !='\0' ; }
@@ -1864,7 +1862,7 @@ int io_bind_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_bind *bind = io_kiocb_to_cmd(req, struct io_bind);struct sockaddr __user *uaddr; -struct io_async_msghdr *io; +struct sockaddr_storage *addr;int ret;if (sqe->len || sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in)
@@ -1873,21 +1871,23 @@ int io_bind_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) uaddr =u64_to_user_ptr (READ_ONCE (sqe->addr)); bind->addr_len =READ_ONCE (sqe->addr2); - io =io_msg_alloc_async (req); -if (unlikely (!io)) + addr =io_uring_alloc_async_data (NULL , req); +if (unlikely (!addr))return -ENOMEM ; - ret =move_addr_to_kernel (uaddr, bind->addr_len, &io->addr); + + ret =move_addr_to_kernel (uaddr, bind->addr_len, addr);if (unlikely (ret))return ret; -if (io_bind_file_create (io, bind->addr_len)) +if (io_bind_file_create (addr, bind->addr_len)) req->flags |=REQ_F_FORCE_ASYNC ;return 0 ; } +int io_bind (struct io_kiocb *req,unsigned int issue_flags) { struct io_bind *bind = io_kiocb_to_cmd(req, struct io_bind); -struct io_async_msghdr *io = req->async_data; +struct sockaddr_storage *addr = req->async_data;struct socket *sock;int ret;
@@ -1895,7 +1895,7 @@ int io_bind(struct io_kiocb *req, unsigned int issue_flags)if (unlikely (!sock))return -ENOTSOCK ; - ret =__sys_bind_socket (sock, &io->addr, bind->addr_len); + ret =__sys_bind_socket (sock, addr, bind->addr_len);if (ret <0 )req_set_fail (req);io_req_set_res (req, ret,0 );
io_uring/opdef.c +2 -2
@@ -207,7 +207,7 @@ const struct io_issue_def io_issue_defs[] = { .unbound_nonreg_file = 1, .pollout = 1,#if defined(CONFIG_NET ) - .async_size = sizeof(struct io_async_msghdr), + .async_size = sizeof(struct sockaddr_storage), .prep = io_connect_prep, .issue = io_connect,#else
@@ -510,7 +510,7 @@ const struct io_issue_def io_issue_defs[] = { .needs_file = 1, .prep = io_bind_prep, .issue = io_bind, - .async_size = sizeof(struct io_async_msghdr), + .async_size = sizeof(struct sockaddr_storage), #else .prep = io_eopnotsupp_prep,#endif
net/core/bpf_sk_storage.c +7 -6
@@ -172,7 +172,7 @@ int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk)struct bpf_map *map; smap =rcu_dereference (SDATA (selem)->smap); -if (!(smap->map.map_flags &BPF_F_CLONE )) +if (!smap || !(smap->map.map_flags &BPF_F_CLONE ))continue ;/* Note that for lockless listeners adding new element
@@ -534,10 +534,10 @@ bpf_sk_storage_diag_alloc(const struct nlattr *nla_stgs) }EXPORT_SYMBOL_GPL (bpf_sk_storage_diag_alloc); -static int diag_get (struct bpf_local_storage_data *sdata,struct sk_buff *skb) +static int diag_get (struct bpf_local_storage_map *smap, +struct bpf_local_storage_data *sdata,struct sk_buff *skb) {struct nlattr *nla_stg, *nla_value; -struct bpf_local_storage_map *smap;/* It cannot exceed max nlattr's payload */ BUILD_BUG_ON (U16_MAX -NLA_HDRLEN <BPF_LOCAL_STORAGE_MAX_VALUE_SIZE );
@@ -546,7 +546,6 @@ static int diag_get(struct bpf_local_storage_data *sdata, struct sk_buff *skb)if (!nla_stg)return -EMSGSIZE ; - smap =rcu_dereference (sdata->smap);if (nla_put_u32 (skb,SK_DIAG_BPF_STORAGE_MAP_ID , smap->map.id)) goto errout;
@@ -599,9 +598,11 @@ static int bpf_sk_storage_diag_put_all(struct sock *sk, struct sk_buff *skb, saved_len = skb->len;hlist_for_each_entry_rcu (selem, &sk_storage->list, snode) { smap =rcu_dereference (SDATA (selem)->smap); +if (!smap) +continue ; diag_size +=nla_value_size (smap->map.value_size); -if (nla_stgs &&diag_get (SDATA (selem), skb)) +if (nla_stgs &&diag_get (smap,SDATA (selem), skb))/* Continue to learn diag_size */ err = -EMSGSIZE ; }
@@ -668,7 +669,7 @@ int bpf_sk_storage_diag_put(struct bpf_sk_storage_diag *diag, diag_size +=nla_value_size (diag->maps[i]->value_size); -if (nla_stgs &&diag_get (sdata, skb)) +if (nla_stgs &&diag_get ((struct bpf_local_storage_map *)diag->maps[i], sdata, skb))/* Continue to learn diag_size */ err = -EMSGSIZE ; }
net/core/dev.c +1 -0
@@ -1731,6 +1731,7 @@ int netif_open(struct net_device *dev, struct netlink_ext_ack *extack)return ret; } +EXPORT_SYMBOL (netif_open);static void __dev_close_many (struct list_head *head) {
net/core/failover.c +5 -1
@@ -12,6 +12,7 @@#include <uapi/linux/if_arp.h> #include <linux/rtnetlink.h> #include <linux/if_vlan.h> +#include <net/netdev_lock.h> #include <net/failover.h> static LIST_HEAD (failover_list);
@@ -221,8 +222,11 @@ failover_existing_slave_register(struct net_device *failover_dev)for_each_netdev (net, dev) {if (netif_is_failover (dev))continue ; -if (ether_addr_equal (failover_dev->perm_addr, dev->perm_addr)) +if (ether_addr_equal (failover_dev->perm_addr, dev->perm_addr)) { +netdev_lock_ops (dev);failover_slave_register (dev); +netdev_unlock_ops (dev); + } }rtnl_unlock (); }
net/rose/af_rose.c +40 -9
97 lines not on this page · raw message
net/rose/rose_in.c +6 -0
@@ -57,6 +57,7 @@ static int rose_state1_machine(struct sock *sk, struct sk_buff *skb, int frametyrose_write_internal (sk,ROSE_CLEAR_CONFIRMATION );rose_disconnect (sk,ECONNREFUSED , skb->data[3 ], skb->data[4 ]);rose_neigh_put (rose->neighbour); + rose->neighbour =NULL ;break ;default :
@@ -80,11 +81,13 @@ static int rose_state2_machine(struct sock *sk, struct sk_buff *skb, int frametyrose_write_internal (sk,ROSE_CLEAR_CONFIRMATION );rose_disconnect (sk,0 , skb->data[3 ], skb->data[4 ]);rose_neigh_put (rose->neighbour); + rose->neighbour =NULL ;break ;case ROSE_CLEAR_CONFIRMATION :rose_disconnect (sk,0 ,-1 ,-1 );rose_neigh_put (rose->neighbour); + rose->neighbour =NULL ;break ;default :
@@ -122,6 +125,7 @@ static int rose_state3_machine(struct sock *sk, struct sk_buff *skb, int frametyrose_write_internal (sk,ROSE_CLEAR_CONFIRMATION );rose_disconnect (sk,0 , skb->data[3 ], skb->data[4 ]);rose_neigh_put (rose->neighbour); + rose->neighbour =NULL ;break ;case ROSE_RR :
@@ -235,6 +239,7 @@ static int rose_state4_machine(struct sock *sk, struct sk_buff *skb, int frametyrose_write_internal (sk,ROSE_CLEAR_CONFIRMATION );rose_disconnect (sk,0 , skb->data[3 ], skb->data[4 ]);rose_neigh_put (rose->neighbour); + rose->neighbour =NULL ;break ;default :
@@ -255,6 +260,7 @@ static int rose_state5_machine(struct sock *sk, struct sk_buff *skb, int frametyrose_write_internal (sk,ROSE_CLEAR_CONFIRMATION );rose_disconnect (sk,0 , skb->data[3 ], skb->data[4 ]);rose_neigh_put (rose_sk (sk)->neighbour); +rose_sk (sk)->neighbour =NULL ; }return 0 ;
net/rose/rose_loopback.c +45 -16
105 lines not on this page · raw message
net/rose/rose_timer.c +78 -5
103 lines not on this page · raw message