Linux 6.6.74
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.74 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/x86/include/asm/special_insns.h | 2 arch/x86/xen/xen-asm.S | 2 block/blk-sysfs.c | 6 - block/genhd.c | 9 - drivers/acpi/resource.c | 6 - drivers/block/zram/zram_drv.c | 1 drivers/gpio/gpio-xilinx.c | 32 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 45 --------- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 drivers/gpu/drm/i915/display/intel_fb.c | 2 drivers/gpu/drm/nouveau/nouveau_fence.c | 6 - drivers/gpu/drm/v3d/v3d_irq.c | 4 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 3 drivers/gpu/drm/vmwgfx/vmwgfx_bo.h | 3 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 7 - drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 1 drivers/gpu/drm/vmwgfx/vmwgfx_shader.c | 7 - drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 5 - drivers/hwmon/tmp513.c | 7 - drivers/i2c/busses/i2c-rcar.c | 20 +++- drivers/i2c/i2c-atr.c | 2 drivers/i2c/muxes/i2c-demux-pinctrl.c | 4 drivers/iio/imu/inv_icm42600/inv_icm42600.h | 1 drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 11 ++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 drivers/infiniband/hw/bnxt_re/ib_verbs.h | 4 drivers/infiniband/hw/bnxt_re/qplib_fp.c | 1 drivers/infiniband/hw/bnxt_re/qplib_fp.h | 1 drivers/irqchip/irq-gic-v3-its.c | 2 drivers/irqchip/irq-gic-v3.c | 2 drivers/irqchip/irqchip.c | 4 drivers/mtd/spi-nor/core.c | 2 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 19 --- drivers/net/ethernet/freescale/fec_main.c | 19 ++- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 22 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c | 12 +- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c | 11 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c | 4 drivers/net/ethernet/netronome/nfp/bpf/offload.c | 3 drivers/net/ethernet/ti/cpsw_ale.c | 14 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 6 + drivers/net/gtp.c | 42 +++++--- drivers/nvme/target/io-cmd-bdev.c | 2 drivers/pci/controller/pci-host-common.c | 4 drivers/pci/probe.c | 20 ++-- drivers/pmdomain/imx/imx8mp-blk-ctrl.c | 2 drivers/ufs/core/ufshcd.c | 9 + fs/cachefiles/daemon.c | 14 +- fs/cachefiles/internal.h | 3 fs/cachefiles/security.c | 6 - fs/file.c | 1 fs/hfs/super.c | 4 fs/iomap/buffered-io.c | 2 fs/nfsd/filecache.c | 18 ++- fs/nfsd/filecache.h | 1 fs/notify/fdinfo.c | 4 fs/ocfs2/extent_map.c | 8 + fs/overlayfs/copy_up.c | 16 +-- fs/overlayfs/export.c | 49 +++++----- fs/overlayfs/namei.c | 4 fs/overlayfs/overlayfs.h | 2 fs/proc/vmcore.c | 2 fs/smb/client/connect.c | 3 include/linux/hrtimer.h | 1 include/linux/poll.h | 10 +- include/linux/pruss_driver.h | 12 +- include/net/net_namespace.h | 3 kernel/cpu.c | 2 kernel/gen_kheaders.sh | 1 kernel/time/hrtimer.c | 11 ++ mm/filemap.c | 2 net/core/filter.c | 30 +++--- net/core/net_namespace.c | 31 ++++++ net/core/pktgen.c | 6 - net/dccp/ipv6.c | 2 net/ipv6/tcp_ipv6.c | 4 net/mac802154/iface.c | 4 net/mptcp/options.c | 6 - net/mptcp/protocol.h | 9 + net/openvswitch/actions.c | 4 net/vmw_vsock/af_vsock.c | 18 +++ net/vmw_vsock/virtio_transport_common.c | 36 +++++-- net/vmw_vsock/vsock_bpf.c | 9 + sound/pci/hda/patch_realtek.c | 1 tools/testing/selftests/net/mptcp/mptcp_connect.c | 43 ++++++-- tools/testing/selftests/tc-testing/tc-tests/filters/flow.json | 4 90 files changed, 477 insertions(+), 313 deletions(-)
Amir Goldstein (3):
ovl: pass realinode to ovl_encode_real_fh() instead of realdentry
ovl: support encoding fid from inode with no alias
fs: relax assertions on failure to encode file handles
Artem Chernyshev (1):
pktgen: Avoid out-of-bounds access in get_imix_entries
Christian König (1):
drm/amdgpu: always sync the GFX pipe on ctx switch
Dan Carpenter (1):
nfp: bpf: prevent integer overflow in nfp_bpf_event_output()
Dave Airlie (1):
nouveau/fence: handle cross device fences properly
David Howells (1):
kheaders: Ignore silly-rename files
David Lechner (1):
hwmon: (tmp513) Fix division of negative numbers
Eric Dumazet (2):
net: add exit_batch_rtnl() method
gtp: use exit_batch_rtnl() method
Greg Kroah-Hartman (2):
Revert "drm/amdgpu: rework resume handling for display (v2)" Linux 6.6.74
Hans de Goede (1):
ACPI: resource: acpi_dev_irq_override(): Check DMI match last
Heiner Kallweit (1):
net: ethernet: xgbe: re-add aneg to supported features in PHY quirks
Hongguang Gao (1):
RDMA/bnxt_re: Fix to export port num to ib_query_qp
Ian Forbes (1):
drm/vmwgfx: Add new keep_resv BO param
Ilya Maximets (1):
openvswitch: fix lockup on tx to unregistering netdev with carrier
Jakub Kicinski (1):
selftests: tc-testing: reduce rshift value
Jean-Baptiste Maneyrol (1):
iio: imu: inv_icm42600: fix spi burst write not supported
Joe Hattori (1):
irqchip: Plug a OF node reference leak in platform_irqchip_probe()
Juergen Gross (2):
x86/asm: Make serialize() always_inline x86/xen: fix SLS mitigation in xen_hypercall_iret()
Kairui Song (1):
zram: fix potential UAF of zram table
Kevin Groeneveld (1):
net: fec: handle page_pool_dev_alloc_pages error
Koichiro Den (1):
hrtimers: Handle CPU state correctly on hotplug
Kuniyuki Iwashima (2):
gtp: Use for_each_netdev_rcu() in gtp_genl_dump_pdp().
gtp: Destroy device along with udp socket's netns dismantle.
Leo Stone (1):
hfs: Sanity check the root record
Leon Romanovsky (3):
net/mlx5e: Fix inversion dependency warning while enabling IPsec tunnel net/mlx5e: Rely on reqid in IPsec tunnel mode
net/mlx5e: Always start IPsec sequence number from 1
Lizhi Xu (1):
mac802154: check local interfaces before deleting sdata list
Luis Chamberlain (1):
nvmet: propagate npwg topology
MD Danish Anwar (1):
soc: ti: pruss: Fix pruss APIs
Manivannan Sadhasivam (1):
scsi: ufs: core: Honor runtime/system PM levels if set by host controller drivers
Marco Nelissen (2):
iomap: avoid avoid truncating 64-bit offset to 32 bits
filemap: avoid truncating 64-bit offset to 32 bits
Mark Zhang (1):
net/mlx5: Clear port select structure when fail to create
Max Kellermann (1):
cachefiles: Parse the "secctx" immediately
Maíra Canal (1):
drm/v3d: Ensure job pointer is set to NULL after job completion
Michal Luczaj (1):
bpf: Fix bpf_sk_select_reuseport() memory leak
Mohammed Anees (1):
ocfs2: fix deadlock in ocfs2_get_system_file_inode
Oleg Nesterov (1):
poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()
Paolo Abeni (3):
mptcp: be sure to send ack when mptcp-level window re-opens
mptcp: fix spurious wake-up on under memory pressure
selftests: mptcp: avoid spurious errors on disconnect
Patrisious Haddad (1):
net/mlx5: Fix RDMA TX steering prio
Paulo Alcantara (1):
smb: client: fix double free of TCP_Server_Info::hostname
Pratyush Yadav (1):
Revert "mtd: spi-nor: core: replace dummy buswidth from addr to data"
Rik van Riel (1):
fs/proc: fix softlockup in __read_vmcore (part 2)
Sean Anderson (2):
net: xilinx: axienet: Fix IRQ coalescing packet count overflow
gpio: xilinx: Convert gpio_lock to raw spinlock
Srinivasan Shanmugam (1):
drm/amd/display: Fix out-of-bounds access in 'dcn21_link_encoder_create'
Stefan Binding (1):
ALSA: hda/realtek: Add support for Ayaneo System using CS35L41 HDA
Stefano Garzarella (5):
vsock/bpf: return early if transport is not assigned vsock/virtio: discard packets if the transport changes vsock/virtio: cancel close work in the destructor
vsock: reset socket state when de-assigning the transport
vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]
Sudheer Kumar Doredla (1):
net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()
Terry Tritton (1):
Revert "PCI: Use preserve_config in place of pci_flags"
Tomas Krcka (1):
irqchip/gic-v3-its: Don't enable interrupts in its_irq_set_vcpu_affinity()
Tomi Valkeinen (1):
i2c: atr: Fix client detach
Ville Syrjälä (1):
drm/i915/fb: Relax clear color alignment to 64 bytes
Wang Liang (1):
net: fix data-races around sk->sk_forward_alloc
Wolfram Sang (2):
i2c: mux: demux-pinctrl: check initial mux selection, too
i2c: rcar: fix NACK handling when being a target
Xiaolei Wang (1):
pmdomain: imx8mp-blk-ctrl: add missing loop break condition
Yogesh Lal (1):
irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly
Youzhong Yang (1):
nfsd: add list_head nf_gc to struct nfsd_file
Yu Kuai (1):
block: fix uaf for flush rq while iterating tags
Zhang Kunbo (1):
fs: fix missing declaration of init_files
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 73 +SUBLEVEL = 74 EXTRAVERSION = NAME = Pinguïn Aangedreven
arch/x86/include/asm/special_insns.h +1 -1
@@ -217,7 +217,7 @@ static inline int write_user_shstk_64(u64 __user *addr, u64 val)#define nop () asm volatile ("nop") -static inline void serialize (void ) +static __always_inline void serialize(void) {/* Instruction opcode for SERIALIZE; supported in binutils >= 2.35. */ asmvolatile (".byte 0xf, 0x1, 0xe8" :::"memory" );
arch/x86/xen/xen-asm.S +1 -1
@@ -221,7 +221,7 @@ SYM_CODE_END(xen_early_idt_handler_array) push %rax mov $__HYPERVISOR_iret, %eax syscall /* Do the IRET. */ -#ifdef CONFIG_MITIGATION_SLS +#ifdef CONFIG_SLS int3 #endif .endm
block/blk-sysfs.c +2 -4
@@ -842,10 +842,8 @@ int blk_register_queue(struct gendisk *disk)* faster to shut down and is made fully functional here as * request_queues for non-existent devices never get registered. */ -if (!blk_queue_init_done (q)) { -blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q); -percpu_ref_switch_to_percpu (&q->q_usage_counter); - } +blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q); +percpu_ref_switch_to_percpu (&q->q_usage_counter);return ret;
block/genhd.c +3 -6
@@ -710,13 +710,10 @@ void del_gendisk(struct gendisk *disk)* If the disk does not own the queue, allow using passthrough requests * again. Else leave the queue frozen to fail all I/O. */ -if (!test_bit (GD_OWNS_QUEUE , &disk->state)) { -blk_queue_flag_clear (QUEUE_FLAG_INIT_DONE , q); +if (!test_bit (GD_OWNS_QUEUE , &disk->state))__blk_mq_unfreeze_queue (q, true); - }else { -if (queue_is_mq (q)) -blk_mq_exit_queue (q); - } +else if (queue_is_mq (q)) +blk_mq_exit_queue (q); }EXPORT_SYMBOL (del_gendisk);
drivers/acpi/resource.c +3 -3
@@ -680,11 +680,11 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,for (i =0 ; i <ARRAY_SIZE (override_table); i++) {const struct irq_override_cmp *entry = &override_table[i]; -if (dmi_check_system (entry->system) && - entry->irq == gsi && +if (entry->irq == gsi && entry->triggering == triggering && entry->polarity == polarity && - entry->shareable == shareable) + entry->shareable == shareable && +dmi_check_system (entry->system))return entry->override; }
drivers/block/zram/zram_drv.c +1 -0
@@ -1262,6 +1262,7 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize) zram->mem_pool =zs_create_pool (zram->disk->disk_name);if (!zram->mem_pool) {vfree (zram->table); + zram->table =NULL ;return false; }
drivers/gpio/gpio-xilinx.c +16 -16
@@ -66,7 +66,7 @@ struct xgpio_instance {DECLARE_BITMAP (state,64 );DECLARE_BITMAP (last_irq_read,64 );DECLARE_BITMAP (dir,64 ); -spinlock_t gpio_lock;/* For serializing operations */ +raw_spinlock_t gpio_lock;/* For serializing operations */ int irq;DECLARE_BITMAP (enable,64 );DECLARE_BITMAP (rising_edge,64 );
@@ -180,14 +180,14 @@ static void xgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)struct xgpio_instance *chip =gpiochip_get_data (gc);int bit =xgpio_to_bit (chip, gpio); -spin_lock_irqsave (&chip->gpio_lock, flags); +raw_spin_lock_irqsave (&chip->gpio_lock, flags);/* Write to GPIO signal and set its direction to output */ __assign_bit (bit, chip->state, val);xgpio_write_ch (chip,XGPIO_DATA_OFFSET , bit, chip->state); -spin_unlock_irqrestore (&chip->gpio_lock, flags); +raw_spin_unlock_irqrestore (&chip->gpio_lock, flags); }/**
@@ -211,7 +211,7 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,bitmap_remap (hw_mask, mask, chip->sw_map, chip->hw_map,64 );bitmap_remap (hw_bits, bits, chip->sw_map, chip->hw_map,64 ); -spin_lock_irqsave (&chip->gpio_lock, flags); +raw_spin_lock_irqsave (&chip->gpio_lock, flags);bitmap_replace (state, chip->state, hw_bits, hw_mask,64 );
@@ -219,7 +219,7 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,bitmap_copy (chip->state, state,64 ); -spin_unlock_irqrestore (&chip->gpio_lock, flags); +raw_spin_unlock_irqrestore (&chip->gpio_lock, flags); }/**
@@ -237,13 +237,13 @@ static int xgpio_dir_in(struct gpio_chip *gc, unsigned int gpio)struct xgpio_instance *chip =gpiochip_get_data (gc);int bit =xgpio_to_bit (chip, gpio); -spin_lock_irqsave (&chip->gpio_lock, flags); +raw_spin_lock_irqsave (&chip->gpio_lock, flags);/* Set the GPIO bit in shadow register and set direction as input */ __set_bit (bit, chip->dir);xgpio_write_ch (chip,XGPIO_TRI_OFFSET , bit, chip->dir); -spin_unlock_irqrestore (&chip->gpio_lock, flags); +raw_spin_unlock_irqrestore (&chip->gpio_lock, flags);return 0 ; }
@@ -266,7 +266,7 @@ static int xgpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)struct xgpio_instance *chip =gpiochip_get_data (gc);int bit =xgpio_to_bit (chip, gpio); -spin_lock_irqsave (&chip->gpio_lock, flags); +raw_spin_lock_irqsave (&chip->gpio_lock, flags);/* Write state of GPIO signal */ __assign_bit (bit, chip->state, val);
@@ -276,7 +276,7 @@ static int xgpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)__clear_bit (bit, chip->dir);xgpio_write_ch (chip,XGPIO_TRI_OFFSET , bit, chip->dir); -spin_unlock_irqrestore (&chip->gpio_lock, flags); +raw_spin_unlock_irqrestore (&chip->gpio_lock, flags);return 0 ; }
@@ -404,7 +404,7 @@ static void xgpio_irq_mask(struct irq_data *irq_data)int bit =xgpio_to_bit (chip, irq_offset);u32 mask =BIT (bit /32 ), temp; -spin_lock_irqsave (&chip->gpio_lock, flags); +raw_spin_lock_irqsave (&chip->gpio_lock, flags);__clear_bit (bit, chip->enable);
@@ -414,7 +414,7 @@ static void xgpio_irq_mask(struct irq_data *irq_data) temp &= ~mask;xgpio_writereg (chip->regs +XGPIO_IPIER_OFFSET , temp); } -spin_unlock_irqrestore (&chip->gpio_lock, flags); +raw_spin_unlock_irqrestore (&chip->gpio_lock, flags);gpiochip_disable_irq (&chip->gc, irq_offset); }
@@ -434,7 +434,7 @@ static void xgpio_irq_unmask(struct irq_data *irq_data)gpiochip_enable_irq (&chip->gc, irq_offset); -spin_lock_irqsave (&chip->gpio_lock, flags); +raw_spin_lock_irqsave (&chip->gpio_lock, flags);__set_bit (bit, chip->enable);
@@ -453,7 +453,7 @@ static void xgpio_irq_unmask(struct irq_data *irq_data)xgpio_writereg (chip->regs +XGPIO_IPIER_OFFSET , val); } -spin_unlock_irqrestore (&chip->gpio_lock, flags); +raw_spin_unlock_irqrestore (&chip->gpio_lock, flags); }/**
@@ -518,7 +518,7 @@ static void xgpio_irqhandler(struct irq_desc *desc)chained_irq_enter (irqchip, desc); -spin_lock (&chip->gpio_lock); +raw_spin_lock (&chip->gpio_lock);xgpio_read_ch_all (chip,XGPIO_DATA_OFFSET , all);
@@ -535,7 +535,7 @@ static void xgpio_irqhandler(struct irq_desc *desc)bitmap_copy (chip->last_irq_read, all,64 );bitmap_or (all, rising, falling,64 ); -spin_unlock (&chip->gpio_lock); +raw_spin_unlock (&chip->gpio_lock);dev_dbg (gc->parent,"IRQ rising %*pb falling %*pb\n" ,64 , rising,64 , falling);
@@ -626,7 +626,7 @@ static int xgpio_probe(struct platform_device *pdev)bitmap_set (chip->hw_map,0 , width[0 ]);bitmap_set (chip->hw_map,32 , width[1 ]); -spin_lock_init (&chip->gpio_lock); +raw_spin_lock_init (&chip->gpio_lock); chip->gc.base =-1 ; chip->gc.ngpio =bitmap_weight (chip->hw_map,64 );
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -43
81 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +2 -2
@@ -193,8 +193,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned int num_ibs, need_ctx_switch = ring->current_ctx != fence_ctx;if (ring->funcs->emit_pipeline_sync && job && ((tmp =amdgpu_sync_get_fence (&job->explicit_sync)) || - (amdgpu_sriov_vf (adev) && need_ctx_switch) || -amdgpu_vm_need_pipeline_sync (ring, job))) { + need_ctx_switch ||amdgpu_vm_need_pipeline_sync (ring, job))) { + need_pipe_sync = true;if (tmp)
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +1 -1
@@ -1315,7 +1315,7 @@ static struct link_encoder *dcn21_link_encoder_create(kzalloc (sizeof (struct dcn21_link_encoder ),GFP_KERNEL );int link_regs_id; -if (!enc21) +if (!enc21 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs))return NULL ; link_regs_id =
drivers/gpu/drm/i915/display/intel_fb.c +1 -1
@@ -1625,7 +1625,7 @@ int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer ** arithmetic related to alignment and offset calculation. */ if (is_gen12_ccs_cc_plane (&fb->base, i)) { -if (IS_ALIGNED (fb->base.offsets[i],PAGE_SIZE )) +if (IS_ALIGNED (fb->base.offsets[i],64 ))continue ;else return -EINVAL ;
drivers/gpu/drm/nouveau/nouveau_fence.c +4 -2
@@ -386,11 +386,13 @@ nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan,if (f) {struct nouveau_channel *prev;bool must_wait = true; +bool local;rcu_read_lock (); prev =rcu_dereference (f->channel); -if (prev && (prev == chan || - fctx->sync (f, prev, chan) ==0 )) + local = prev && prev->cli->drm == chan->cli->drm; +if (local && (prev == chan || + fctx->sync (f, prev, chan) ==0 )) must_wait = false;rcu_read_unlock ();if (!must_wait)
drivers/gpu/drm/v3d/v3d_irq.c +4 -0
@@ -103,6 +103,7 @@ v3d_irq(int irq, void *arg)trace_v3d_bcl_irq (&v3d->drm, fence->seqno);dma_fence_signal (&fence->base); + v3d->bin_job =NULL ; status =IRQ_HANDLED ; }
@@ -112,6 +113,7 @@ v3d_irq(int irq, void *arg)trace_v3d_rcl_irq (&v3d->drm, fence->seqno);dma_fence_signal (&fence->base); + v3d->render_job =NULL ; status =IRQ_HANDLED ; }
@@ -121,6 +123,7 @@ v3d_irq(int irq, void *arg)trace_v3d_csd_irq (&v3d->drm, fence->seqno);dma_fence_signal (&fence->base); + v3d->csd_job =NULL ; status =IRQ_HANDLED ; }
@@ -157,6 +160,7 @@ v3d_hub_irq(int irq, void *arg)trace_v3d_tfu_irq (&v3d->drm, fence->seqno);dma_fence_signal (&fence->base); + v3d->tfu_job =NULL ; status =IRQ_HANDLED ; }
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +2 -1
@@ -412,7 +412,8 @@ static int vmw_bo_init(struct vmw_private *dev_priv,if (params->pin)ttm_bo_pin (&vmw_bo->tbo); -ttm_bo_unreserve (&vmw_bo->tbo); +if (!params->keep_resv) +ttm_bo_unreserve (&vmw_bo->tbo);return 0 ; }
drivers/gpu/drm/vmwgfx/vmwgfx_bo.h +2 -1
@@ -53,8 +53,9 @@ struct vmw_bo_params {u32 domain;u32 busy_domain;enum ttm_bo_type bo_type; -size_t size;bool pin; +bool keep_resv; +size_t size;struct dma_resv *resv;struct sg_table *sg; };
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +2 -5
@@ -399,7 +399,8 @@ static int vmw_dummy_query_bo_create(struct vmw_private *dev_priv) .busy_domain = VMW_BO_DOMAIN_SYS, .bo_type = ttm_bo_type_kernel, .size = PAGE_SIZE, - .pin = true + .pin = true, + .keep_resv = true, };/*
@@ -411,10 +412,6 @@ static int vmw_dummy_query_bo_create(struct vmw_private *dev_priv)if (unlikely (ret !=0 ))return ret; - ret =ttm_bo_reserve (&vbo->tbo, false, true,NULL ); -BUG_ON (ret !=0 ); -vmw_bo_pin_reserved (vbo, true); - ret =ttm_bo_kmap (&vbo->tbo,0 ,1 , &map);if (likely (ret ==0 )) { result =ttm_kmap_obj_virtual (&map, &dummy);
drivers/gpu/drm/vmwgfx/vmwgfx_gem.c +1 -0
@@ -163,6 +163,7 @@ struct drm_gem_object *vmw_prime_import_sg_table(struct drm_device *dev, .bo_type = ttm_bo_type_sg, .size = attach->dmabuf->size, .pin = false, + .keep_resv = true, .resv = attach->dmabuf->resv, .sg = table,
drivers/gpu/drm/vmwgfx/vmwgfx_shader.c +2 -5
@@ -896,7 +896,8 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv, .busy_domain = VMW_BO_DOMAIN_SYS, .bo_type = ttm_bo_type_device, .size = size, - .pin = true + .pin = true, + .keep_resv = true, };if (!vmw_shader_id_ok (user_key, shader_type))
@@ -906,10 +907,6 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv,if (unlikely (ret !=0 )) goto out; - ret =ttm_bo_reserve (&buf->tbo, false, true,NULL ); -if (unlikely (ret !=0 )) - goto no_reserve; -/* Map and copy shader bytecode. */ ret =ttm_bo_kmap (&buf->tbo,0 ,PFN_UP (size), &map);if (unlikely (ret !=0 )) {
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +2 -3
@@ -604,15 +604,14 @@ int vmw_bo_create_and_populate(struct vmw_private *dev_priv, .busy_domain = domain, .bo_type = ttm_bo_type_kernel, .size = bo_size, - .pin = true + .pin = true, + .keep_resv = true, }; ret =vmw_bo_create (dev_priv, &bo_params, &vbo);if (unlikely (ret !=0 ))return ret; - ret =ttm_bo_reserve (&vbo->tbo, false, true,NULL ); -BUG_ON (ret !=0 ); ret =vmw_ttm_populate (vbo->tbo.bdev, vbo->tbo.ttm, &ctx);if (likely (ret ==0 )) { struct vmw_ttm_tt *vmw_tt =
drivers/hwmon/tmp513.c +4 -3
@@ -203,7 +203,8 @@ static int tmp51x_get_value(struct tmp51x_data *data, u8 reg, u8 pos, *val =sign_extend32 (regval, reg ==TMP51X_SHUNT_CURRENT_RESULT ?16 -tmp51x_get_pga_shift (data) :15 ); - *val =DIV_ROUND_CLOSEST (*val *10 *MILLI , data->shunt_uohms); + *val =DIV_ROUND_CLOSEST (*val *10 * (long )MILLI , (long )data->shunt_uohms); +break ;case TMP51X_BUS_VOLTAGE_RESULT :case TMP51X_BUS_VOLTAGE_H_LIMIT :
@@ -219,7 +220,7 @@ static int tmp51x_get_value(struct tmp51x_data *data, u8 reg, u8 pos,case TMP51X_BUS_CURRENT_RESULT :// Current = (ShuntVoltage * CalibrationRegister) / 4096 *val =sign_extend32 (regval,15 ) * (long )data->curr_lsb_ua; - *val =DIV_ROUND_CLOSEST (*val,MILLI ); + *val =DIV_ROUND_CLOSEST (*val, (long )MILLI );break ;case TMP51X_LOCAL_TEMP_RESULT :case TMP51X_REMOTE_TEMP_RESULT_1 :
@@ -259,7 +260,7 @@ static int tmp51x_set_value(struct tmp51x_data *data, u8 reg, long val)* The user enter current value and we convert it to * voltage. 1lsb = 10uV */ - val =DIV_ROUND_CLOSEST (val * data->shunt_uohms,10 *MILLI ); + val =DIV_ROUND_CLOSEST (val * (long )data->shunt_uohms,10 * (long )MILLI ); max_val =U16_MAX >>tmp51x_get_pga_shift (data); regval =clamp_val (val, -max_val, max_val);break ;
drivers/i2c/busses/i2c-rcar.c +15 -5
@@ -110,6 +110,8 @@#define ID_P_PM_BLOCKED BIT(31)#define ID_P_MASK GENMASK(31, 28) +#define ID_SLAVE_NACK BIT(0) +enum rcar_i2c_type {I2C_RCAR_GEN1 ,I2C_RCAR_GEN2 ,
@@ -143,6 +145,7 @@ struct rcar_i2c_priv {int irq;struct i2c_client *host_notify_client; +u8 slave_flags; };#define rcar_i2c_priv_to_dev (p) ((p)->adap.dev.parent)
@@ -597,6 +600,7 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv) {u32 ssr_raw, ssr_filtered;u8 value; +int ret; ssr_raw =rcar_i2c_read (priv,ICSSR ) &0xff ; ssr_filtered = ssr_raw &rcar_i2c_read (priv,ICSIER );
@@ -612,7 +616,10 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)rcar_i2c_write (priv,ICRXTX , value);rcar_i2c_write (priv,ICSIER ,SDE |SSR |SAR ); }else { -i2c_slave_event (priv->slave,I2C_SLAVE_WRITE_REQUESTED , &value); + ret =i2c_slave_event (priv->slave,I2C_SLAVE_WRITE_REQUESTED , &value); +if (ret) + priv->slave_flags |=ID_SLAVE_NACK ; +rcar_i2c_read (priv,ICRXTX );/* dummy read */ rcar_i2c_write (priv,ICSIER ,SDR |SSR |SAR ); }
@@ -625,18 +632,21 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)if (ssr_filtered &SSR ) {i2c_slave_event (priv->slave,I2C_SLAVE_STOP , &value);rcar_i2c_write (priv,ICSCR ,SIE |SDBS );/* clear our NACK */ + priv->slave_flags &= ~ID_SLAVE_NACK ;rcar_i2c_write (priv,ICSIER ,SAR );rcar_i2c_write (priv,ICSSR , ~SSR &0xff ); }/* master wants to write to us */ if (ssr_filtered &SDR ) { -int ret; - value =rcar_i2c_read (priv,ICRXTX ); ret =i2c_slave_event (priv->slave,I2C_SLAVE_WRITE_RECEIVED , &value); -/* Send NACK in case of error */ -rcar_i2c_write (priv,ICSCR ,SIE |SDBS | (ret <0 ?FNA :0 )); +if (ret) + priv->slave_flags |=ID_SLAVE_NACK ; + +/* Send NACK in case of error, but it will come 1 byte late :( */ +rcar_i2c_write (priv,ICSCR ,SIE |SDBS | + (priv->slave_flags &ID_SLAVE_NACK ?FNA :0 ));rcar_i2c_write (priv,ICSSR , ~SDR &0xff ); }
drivers/i2c/i2c-atr.c +1 -1
@@ -412,7 +412,7 @@ static int i2c_atr_bus_notifier_call(struct notifier_block *nb, dev_name(dev), ret);break ; -case BUS_NOTIFY_DEL_DEVICE : +case BUS_NOTIFY_REMOVED_DEVICE :i2c_atr_detach_client (client->adapter, client);break ;
drivers/i2c/muxes/i2c-demux-pinctrl.c +3 -1
@@ -261,7 +261,9 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)pm_runtime_no_callbacks (&pdev->dev);/* switch to first parent as active master */ -i2c_demux_activate_master (priv,0 ); + err =i2c_demux_activate_master (priv,0 ); +if (err) + goto err_rollback; err =device_create_file (&pdev->dev, &dev_attr_available_masters);if (err)
drivers/iio/imu/inv_icm42600/inv_icm42600.h +1 -0
@@ -362,6 +362,7 @@ struct inv_icm42600_state {typedef int (*inv_icm42600_bus_setup )(struct inv_icm42600_state *);extern const struct regmap_config inv_icm42600_regmap_config; +extern const struct regmap_config inv_icm42600_spi_regmap_config;extern const struct dev_pm_ops inv_icm42600_pm_ops; const struct iio_mount_matrix *
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +11 -0
@@ -44,6 +44,17 @@ const struct regmap_config inv_icm42600_regmap_config = { };EXPORT_SYMBOL_NS_GPL (inv_icm42600_regmap_config,IIO_ICM42600 ); +/* define specific regmap for SPI not supporting burst write */ +const struct regmap_config inv_icm42600_spi_regmap_config = { + .reg_bits =8 , + .val_bits =8 , + .max_register =0x4FFF , + .ranges = inv_icm42600_regmap_ranges, + .num_ranges =ARRAY_SIZE (inv_icm42600_regmap_ranges), + .use_single_write = true, +}; +EXPORT_SYMBOL_NS_GPL (inv_icm42600_spi_regmap_config,IIO_ICM42600 ); +struct inv_icm42600_hw {uint8_t whoami;const char *name;
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +2 -1
@@ -59,7 +59,8 @@ static int inv_icm42600_probe(struct spi_device *spi)return -EINVAL ; chip = (uintptr_t )match; - regmap =devm_regmap_init_spi (spi, &inv_icm42600_regmap_config); +/* use SPI specific regmap */ + regmap =devm_regmap_init_spi (spi, &inv_icm42600_spi_regmap_config);if (IS_ERR (regmap))return PTR_ERR (regmap);
drivers/infiniband/hw/bnxt_re/ib_verbs.c +1 -0
@@ -2220,6 +2220,7 @@ int bnxt_re_query_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr, qp_attr->retry_cnt = qplib_qp->retry_cnt; qp_attr->rnr_retry = qplib_qp->rnr_retry; qp_attr->min_rnr_timer = qplib_qp->min_rnr_timer; + qp_attr->port_num =__to_ib_port_num (qplib_qp->port_id); qp_attr->rq_psn = qplib_qp->rq.psn; qp_attr->max_rd_atomic = qplib_qp->max_rd_atomic; qp_attr->sq_psn = qplib_qp->sq.psn;
drivers/infiniband/hw/bnxt_re/ib_verbs.h +4 -0
@@ -245,6 +245,10 @@ void bnxt_re_dealloc_ucontext(struct ib_ucontext *context);int bnxt_re_mmap (struct ib_ucontext *context,struct vm_area_struct *vma);void bnxt_re_mmap_free (struct rdma_user_mmap_entry *rdma_entry); +static inline u32 __to_ib_port_num (u16 port_id) +{ +return (u32 )port_id +1 ; +}unsigned long bnxt_re_lock_cqs (struct bnxt_re_qp *qp);void bnxt_re_unlock_cqs (struct bnxt_re_qp *qp,unsigned long flags);
drivers/infiniband/hw/bnxt_re/qplib_fp.c +1 -0
@@ -1460,6 +1460,7 @@ int bnxt_qplib_query_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) qp->dest_qpn =le32_to_cpu (sb->dest_qp_id);memcpy (qp->smac, sb->src_mac,6 ); qp->vlan_id =le16_to_cpu (sb->vlan_pcp_vlan_dei_vlan_id); + qp->port_id =le16_to_cpu (sb->port_id); bail:dma_free_coherent (&rcfw->pdev->dev, sbuf.size, sbuf.sb, sbuf.dma_addr);
drivers/infiniband/hw/bnxt_re/qplib_fp.h +1 -0
@@ -297,6 +297,7 @@ struct bnxt_qplib_qp {u32 dest_qpn;u8 smac[6 ];u16 vlan_id; +u16 port_id;u8 nw_type;struct bnxt_qplib_ah ah;
drivers/irqchip/irq-gic-v3-its.c +1 -1
@@ -1970,7 +1970,7 @@ static int its_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)if (!is_v4 (its_dev->its))return -EINVAL ; -guard (raw_spinlock_irq)(&its_dev->event_map.vlpi_lock); +guard (raw_spinlock)(&its_dev->event_map.vlpi_lock);/* Unmap request? */ if (!info)
drivers/irqchip/irq-gic-v3.c +1 -1
@@ -1460,7 +1460,7 @@ static int gic_retrigger(struct irq_data *data)static int gic_cpu_pm_notifier (struct notifier_block *self,unsigned long cmd,void *v) { -if (cmd ==CPU_PM_EXIT ) { +if (cmd ==CPU_PM_EXIT || cmd ==CPU_PM_ENTER_FAILED ) {if (gic_dist_security_disabled ())gic_enable_redist (true);gic_cpu_sys_reg_init ();
drivers/irqchip/irqchip.c +1 -3
@@ -35,11 +35,10 @@ void __init irqchip_init(void)int platform_irqchip_probe (struct platform_device *pdev) {struct device_node *np = pdev->dev.of_node; -struct device_node *par_np =of_irq_find_parent (np); + struct device_node *par_np __free(device_node) = of_irq_find_parent(np);of_irq_init_cb_t irq_init_cb =of_device_get_match_data (&pdev->dev);if (!irq_init_cb) { -of_node_put (par_np);return -EINVAL ; }
@@ -55,7 +54,6 @@ int platform_irqchip_probe(struct platform_device *pdev)* interrupt controller can check for specific domains as necessary. */ if (par_np && !irq_find_matching_host (par_np,DOMAIN_BUS_ANY )) { -of_node_put (par_np);return -EPROBE_DEFER ; }
drivers/mtd/spi-nor/core.c +1 -1
@@ -89,7 +89,7 @@ void spi_nor_spimem_setup_op(const struct spi_nor *nor, op->addr.buswidth =spi_nor_get_protocol_addr_nbits (proto);if (op->dummy.nbytes) - op->dummy.buswidth =spi_nor_get_protocol_data_nbits (proto); + op->dummy.buswidth =spi_nor_get_protocol_addr_nbits (proto);if (op->data.nbytes) op->data.buswidth =spi_nor_get_protocol_data_nbits (proto);
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +2 -17
@@ -923,7 +923,6 @@ static void xgbe_phy_free_phy_device(struct xgbe_prv_data *pdata)static bool xgbe_phy_finisar_phy_quirks (struct xgbe_prv_data *pdata) { -__ETHTOOL_DECLARE_LINK_MODE_MASK (supported) = {0 , };struct xgbe_phy_data *phy_data = pdata->phy_data;unsigned int phy_id = phy_data->phydev->phy_id;
@@ -945,14 +944,7 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)phy_write (phy_data->phydev,0x04 ,0x0d01 );phy_write (phy_data->phydev,0x00 ,0x9140 ); -linkmode_set_bit_array (phy_10_100_features_array, -ARRAY_SIZE (phy_10_100_features_array), - supported); -linkmode_set_bit_array (phy_gbit_features_array, -ARRAY_SIZE (phy_gbit_features_array), - supported); - -linkmode_copy (phy_data->phydev->supported, supported); +linkmode_copy (phy_data->phydev->supported,PHY_GBIT_FEATURES );phy_support_asym_pause (phy_data->phydev);
@@ -964,7 +956,6 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)static bool xgbe_phy_belfuse_phy_quirks (struct xgbe_prv_data *pdata) { -__ETHTOOL_DECLARE_LINK_MODE_MASK (supported) = {0 , };struct xgbe_phy_data *phy_data = pdata->phy_data;struct xgbe_sfp_eeprom *sfp_eeprom = &phy_data->sfp_eeprom;unsigned int phy_id = phy_data->phydev->phy_id;
@@ -1028,13 +1019,7 @@ static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata) reg =phy_read (phy_data->phydev,0x00 );phy_write (phy_data->phydev,0x00 , reg & ~0x00800 ); -linkmode_set_bit_array (phy_10_100_features_array, -ARRAY_SIZE (phy_10_100_features_array), - supported); -linkmode_set_bit_array (phy_gbit_features_array, -ARRAY_SIZE (phy_gbit_features_array), - supported); -linkmode_copy (phy_data->phydev->supported, supported); +linkmode_copy (phy_data->phydev->supported,PHY_GBIT_FEATURES );phy_support_asym_pause (phy_data->phydev); netif_dbg(pdata, drv, pdata->netdev,
drivers/net/ethernet/freescale/fec_main.c +14 -5
@@ -1572,19 +1572,22 @@ static void fec_enet_tx(struct net_device *ndev, int budget)fec_enet_tx_queue (ndev, i, budget); } -static void fec_enet_update_cbd (struct fec_enet_priv_rx_q *rxq, +static int fec_enet_update_cbd (struct fec_enet_priv_rx_q *rxq,struct bufdesc *bdp,int index) {struct page *new_page;dma_addr_t phys_addr; new_page =page_pool_dev_alloc_pages (rxq->page_pool); -WARN_ON (!new_page); - rxq->rx_skb_info[index].page = new_page; +if (unlikely (!new_page)) +return -ENOMEM ; + rxq->rx_skb_info[index].page = new_page; rxq->rx_skb_info[index].offset =FEC_ENET_XDP_HEADROOM ; phys_addr =page_pool_get_dma_addr (new_page) +FEC_ENET_XDP_HEADROOM ; bdp->cbd_bufaddr =cpu_to_fec32 (phys_addr); + +return 0 ; } static u32
@@ -1679,6 +1682,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)int cpu =smp_processor_id ();struct xdp_buff xdp;struct page *page; +__fec32 cbd_bufaddr;u32 sub_len =4 ;#if !defined(CONFIG_M5272 )
@@ -1743,12 +1747,17 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id) index =fec_enet_get_bd_index (bdp, &rxq->bd); page = rxq->rx_skb_info[index].page; + cbd_bufaddr = bdp->cbd_bufaddr; +if (fec_enet_update_cbd (rxq, bdp, index)) { + ndev->stats.rx_dropped++; + goto rx_processing_done; + } +dma_sync_single_for_cpu (&fep->pdev->dev, -fec32_to_cpu (bdp->cbd_bufaddr), +fec32_to_cpu (cbd_bufaddr), pkt_len,DMA_FROM_DEVICE );prefetch (page_address (page)); -fec_enet_update_cbd (rxq, bdp, index);if (xdp_prog) {xdp_buff_clear_frags_flag (&xdp);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +12 -10
@@ -719,6 +719,12 @@ static int mlx5e_xfrm_add_state(struct xfrm_state *x,/* check esn */ if (x->props.flags &XFRM_STATE_ESN )mlx5e_ipsec_update_esn_state (sa_entry); +else +/* According to RFC4303, section "3.3.3. Sequence Number Generation", +* the first packet sent using a given SA will contain a sequence +* number of 1. +*/ + sa_entry->esn_state.esn =1 ;mlx5e_ipsec_build_accel_xfrm_attrs (sa_entry, &sa_entry->attrs);
@@ -763,9 +769,12 @@ static int mlx5e_xfrm_add_state(struct xfrm_state *x, MLX5_IPSEC_RESCHED);if (x->xso.type ==XFRM_DEV_OFFLOAD_PACKET && - x->props.mode ==XFRM_MODE_TUNNEL ) -xa_set_mark (&ipsec->sadb, sa_entry->ipsec_obj_id, -MLX5E_IPSEC_TUNNEL_SA ); + x->props.mode ==XFRM_MODE_TUNNEL ) { +xa_lock_bh (&ipsec->sadb); +__xa_set_mark (&ipsec->sadb, sa_entry->ipsec_obj_id, +MLX5E_IPSEC_TUNNEL_SA ); +xa_unlock_bh (&ipsec->sadb); + } out: x->xso.offload_handle = (unsigned long )sa_entry;
@@ -792,7 +801,6 @@ static int mlx5e_xfrm_add_state(struct xfrm_state *x,static void mlx5e_xfrm_del_state (struct xfrm_state *x) {struct mlx5e_ipsec_sa_entry *sa_entry =to_ipsec_sa_entry (x); -struct mlx5_accel_esp_xfrm_attrs *attrs = &sa_entry->attrs;struct mlx5e_ipsec *ipsec = sa_entry->ipsec;struct mlx5e_ipsec_sa_entry *old;
@@ -801,12 +809,6 @@ static void mlx5e_xfrm_del_state(struct xfrm_state *x) old =xa_erase_bh (&ipsec->sadb, sa_entry->ipsec_obj_id);WARN_ON (old != sa_entry); - -if (attrs->mode ==XFRM_MODE_TUNNEL && - attrs->type ==XFRM_DEV_OFFLOAD_PACKET ) -/* Make sure that no ARP requests are running in parallel */ -flush_workqueue (ipsec->wq); - }static void mlx5e_xfrm_free_state (struct xfrm_state *x)
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c +5 -7
@@ -1442,23 +1442,21 @@ static int tx_add_rule(struct mlx5e_ipsec_sa_entry *sa_entry) goto err_alloc; } -if (attrs->family ==AF_INET ) -setup_fte_addr4 (spec, &attrs->saddr.a4, &attrs->daddr.a4); -else -setup_fte_addr6 (spec, attrs->saddr.a6, attrs->daddr.a6); -setup_fte_no_frags (spec);setup_fte_upper_proto_match (spec, &attrs->upspec);switch (attrs->type) {case XFRM_DEV_OFFLOAD_CRYPTO : +if (attrs->family ==AF_INET ) +setup_fte_addr4 (spec, &attrs->saddr.a4, &attrs->daddr.a4); +else +setup_fte_addr6 (spec, attrs->saddr.a6, attrs->daddr.a6);setup_fte_spi (spec, attrs->spi, false);setup_fte_esp (spec);setup_fte_reg_a (spec);break ;case XFRM_DEV_OFFLOAD_PACKET : -if (attrs->reqid) -setup_fte_reg_c4 (spec, attrs->reqid); +setup_fte_reg_c4 (spec, attrs->reqid); err =setup_pkt_reformat (ipsec, attrs, &flow_act);if (err) goto err_pkt_reformat;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c +8 -3
@@ -90,8 +90,9 @@ u32 mlx5_ipsec_device_caps(struct mlx5_core_dev *mdev)EXPORT_SYMBOL_GPL (mlx5_ipsec_device_caps);static void mlx5e_ipsec_packet_setup (void *obj,u32 pdn, -struct mlx5_accel_esp_xfrm_attrs *attrs) +struct mlx5e_ipsec_sa_entry *sa_entry) { +struct mlx5_accel_esp_xfrm_attrs *attrs = &sa_entry->attrs;void *aso_ctx; aso_ctx =MLX5_ADDR_OF (ipsec_obj, obj, ipsec_aso);
@@ -119,8 +120,12 @@ static void mlx5e_ipsec_packet_setup(void *obj, u32 pdn,* active. */ MLX5_SET (ipsec_obj, obj, aso_return_reg,MLX5_IPSEC_ASO_REG_C_4_5 ); -if (attrs->dir ==XFRM_DEV_OFFLOAD_OUT ) +if (attrs->dir ==XFRM_DEV_OFFLOAD_OUT ) {MLX5_SET (ipsec_aso, aso_ctx, mode,MLX5_IPSEC_ASO_INC_SN ); +if (!attrs->replay_esn.trigger) +MLX5_SET (ipsec_aso, aso_ctx, mode_parameter, + sa_entry->esn_state.esn); + }if (attrs->lft.hard_packet_limit !=XFRM_INF ) { MLX5_SET(ipsec_aso, aso_ctx, remove_flow_pkt_cnt,
@@ -173,7 +178,7 @@ static int mlx5_create_ipsec_obj(struct mlx5e_ipsec_sa_entry *sa_entry) res = &mdev->mlx5e_res.hw_objs;if (attrs->type ==XFRM_DEV_OFFLOAD_PACKET ) -mlx5e_ipsec_packet_setup (obj, res->pdn, attrs); +mlx5e_ipsec_packet_setup (obj, res->pdn, sa_entry); err =mlx5_cmd_exec (mdev, in,sizeof (in), out,sizeof (out));if (!err)
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +1 -0
@@ -2490,6 +2490,7 @@ struct mlx5_flow_namespace *mlx5_get_flow_namespace(struct mlx5_core_dev *dev,break ;case MLX5_FLOW_NAMESPACE_RDMA_TX : root_ns = steering->rdma_tx_root_ns; + prio =RDMA_TX_BYPASS_PRIO ;break ;case MLX5_FLOW_NAMESPACE_RDMA_RX_COUNTERS : root_ns = steering->rdma_rx_root_ns;
drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c +3 -1
@@ -540,7 +540,7 @@ int mlx5_lag_port_sel_create(struct mlx5_lag *ldev,set_tt_map (port_sel, hash_type); err =mlx5_lag_create_definers (ldev, hash_type, ports);if (err) -return err; + goto clear_port_sel;if (port_sel->tunnel) { err =mlx5_lag_create_inner_ttc_table (ldev);
@@ -559,6 +559,8 @@ int mlx5_lag_port_sel_create(struct mlx5_lag *ldev,mlx5_destroy_ttc_table (port_sel->inner.ttc); destroy_definers:mlx5_lag_destroy_definers (ldev); +clear_port_sel: +memset (port_sel,0 ,sizeof (*port_sel));return err; }
drivers/net/ethernet/netronome/nfp/bpf/offload.c +2 -1
@@ -458,7 +458,8 @@ int nfp_bpf_event_output(struct nfp_app_bpf *bpf, const void *data, map_id_full =be64_to_cpu (cbe->map_ptr); map_id = map_id_full; -if (len <sizeof (struct cmsg_bpf_event ) + pkt_size + data_size) +if (size_add (pkt_size, data_size) >INT_MAX || + len <sizeof (struct cmsg_bpf_event ) + pkt_size + data_size)return -EINVAL ;if (cbe->hdr.ver !=NFP_CCM_ABI_VERSION )return -EINVAL ;
drivers/net/ethernet/ti/cpsw_ale.c +7 -7
@@ -106,15 +106,15 @@ struct cpsw_ale_dev_id {static inline int cpsw_ale_get_field (u32 *ale_entry,u32 start,u32 bits) { -int idx, idx2; +int idx, idx2, index;u32 hi_val =0 ; idx = start /32 ; idx2 = (start + bits -1 ) /32 ;/* Check if bits to be fetched exceed a word */ if (idx != idx2) { - idx2 =2 - idx2;/* flip */ - hi_val = ale_entry[idx2] << ((idx2 *32 ) - start); + index =2 - idx2;/* flip */ + hi_val = ale_entry[index] << ((idx2 *32 ) - start); } start -= idx *32 ; idx =2 - idx;/* flip */
@@ -124,16 +124,16 @@ static inline int cpsw_ale_get_field(u32 *ale_entry, u32 start, u32 bits)static inline void cpsw_ale_set_field (u32 *ale_entry,u32 start,u32 bits,u32 value) { -int idx, idx2; +int idx, idx2, index; value &=BITMASK (bits); idx = start /32 ; idx2 = (start + bits -1 ) /32 ;/* Check if bits to be set exceed a word */ if (idx != idx2) { - idx2 =2 - idx2;/* flip */ - ale_entry[idx2] &= ~(BITMASK (bits + start - (idx2 *32 ))); - ale_entry[idx2] |= (value >> ((idx2 *32 ) - start)); + index =2 - idx2;/* flip */ + ale_entry[index] &= ~(BITMASK (bits + start - (idx2 *32 ))); + ale_entry[index] |= (value >> ((idx2 *32 ) - start)); } start -= idx *32 ; idx =2 - idx;/* flip */
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +6 -0
@@ -1571,6 +1571,12 @@ axienet_ethtools_set_coalesce(struct net_device *ndev,return -EFAULT ; } +if (ecoalesce->rx_max_coalesced_frames >255 || + ecoalesce->tx_max_coalesced_frames >255 ) { +NL_SET_ERR_MSG (extack,"frames must be less than 256" ); +return -EINVAL ; + } +if (ecoalesce->rx_max_coalesced_frames) lp->coalesce_count_rx = ecoalesce->rx_max_coalesced_frames;if (ecoalesce->rx_coalesce_usecs)
drivers/net/gtp.c +25 -17
79 lines not on this page · raw message
drivers/nvme/target/io-cmd-bdev.c +1 -1
@@ -36,7 +36,7 @@ void nvmet_bdev_set_limits(struct block_device *bdev, struct nvme_id_ns *id)*/ id->nsfeat |=1 <<4 ;/* NPWG = Namespace Preferred Write Granularity. 0's based */ - id->npwg = lpp0b; + id->npwg =to0based (bdev_io_min (bdev) /bdev_logical_block_size (bdev));/* NPWA = Namespace Preferred Write Alignment. 0's based */ id->npwa = id->npwg;/* NPDG = Namespace Preferred Deallocate Granularity. 0's based */
drivers/pci/controller/pci-host-common.c +4 -0
@@ -73,6 +73,10 @@ int pci_host_common_probe(struct platform_device *pdev)if (IS_ERR (cfg))return PTR_ERR (cfg); +/* Do not reassign resources if probe only */ +if (!pci_has_flag (PCI_PROBE_ONLY )) +pci_add_flags (PCI_REASSIGN_ALL_BUS ); + bridge->sysdata = cfg; bridge->ops = (struct pci_ops *)&ops->pci_ops; bridge->msi_domain = true;
drivers/pci/probe.c +11 -9
@@ -3096,18 +3096,20 @@ int pci_host_probe(struct pci_host_bridge *bridge) bus = bridge->bus; -/* If we must preserve the resource configuration, claim now */ -if (bridge->preserve_config) -pci_bus_claim_resources (bus); -/* -* Assign whatever was left unassigned. If we didn't claim above, -* this will reassign everything. +* We insert PCI resources into the iomem_resource and +* ioport_resource trees in either pci_bus_claim_resources() +* or pci_bus_assign_resources(). */ -pci_assign_unassigned_root_bus_resources (bus); +if (pci_has_flag (PCI_PROBE_ONLY )) { +pci_bus_claim_resources (bus); + }else { +pci_bus_size_bridges (bus); +pci_bus_assign_resources (bus); -list_for_each_entry (child, &bus->children, node) -pcie_bus_configure_settings (child); +list_for_each_entry (child, &bus->children, node) +pcie_bus_configure_settings (child); + }pci_bus_add_devices (bus);return 0 ;
drivers/pmdomain/imx/imx8mp-blk-ctrl.c +1 -1
@@ -767,7 +767,7 @@ static int imx8mp_blk_ctrl_remove(struct platform_device *pdev)of_genpd_del_provider (pdev->dev.of_node); -for (i =0 ; bc->onecell_data.num_domains; i++) { +for (i =0 ; i < bc->onecell_data.num_domains; i++) {struct imx8mp_blk_ctrl_domain *domain = &bc->domains[i];pm_genpd_remove (&domain->genpd);
drivers/ufs/core/ufshcd.c +6 -3
@@ -10483,14 +10483,17 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) }/* -* Set the default power management level for runtime and system PM. +* Set the default power management level for runtime and system PM if +* not set by the host controller drivers. * Default power saving mode is to keep UFS link in Hibern8 state * and UFS device in sleep state. */ - hba->rpm_lvl =ufs_get_desired_pm_lvl_for_dev_link_state ( +if (!hba->rpm_lvl) + hba->rpm_lvl =ufs_get_desired_pm_lvl_for_dev_link_state (UFS_SLEEP_PWR_MODE ,UIC_LINK_HIBERN8_STATE ); - hba->spm_lvl =ufs_get_desired_pm_lvl_for_dev_link_state ( +if (!hba->spm_lvl) + hba->spm_lvl =ufs_get_desired_pm_lvl_for_dev_link_state (UFS_SLEEP_PWR_MODE ,UIC_LINK_HIBERN8_STATE );
fs/cachefiles/daemon.c +7 -7
@@ -15,6 +15,7 @@#include <linux/namei.h> #include <linux/poll.h> #include <linux/mount.h> +#include <linux/security.h> #include <linux/statfs.h> #include <linux/ctype.h> #include <linux/string.h>
@@ -576,7 +577,7 @@ static int cachefiles_daemon_dir(struct cachefiles_cache *cache, char *args)*/ static int cachefiles_daemon_secctx (struct cachefiles_cache *cache,char *args) { -char *secctx; +int err;_enter (",%s" , args);
@@ -585,16 +586,16 @@ static int cachefiles_daemon_secctx(struct cachefiles_cache *cache, char *args)return -EINVAL ; } -if (cache->secctx) { +if (cache->have_secid) {pr_err ("Second security context specified\n" );return -EINVAL ; } - secctx =kstrdup (args,GFP_KERNEL ); -if (!secctx) -return -ENOMEM ; + err =security_secctx_to_secid (args,strlen (args), &cache->secid); +if (err) +return err; - cache->secctx = secctx; + cache->have_secid = true;return 0 ; }
@@ -820,7 +821,6 @@ static void cachefiles_daemon_unbind(struct cachefiles_cache *cache)put_cred (cache->cache_cred);kfree (cache->rootdirname); -kfree (cache->secctx);kfree (cache->tag);_leave ("" );
fs/cachefiles/internal.h +2 -1
@@ -122,7 +122,6 @@ struct cachefiles_cache {#define CACHEFILES_STATE_CHANGED 3/* T if state changed (poll trigger) */ #define CACHEFILES_ONDEMAND_MODE 4/* T if in on-demand read mode */ char *rootdirname;/* name of cache root directory */ -char *secctx;/* LSM security context */ char *tag;/* cache binding tag */ refcount_t unbind_pincount;/* refcount to do daemon unbind */ struct xarray reqs;/* xarray of pending on-demand requests */
@@ -130,6 +129,8 @@ struct cachefiles_cache {struct xarray ondemand_ids;/* xarray for ondemand_id allocation */ u32 ondemand_id_next;u32 msg_id_next; +u32 secid;/* LSM security id */ +bool have_secid;/* whether "secid" was set */ };static inline bool cachefiles_in_ondemand_mode (struct cachefiles_cache *cache)
fs/cachefiles/security.c +3 -3
@@ -18,7 +18,7 @@ int cachefiles_get_security_ID(struct cachefiles_cache *cache)struct cred *new;int ret; -_enter ("{%s}" , cache->secctx); +_enter ("{%u}" , cache->have_secid ? cache->secid :0 ); new =prepare_kernel_cred (current);if (!new) {
@@ -26,8 +26,8 @@ int cachefiles_get_security_ID(struct cachefiles_cache *cache) goto error; } -if (cache->secctx) { - ret =set_security_override_from_ctx (new, cache->secctx); +if (cache->have_secid) { + ret =set_security_override (new, cache->secid);if (ret <0 ) {put_cred (new); pr_err("Security denies permission to nominate security context: error %d\n",
fs/file.c +1 -0
@@ -21,6 +21,7 @@#include <linux/rcupdate.h> #include <linux/close_range.h> #include <net/sock.h> +#include <linux/init_task.h> #include "internal.h"
fs/hfs/super.c +3 -1
@@ -418,11 +418,13 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) goto bail_no_root; res =hfs_cat_find_brec (sb,HFS_ROOT_CNID , &fd);if (!res) { -if (fd.entrylength >sizeof (rec) || fd.entrylength <0 ) { +if (fd.entrylength !=sizeof (rec.dir)) { res = -EIO ; goto bail_hfs_find; }hfs_bnode_read (fd.bnode, &rec, fd.entryoffset, fd.entrylength); +if (rec.type !=HFS_CDR_DIR ) + res = -EIO ; }if (res) goto bail_hfs_find;
fs/iomap/buffered-io.c +1 -1
@@ -1095,7 +1095,7 @@ static int iomap_write_delalloc_scan(struct inode *inode, }/* move offset to start of next folio in range */ - start_byte =folio_next_index (folio) <<PAGE_SHIFT ; + start_byte =folio_pos (folio) +folio_size (folio);folio_unlock (folio);folio_put (folio); }
fs/nfsd/filecache.c +10 -8
@@ -219,6 +219,7 @@ nfsd_file_alloc(struct net *net, struct inode *inode, unsigned char need,return NULL ;INIT_LIST_HEAD (&nf->nf_lru); +INIT_LIST_HEAD (&nf->nf_gc); nf->nf_birthtime =ktime_get (); nf->nf_file =NULL ; nf->nf_cred =get_current_cred ();
@@ -396,8 +397,8 @@ nfsd_file_dispose_list(struct list_head *dispose)struct nfsd_file *nf;while (!list_empty (dispose)) { - nf = list_first_entry(dispose, struct nfsd_file, nf_lru); -list_del_init (&nf->nf_lru); + nf = list_first_entry(dispose, struct nfsd_file, nf_gc); +list_del_init (&nf->nf_gc);nfsd_file_free (nf); } }
@@ -414,12 +415,12 @@ nfsd_file_dispose_list_delayed(struct list_head *dispose) {while (!list_empty (dispose)) {struct nfsd_file *nf =list_first_entry (dispose, - struct nfsd_file, nf_lru); + struct nfsd_file, nf_gc);struct nfsd_net *nn =net_generic (nf->nf_net, nfsd_net_id);struct nfsd_fcache_disposal *l = nn->fcache_disposal;spin_lock (&l->lock); -list_move_tail (&nf->nf_lru, &l->freeme); +list_move_tail (&nf->nf_gc, &l->freeme);spin_unlock (&l->lock);queue_work (nfsd_filecache_wq, &l->work); }
@@ -476,7 +477,8 @@ nfsd_file_lru_cb(struct list_head *item, struct list_lru_one *lru,/* Refcount went to zero. Unhash it and queue it to the dispose list */ nfsd_file_unhash (nf); -list_lru_isolate_move (lru, &nf->nf_lru, head); +list_lru_isolate (lru, &nf->nf_lru); +list_add (&nf->nf_gc, head);this_cpu_inc (nfsd_file_evictions);trace_nfsd_file_gc_disposed (nf);return LRU_REMOVED ;
@@ -555,7 +557,7 @@ nfsd_file_cond_queue(struct nfsd_file *nf, struct list_head *dispose)/* If refcount goes to 0, then put on the dispose list */ if (refcount_sub_and_test (decrement, &nf->nf_ref)) { -list_add (&nf->nf_lru, dispose); +list_add (&nf->nf_gc, dispose);trace_nfsd_file_closing (nf); } }
@@ -631,8 +633,8 @@ nfsd_file_close_inode_sync(struct inode *inode)nfsd_file_queue_for_close (inode, &dispose);while (!list_empty (&dispose)) { - nf = list_first_entry(&dispose, struct nfsd_file, nf_lru); -list_del_init (&nf->nf_lru); + nf = list_first_entry(&dispose, struct nfsd_file, nf_gc); +list_del_init (&nf->nf_gc);nfsd_file_free (nf); }flush_delayed_fput ();
fs/nfsd/filecache.h +1 -0
@@ -44,6 +44,7 @@ struct nfsd_file {struct nfsd_file_mark *nf_mark;struct list_head nf_lru; +struct list_head nf_gc;struct rcu_head nf_rcu;ktime_t nf_birthtime; };
fs/notify/fdinfo.c +1 -3
@@ -51,10 +51,8 @@ static void show_mark_fhandle(struct seq_file *m, struct inode *inode) size = f.handle.handle_bytes >>2 ; ret =exportfs_encode_fid (inode, (struct fid *)f.handle.f_handle, &size); -if ((ret ==FILEID_INVALID ) || (ret <0 )) { -WARN_ONCE (1 ,"Can't encode file handler for inotify: %d\n" , ret); +if ((ret ==FILEID_INVALID ) || (ret <0 ))return ; - } f.handle.handle_type = ret; f.handle.handle_bytes = size *sizeof (u32);
fs/ocfs2/extent_map.c +7 -1
@@ -973,7 +973,13 @@ int ocfs2_read_virt_blocks(struct inode *inode, u64 v_block, int nr, }while (done < nr) { -down_read (&OCFS2_I (inode)->ip_alloc_sem); +if (!down_read_trylock (&OCFS2_I (inode)->ip_alloc_sem)) { + rc = -EAGAIN ; +mlog (ML_ERROR , +"Inode #%llu ip_alloc_sem is temporarily unavailable\n" , + (unsigned long long )OCFS2_I (inode)->ip_blkno); +break ; + } rc =ocfs2_extent_map_get_blocks (inode, v_block + done, &p_block, &p_count,NULL );up_read (&OCFS2_I (inode)->ip_alloc_sem);
fs/overlayfs/copy_up.c +8 -8
@@ -371,13 +371,13 @@ int ovl_set_attr(struct ovl_fs *ofs, struct dentry *upperdentry,return err; } -struct ovl_fh *ovl_encode_real_fh (struct ovl_fs *ofs,struct dentry *real, +struct ovl_fh *ovl_encode_real_fh (struct ovl_fs *ofs,struct inode *realinode,bool is_upper) {struct ovl_fh *fh;int fh_type, dwords;int buflen =MAX_HANDLE_SZ ; -uuid_t *uuid = &real->d_sb->s_uuid; +uuid_t *uuid = &realinode->i_sb->s_uuid;int err;/* Make sure the real fid stays 32bit aligned */
@@ -394,13 +394,13 @@ struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, struct dentry *real,* the price or reconnecting the dentry. */ dwords = buflen >>2 ; - fh_type =exportfs_encode_fh (real, (void *)fh->fb.fid, &dwords,0 ); + fh_type =exportfs_encode_inode_fh (realinode, (void *)fh->fb.fid, + &dwords,NULL ,0 ); buflen = (dwords <<2 ); err = -EIO ; -if (WARN_ON (fh_type <0 ) || -WARN_ON (buflen >MAX_HANDLE_SZ ) || -WARN_ON (fh_type ==FILEID_INVALID )) +if (fh_type <0 || fh_type ==FILEID_INVALID || +WARN_ON (buflen >MAX_HANDLE_SZ )) goto out_err; fh->fb.version =OVL_FH_VERSION ;
@@ -438,7 +438,7 @@ int ovl_set_origin(struct ovl_fs *ofs, struct dentry *lower,* up and a pure upper inode. */ if (ovl_can_decode_fh (lower->d_sb)) { - fh =ovl_encode_real_fh (ofs, lower, false); + fh =ovl_encode_real_fh (ofs,d_inode (lower), false);if (IS_ERR (fh))return PTR_ERR (fh); }
@@ -461,7 +461,7 @@ static int ovl_set_upper_fh(struct ovl_fs *ofs, struct dentry *upper,const struct ovl_fh *fh;int err; - fh =ovl_encode_real_fh (ofs, upper, true); + fh =ovl_encode_real_fh (ofs,d_inode (upper), true);if (IS_ERR (fh))return PTR_ERR (fh);
fs/overlayfs/export.c +27 -22
116 lines not on this page · raw message
fs/overlayfs/namei.c +2 -2
@@ -523,7 +523,7 @@ int ovl_verify_set_fh(struct ovl_fs *ofs, struct dentry *dentry,struct ovl_fh *fh;int err; - fh =ovl_encode_real_fh (ofs, real, is_upper); + fh =ovl_encode_real_fh (ofs,d_inode (real), is_upper); err =PTR_ERR (fh);if (IS_ERR (fh)) { fh =NULL ;
@@ -720,7 +720,7 @@ int ovl_get_index_name(struct ovl_fs *ofs, struct dentry *origin,struct ovl_fh *fh;int err; - fh =ovl_encode_real_fh (ofs, origin, false); + fh =ovl_encode_real_fh (ofs,d_inode (origin), false);if (IS_ERR (fh))return PTR_ERR (fh);
fs/overlayfs/overlayfs.h +1 -1
@@ -821,7 +821,7 @@ int ovl_copy_up_with_data(struct dentry *dentry);int ovl_maybe_copy_up (struct dentry *dentry,int flags);int ovl_copy_xattr (struct super_block *sb,const struct path *path,struct dentry *new);int ovl_set_attr (struct ovl_fs *ofs,struct dentry *upper,struct kstat *stat); -struct ovl_fh *ovl_encode_real_fh (struct ovl_fs *ofs,struct dentry *real, +struct ovl_fh *ovl_encode_real_fh (struct ovl_fs *ofs,struct inode *realinode,bool is_upper);int ovl_set_origin (struct ovl_fs *ofs,struct dentry *lower,struct dentry *upper);
fs/proc/vmcore.c +2 -0
@@ -404,6 +404,8 @@ static ssize_t __read_vmcore(struct iov_iter *iter, loff_t *fpos)if (!iov_iter_count (iter))return acc; } + +cond_resched (); }return acc;
fs/smb/client/connect.c +1 -2
@@ -1061,6 +1061,7 @@ clean_demultiplex_info(struct TCP_Server_Info *server)/* Release netns reference for this server. */ put_net (cifs_net_ns (server));kfree (server->leaf_fullpath); +kfree (server->hostname);kfree (server); length =atomic_dec_return (&tcpSesAllocCount);
@@ -1684,8 +1685,6 @@ cifs_put_tcp_session(struct TCP_Server_Info *server, int from_reconnect)kfree_sensitive (server->session_key.response); server->session_key.response =NULL ; server->session_key.len =0 ; -kfree (server->hostname); - server->hostname =NULL ; task =xchg (&server->tsk,NULL );if (task)
include/linux/hrtimer.h +1 -0
@@ -532,6 +532,7 @@ extern void __init hrtimers_init(void);extern void sysrq_timer_list_show (void );int hrtimers_prepare_cpu (unsigned int cpu); +int hrtimers_cpu_starting (unsigned int cpu);#ifdef CONFIG_HOTPLUG_CPU int hrtimers_cpu_dying (unsigned int cpu);#else
include/linux/poll.h +9 -1
@@ -41,8 +41,16 @@ typedef struct poll_table_struct {static inline void poll_wait (struct file * filp,wait_queue_head_t * wait_address,poll_table *p) { -if (p && p->_qproc && wait_address) +if (p && p->_qproc && wait_address) { p->_qproc (filp, wait_address, p); +/* +* This memory barrier is paired in the wq_has_sleeper(). +* See the comment above prepare_to_wait(), we need to +* ensure that subsequent tests in this thread can't be +* reordered with __add_wait_queue() in _qproc() paths. +*/ +smp_mb (); + } }/*
include/linux/pruss_driver.h +6 -6
@@ -144,32 +144,32 @@ static inline int pruss_release_mem_region(struct pruss *pruss,static inline int pruss_cfg_get_gpmux (struct pruss *pruss,enum pruss_pru_id pru_id,u8 *mux) { -return ERR_PTR (-EOPNOTSUPP ); +return -EOPNOTSUPP ; }static inline int pruss_cfg_set_gpmux (struct pruss *pruss,enum pruss_pru_id pru_id,u8 mux) { -return ERR_PTR (-EOPNOTSUPP ); +return -EOPNOTSUPP ; }static inline int pruss_cfg_gpimode (struct pruss *pruss,enum pruss_pru_id pru_id,enum pruss_gpi_mode mode) { -return ERR_PTR (-EOPNOTSUPP ); +return -EOPNOTSUPP ; }static inline int pruss_cfg_miirt_enable (struct pruss *pruss,bool enable) { -return ERR_PTR (-EOPNOTSUPP ); +return -EOPNOTSUPP ; }static inline int pruss_cfg_xfr_enable (struct pruss *pruss,enum pru_type pru_type, -bool enable); +bool enable) { -return ERR_PTR (-EOPNOTSUPP ); +return -EOPNOTSUPP ; }#endif /* CONFIG_TI_PRUSS */
include/net/net_namespace.h +3 -0
@@ -442,6 +442,9 @@ struct pernet_operations {void (*pre_exit)(struct net *net);void (*exit)(struct net *net);void (*exit_batch)(struct list_head *net_exit_list); +/* Following method is called with RTNL held. */ +void (*exit_batch_rtnl)(struct list_head *net_exit_list, +struct list_head *dev_kill_list);unsigned int *id;size_t size; };
kernel/cpu.c +1 -1
@@ -2206,7 +2206,7 @@ static struct cpuhp_step cpuhp_hp_states[] = { }, [CPUHP_AP_HRTIMERS_DYING] = { .name = "hrtimers:dying", - .startup.single = NULL, + .startup.single = hrtimers_cpu_starting, .teardown.single = hrtimers_cpu_dying, },
kernel/gen_kheaders.sh +1 -0
@@ -89,6 +89,7 @@ find $cpio_dir -type f -print0 | # Create archive and try to normalize metadata for reproducibility. tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \ + --exclude=".__afs*" --exclude=".nfs*" \ --owner=0 --group=0 --sort=name --numeric-owner --mode=u=rw,go=r,a+X \ -I $XZ -cf $tarfile -C $cpio_dir/ . > /dev/null
kernel/time/hrtimer.c +10 -1
@@ -2180,6 +2180,15 @@ int hrtimers_prepare_cpu(unsigned int cpu) } cpu_base->cpu = cpu; +hrtimer_cpu_base_init_expiry_lock (cpu_base); +return 0 ; +} + +int hrtimers_cpu_starting (unsigned int cpu) +{ +struct hrtimer_cpu_base *cpu_base =this_cpu_ptr (&hrtimer_bases); + +/* Clear out any left over state from a CPU down operation */ cpu_base->active_bases =0 ; cpu_base->hres_active =0 ; cpu_base->hang_detected =0 ;
@@ -2188,7 +2197,6 @@ int hrtimers_prepare_cpu(unsigned int cpu) cpu_base->expires_next =KTIME_MAX ; cpu_base->softirq_expires_next =KTIME_MAX ; cpu_base->online =1 ; -hrtimer_cpu_base_init_expiry_lock (cpu_base);return 0 ; }
@@ -2266,6 +2274,7 @@ int hrtimers_cpu_dying(unsigned int dying_cpu)void __init hrtimers_init (void ) {hrtimers_prepare_cpu (smp_processor_id ()); +hrtimers_cpu_starting (smp_processor_id ());open_softirq (HRTIMER_SOFTIRQ , hrtimer_run_softirq); }
mm/filemap.c +1 -1
@@ -3037,7 +3037,7 @@ static inline loff_t folio_seek_hole_data(struct xa_state *xas,if (ops->is_partially_uptodate (folio, offset, bsz) == seek_data)break ; - start = (start + bsz) & ~(bsz -1 ); + start = (start + bsz) & ~((u64 )bsz -1 ); offset += bsz; }while (offset <folio_size (folio)); unlock:
net/core/filter.c +18 -12
@@ -11190,6 +11190,7 @@ BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern,bool is_sockarray = map->map_type ==BPF_MAP_TYPE_REUSEPORT_SOCKARRAY ;struct sock_reuseport *reuse;struct sock *selected_sk; +int err; selected_sk = map->ops->map_lookup_elem (map, key);if (!selected_sk)
@@ -11197,10 +11198,6 @@ BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, reuse =rcu_dereference (selected_sk->sk_reuseport_cb);if (!reuse) { -/* Lookup in sock_map can return TCP ESTABLISHED sockets. */ -if (sk_is_refcounted (selected_sk)) -sock_put (selected_sk); -/* reuseport_array has only sk with non NULL sk_reuseport_cb. * The only (!reuse) case here is - the sk has already been * unhashed (e.g. by close()), so treat it as -ENOENT.
@@ -11208,24 +11205,33 @@ BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern,* Other maps (e.g. sock_map) do not provide this guarantee and * the sk may never be in the reuseport group to begin with. */ -return is_sockarray ? -ENOENT : -EINVAL ; + err = is_sockarray ? -ENOENT : -EINVAL ; + goto error; }if (unlikely (reuse->reuseport_id != reuse_kern->reuseport_id)) {struct sock *sk = reuse_kern->sk; -if (sk->sk_protocol != selected_sk->sk_protocol) -return -EPROTOTYPE ; -else if (sk->sk_family != selected_sk->sk_family) -return -EAFNOSUPPORT ; - -/* Catch all. Likely bound to a different sockaddr. */ -return -EBADFD ; +if (sk->sk_protocol != selected_sk->sk_protocol) { + err = -EPROTOTYPE ; + }else if (sk->sk_family != selected_sk->sk_family) { + err = -EAFNOSUPPORT ; + }else { +/* Catch all. Likely bound to a different sockaddr. */ + err = -EBADFD ; + } + goto error; } reuse_kern->selected_sk = selected_sk;return 0 ; +error: +/* Lookup in sock_map can return TCP ESTABLISHED sockets. */ +if (sk_is_refcounted (selected_sk)) +sock_put (selected_sk); + +return err; }static const struct bpf_func_proto sk_select_reuseport_proto = {
net/core/net_namespace.c +30 -1
@@ -321,8 +321,9 @@ static __net_init int setup_net(struct net *net, struct user_namespace *user_ns) {/* Must be called with pernet_ops_rwsem held */ const struct pernet_operations *ops, *saved_ops; -int error =0 ;LIST_HEAD (net_exit_list); +LIST_HEAD (dev_kill_list); +int error =0 ;refcount_set (&net->ns.count,1 );ref_tracker_dir_init (&net->refcnt_tracker,128 ,"net refcnt" );
@@ -360,6 +361,15 @@ static __net_init int setup_net(struct net *net, struct user_namespace *user_ns)synchronize_rcu (); + ops = saved_ops; +rtnl_lock (); +list_for_each_entry_continue_reverse (ops, &pernet_list, list) { +if (ops->exit_batch_rtnl) + ops->exit_batch_rtnl (&net_exit_list, &dev_kill_list); + } +unregister_netdevice_many (&dev_kill_list); +rtnl_unlock (); + ops = saved_ops;list_for_each_entry_continue_reverse (ops, &pernet_list, list)ops_exit_list (ops, &net_exit_list);
@@ -588,6 +598,7 @@ static void cleanup_net(struct work_struct *work)struct net *net, *tmp, *last;struct llist_node *net_kill_list;LIST_HEAD (net_exit_list); +LIST_HEAD (dev_kill_list);/* Atomically snapshot the list of namespaces to cleanup */ net_kill_list =llist_del_all (&cleanup_list);
@@ -628,6 +639,14 @@ static void cleanup_net(struct work_struct *work)*/ synchronize_rcu (); +rtnl_lock (); +list_for_each_entry_reverse (ops, &pernet_list, list) { +if (ops->exit_batch_rtnl) + ops->exit_batch_rtnl (&net_exit_list, &dev_kill_list); + } +unregister_netdevice_many (&dev_kill_list); +rtnl_unlock (); +/* Run all of the network namespace exit methods */ list_for_each_entry_reverse (ops, &pernet_list, list)ops_exit_list (ops, &net_exit_list);
@@ -1170,7 +1189,17 @@ static void free_exit_list(struct pernet_operations *ops, struct list_head *net_ {ops_pre_exit_list (ops, net_exit_list);synchronize_rcu (); + +if (ops->exit_batch_rtnl) { +LIST_HEAD (dev_kill_list); + +rtnl_lock (); + ops->exit_batch_rtnl (net_exit_list, &dev_kill_list); +unregister_netdevice_many (&dev_kill_list); +rtnl_unlock (); + }ops_exit_list (ops, net_exit_list); +ops_free_list (ops, net_exit_list); }
net/core/pktgen.c +3 -3
@@ -850,6 +850,9 @@ static ssize_t get_imix_entries(const char __user *buffer,unsigned long weight;unsigned long size; +if (pkt_dev->n_imix_entries >=MAX_IMIX_ENTRIES ) +return -E2BIG ; + len =num_arg (&buffer[i], max_digits, &size);if (len <0 )return len;
@@ -879,9 +882,6 @@ static ssize_t get_imix_entries(const char __user *buffer, i++; pkt_dev->n_imix_entries++; - -if (pkt_dev->n_imix_entries >MAX_IMIX_ENTRIES ) -return -E2BIG ; }while (c ==' ' );return i;
net/dccp/ipv6.c +1 -1
@@ -616,7 +616,7 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)by tcp. Feel free to propose better solution. --ANK (980728) */ -if (np->rxopt.all) +if (np->rxopt.all && sk->sk_state !=DCCP_LISTEN ) opt_skb =skb_clone_and_charge_r (skb, sk);if (sk->sk_state ==DCCP_OPEN ) {/* Fast path */
net/ipv6/tcp_ipv6.c +1 -3
@@ -1456,7 +1456,7 @@ int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)by tcp. Feel free to propose better solution. --ANK (980728) */ -if (np->rxopt.all) +if (np->rxopt.all && sk->sk_state !=TCP_LISTEN ) opt_skb =skb_clone_and_charge_r (skb, sk); reason =SKB_DROP_REASON_NOT_SPECIFIED ;
@@ -1495,8 +1495,6 @@ int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)if (nsk != sk) {if (tcp_child_process (sk, nsk, skb)) goto reset; -if (opt_skb) -__kfree_skb (opt_skb);return 0 ; } }else
net/mac802154/iface.c +4 -0
@@ -684,6 +684,10 @@ void ieee802154_if_remove(struct ieee802154_sub_if_data *sdata)ASSERT_RTNL ();mutex_lock (&sdata->local->iflist_mtx); +if (list_empty (&sdata->local->interfaces)) { +mutex_unlock (&sdata->local->iflist_mtx); +return ; + }list_del_rcu (&sdata->list);mutex_unlock (&sdata->local->iflist_mtx);
net/mptcp/options.c +4 -2
@@ -607,7 +607,6 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb, } opts->ext_copy.use_ack =1 ; opts->suboptions =OPTION_MPTCP_DSS ; -WRITE_ONCE (msk->old_wspace,__mptcp_space ((struct sock *)msk));/* Add kind/length/subtype/flag overhead if mapping is not populated */ if (dss_size ==0 )
@@ -1287,7 +1286,7 @@ static void mptcp_set_rwin(struct tcp_sock *tp, struct tcphdr *th) }MPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_RCVWNDCONFLICT ); } -return ; + goto update_wspace; }if (rcv_wnd_new != rcv_wnd_old) {
@@ -1312,6 +1311,9 @@ static void mptcp_set_rwin(struct tcp_sock *tp, struct tcphdr *th) th->window =htons (new_win);MPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_RCVWNDSHARED ); } + +update_wspace: +WRITE_ONCE (msk->old_wspace, tp->rcv_wnd); }__sum16 __mptcp_make_csum (u64 data_seq,u32 subflow_seq,u16 data_len,__wsum sum)
net/mptcp/protocol.h +7 -2
@@ -685,10 +685,15 @@ static inline u64 mptcp_data_avail(const struct mptcp_sock *msk)static inline bool mptcp_epollin_ready (const struct sock *sk) { +u64 data_avail =mptcp_data_avail (mptcp_sk (sk)); + +if (!data_avail) +return false; +/* mptcp doesn't have to deal with small skbs in the receive queue, -* at it can always coalesce them +* as it can always coalesce them */ -return (mptcp_data_avail (mptcp_sk (sk)) >= sk->sk_rcvlowat) || +return (data_avail >= sk->sk_rcvlowat) || (mem_cgroup_sockets_enabled && sk->sk_memcg &&mem_cgroup_under_socket_pressure (sk->sk_memcg)) ||READ_ONCE (tcp_memory_pressure);
net/openvswitch/actions.c +3 -1
@@ -918,7 +918,9 @@ static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port, {struct vport *vport =ovs_vport_rcu (dp, out_port); -if (likely (vport &&netif_carrier_ok (vport->dev))) { +if (likely (vport && +netif_running (vport->dev) && +netif_carrier_ok (vport->dev))) {u16 mru =OVS_CB (skb)->mru;u32 cutlen =OVS_CB (skb)->cutlen;
net/vmw_vsock/af_vsock.c +18 -0
@@ -490,6 +490,15 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk)*/ vsk->transport->release (vsk);vsock_deassign_transport (vsk); + +/* transport's release() and destruct() can touch some socket +* state, since we are reassigning the socket to a new transport +* during vsock_connect(), let's reset these fields to have a +* clean state. +*/ +sock_reset_flag (sk,SOCK_DONE ); + sk->sk_state =TCP_CLOSE ; + vsk->peer_shutdown =0 ; }/* We increase the module refcnt to prevent the transport unloading
@@ -866,6 +875,9 @@ EXPORT_SYMBOL_GPL(vsock_create_connected);s64 vsock_stream_has_data (struct vsock_sock *vsk) { +if (WARN_ON (!vsk->transport)) +return 0 ; +return vsk->transport->stream_has_data (vsk); }EXPORT_SYMBOL_GPL (vsock_stream_has_data);
@@ -874,6 +886,9 @@ s64 vsock_connectible_has_data(struct vsock_sock *vsk) {struct sock *sk =sk_vsock (vsk); +if (WARN_ON (!vsk->transport)) +return 0 ; +if (sk->sk_type ==SOCK_SEQPACKET )return vsk->transport->seqpacket_has_data (vsk);else
@@ -883,6 +898,9 @@ EXPORT_SYMBOL_GPL(vsock_connectible_has_data);s64 vsock_stream_has_space (struct vsock_sock *vsk) { +if (WARN_ON (!vsk->transport)) +return 0 ; +return vsk->transport->stream_has_space (vsk); }EXPORT_SYMBOL_GPL (vsock_stream_has_space);
net/vmw_vsock/virtio_transport_common.c +26 -10
@@ -26,6 +26,9 @@/* Threshold for detecting small packets to copy */ #define GOOD_COPY_LEN 128 +static void virtio_transport_cancel_close_work (struct vsock_sock *vsk, +bool cancel_timeout); +static const struct virtio_transport *virtio_transport_get_ops (struct vsock_sock *vsk) {
@@ -922,6 +925,8 @@ void virtio_transport_destruct(struct vsock_sock *vsk) {struct virtio_vsock_sock *vvs = vsk->trans; +virtio_transport_cancel_close_work (vsk, true); +kfree (vvs); vsk->trans =NULL ; }
@@ -1004,17 +1009,11 @@ static void virtio_transport_wait_close(struct sock *sk, long timeout) } } -static void virtio_transport_do_close (struct vsock_sock *vsk, -bool cancel_timeout) +static void virtio_transport_cancel_close_work (struct vsock_sock *vsk, +bool cancel_timeout) {struct sock *sk =sk_vsock (vsk); -sock_set_flag (sk,SOCK_DONE ); - vsk->peer_shutdown =SHUTDOWN_MASK ; -if (vsock_stream_has_data (vsk) <=0 ) - sk->sk_state =TCP_CLOSING ; - sk->sk_state_change (sk); -if (vsk->close_work_scheduled && (!cancel_timeout ||cancel_delayed_work (&vsk->close_work))) { vsk->close_work_scheduled = false;
@@ -1026,6 +1025,20 @@ static void virtio_transport_do_close(struct vsock_sock *vsk, } } +static void virtio_transport_do_close (struct vsock_sock *vsk, +bool cancel_timeout) +{ +struct sock *sk =sk_vsock (vsk); + +sock_set_flag (sk,SOCK_DONE ); + vsk->peer_shutdown =SHUTDOWN_MASK ; +if (vsock_stream_has_data (vsk) <=0 ) + sk->sk_state =TCP_CLOSING ; + sk->sk_state_change (sk); + +virtio_transport_cancel_close_work (vsk, cancel_timeout); +} +static void virtio_transport_close_timeout (struct work_struct *work) { struct vsock_sock *vsk =
@@ -1428,8 +1441,11 @@ void virtio_transport_recv_pkt(struct virtio_transport *t,lock_sock (sk); -/* Check if sk has been closed before lock_sock */ -if (sock_flag (sk,SOCK_DONE )) { +/* Check if sk has been closed or assigned to another transport before +* lock_sock (note: listener sockets are not assigned to any transport) +*/ +if (sock_flag (sk,SOCK_DONE ) || + (sk->sk_state !=TCP_LISTEN && vsk->transport != &t->transport)) { (void )virtio_transport_reset_no_sock (t, skb);release_sock (sk);sock_put (sk);
net/vmw_vsock/vsock_bpf.c +9 -0
@@ -77,6 +77,7 @@ static int vsock_bpf_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int flags, int *addr_len) { struct sk_psock *psock; +struct vsock_sock *vsk;int copied; psock =sk_psock_get (sk);
@@ -84,6 +85,13 @@ static int vsock_bpf_recvmsg(struct sock *sk, struct msghdr *msg,return __vsock_recvmsg (sk, msg, len, flags);lock_sock (sk); + vsk =vsock_sk (sk); + +if (!vsk->transport) { + copied = -ENODEV ; + goto out; + } +if (vsock_has_data (sk, psock) &&sk_psock_queue_empty (psock)) {release_sock (sk);sk_psock_put (sk, psock);
@@ -108,6 +116,7 @@ static int vsock_bpf_recvmsg(struct sock *sk, struct msghdr *msg, copied =sk_msg_recvmsg (sk, psock, msg, len, flags); } +out:release_sock (sk);sk_psock_put (sk, psock);
sound/pci/hda/patch_realtek.c +1 -0
@@ -10430,6 +10430,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1d72 ,0x1901 ,"RedmiBook 14" ,ALC256_FIXUP_ASUS_HEADSET_MIC ),SND_PCI_QUIRK (0x1d72 ,0x1945 ,"Redmi G" ,ALC256_FIXUP_ASUS_HEADSET_MIC ),SND_PCI_QUIRK (0x1d72 ,0x1947 ,"RedmiBook Air" ,ALC255_FIXUP_XIAOMI_HEADSET_MIC ), +SND_PCI_QUIRK (0x1f66 ,0x0105 ,"Ayaneo Portable Game Player" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x2782 ,0x0214 ,"VAIO VJFE-CL" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ),SND_PCI_QUIRK (0x2782 ,0x0228 ,"Infinix ZERO BOOK 13" ,ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13 ), SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO),
tools/testing/selftests/net/mptcp/mptcp_connect.c +32 -11
70 lines not on this page · raw message
tools/testing/selftests/tc-testing/tc-tests/filters/flow.json +2 -2
@@ -78,10 +78,10 @@ "setup": [ "$TC qdisc add dev $DEV1 ingress" ], - "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 protocol ip flow map key dst rshift 0xff", + "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 protocol ip flow map key dst rshift 0x1f", "expExitCode": "0", "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 protocol ip prio 1 flow", - "matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst rshift 255 baseclass", + "matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst rshift 31 baseclass", "matchCount": "1", "teardown": [ "$TC qdisc del dev $DEV1 ingress"