Linux 6.12.115
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 12 -SUBLEVEL = 114 +SUBLEVEL = 115 EXTRAVERSION = NAME = Baby Opossum Posse
arch/nios2/include/asm/checksum.h +1 -1
@@ -27,7 +27,7 @@ static inline __sum16 csum_fold(__wsum sum) "add %0, %0, r8\n" "nor %0, %0, %0\n" : "=r" (sum) - : "r" (sum << 16), "0" (sum) + : "r" ((__force u32)sum << 16), "0" (sum) : "r8");return (__force __sum16 ) sum; }
arch/s390/mm/fault.c +2 -9
@@ -443,17 +443,10 @@ void do_secure_storage_access(struct pt_regs *regs) folio =phys_to_folio (addr);if (unlikely (!folio_try_get (folio)))return ; - rc =uv_convert_from_secure (folio_to_phys (folio)); -if (!rc) -clear_bit (PG_arch_1, &folio->flags.f); + rc =arch_make_folio_accessible (folio);folio_put (folio); -/* -* There are some valid fixup types for kernel -* accesses to donated secure memory. zeropad is one -* of them. -*/ if (rc) -return handle_fault_error_nolock (regs,0 ); +BUG (); }else {if (faulthandler_disabled ())return handle_fault_error_nolock (regs,0 );
arch/s390/pci/pci_sysfs.c +3 -0
@@ -150,6 +150,9 @@ static ssize_t report_error_write(struct file *filp, struct kobject *kobj,if (off || (count <sizeof (*report)))return -EINVAL ; +if (count < (report->length +sizeof (*report))) +return -EINVAL ; + ret =sclp_pci_report (report, zdev->fh, zdev->fid);return ret ? ret : count;
arch/x86/hyperv/hv_init.c +2 -1
@@ -750,7 +750,8 @@ int hv_apicid_to_vp_index(u32 apic_id) input->partition_id =HV_PARTITION_ID_SELF ; input->apic_ids[0 ] = apic_id; - output = *this_cpu_ptr (hyperv_pcpu_output_arg); +/* Treat input as having 2 APIC IDs so output is 64-bit aligned */ + output = (void *)input +struct_size (input, apic_ids,2 ); control =HV_HYPERCALL_REP_COMP_1 |HVCALL_GET_VP_ID_FROM_APIC_ID ; status =hv_do_hypercall (control, input, output);
arch/x86/kernel/kvm.c +29 -3
@@ -255,11 +255,39 @@ noinstr u32 kvm_read_and_reset_apf_flags(void) }EXPORT_SYMBOL_GPL (kvm_read_and_reset_apf_flags); +static __always_inline bool kvm_apf_reason_pending(void) +{ +return __this_cpu_read (async_pf_enabled) && +__this_cpu_read (apf_reason.flags); +} + noinstr bool __kvm_handle_async_pf(struct pt_regs *regs, u32 token) { -u32 flags =kvm_read_and_reset_apf_flags ();irqentry_state_t state; +u32 flags; + +if (!kvm_apf_reason_pending ()) +return false; + +/* +* The guest does not enable KVM_ASYNC_PF_SEND_ALWAYS, so the host +* delivers async #PF only to user mode (or as a #PF VM-exit, which KVM +* reads itself). A #PF from kernel mode can still arrive between that +* delivery and the read of the reason flags, inside an NMI that +* interrupted it, for instance perf reading user memory for a call +* chain. Such a fault is not async, so leave the async PF flags +* untouched for the outer handler. Outside NMI context, on the other +* hand, async PF flags on a kernel-mode fault mean the host is broken. +*/ +if (!user_mode (regs)) { +if (likely (in_nmi ())) +return false; + state =irqentry_enter (regs); +instrumentation_begin (); +panic ("Host injected async #PF in kernel mode\n" ); + } + flags =kvm_read_and_reset_apf_flags ();if (!flags)return false;
@@ -275,8 +303,6 @@ noinstr bool __kvm_handle_async_pf(struct pt_regs *regs, u32 token)panic ("Host injected async #PF in interrupt disabled region\n" );if (flags &KVM_PV_REASON_PAGE_NOT_PRESENT ) { -if (unlikely (!(user_mode (regs)))) -panic ("Host injected async #PF in kernel mode\n" );/* Page is swapped out by the host. */ kvm_async_pf_task_wait_schedule (token); }else {
arch/x86/kvm/mmu/mmu.c +3 -1
@@ -2500,7 +2500,9 @@ static int mmu_page_zap_pte(struct kvm *kvm, struct kvm_mmu_page *sp,* avoids retaining a large number of stale nested SPs. */ if (tdp_enabled && invalid_list && - child->role.guest_mode && !child->parent_ptes.val) + child->role.guest_mode && + !child->root_count && + !child->parent_ptes.val)return kvm_mmu_prepare_zap_page (kvm, child, invalid_list); }
arch/x86/kvm/vmx/nested.c +3 -1
@@ -3689,8 +3689,10 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, vmentry_fail_vmexit:vmx_switch_vmcs (vcpu, &vmx->vmcs01); -if (!from_vmentry) +if (!from_vmentry) { +nested_ept_uninit_mmu_context (vcpu);return NVMX_VMENTRY_VMEXIT ; + }kvm_vcpu_unmap (vcpu, &vmx->nested.apic_access_page_map, false);kvm_vcpu_unmap (vcpu, &vmx->nested.virtual_apic_map, true);
block/blk-zoned.c +27 -10
@@ -1408,11 +1408,20 @@ static int disk_alloc_zone_resources(struct gendisk *disk,if (!disk->zone_wplugs_pool) goto free_hash; - disk->zone_wplugs_wq = -alloc_workqueue ("%s_zwplugs" ,WQ_MEM_RECLAIM |WQ_HIGHPRI , - pool_size, disk->disk_name); -if (!disk->zone_wplugs_wq) - goto destroy_pool; +/* +* We may already have a zone write plug workqueue as this function may +* be called after disk_free_zone_resources(), which does not destroy +* the workqueue (the zone write plugs workqueue is destroyed at +* disk_release() time). +*/ +if (!disk->zone_wplugs_wq) { + disk->zone_wplugs_wq = +alloc_workqueue ("%s_zwplugs" , +WQ_MEM_RECLAIM |WQ_HIGHPRI , + pool_size, disk->disk_name); +if (!disk->zone_wplugs_wq) + goto destroy_pool; + }return 0 ;
@@ -1469,15 +1478,13 @@ static unsigned int disk_set_conv_zones_bitmap(struct gendisk *disk,return nr_conv_zones; } -void disk_free_zone_resources (struct gendisk *disk) +static void disk_free_zone_resources (struct gendisk *disk) {if (!disk->zone_wplugs_pool)return ; -if (disk->zone_wplugs_wq) { -destroy_workqueue (disk->zone_wplugs_wq); - disk->zone_wplugs_wq =NULL ; - } +if (disk->zone_wplugs_wq) +drain_workqueue (disk->zone_wplugs_wq);disk_destroy_zone_wplugs_hash_table (disk);
@@ -1496,6 +1503,16 @@ void disk_free_zone_resources(struct gendisk *disk) disk->nr_zones =0 ; } +void disk_release_zone_resources (struct gendisk *disk) +{ +if (disk->zone_wplugs_wq) { +destroy_workqueue (disk->zone_wplugs_wq); + disk->zone_wplugs_wq =NULL ; + } + +disk_free_zone_resources (disk); +} +static inline bool disk_need_zone_resources (struct gendisk *disk) {/*
block/blk.h +2 -2
@@ -489,7 +489,7 @@ static inline struct bio *blk_queue_bounce(struct bio *bio,#ifdef CONFIG_BLK_DEV_ZONED void disk_init_zone_resources (struct gendisk *disk); -void disk_free_zone_resources (struct gendisk *disk); +void disk_release_zone_resources (struct gendisk *disk);static inline bool bio_zone_write_plugging (struct bio *bio) {return bio_flagged (bio,BIO_ZONE_WRITE_PLUGGING );
@@ -550,7 +550,7 @@ int blkdev_zone_mgmt_ioctl(struct block_device *bdev, blk_mode_t mode,static inline void disk_init_zone_resources (struct gendisk *disk) { } -static inline void disk_free_zone_resources (struct gendisk *disk) +static inline void disk_release_zone_resources (struct gendisk *disk) { }static inline bool bio_zone_write_plugging (struct bio *bio)
block/bsg-lib.c +10 -3
@@ -23,11 +23,14 @@ struct bsg_set {struct bsg_device *bd;bsg_job_fn *job_fn;bsg_timeout_fn *timeout_fn; +unsigned int reply_len; };static int bsg_transport_sg_io_fn (struct request_queue *q,struct sg_io_v4 *hdr,bool open_for_write,unsigned int timeout) { +struct bsg_set *bset = + container_of(q->tag_set, struct bsg_set, tag_set);struct bsg_job *job;struct request *rq;struct bio *bio;
@@ -50,7 +53,7 @@ static int bsg_transport_sg_io_fn(struct request_queue *q, struct sg_io_v4 *hdr, reply = job->reply;memset (job,0 ,sizeof (*job)); job->reply = reply; - job->reply_len =SCSI_SENSE_BUFFERSIZE ; + job->reply_len = bset->reply_len; job->dd_data = job +1 ; job->request_len = hdr->request_len;
@@ -301,9 +304,10 @@ static blk_status_t bsg_queue_rq(struct blk_mq_hw_ctx *hctx,static int bsg_init_rq (struct blk_mq_tag_set *set,struct request *req,unsigned int hctx_idx,unsigned int numa_node) { + struct bsg_set *bset = container_of(set, struct bsg_set, tag_set);struct bsg_job *job =blk_mq_rq_to_pdu (req); - job->reply =kzalloc (SCSI_SENSE_BUFFERSIZE ,GFP_KERNEL ); + job->reply =kzalloc (bset->reply_len,GFP_KERNEL );if (!job->reply)return -ENOMEM ;return 0 ;
@@ -358,10 +362,12 @@ static const struct blk_mq_ops bsg_mq_ops = {* @job_fn: bsg job handler * @timeout: timeout handler function pointer * @dd_job_size: size of LLD data needed for each job +* @reply_len: size of the reply buffer needed for each job */ struct request_queue *bsg_setup_queue (struct device *dev,const char *name,struct queue_limits *lim,bsg_job_fn *job_fn, -bsg_timeout_fn *timeout,int dd_job_size) +bsg_timeout_fn *timeout,int dd_job_size, +unsigned int reply_len) {struct bsg_set *bset;struct blk_mq_tag_set *set;
@@ -374,6 +380,7 @@ struct request_queue *bsg_setup_queue(struct device *dev, const char *name, bset->job_fn = job_fn; bset->timeout_fn = timeout; + bset->reply_len = reply_len; set = &bset->tag_set; set->ops = &bsg_mq_ops;
block/genhd.c +1 -1
@@ -1219,7 +1219,7 @@ static void disk_release(struct device *dev)disk_release_events (disk);kfree (disk->random); -disk_free_zone_resources (disk); +disk_release_zone_resources (disk);xa_destroy (&disk->part_tbl); disk->queue->disk =NULL ;
crypto/asymmetric_keys/restrict.c +6 -2
@@ -240,10 +240,14 @@ static int key_or_keyring_common(struct key *dest_keyring,if (IS_ERR (key)) key =NULL ; }else if (trusted->type == &key_type_asymmetric) { +const struct asymmetric_key_ids *kids;const struct asymmetric_key_id **signer_ids; - signer_ids = (const struct asymmetric_key_id **) -asymmetric_key_ids (trusted)->id; + kids =asymmetric_key_ids (trusted); +if (!kids) +return -ENOKEY ; + + signer_ids = (const struct asymmetric_key_id **)kids->id;/* * The auth_ids come from the candidate key (the
drivers/base/regmap/internal.h +1 -0
@@ -186,6 +186,7 @@ struct regcache_ops {enum regcache_type type;int (*init)(struct regmap *map);int (*exit)(struct regmap *map); +int (*populate)(struct regmap *map);#ifdef CONFIG_DEBUG_FS void (*debugfs_init)(struct regmap *map);#endif
drivers/base/regmap/regcache-maple.c +7 -2
@@ -296,16 +296,21 @@ static int regcache_maple_exit(struct regmap *map)struct maple_tree *mt = map->cache;MA_STATE (mas, mt,0 ,UINT_MAX );unsigned int *entry; +unsigned long flags;/* if we've already been called then just return */ if (!mt)return 0 ; -mas_lock (&mas); +/* +* Register access may take the Maple lock from hard IRQ context, so +* preserve its IRQ-safe lockdep state during teardown. +*/ +mas_lock_irqsave (&mas, flags);mas_for_each (&mas, entry,UINT_MAX )kfree (entry);__mt_destroy (mt); -mas_unlock (&mas); +mas_unlock_irqrestore (&mas, flags);kfree (mt); map->cache =NULL ;
drivers/base/regmap/regcache.c +14 -4
@@ -195,14 +195,26 @@ int regcache_init(struct regmap *map, const struct regmap_config *config)if (map->cache_ops->init) {dev_dbg (map->dev,"Initializing %s cache\n" , map->cache_ops->name); - map->lock (map->lock_arg); ret = map->cache_ops->init (map); - map->unlock (map->lock_arg);if (ret) goto err_free; } + +if (map->num_reg_defaults && map->cache_ops->populate) { +dev_dbg (map->dev,"Populating %s cache\n" , map->cache_ops->name); + map->lock (map->lock_arg); + ret = map->cache_ops->populate (map); + map->unlock (map->lock_arg); +if (ret) + goto err_exit; + }return 0 ; +err_exit: +if (map->cache_ops->exit) { +dev_dbg (map->dev,"Destroying %s cache\n" , map->cache_ops->name); + map->cache_ops->exit (map); + } err_free:kfree (map->reg_defaults);if (map->cache_free)
@@ -225,9 +237,7 @@ void regcache_exit(struct regmap *map)if (map->cache_ops->exit) {dev_dbg (map->dev,"Destroying %s cache\n" , map->cache_ops->name); - map->lock (map->lock_arg); map->cache_ops->exit (map); - map->unlock (map->lock_arg); } }
drivers/gpio/gpio-mxc.c +32 -35
145 lines not on this page · raw message
drivers/gpio/gpiolib.c +5 -4
@@ -3578,16 +3578,17 @@ int gpiod_set_array_value_complex(bool raw, bool can_sleep, }while ((i < array_size) &&gpio_device_chip_cmp (desc_array[i]->gdev, guard.gc));/* push collected bits to outputs */ -if (count !=0 ) { + ret =0 ; +if (count !=0 ) ret =gpiochip_set_multiple (guard.gc, mask, bits); -if (ret) -return ret; - }if (mask != fastpath_mask)bitmap_free (mask);if (bits != fastpath_bits)bitmap_free (bits); + +if (ret) +return ret; }return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +6 -0
@@ -1449,6 +1449,7 @@ static void amdgpu_cs_parser_fini(struct amdgpu_cs_parser *parser)int amdgpu_cs_ioctl (struct drm_device *dev,void *data,struct drm_file *filp) {struct amdgpu_device *adev =drm_to_adev (dev); +struct amdgpu_bo_list_entry *e;struct amdgpu_cs_parser parser;int r;
@@ -1503,6 +1504,11 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)return 0 ; error_backoff: +/* amdgpu_cs_submit() only drops the ranges once it got that far. */ +amdgpu_bo_list_for_each_userptr_entry (e, parser.bo_list) { +amdgpu_ttm_tt_get_user_pages_done (e->bo->tbo.ttm, e->range); + e->range =NULL ; + }mutex_unlock (&parser.bo_list->bo_list_mutex); error_fini:
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +3 -18
@@ -1164,7 +1164,6 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf, {struct amdgpu_device *adev = f->f_inode->i_private;int r; -ssize_t result =0 ;uint32_t offset, se, sh, cu, wave, simd, thread, bank, *data;if (size >4096 || size &3 || *pos &3 )
@@ -1209,25 +1208,11 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,pm_runtime_mark_last_busy (adev_to_drm (adev)->dev);pm_runtime_put_autosuspend (adev_to_drm (adev)->dev); +amdgpu_virt_disable_access_debugfs (adev); -while (size) { -uint32_t value; - - value = data[result >>2 ]; - r =put_user (value, (uint32_t *)buf); -if (r) { -amdgpu_virt_disable_access_debugfs (adev); - goto err; - } - - result +=4 ; - buf +=4 ; - size -=4 ; - } - + r =copy_to_user (buf, data, size) ? -EFAULT : size;kfree (data); -amdgpu_virt_disable_access_debugfs (adev); -return result; +return r; err:pm_runtime_put_autosuspend (adev_to_drm (adev)->dev);
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +21 -4
@@ -455,6 +455,9 @@ static void sdma_v3_0_ring_emit_hdp_flush(struct amdgpu_ring *ring)else ref_and_mask =REG_SET_FIELD (ref_and_mask,GPU_HDP_FLUSH_DONE ,SDMA1 ,1 ); +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); +amdgpu_ring_write (ring,SDMA_PKT_HEADER_OP (SDMA_OP_POLL_REGMEM ) |SDMA_PKT_POLL_REGMEM_HEADER_HDP_FLUSH (1 ) |SDMA_PKT_POLL_REGMEM_HEADER_FUNC (3 ));/* == */
@@ -482,6 +485,10 @@ static void sdma_v3_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se unsigned flags) {bool write64bit = flags &AMDGPU_FENCE_FLAG_64BIT ; + +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); +/* write the fence */ amdgpu_ring_write (ring,SDMA_PKT_HEADER_OP (SDMA_OP_FENCE ));amdgpu_ring_write (ring,lower_32_bits (addr));
@@ -490,7 +497,11 @@ static void sdma_v3_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se/* optionally write high bits as well */ if (write64bit) { +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); + addr +=4 ; +amdgpu_ring_write (ring,SDMA_PKT_HEADER_OP (SDMA_OP_FENCE ));amdgpu_ring_write (ring,lower_32_bits (addr));amdgpu_ring_write (ring,upper_32_bits (addr));
@@ -1031,6 +1042,9 @@ static void sdma_v3_0_ring_emit_pipeline_sync(struct amdgpu_ring *ring)uint32_t seq = ring->fence_drv.sync_seq;uint64_t addr = ring->fence_drv.gpu_addr; +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); +/* wait for idle */ amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_POLL_REGMEM) | SDMA_PKT_POLL_REGMEM_HEADER_HDP_FLUSH(0) |
@@ -1059,6 +1073,9 @@ static void sdma_v3_0_ring_emit_vm_flush(struct amdgpu_ring *ring, {amdgpu_gmc_emit_flush_gpu_tlb (ring, vmid, pd_addr); +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); +/* wait for flush */ amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_POLL_REGMEM) | SDMA_PKT_POLL_REGMEM_HEADER_HDP_FLUSH(0) |
@@ -1568,11 +1585,11 @@ static const struct amdgpu_ring_funcs sdma_v3_0_ring_funcs = { .get_wptr = sdma_v3_0_ring_get_wptr, .set_wptr = sdma_v3_0_ring_set_wptr, .emit_frame_size = -6 +/* sdma_v3_0_ring_emit_hdp_flush */ +6 +1 +/* sdma_v3_0_ring_emit_hdp_flush */ 3 +/* hdp invalidate */ -6 +/* sdma_v3_0_ring_emit_pipeline_sync */ -VI_FLUSH_GPU_TLB_NUM_WREG *3 +6 +/* sdma_v3_0_ring_emit_vm_flush */ - 10 + 10 + 10, /* sdma_v3_0_ring_emit_fence x3 for user fence, vm fence */ +6 +1 +/* sdma_v3_0_ring_emit_pipeline_sync */ +VI_FLUSH_GPU_TLB_NUM_WREG *3 +6 +1 +/* sdma_v3_0_ring_emit_vm_flush */ + (10 + 1) * 3, /* sdma_v3_0_ring_emit_fence x3 for user fence, vm fence */ .emit_ib_size = 7 + 6, /* sdma_v3_0_ring_emit_ib */ .emit_ib = sdma_v3_0_ring_emit_ib, .emit_fence = sdma_v3_0_ring_emit_fence,
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +1 -1
@@ -959,7 +959,7 @@ static const struct amdgpu_ring_funcs vce_v3_0_ring_phys_funcs = {static const struct amdgpu_ring_funcs vce_v3_0_ring_vm_funcs = { .type =AMDGPU_RING_TYPE_VCE , - .align_mask =0xf , + .align_mask =0x1f , .nop =VCE_CMD_NO_OP , .support_64bit_ptrs = false, .no_user_fence = true,
drivers/gpu/drm/drm_exec.c +43 -30
114 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_dmc.c +16 -5
@@ -796,7 +796,7 @@ static u32 parse_dmc_fw_header(struct intel_dmc *dmc, }/* Cache the dmc header info. */ -if (mmio_count > mmio_count_max) { +if (!mmio_count || mmio_count > mmio_count_max) {drm_err (&i915->drm,"DMC firmware has wrong mmio count %u\n" , mmio_count);return 0 ; }
@@ -819,13 +819,21 @@ static u32 parse_dmc_fw_header(struct intel_dmc *dmc,disable_dmc_evt (i915, dmc_id, dmc_info->mmioaddr[i], dmc_info->mmiodata[i]) ? " (disabling)" : ""); } - dmc_info->mmio_count = mmio_count; - dmc_info->start_mmioaddr = start_mmioaddr; rem_size -= header_len_bytes;/* fw_size is in dwords, so multiplied by 4 to convert into bytes. */ - payload_size = dmc_header->fw_size *4 ; +if (check_mul_overflow (dmc_header->fw_size,4u , &payload_size)) { +drm_err (&i915->drm,"DMC fw_size too large (%u dwords)\n" , + dmc_header->fw_size); +return 0 ; + } + +if (!payload_size) { +drm_err (&i915->drm,"DMC firmware has empty payload\n" ); +return 0 ; + } +if (rem_size < payload_size) goto error_truncated;
@@ -833,12 +841,15 @@ static u32 parse_dmc_fw_header(struct intel_dmc *dmc,drm_err (&i915->drm,"DMC FW too big (%u bytes)\n" , payload_size);return 0 ; } - dmc_info->dmc_fw_size = dmc_header->fw_size; dmc_info->payload =kmalloc (payload_size,GFP_KERNEL );if (!dmc_info->payload)return 0 ; + dmc_info->mmio_count = mmio_count; + dmc_info->start_mmioaddr = start_mmioaddr; + dmc_info->dmc_fw_size = dmc_header->fw_size; + payload = (u8 *)(dmc_header) + header_len_bytes;memcpy (dmc_info->payload, payload, payload_size);
drivers/gpu/drm/vc4/vc4_hdmi.c +11 -9
@@ -857,7 +857,7 @@ static void vc4_hdmi_encoder_post_crtc_disable(struct drm_encoder *encoder,spin_lock_irqsave (&vc4_hdmi->hw_lock, flags); -HDMI_WRITE (HDMI_RAM_PACKET_CONFIG ,0 ); +HDMI_WRITE (HDMI_RAM_PACKET_CONFIG ,VC4_HDMI_RAM_PACKET_ENABLE );HDMI_WRITE (HDMI_VID_CTL ,HDMI_READ (HDMI_VID_CTL ) |VC4_HD_VID_CTL_CLRRGB );
@@ -1616,9 +1616,6 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder,WARN_ONCE (ret,"Timeout waiting for " "VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE\n" ); }else { -HDMI_WRITE (HDMI_RAM_PACKET_CONFIG , -HDMI_READ (HDMI_RAM_PACKET_CONFIG ) & - ~(VC4_HDMI_RAM_PACKET_ENABLE ));HDMI_WRITE (HDMI_SCHEDULER_CONTROL ,HDMI_READ (HDMI_SCHEDULER_CONTROL ) & ~VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI );
@@ -1637,9 +1634,6 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder,WARN_ON (!(HDMI_READ (HDMI_SCHEDULER_CONTROL ) &VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE )); -HDMI_WRITE (HDMI_RAM_PACKET_CONFIG , -VC4_HDMI_RAM_PACKET_ENABLE ); -spin_unlock_irqrestore (&vc4_hdmi->hw_lock, flags); vc4_hdmi->packet_ram_enabled = true;
@@ -3125,6 +3119,11 @@ static int vc5_hdmi_init_resources(struct drm_device *drm,static int vc4_hdmi_runtime_suspend (struct device *dev) {struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev); +unsigned long flags; + +spin_lock_irqsave (&vc4_hdmi->hw_lock, flags); +HDMI_WRITE (HDMI_RAM_PACKET_CONFIG ,0 ); +spin_unlock_irqrestore (&vc4_hdmi->hw_lock, flags);clk_disable_unprepare (vc4_hdmi->hsm_clock);
@@ -3134,9 +3133,8 @@ static int vc4_hdmi_runtime_suspend(struct device *dev)static int vc4_hdmi_runtime_resume (struct device *dev) {struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev); -unsigned long __maybe_unused flags; +unsigned long rate, flags;u32 __maybe_unused value; -unsigned long rate;int ret; ret =clk_prepare_enable (vc4_hdmi->hsm_clock);
@@ -3178,6 +3176,10 @@ static int vc4_hdmi_runtime_resume(struct device *dev) }#endif +spin_lock_irqsave (&vc4_hdmi->hw_lock, flags); +HDMI_WRITE (HDMI_RAM_PACKET_CONFIG ,VC4_HDMI_RAM_PACKET_ENABLE ); +spin_unlock_irqrestore (&vc4_hdmi->hw_lock, flags); +return 0 ; err_disable_clk:
drivers/gpu/drm/xe/xe_exec.c +2 -5
@@ -330,11 +330,8 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)xe_sched_job_push (job);xe_vm_reactivate_rebind (vm); -if (!err && !xe_vm_in_lr_mode (vm)) { -spin_lock (&xe->ttm.lru_lock); -ttm_lru_bulk_move_tail (&vm->lru_bulk_move); -spin_unlock (&xe->ttm.lru_lock); - } +if (!err && !xe_vm_in_lr_mode (vm)) +xe_vm_bump_lru (vm, exec);if (mode ==EXEC_MODE_LR )xe_hw_engine_group_resume_faulting_lr_jobs (group);
drivers/gpu/drm/xe/xe_vm.c +28 -3
@@ -439,6 +439,33 @@ int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec,return 0 ; } +/** +* xe_vm_bump_lru() - Bump the LRU position of BOs used by a submission +* @vm: The vm for which we are bumping LRUs. +* @exec: The struct drm_exec with the locked GEM objects. +* +* Move the VM's private BOs, and all external objects locked by @exec, +* to the LRU tail. Private BOs are moved in bulk using @vm's +* &xe_vm.lru_bulk_move. External objects, which may be shared with other +* VMs, are not part of that bulk move and are bumped individually. +*/ +void xe_vm_bump_lru (struct xe_vm *vm,struct drm_exec *exec) +{ +spinlock_t *lru_lock = &vm->xe->ttm.lru_lock; +struct drm_gem_object *obj; + +spin_lock (lru_lock); +ttm_lru_bulk_move_tail (&vm->lru_bulk_move); +drm_exec_for_each_locked_object (exec, obj) { +if (!drm_gpuvm_is_extobj (&vm->gpuvm, obj)) +continue ; + +ttm_bo_move_to_lru_tail (&gem_to_xe_bo (obj)->ttm); +cond_resched_lock (lru_lock); + } +spin_unlock (lru_lock); +} +static int xe_preempt_work_begin (struct drm_exec *exec,struct xe_vm *vm,bool *done) {
@@ -552,9 +579,7 @@ static void preempt_rebind_work_func(struct work_struct *w)#undef retry_required -spin_lock (&vm->xe->ttm.lru_lock); -ttm_lru_bulk_move_tail (&vm->lru_bulk_move); -spin_unlock (&vm->xe->ttm.lru_lock); +xe_vm_bump_lru (vm, &exec);/* Point of no return. */ arm_preempt_fences (vm, &preempt_fences);
drivers/gpu/drm/xe/xe_vm.h +2 -0
@@ -248,6 +248,8 @@ int xe_vm_lock_vma(struct drm_exec *exec, struct xe_vma *vma);int xe_vm_validate_rebind (struct xe_vm *vm,struct drm_exec *exec,unsigned int num_fences); +void xe_vm_bump_lru (struct xe_vm *vm,struct drm_exec *exec); +/** * xe_vm_resv() - Return's the vm's reservation object * @vm: The vm
drivers/hv/channel_mgmt.c +9 -3
@@ -743,13 +743,14 @@ static void init_vp_index(struct vmbus_channel *channel)u32 i, ncpu =num_online_cpus ();cpumask_var_t available_mask;struct cpumask *allocated_mask; +const struct cpumask *node_mask;const struct cpumask *hk_mask =housekeeping_cpumask (HK_TYPE_MANAGED_IRQ );u32 target_cpu;int numa_node;if (!perf_chn || !alloc_cpumask_var (&available_mask,GFP_KERNEL ) || -cpumask_empty (hk_mask)) { + !cpumask_intersects (hk_mask, cpu_online_mask)) {/* * If the channel is not a performance critical * channel, bind it to VMBUS_CONNECT_CPU.
@@ -771,14 +772,19 @@ static void init_vp_index(struct vmbus_channel *channel) next_numa_node_id =0 ;continue ; } -if (cpumask_empty (cpumask_of_node (numa_node))) +/* +* Try next NUMA node if current NUMA node has no CPU +* or doesn't contain any housekeeping CPU. +*/ + node_mask =cpumask_of_node (numa_node); +if (!cpumask_intersects (node_mask, hk_mask))continue ;break ; } allocated_mask = &hv_context.hv_numa_map[numa_node]; retry: -cpumask_xor (available_mask, allocated_mask,cpumask_of_node (numa_node)); +cpumask_xor (available_mask, allocated_mask, node_mask);cpumask_and (available_mask, available_mask, hk_mask);if (cpumask_empty (available_mask)) {
drivers/hv/connection.c +0 -1
@@ -340,7 +340,6 @@ int vmbus_connect(void) cleanup:pr_err ("Unable to connect to host\n" ); - vmbus_connection.conn_state =DISCONNECTED ;vmbus_disconnect ();kfree (msginfo);
drivers/hv/vmbus_drv.c +0 -1
@@ -2899,7 +2899,6 @@ static void __exit vmbus_exit(void)hv_remove_kexec_handler ();hv_remove_crash_handler (); - vmbus_connection.conn_state =DISCONNECTED ;hv_stimer_global_cleanup ();vmbus_disconnect ();if (vmbus_irq ==-1 ) {
drivers/i2c/busses/i2c-qcom-cci.c +2 -2
@@ -168,12 +168,12 @@ static irqreturn_t cci_isr(int irq, void *dev) }if (unlikely (val &CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK )) { - reset =CCI_RESET_CMD_M0_MASK ; + reset |=CCI_RESET_CMD_M0_MASK ; ret =IRQ_HANDLED ; }if (unlikely (val &CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK )) { - reset =CCI_RESET_CMD_M1_MASK ; + reset |=CCI_RESET_CMD_M1_MASK ; ret =IRQ_HANDLED ; }
drivers/i2c/busses/i2c-viai2c-wmt.c +8 -14
@@ -44,16 +44,13 @@ static int wmt_i2c_reset_hardware(struct viai2c *i2c)int err; err =clk_prepare_enable (i2c->clk); -if (err) { -dev_err (i2c->dev,"failed to enable clock\n" ); -return err; - } +if (err) +return dev_err_probe (i2c->dev, err,"failed to enable clock\n" ); err =clk_set_rate (i2c->clk,20000000 );if (err) { -dev_err (i2c->dev,"failed to set clock = 20Mhz\n" );clk_disable_unprepare (i2c->clk); -return err; +return dev_err_probe (i2c->dev, err,"failed to set clock = 20Mhz\n" ); }writew (0 , i2c->base +VIAI2C_REG_CR );
@@ -120,11 +117,10 @@ static int wmt_i2c_probe(struct platform_device *pdev)return dev_err_probe (&pdev->dev, err,"failed to request irq %i\n" , i2c->irq); - i2c->clk =of_clk_get (np,0 ); -if (IS_ERR (i2c->clk)) { -dev_err (&pdev->dev,"unable to request clock\n" ); -return PTR_ERR (i2c->clk); - } + i2c->clk =devm_clk_get (&pdev->dev,NULL ); +if (IS_ERR (i2c->clk)) +return dev_err_probe (&pdev->dev,PTR_ERR (i2c->clk), +"unable to request clock\n" ); err =of_property_read_u32 (np,"clock-frequency" , &clk_rate);if (!err && clk_rate ==I2C_MAX_FAST_MODE_FREQ )
@@ -139,10 +135,8 @@ static int wmt_i2c_probe(struct platform_device *pdev) adap->dev.of_node = pdev->dev.of_node; err =wmt_i2c_reset_hardware (i2c); -if (err) { -dev_err (&pdev->dev,"error initializing hardware\n" ); +if (err)return err; - } err =i2c_add_adapter (adap);if (err)
drivers/md/dm-cache-target.c +31 -28
129 lines not on this page · raw message
drivers/md/dm-crypt.c +1 -2
@@ -1837,7 +1837,6 @@ static void crypt_dec_pending(struct dm_crypt_io *io) {struct crypt_config *cc = io->cc;struct bio *base_bio = io->base_bio; -blk_status_t error = io->error;if (!atomic_dec_and_test (&io->io_pending))return ;
@@ -1859,7 +1858,7 @@ static void crypt_dec_pending(struct dm_crypt_io *io)else kfree (io->integrity_metadata); - base_bio->bi_status = error; + base_bio->bi_status = io->error;bio_endio (base_bio); }
drivers/md/dm-ebs-target.c +1 -2
@@ -265,8 +265,7 @@ static int ebs_ctr(struct dm_target *ti, unsigned int argc, char **argv) r = -EINVAL ;if (sscanf (argv[1 ],"%llu%c" , &tmp, &dummy) !=1 || - tmp != (sector_t )tmp || - (sector_t )tmp >= ti->len) { + tmp != (sector_t )tmp) { ti->error ="Invalid device offset sector" ; goto bad; }
drivers/md/dm-integrity.c +5 -1
@@ -1856,7 +1856,7 @@ static void integrity_metadata(struct work_struct *w)if (unlikely (dio->op ==REQ_OP_DISCARD )) {unsigned int bi_size = dio->bio_details.bi_iter.bi_size; -unsigned int max_size =likely (checksums != checksums_onstack) ?PAGE_SIZE :HASH_MAX_DIGESTSIZE ; +unsigned int max_size =likely (checksums != checksums_onstack) ?PAGE_SIZE :sizeof (checksums_onstack);unsigned int max_blocks = (max_size - extra_space) / ic->tag_size;sector_t sector = dio->range.logical_sector;
@@ -3979,6 +3979,10 @@ static void dm_integrity_io_hints(struct dm_target *ti, struct queue_limits *lim limits->discard_granularity = ic->sectors_per_block <<SECTOR_SHIFT ; } +if (ic->internal_hash && + (ic->mode =='D' || ic->mode =='B' || ic->mode =='I' )) + limits->features |=BLK_FEAT_STABLE_WRITES ; +if (!ic->internal_hash) {struct blk_integrity *bi = &limits->integrity;
drivers/net/ethernet/broadcom/genet/bcmgenet.c +10 -0
@@ -2095,6 +2095,16 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) goto out; } +/* We store Tx state in the control block, so the skb must not be +* shared, but ether_setup() leaves IFF_TX_SKB_SHARING set. +*/ + skb =skb_share_check (skb,GFP_ATOMIC ); +if (!skb) { +BCMGENET_STATS64_INC ((&ring->stats64), dropped); + ret =NETDEV_TX_OK ; + goto out; + } +/* Retain how many bytes will be sent on the wire, without TSB inserted * by transmit checksum offload */
drivers/net/wireless/intersil/p54/fwio.c +37 -5
59 lines not on this page · raw message
drivers/pci/pci.c +11 -4
@@ -1312,9 +1312,11 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)* initialize. * * If the device is below a Root Port with Configuration RRS -* Software Visibility enabled, reading the Vendor ID returns a +* Software Visibility enabled, reading the Vendor ID may return a * special data value if the device responded with RRS. Read the -* Vendor ID until we get non-RRS status. +* Vendor ID until we get non-RRS status and something other than +* ~0. The Vendor ID of VFs reads ~0, so check their Command +* register instead. * * If there's no Root Port or Configuration RRS Software Visibility * is not enabled, the device may still respond with RRS, but
@@ -1334,8 +1336,13 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)if (root && root->config_rrs_sv) {pci_read_config_dword (dev,PCI_VENDOR_ID , &id); -if (!pci_bus_rrs_vendor_id (id)) -break ; +if (!pci_bus_rrs_vendor_id (id)) { +if (PCI_POSSIBLE_ERROR (id) && dev->is_virtfn) +pci_read_config_dword (dev,PCI_COMMAND , + &id); +if (!PCI_POSSIBLE_ERROR (id)) +break ; + } }else {pci_read_config_dword (dev,PCI_COMMAND , &id);if (!PCI_POSSIBLE_ERROR (id))
drivers/pinctrl/pinctrl-amd.c +9 -0
@@ -871,6 +871,15 @@ static void amd_gpio_irq_init(struct amd_gpio *gpio_dev) mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 ); +#ifdef CONFIG_ACPI +/* +* Platforms without _AEI leave GPIO wake sources to firmware, so +* preserve their S4 wake bits. +*/ +if (acpi_has_method (ACPI_HANDLE (&gpio_dev->pdev->dev),"_AEI" )) + mask |=BIT (WAKE_CNTRL_OFF_S4 ); +#endif +for (i =0 ; i < desc->npins; i++) {int pin = desc->pins[i].number;const struct pin_desc *pd =pin_desc_get (gpio_dev->pctrl, pin);
drivers/pinctrl/qcom/pinctrl-ipq5018.c +5 -5
@@ -363,7 +363,7 @@ static const char * const blsp1_uart0_groups[] = { };static const char *const gcc_plltest_groups[] = { -"gpio10" ,"gpio12" , +"gpio10" , };static const char *const gcc_tlmm_groups[] = {
@@ -557,7 +557,7 @@ static const char * const qdss_cti_trig_in_b0_groups[] = { };static const char *const pwm2_groups[] = { -"gpio44" , +"gpio12" ,"gpio44" , };static const char *const qdss_cti_trig_out_b1_groups[] = {
@@ -565,7 +565,7 @@ static const char * const qdss_cti_trig_out_b1_groups[] = { };static const char *const pwm3_groups[] = { -"gpio45" , +"gpio45" ,"gpio13" , };static const char *const qdss_cti_trig_in_b1_groups[] = {
@@ -690,8 +690,8 @@ static const struct msm_pingroup ipq5018_groups[] = {PINGROUP (9 , sdc1_clk, qspi_clk, _, qdss_tracedata_a, _, _, _, _, _),PINGROUP (10 , blsp0_spi, blsp1_uart0, led0, gcc_plltest, qdss_tracedata_a, _, _, _, _),PINGROUP (11 , blsp0_spi, blsp1_uart0, _, gcc_tlmm, qdss_tracedata_a, _, _, _, _), -PINGROUP (12 , blsp0_spi, blsp0_i2c, blsp1_uart0, _, gcc_plltest, qdss_tracedata_a, _, _, _), -PINGROUP (13 , blsp0_spi, blsp0_i2c, blsp1_uart0, _, qdss_tracedata_a, _, _, _, _), +PINGROUP (12 , blsp0_spi, blsp0_i2c, blsp1_uart0, _, pwm2, qdss_tracedata_a, _, _, _), +PINGROUP (13 , blsp0_spi, blsp0_i2c, blsp1_uart0, pwm3, qdss_tracedata_a, _, _, _, _),PINGROUP (14 , pcie0_clk, _, _, cri_trng0, qdss_tracedata_a, _, _, _, _),PINGROUP (15 , _, _, cri_trng1, qdss_tracedata_a, _, _, _, _, _), PINGROUP(16, pcie0_wake, _, _, cri_trng, qdss_tracedata_a, _, _, _, _),
drivers/power/supply/ds2780_battery.c +1 -1
@@ -304,7 +304,7 @@ static int ds2780_get_capacity(struct ds2780_device_info *dev_info,return ret; *capacity = raw; -return raw; +return 0 ; }static int ds2780_get_status (struct ds2780_device_info *dev_info,int *status)
drivers/power/supply/generic-adc-battery.c +7 -2
@@ -90,12 +90,17 @@ static int gab_read_channel(struct gab *adc_bat, enum gab_chan_type channel,int ret; ret =iio_read_channel_processed (adc_bat->channel[channel], result); -if (ret <0 ) +if (ret <0 ) {dev_err (&adc_bat->psy->dev,"read channel error: %d\n" , ret); +return ret; + } + +if (channel ==GAB_TEMP ) + *result /=100 ;/* Convert from milli- to deci-degree */ else *result *=1000 ; -return ret; +return 0 ; } static int gab_get_property(struct power_supply *psy,
drivers/s390/net/ctcm_mpc.c +1 -2
@@ -826,7 +826,7 @@ static void mpc_action_go_ready(fsm_instance *fsm, int event, void *arg)fsm_deltimer (&grp->timer); -if (grp->saved_xid2->xid2_flag2 ==0x40 ) { +if (priv->xid->xid2_flag2 ==0x40 ) { priv->xid->xid2_flag2 =0x00 ;if (grp->estconnfunc) { grp->estconnfunc(grp->port_num, 1,
@@ -1636,7 +1636,6 @@ static int mpc_validate_xid(struct mpcg_info *mpcginfo)"The XID used in the MPC protocol is not valid, " "rc = %d\n", rc); priv->xid->xid2_flag2 =0x40 ; - grp->saved_xid2->xid2_flag2 =0x40 ; }return rc;
drivers/scsi/libiscsi.c +8 -6
@@ -1142,13 +1142,15 @@ static int iscsi_handle_reject(struct iscsi_conn *conn, struct iscsi_hdr *hdr,spin_unlock (&conn->session->frwd_lock);spin_lock (&conn->session->back_lock); }else { -struct iscsi_task *task; +struct iscsi_task *task =NULL ;/* * Our nop as ping got dropped. We know the target * and transport are ok so just clean up */ - task =iscsi_itt_to_task (conn, rejected_pdu.itt); -if (!task) { +if (!iscsi_verify_itt (conn, rejected_pdu.itt)) + task =iscsi_itt_to_task (conn, rejected_pdu.itt); +if (!task || task->state ==ISCSI_TASK_FREE || + task->sc) {iscsi_conn_printk (KERN_ERR , conn,"Invalid pdu reject. Could " "not lookup rejected task.\n" );
@@ -1191,7 +1193,7 @@ struct iscsi_task *iscsi_itt_to_task(struct iscsi_conn *conn, itt_t itt) session->tt->parse_pdu_itt (conn, itt, &i,NULL ); else i =get_itt (itt); -if (i >= session->cmds_max) +if (i <0 || i >= session->cmds_max)return NULL ;return session->cmds[i];
@@ -1284,7 +1286,7 @@ int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,case ISCSI_OP_SCSI_TMFUNC_RSP :case ISCSI_OP_NOOP_IN : task =iscsi_itt_to_task (conn, hdr->itt); -if (!task) +if (!task || task->state ==ISCSI_TASK_FREE || task->sc)return ISCSI_ERR_BAD_ITT ;break ;default :
@@ -1384,7 +1386,7 @@ int iscsi_verify_itt(struct iscsi_conn *conn, itt_t itt)return ISCSI_ERR_BAD_ITT ; } -if (i >= session->cmds_max) { +if (i <0 || i >= session->cmds_max) {iscsi_conn_printk (KERN_ERR , conn,"received invalid itt index %u (max cmds " "%u.\n" , i, session->cmds_max);
drivers/scsi/libsas/sas_expander.c +12 -2
@@ -62,7 +62,11 @@ static int smp_execute_task_sg(struct domain_device *dev,to_sas_internal (dev->port->ha->shost->transportt);struct sas_ha_struct *ha = dev->port->ha; -pm_runtime_get_sync (ha->dev); +/* +* Non-blocking: a sync resume here would deadlock against +* sas_drain_work() during HA resume. +*/ +pm_runtime_get_noresume (ha->dev);mutex_lock (&dev->ex_dev.cmd_mutex);for (retry =0 ; retry <3 ; retry++) {if (test_bit (SAS_DEV_GONE , &dev->state)) {
@@ -135,7 +139,7 @@ static int smp_execute_task_sg(struct domain_device *dev, } }mutex_unlock (&dev->ex_dev.cmd_mutex); -pm_runtime_put_sync (ha->dev); +pm_runtime_put (ha->dev);BUG_ON (retry ==3 && task !=NULL );sas_free_task (task);
@@ -2165,6 +2169,11 @@ void sas_smp_handler(struct bsg_job *job, struct Scsi_Host *shost, goto out; } +/* The host may have autosuspended, resume it here. */ + ret =pm_runtime_resume_and_get (dev->port->ha->dev); +if (ret) + goto out; + ret =smp_execute_task_sg (dev, job->request_payload.sg_list, job->reply_payload.sg_list);if (ret >=0 ) {
@@ -2172,6 +2181,7 @@ void sas_smp_handler(struct bsg_job *job, struct Scsi_Host *shost, rcvlen = job->reply_payload.payload_len - ret; ret =0 ; } +pm_runtime_put (dev->port->ha->dev); out:bsg_job_done (job, ret, rcvlen);
drivers/scsi/mpi3mr/mpi3mr_app.c +1 -1
@@ -2968,7 +2968,7 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc) } q =bsg_setup_queue (bsg_dev,dev_name (bsg_dev), &lim, - mpi3mr_bsg_request,NULL ,0 ); + mpi3mr_bsg_request,NULL ,0 ,SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q)) {ioc_err (mrioc,"%s: bsg registration failed\n" ,dev_name (bsg_dev));
drivers/scsi/scsi_transport_fc.c +4 -2
@@ -4290,7 +4290,8 @@ fc_bsg_hostadd(struct Scsi_Host *shost, struct fc_host_attrs *fc_host)scsi_init_limits (shost, &lim); lim.max_segments =min_not_zero (lim.max_segments, i->f->max_bsg_segments); q =bsg_setup_queue (dev, bsg_name, &lim, fc_bsg_dispatch, - fc_bsg_job_timeout, i->f->dd_bsg_size); + fc_bsg_job_timeout, i->f->dd_bsg_size, +SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q)) { dev_err(dev, "fc_host%d: bsg interface failed to initialize - setup queue\n",
@@ -4323,7 +4324,8 @@ fc_bsg_rportadd(struct Scsi_Host *shost, struct fc_rport *rport)scsi_init_limits (shost, &lim); lim.max_segments =min_not_zero (lim.max_segments, i->f->max_bsg_segments); q =bsg_setup_queue (dev,dev_name (dev), &lim, fc_bsg_dispatch_prep, - fc_bsg_job_timeout, i->f->dd_bsg_size); + fc_bsg_job_timeout, i->f->dd_bsg_size, +SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q)) {dev_err (dev,"failed to setup bsg queue\n" );return PTR_ERR (q);
drivers/scsi/scsi_transport_iscsi.c +1 -1
@@ -1545,7 +1545,7 @@ iscsi_bsg_host_add(struct Scsi_Host *shost, struct iscsi_cls_host *ihost)snprintf (bsg_name,sizeof (bsg_name),"iscsi_host%d" , shost->host_no);scsi_init_limits (shost, &lim); q =bsg_setup_queue (dev, bsg_name, &lim, iscsi_bsg_host_dispatch,NULL , -0 ); +0 ,SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q)) {shost_printk (KERN_ERR , shost,"bsg interface failed to " "initialize - no request queue\n" );
drivers/scsi/scsi_transport_sas.c +4 -2
@@ -199,7 +199,8 @@ static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy)if (rphy) { q =bsg_setup_queue (&rphy->dev,dev_name (&rphy->dev),NULL , - sas_smp_dispatch,NULL ,0 ); + sas_smp_dispatch,NULL ,0 , +SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q))return PTR_ERR (q); rphy->q = q;
@@ -208,7 +209,8 @@ static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy)snprintf (name,sizeof (name),"sas_host%d" , shost->host_no); q =bsg_setup_queue (&shost->shost_gendev, name,NULL , - sas_smp_dispatch,NULL ,0 ); + sas_smp_dispatch,NULL ,0 , +SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q))return PTR_ERR (q);to_sas_host_attrs (shost)->q = q;
drivers/scsi/st.c +12 -6
@@ -3194,14 +3194,20 @@ static int set_location(struct scsi_tape *STp, unsigned int block, int partition partition >= ST_NBR_PARTITIONS)return (-EINVAL );if (partition != STp->partition) { -if (get_location (STp, &blk, &p,1 )) +/* +* Save the location for the partition the drive reports, +* not for STp->partition: after a reset STp->partition may +* not match the partition the drive is in. +*/ +if (get_location (STp, &blk, &p,1 ) || + p <0 || p >=ST_NBR_PARTITIONS ) STps->last_block_valid =0 ;else { - STps->last_block_valid =1 ; - STps->last_block_visited = blk; + STp->ps[p].last_block_valid =1 ; + STp->ps[p].last_block_visited = blk;DEBC_printk (STp,"Visited block %d for " "partition %d saved.\n" , - blk, STp->partition); + blk, p); } }
@@ -4442,11 +4448,11 @@ static int st_remove(struct device *dev)remove_cdevs (tpnt);mutex_lock (&st_ref_mutex); -kref_put (&tpnt->kref, scsi_tape_release); -mutex_unlock (&st_ref_mutex);spin_lock (&st_index_lock);idr_remove (&st_index_idr, index);spin_unlock (&st_index_lock); +kref_put (&tpnt->kref, scsi_tape_release); +mutex_unlock (&st_ref_mutex);return 0 ; }
drivers/scsi/xen-scsifront.c +1 -0
@@ -367,6 +367,7 @@ static void scsifront_do_response(struct vscsifrnt_info *info,struct vscsifrnt_shadow *shadow;if (ring_rsp->rqid >=VSCSIIF_MAX_REQS || + !info->shadow[ring_rsp->rqid] || !info->shadow[ring_rsp->rqid]->inflight) {scsifront_set_error (info,"illegal rqid returned by backend!" );return ;
drivers/soc/tegra/fuse/tegra-apbmisc.c +1 -1
@@ -277,7 +277,7 @@ void tegra_acpi_init_apbmisc(void) ret =acpi_dev_get_memory_resources (adev, &resource_list);if (ret <0 ) { -pr_err ("failed to get APBMISC memory resources" ); +pr_err ("failed to get APBMISC memory resources\n" ); goto out_put_acpi_dev; }
drivers/spi/spi-tegra114.c +7 -0
@@ -859,6 +859,13 @@ static u32 tegra_spi_setup_transfer_one(struct spi_device *spi, command1 |=SPI_BIT_LENGTH (bits_per_word -1 ); } +/* +* Re-assert the CS GPIO for every transfer: transfer_end() drops it +* on cs_change, and the assert above only covers is_first_of_msg. +*/ +if (spi_get_csgpiod (spi,0 )) +gpiod_set_value (spi_get_csgpiod (spi,0 ),1 ); +return command1; }
drivers/target/iscsi/iscsi_target_configfs.c +19 -7
@@ -1306,17 +1306,24 @@ static ssize_t iscsi_disc_enforce_discovery_auth_store(struct config_item *item,return -EINVAL ; } +if (iscsit_get_tpg (discovery_tpg) <0 ) +return -EINVAL ; + param =iscsi_find_param_from_key (AUTHMETHOD , discovery_tpg->param_list); -if (!param) -return -EINVAL ; +if (!param) { + err = -EINVAL ; + goto out; + }if (op) {/* * Reset the AuthMethod key to CHAP. */ -if (iscsi_update_param_value (param,CHAP ) <0 ) -return -EINVAL ; +if (iscsi_update_param_value (param,CHAP ) <0 ) { + err = -EINVAL ; + goto out; + } discovery_tpg->tpg_attrib.authentication =1 ; iscsit_global->discovery_acl.node_auth.enforce_discovery_auth =1 ;
@@ -1327,8 +1334,10 @@ static ssize_t iscsi_disc_enforce_discovery_auth_store(struct config_item *item,/* * Reset the AuthMethod key to CHAP,None */ -if (iscsi_update_param_value (param,"CHAP,None" ) <0 ) -return -EINVAL ; +if (iscsi_update_param_value (param,"CHAP,None" ) <0 ) { + err = -EINVAL ; + goto out; + } discovery_tpg->tpg_attrib.authentication =0 ; iscsit_global->discovery_acl.node_auth.enforce_discovery_auth =0 ;
@@ -1337,7 +1346,10 @@ static ssize_t iscsi_disc_enforce_discovery_auth_store(struct config_item *item, " Discovery TPG\n"); } -return count; + err = count; +out: +iscsit_put_tpg (discovery_tpg); +return err; }CONFIGFS_ATTR (iscsi_disc_, enforce_discovery_auth);
drivers/ufs/core/ufs_bsg.c +1 -1
@@ -257,7 +257,7 @@ int ufs_bsg_probe(struct ufs_hba *hba) goto out; q =bsg_setup_queue (bsg_dev,dev_name (bsg_dev),NULL , ufs_bsg_request, -NULL ,0 ); +NULL ,0 ,sizeof (struct ufs_rpmb_reply ));if (IS_ERR (q)) { ret =PTR_ERR (q);device_del (bsg_dev);
fs/afs/internal.h +2 -0
@@ -264,6 +264,8 @@ struct afs_super_info {struct afs_volume *volume;/* volume record */ enum afs_flock_mode flock_mode:8; /* File locking emulation mode */bool dyn_root;/* True if dynamic root */ +/* afs_atcell_get_link() reads ->net_ns in rcu pathwalk */ +struct rcu_head rcu; };static inline struct afs_super_info *AFS_FS_S (struct super_block *sb)
fs/afs/super.c +1 -1
@@ -523,7 +523,7 @@ static void afs_destroy_sbi(struct afs_super_info *as)afs_put_volume (as->volume, afs_volume_trace_put_destroy_sbi);afs_unuse_cell (as->cell, afs_cell_trace_unuse_sbi);put_net (as->net_ns); -kfree (as); +kfree_rcu (as, rcu); } }
fs/autofs/waitq.c +19 -6
@@ -12,15 +12,13 @@*/ static autofs_wqt_t autofs_next_wait_queue =1 ; -void autofs_catatonic_mode (struct autofs_sb_info *sbi) +static void autofs_catatonic_mode_locked (struct autofs_sb_info *sbi) {struct autofs_wait_queue *wq, *nwq; -mutex_lock (&sbi->wq_mutex); -if (sbi->flags &AUTOFS_SBI_CATATONIC ) { -mutex_unlock (&sbi->wq_mutex); +lockdep_assert_held (&sbi->wq_mutex); +if (sbi->flags &AUTOFS_SBI_CATATONIC )return ; - }pr_debug ("entering catatonic mode\n" );
@@ -40,6 +38,21 @@ void autofs_catatonic_mode(struct autofs_sb_info *sbi)fput (sbi->pipe);/* Close the pipe */ sbi->pipe =NULL ; sbi->pipefd =-1 ; +} + +void autofs_catatonic_mode (struct autofs_sb_info *sbi) +{ +mutex_lock (&sbi->wq_mutex); +autofs_catatonic_mode_locked (sbi); +mutex_unlock (&sbi->wq_mutex); +} + +static void autofs_catatonic_mode_for_pipe (struct autofs_sb_info *sbi, +struct file *pipe) +{ +mutex_lock (&sbi->wq_mutex); +if (sbi->pipe == pipe) +autofs_catatonic_mode_locked (sbi);mutex_unlock (&sbi->wq_mutex); }
@@ -170,7 +183,7 @@ static void autofs_notify_daemon(struct autofs_sb_info *sbi,autofs_wait_release (sbi, wq->wait_queue_token, ret);break ;default : -autofs_catatonic_mode (sbi); +autofs_catatonic_mode_for_pipe (sbi, pipe);break ; }fput (pipe);
fs/coredump.c +8 -8
@@ -420,7 +420,9 @@ static int zap_threads(struct task_struct *tsk,int nr = -EAGAIN ;spin_lock_irq (&tsk->sighand->siglock); -if (!(signal->flags &SIGNAL_GROUP_EXIT ) && !signal->group_exec_task) { +/* A freeze requested before the dump would be lost with TIF_SIGPENDING. */ +if (!(signal->flags &SIGNAL_GROUP_EXIT ) && !signal->group_exec_task && + !freezing (tsk) && !(tsk->jobctl &JOBCTL_TRAP_FREEZE )) {/* Allow SIGKILL, see prepare_signal() */ signal->core_state = core_state; nr =zap_process (signal, exit_code);
@@ -474,6 +476,8 @@ static void coredump_finish(bool core_dumped) current->signal->core_state =NULL ;spin_unlock_irq (¤t->sighand->siglock); +/* A released thread may exit and be freed before it is woken. */ +guard (rcu)();while ((curr = next) !=NULL ) { next = curr->next; task = curr->task;
@@ -482,6 +486,7 @@ static void coredump_finish(bool core_dumped)* ->task == NULL before we read ->next. */ smp_mb (); +/* Any wakeup now lets the thread exit, rcu keeps it alive. */ curr->task =NULL ;wake_up_process (task); }
@@ -489,13 +494,8 @@ static void coredump_finish(bool core_dumped)static bool dump_interrupted (void ) { -/* -* SIGKILL or freezing() interrupt the coredumping. Perhaps we -* can do try_to_freeze() and check __fatal_signal_pending(), -* but then we need to teach dump_write() to restart and clear -* TIF_SIGPENDING. -*/ -return fatal_signal_pending (current) ||freezing (current); +/* Only SIGKILL and the freezers set it after zap_threads(). */ +return task_sigpending (current); }static void wait_for_dump_helpers (struct file *file)
fs/ext4/ext4.h +2 -0
@@ -1663,6 +1663,8 @@ struct ext4_sb_info {struct list_head s_es_list;/* List of inodes with reclaimable extents */ long s_es_nr_inode;struct ext4_es_stats s_es_stats; +/* ext4_get_link() reads the sbi in rcu pathwalk */ +struct rcu_head s_rcu;struct mb_cache *s_ea_block_cache;struct mb_cache *s_ea_inode_cache;spinlock_t s_es_lock____cacheline_aligned_in_smp ;
fs/ext4/extents_status.c +6 -1
@@ -1766,12 +1766,17 @@ int ext4_es_register_shrinker(struct ext4_sb_info *sbi) }void ext4_es_unregister_shrinker (struct ext4_sb_info *sbi) +{ +shrinker_free (sbi->s_es_shrinker); +} + +/* ext4_get_link() bumps the hit and miss counters in rcu pathwalk */ +void ext4_es_destroy_stats (struct ext4_sb_info *sbi) {percpu_counter_destroy (&sbi->s_es_stats.es_stats_cache_hits);percpu_counter_destroy (&sbi->s_es_stats.es_stats_cache_misses);percpu_counter_destroy (&sbi->s_es_stats.es_stats_all_cnt);percpu_counter_destroy (&sbi->s_es_stats.es_stats_shk_cnt); -shrinker_free (sbi->s_es_shrinker); }/*
fs/ext4/extents_status.h +1 -0
@@ -237,6 +237,7 @@ static inline void ext4_es_store_pblock_status(struct extent_status *es,extern int ext4_es_register_shrinker (struct ext4_sb_info *sbi);extern void ext4_es_unregister_shrinker (struct ext4_sb_info *sbi); +extern void ext4_es_destroy_stats (struct ext4_sb_info *sbi);extern int ext4_seq_es_shrinker_info_show (struct seq_file *seq,void *v);
fs/ext4/super.c +11 -2
@@ -1289,6 +1289,14 @@ static void ext4_flex_groups_free(struct ext4_sb_info *sbi) } } +static void ext4_put_sbi_rcu (struct rcu_head *head) +{ + struct ext4_sb_info *sbi = container_of(head, struct ext4_sb_info, s_rcu); + +ext4_es_destroy_stats (sbi); +kfree (sbi); +} +static void ext4_put_super (struct super_block *sb) {struct ext4_sb_info *sbi =EXT4_SB (sb);
@@ -1381,7 +1389,6 @@ static void ext4_put_super(struct super_block *sb)ext4_stop_mmpd (sbi);brelse (sbi->s_sbh); - sb->s_fs_info =NULL ;/* * Now that we are completely done shutting down the * superblock, we need to actually destroy the kobject.
@@ -1396,7 +1403,8 @@ static void ext4_put_super(struct super_block *sb)#if IS_ENABLED (CONFIG_UNICODE )utf8_unload (sb->s_encoding);#endif -kfree (sbi); +/* ext4_get_link() reads the sbi and the counters in rcu pathwalk */ +call_rcu (&sbi->s_rcu, ext4_put_sbi_rcu); }static struct kmem_cache *ext4_inode_cachep;
@@ -5659,6 +5667,7 @@ failed_mount8: __maybe_unused } failed_mount3a:ext4_es_unregister_shrinker (sbi); +ext4_es_destroy_stats (sbi); failed_mount3:/* flush s_sb_upd_work before sbi destroy */ flush_work (&sbi->s_sb_upd_work);
fs/fat/dir.c +40 -4
98 lines not on this page · raw message
fs/namei.c +1 -2
@@ -3726,8 +3726,7 @@ static struct dentry *lookup_fast_for_open(struct nameidata *nd, int open_flag)return dentry;if (open_flag &O_CREAT ) { -/* Discard negative dentries. Need inode_lock to do the create */ -if (!dentry->d_inode) { +if (d_is_negative (dentry)) {if (!(nd->flags &LOOKUP_RCU ))dput (dentry); dentry =NULL ;
fs/notify/mark.c +11 -0
@@ -779,6 +779,11 @@ static int fsnotify_add_mark_list(struct fsnotify_mark *mark, void *obj, goto restart; } +if (conn->flags &FSNOTIFY_CONN_FLAG_DESTROYING ) { + err = -ENOENT ; + goto out_err; + } +/* is mark the first mark? */ if (hlist_empty (&conn->list)) {hlist_add_head_rcu (&mark->obj_list, &conn->list);
@@ -965,6 +970,12 @@ void fsnotify_destroy_marks(fsnotify_connp_t *connp) conn =fsnotify_grab_connector (connp);if (!conn)return ; +/* +* New marks could be inserted before our cursor and survive the final +* detachment of the connector from the object. Prevent additions to +* this connector before dropping its lock. +*/ + conn->flags |=FSNOTIFY_CONN_FLAG_DESTROYING ;/* * We have to be careful since we can race with e.g. * fsnotify_clear_marks_by_group() and once we drop the conn->lock, the
fs/ntfs3/ntfs_fs.h +1 -0
@@ -209,6 +209,7 @@ struct ntfs_index {/* Ntfs file system in-core superblock data. */ struct ntfs_sb_info {struct super_block *sb; +struct rcu_head rcu;u32 discard_granularity;u64 discard_granularity_mask_inv;// ~(discard_granularity_mask_inv-1)
fs/ntfs3/super.c +22 -7
@@ -187,7 +187,7 @@ void *ntfs_set_shared(void *ptr, u32 bytes)void *ret =NULL ;int i, j =-1 ; -spin_lock (&s_shared_lock); +spin_lock_bh (&s_shared_lock);for (i =0 ; i <ARRAY_SIZE (s_shared); i++) {if (!s_shared[i].cnt) { j = i;
@@ -205,7 +205,7 @@ void *ntfs_set_shared(void *ptr, u32 bytes) s_shared[j].cnt =1 ; ret = ptr; } -spin_unlock (&s_shared_lock); +spin_unlock_bh (&s_shared_lock);return ret; }
@@ -222,7 +222,7 @@ void *ntfs_put_shared(void *ptr)void *ret = ptr;int i; -spin_lock (&s_shared_lock); +spin_lock_bh (&s_shared_lock);for (i =0 ; i <ARRAY_SIZE (s_shared); i++) {if (s_shared[i].cnt && s_shared[i].ptr == ptr) {if (--s_shared[i].cnt)
@@ -230,7 +230,7 @@ void *ntfs_put_shared(void *ptr)break ; } } -spin_unlock (&s_shared_lock); +spin_unlock_bh (&s_shared_lock);return ret; }
@@ -630,6 +630,8 @@ static noinline void ntfs3_put_sbi(struct ntfs_sb_info *sbi)static void ntfs3_free_sbi (struct ntfs_sb_info *sbi) { +if (sbi->options) +put_mount_options (sbi->options);kfree (sbi->new_rec);kvfree (ntfs_put_shared (sbi->upcase));kvfree (sbi->def_table);
@@ -641,6 +643,11 @@ static void ntfs3_free_sbi(struct ntfs_sb_info *sbi)kfree (sbi); } +static void ntfs3_free_sbi_rcu (struct rcu_head *head) +{ +ntfs3_free_sbi (container_of(head ,struct ntfs_sb_info ,rcu )); +} +static void ntfs_put_super (struct super_block *sb) {struct ntfs_sb_info *sbi = sb->s_fs_info;
@@ -657,6 +664,12 @@ static void ntfs_put_super(struct super_block *sb)/* Mark rw ntfs as clear, if possible. */ ntfs_set_state (sbi,NTFS_DIRTY_CLEAR ); + +/* +* The mount options stay until the sbi is freed: ->d_hash() and +* ->d_compare() of a pathwalk in rcu mode read the nls table through +* them. +*/ ntfs3_put_sbi (sbi); }
@@ -1806,9 +1819,11 @@ static void ntfs3_kill_sb(struct super_block *sb)kill_block_super (sb); -if (sbi->options) -put_mount_options (sbi->options); -ntfs3_free_sbi (sbi); +/* +* A pathwalk in rcu mode may still be in ->d_hash() or ->d_compare() +* and read the upcase table and the nls table through the sbi. +*/ +call_rcu (&sbi->rcu, ntfs3_free_sbi_rcu); }// clang-format off
fs/ocfs2/dlm/dlmcommon.h +2 -0
@@ -435,6 +435,8 @@ enum { DLM_DEREF_LOCKRES_DONE = 522, }; +extern spinlock_t dlm_reco_state_lock; +struct dlm_reco_node_data {int state;
fs/ocfs2/dlm/dlmdebug.c +4 -1
@@ -792,8 +792,11 @@ static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len) buf + out, len - out); out +=scnprintf (buf + out, len - out,"\n" ); +spin_unlock (&dlm->spinlock); +/* Recovery Node State: */ out +=scnprintf (buf + out, len - out,"Recovery Node State:\n" ); +spin_lock (&dlm_reco_state_lock);list_for_each_entry (node, &dlm->reco.node_data, list) {switch (node->state) {case DLM_RECO_NODE_DATA_INIT :
@@ -825,7 +828,7 @@ static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len) node->node_num, state); } -spin_unlock (&dlm->spinlock); +spin_unlock (&dlm_reco_state_lock);return out; }
fs/ocfs2/dlm/dlmrecovery.c +1 -1
@@ -80,7 +80,7 @@ static int dlm_lockres_master_requery(struct dlm_ctxt *dlm,static u64 dlm_get_next_mig_cookie (void ); -static DEFINE_SPINLOCK (dlm_reco_state_lock); +DEFINE_SPINLOCK (dlm_reco_state_lock);static DEFINE_SPINLOCK (dlm_mig_cookie_lock);static u64 dlm_mig_cookie =1 ;
fs/pipe.c +4 -2
@@ -753,9 +753,11 @@ pipe_fasync(int fd, struct file *filp, int on)if (filp->f_mode &FMODE_READ ) retval =fasync_helper (fd, filp, on, &pipe->fasync_readers);if ((filp->f_mode &FMODE_WRITE ) && retval >=0 ) { +int read_ret = retval; + retval =fasync_helper (fd, filp, on, &pipe->fasync_writers); -if (retval <0 && (filp->f_mode &FMODE_READ )) -/* this can happen only if on == T */ +/* Undo only a reader entry added by this call. */ +if (retval <0 && read_ret >0 )fasync_helper (-1 , filp,0 , &pipe->fasync_readers); }mutex_unlock (&pipe->mutex);
fs/smb/client/cifssmb.c +11 -2
@@ -3188,6 +3188,7 @@ int cifs_do_set_acl(const unsigned int xid, struct cifs_tcon *tcon,int rc =0 ;int bytes_returned =0 ;__u16 params, byte_count, data_count, param_offset, offset; +size_t cifs_acl_size, bytes_available;cifs_dbg (FYI ,"In SetPosixACL (Unix) for path %s\n" , fileName); setAclRetry:
@@ -3206,8 +3207,7 @@ int cifs_do_set_acl(const unsigned int xid, struct cifs_tcon *tcon, } params =6 + name_len; pSMB->MaxParameterCount =cpu_to_le16 (2 ); -/* BB find max SMB size from sess */ - pSMB->MaxDataCount =cpu_to_le16 (1000 ); + pSMB->MaxDataCount = cpu_to_le16(min_t(unsigned int, CIFSMaxBufSize, USHRT_MAX)); pSMB->MaxSetupCount =0 ; pSMB->Reserved =0 ; pSMB->Flags =0 ;
@@ -3219,6 +3219,15 @@ int cifs_do_set_acl(const unsigned int xid, struct cifs_tcon *tcon, parm_data = ((char *)pSMB) +sizeof (pSMB->hdr.smb_buf_length) + offset; pSMB->ParameterOffset =cpu_to_le16 (param_offset); +/* make sure we can fit the larger cifs_posix_aces in the buffer */ + cifs_acl_size =sizeof (struct cifs_posix_acl ) + + (acl->a_count *sizeof (struct cifs_posix_ace )); + bytes_available = (CIFSMaxBufSize +MAX_HEADER_SIZE (tcon->ses->server)) - offset; +if (cifs_acl_size > bytes_available || cifs_acl_size >USHRT_MAX ) { + rc = -E2BIG ; + goto setACLerrorExit; + } +/* convert to on the wire format for POSIX ACL */ data_count =posix_acl_to_cifs (parm_data, acl, acl_type);
fs/smb/client/connect.c +16 -5
@@ -4151,14 +4151,25 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,return rc; } -static int -cifs_set_vol_auth (struct smb3_fs_context *ctx,struct cifs_ses *ses) +static int set_fs_context_auth (struct smb3_fs_context *ctx, +struct cifs_ses *ses) { ctx->sectype = ses->sectype; -/* krb5 is special, since we don't need username or pw */ -if (ctx->sectype == Kerberos) +/* +* krb5 is special as we might need to pass username (passwordless) down +* to cifs.upcall(8) for keytab. +*/ +if (ctx->sectype == Kerberos) { +if (ses->user_name && ses->user_name[0 ]) { + ctx->username =kstrndup (ses->user_name, +CIFS_MAX_USERNAME_LEN , +GFP_KERNEL ); +if (!ctx->username) +return -ENOMEM ; + }return 0 ; + }return cifs_set_cifscreds (ctx, ses); }
@@ -4197,7 +4208,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) ctx->witness = master_tcon->use_witness; ctx->dfs_root_ses = master_tcon->ses->dfs_root_ses; - rc =cifs_set_vol_auth (ctx, master_tcon->ses); + rc =set_fs_context_auth (ctx, master_tcon->ses);if (rc) { tcon =ERR_PTR (rc); goto out;
fs/smb/client/smb2ops.c +6 -1
@@ -2292,7 +2292,7 @@ smb2_duplicate_extents(const unsigned int xid, trgtfile->fid.volatile_fid, tcon->tid, tcon->ses->Suid, src_off, dest_off, len); inode =d_inode (trgtfile->dentry); -if (inode->i_size < dest_off + len) { +if (i_size_read (inode) < dest_off + len) { rc =smb2_set_file_size (xid, tcon, trgtfile, dest_off + len, false);if (rc) goto duplicate_extents_out;
@@ -2318,6 +2318,11 @@ smb2_duplicate_extents(const unsigned int xid,if (ret_data_len >0 )cifs_dbg (FYI ,"Non-zero response length in duplicate extents\n" ); +if (rc) { +CIFS_I (inode)->time =0 ;/* force reval */ +cifs_invalidate_cache (inode,0 ); + } + duplicate_extents_out:if (rc) trace_smb3_clone_err(xid, srcfile->fid.volatile_fid,
fs/smb/server/smb2pdu.c +5 -0
@@ -5698,6 +5698,7 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,struct object_id_info *info; info = (struct object_id_info *)(rsp->Buffer); +memset (info,0 ,sizeof (*info));if (path.mnt->mnt_sb->s_uuid_len ==16 ) memcpy(info->objid, path.mnt->mnt_sb->s_uuid.b,
@@ -5752,6 +5753,7 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work, info->FreeSpaceStopFiltering =0 ; info->DefaultQuotaThreshold =cpu_to_le64 (SMB2_NO_FID ); info->DefaultQuotaLimit =cpu_to_le64 (SMB2_NO_FID ); + info->FileSystemControlFlags =0 ; info->Padding =0 ; rsp->OutputBufferLength =cpu_to_le32 (48 ); fixed_len =48 ;
@@ -5774,6 +5776,9 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work, info->UserBlocksAvail =cpu_to_le64 (stfs.f_bavail); info->TotalFileNodes =cpu_to_le64 (stfs.f_files); info->FreeFileNodes =cpu_to_le64 (stfs.f_ffree); + info->FileSysIdentifier = +cpu_to_le64 ((u64 )(u32 )stfs.f_fsid.val[1 ] <<32 | + (u32 )stfs.f_fsid.val[0 ]); rsp->OutputBufferLength =cpu_to_le32 (56 ); fixed_len =56 ; }
fs/tracefs/event_inode.c +13 -3
@@ -91,6 +91,14 @@ static void free_ei_rcu(struct rcu_head *rcu) } } +/* read under eventfs_srcu and, by tracefs_d_revalidate(), in rcu pathwalk */ +static void free_ei_srcu (struct rcu_head *rcu) +{ + struct eventfs_inode *ei = container_of(rcu, struct eventfs_inode, rcu); + +call_rcu (&ei->rcu, free_ei_rcu); +} +/* * eventfs_inode reference count management. *
@@ -112,7 +120,7 @@ static void release_ei(struct kref *ref) entry->release (entry->name, ei->data); } -call_srcu (&eventfs_srcu, &ei->rcu, free_ei_rcu); +call_srcu (&eventfs_srcu, &ei->rcu, free_ei_srcu); }static inline void put_ei (struct eventfs_inode *ei)
@@ -670,8 +678,10 @@ static int eventfs_iterate(struct file *file, struct dir_context *ctx)* Matches the smp_wmb() in free_ei() */ smp_rmb (); -if (ei->is_freed) -return -EINVAL ; +if (ei->is_freed) { + ret = -EINVAL ; + goto out; + }if (c >0 ) { c--;
fs/unicode/utf8-core.c +17 -4
@@ -3,6 +3,7 @@#include <linux/kernel.h> #include <linux/string.h> #include <linux/slab.h> +#include <linux/rcupdate.h> #include <linux/parser.h> #include <linux/errno.h> #include <linux/stringhash.h>
@@ -205,12 +206,24 @@ struct unicode_map *utf8_load(unsigned int version) }EXPORT_SYMBOL (utf8_load); +static void utf8_unload_rcu (struct rcu_head *head) +{ + struct unicode_map *um = container_of(head, struct unicode_map, rcu); + +symbol_put (utf8_data_table); +kfree (um); +} + +/* +* A pathwalk in rcu mode may still be in ->d_hash() or ->d_compare() of a +* filesystem that is being torn down and read the map through its +* superblock, so the map and the tables it points to have to outlive the +* grace period. +*/ void utf8_unload (struct unicode_map *um) { -if (um) { -symbol_put (utf8_data_table); -kfree (um); - } +if (um) +call_rcu (&um->rcu, utf8_unload_rcu); }EXPORT_SYMBOL (utf8_unload);
fs/xfs/libxfs/xfs_sb.c +7 -10
@@ -1186,26 +1186,23 @@ xfs_sync_sb_buf( struct xfs_mount *mp) {struct xfs_trans *tp; -struct xfs_buf *bp;int error; error =xfs_trans_alloc (mp, &M_RES (mp)->tr_sb,0 ,0 ,0 , &tp);if (error)return error; - bp =xfs_trans_getsb (tp);xfs_log_sb (tp); -xfs_trans_bhold (tp, bp);xfs_trans_set_sync (tp); error =xfs_trans_commit (tp);if (error) - goto out; -/* -* write out the sb buffer to get the changes to disk -*/ - error =xfs_bwrite (bp); -out: -xfs_buf_relse (bp); +return error; + +/* Re-acquire and write the sb to disk. */ +xfs_buf_lock (mp->m_sb_bp); + error =xfs_bwrite (mp->m_sb_bp); +xfs_buf_unlock (mp->m_sb_bp); +return error; }
fs/xfs/xfs_fsmap.c +1 -1
@@ -916,7 +916,7 @@ xfs_getfsmap(return -EINVAL ; use_rmap =xfs_has_rmapbt (mp) && -has_capability_noaudit (current,CAP_SYS_ADMIN ); +ns_capable_noaudit (&init_user_ns,CAP_SYS_ADMIN ); head->fmh_entries =0 ;/* Set up our device handlers. */
fs/xfs/xfs_ioctl.c +1 -1
@@ -573,7 +573,7 @@ xfs_ioctl_setattr_get_trans( goto out_error; error =xfs_trans_alloc_ichange (ip,NULL ,NULL , pdqp, -has_capability_noaudit (current,CAP_FOWNER ), &tp); +ns_capable_noaudit (&init_user_ns,CAP_FOWNER ), &tp);if (error) goto out_error;
fs/xfs/xfs_iops.c +1 -1
@@ -735,7 +735,7 @@ xfs_setattr_nonsize( } error =xfs_trans_alloc_ichange (ip, udqp, gdqp,NULL , -has_capability_noaudit (current,CAP_FOWNER ), &tp); +ns_capable_noaudit (&init_user_ns,CAP_FOWNER ), &tp);if (error) goto out_dqrele;
include/drm/drm_exec.h +9 -6
@@ -67,13 +67,15 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index)/* Helper for drm_exec_for_each_locked_object(). Internal use only. */ #define __drm_exec_for_each_locked_object (exec, obj, __index) \ - for (unsigned long __index = 0; ((obj) = drm_exec_obj(exec, __index)); ++__index) + for (unsigned long __index = 0; ((obj) = drm_exec_obj(exec, __index)); \ + ++__index)/** * drm_exec_for_each_locked_object - iterate over all the locked objects * @exec: drm_exec object * @obj: the current GEM object * -* Iterate over all the locked GEM objects inside the drm_exec object. +* Iterate over all the explicitly locked GEM objects inside the drm_exec +* container, except for the contended and implicit prelocked one. */ #define drm_exec_for_each_locked_object (exec, obj) \ __drm_exec_for_each_locked_object(exec, obj, __UNIQUE_ID(drm_exec))
@@ -88,12 +90,13 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index)* @exec: drm_exec object * @obj: the current GEM object * -* Iterate over all the locked GEM objects inside the drm_exec object in -* reverse locking order. Note that the internal index may wrap around, -* but that will be caught by drm_exec_obj(), returning a NULL object. +* Iterate over all the explicitly locked GEM objects inside the drm_exec +* container in reverse locking order. Note that the internal index may wrap +* around, but that will be caught by drm_exec_obj(), returning a NULL object. */ #define drm_exec_for_each_locked_object_reverse (exec, obj) \ - __drm_exec_for_each_locked_object_reverse(exec, obj, __UNIQUE_ID(drm_exec)) + __drm_exec_for_each_locked_object_reverse(exec, obj, \ + __UNIQUE_ID(drm_exec))/** * drm_exec_until_all_locked - loop until all GEM objects are locked
include/linux/bsg-lib.h +2 -1
@@ -66,7 +66,8 @@ void bsg_job_done(struct bsg_job *job, int result, unsigned int reply_payload_rcv_len);struct request_queue *bsg_setup_queue (struct device *dev,const char *name,struct queue_limits *lim,bsg_job_fn *job_fn, -bsg_timeout_fn *timeout,int dd_job_size); +bsg_timeout_fn *timeout,int dd_job_size, +unsigned int reply_len);void bsg_remove_queue (struct request_queue *q);void bsg_job_put (struct bsg_job *job);int __must_check bsg_job_get (struct bsg_job *job);
include/linux/cgroup-defs.h +4 -1
@@ -458,7 +458,10 @@ struct cgroup {int nr_threaded_children;/* # of live threaded child cgroups */ -/* sequence number for cgroup.kill, serialized by css_set_lock. */ +/* +* Sequence number for cgroup.kill. Incremented with both cgroup_mutex +* and css_set_lock held. Readers hold either one. +*/ unsigned int kill_seq;struct kernfs_node *kn;/* cgroup kernfs entry */
include/linux/fsnotify_backend.h +1 -0
@@ -468,6 +468,7 @@ struct fsnotify_mark_connector {unsigned char prio;/* Highest priority group */ #define FSNOTIFY_CONN_FLAG_IS_WATCHED 0x01#define FSNOTIFY_CONN_FLAG_HAS_IREF 0x02 +#define FSNOTIFY_CONN_FLAG_DESTROYING 0x04unsigned short flags;/* flags [lock] */ union {/* Object pointer [lock] */
include/linux/futex.h +9 -5
@@ -23,26 +23,30 @@ struct task_struct;* 01 : Shared futex (PTHREAD_PROCESS_SHARED) * mapped on a file (reference on the underlying inode) * 10 : Shared futex (PTHREAD_PROCESS_SHARED) -* (but private mapping on an mm, and reference taken on it) +* (but private mapping on an mm) */ -#define FUT_OFF_INODE 1/* We set bit 0 if key has a reference on inode */ -#define FUT_OFF_MMSHARED 2/* We set bit 1 if key has a reference on mm */ +#define FUT_OFF_INODE 1/* We set bit 0 if shared key identifies an inode */ +#define FUT_OFF_MMSHARED 2/* We set bit 1 if shared key identifies an mm */ union futex_key { +/* For FUT_OFF_INODE */ struct {u64 i_seq;unsigned long pgoff;unsigned int offset; } shared; + +/* For FUT_OFF_MMSHARED or private */ struct {union { -struct mm_struct *mm; -u64 __tmp; +struct mm_struct *mm;/* for private */ +u64 mm_seq;/* for FUT_OFF_MMSHARED */ };unsigned long address;unsigned int offset; } private; +struct {u64 ptr;unsigned long word;
include/linux/huge_mm.h +1 -1
@@ -254,7 +254,7 @@ static inline unsigned long thp_vma_suitable_orders(struct vm_area_struct *vma,return orders; } -static inline bool file_thp_enabled (struct vm_area_struct *vma) +static inline bool file_thp_enabled (const struct vm_area_struct *vma) {struct inode *inode;
include/linux/io_uring_types.h +3 -0
@@ -403,6 +403,9 @@ struct io_ring_ctx {u32 iowq_limits[2 ];struct callback_head poll_wq_task_work; +/* deferred ->poll_wq wake up for local task_work */ +struct rcu_head poll_wq_rcu; +atomic_t poll_wq_rcu_pending;struct list_head defer_list;#ifdef CONFIG_NET_RX_BUSY_POLL
include/linux/ipv6.h +22 -0
@@ -125,6 +125,28 @@ static inline unsigned int ipv6_transport_len(const struct sk_buff *skb)skb_network_header_len (skb); } +static inline unsigned int +ipv6_payload_len (const struct sk_buff *skb,const struct ipv6hdr *ip6) +{ +u32 len =ntohs (ip6->payload_len); + +return (len || !skb_is_gso (skb) || !skb_is_gso_tcp (skb)) ? + len : + skb->len -skb_network_offset (skb) -sizeof (struct ipv6hdr ); +} + +static inline unsigned int skb_ipv6_payload_len (const struct sk_buff *skb) +{ +return ipv6_payload_len (skb,ipv6_hdr (skb)); +} + +#define IPV6_MAXPLEN 65535 + +static inline void ipv6_set_payload_len (struct ipv6hdr *ip6,unsigned int len) +{ + ip6->payload_len = len <=IPV6_MAXPLEN ?htons (len) :0 ; +} +/* This structure contains results of exthdrs parsing as offsets from skb->nh.
include/linux/key-type.h +1 -0
@@ -158,6 +158,7 @@ struct key_type { const void *in, const void *in2);/* internal fields */ +atomic64_t index_id;/* Opaque keyring index ID */ struct list_head link;/* link in types list */ struct lock_class_key lock_class;/* key->sem lock class */ } __randomize_layout;
include/linux/key.h +5 -0
@@ -107,6 +107,7 @@ struct keyring_name;struct key_tag {struct rcu_head rcu; +atomic64_t index_id;/* Opaque keyring index ID */ refcount_t usage;bool removed;/* T when subject removed */ };
@@ -129,6 +130,8 @@ struct keyring_index_key {struct key_type *type;struct key_tag *domain_tag;/* Domain of operation */ const char *description; +u64 type_id;/* Cached index IDs */ +u64 domain_id; };union key_payload {
@@ -251,6 +254,8 @@ struct key {struct key_type *type;/* type of key */ struct key_tag *domain_tag;/* Domain of operation */ char *description; +u64 type_id; +u64 domain_id; }; };
include/linux/maple_tree.h +4 -0
@@ -466,9 +466,13 @@ struct ma_wr_state { };#define mas_lock (mas) spin_lock(&((mas)->tree->ma_lock)) +#define mas_lock_irqsave (mas, flags) \ + spin_lock_irqsave(&((mas)->tree->ma_lock), flags)#define mas_lock_nested (mas, subclass) \ spin_lock_nested(&((mas)->tree->ma_lock), subclass)#define mas_unlock (mas) spin_unlock(&((mas)->tree->ma_lock)) +#define mas_unlock_irqrestore (mas, flags) \ + spin_unlock_irqrestore(&((mas)->tree->ma_lock), flags)/* * Special values for ma_state.node.
include/linux/mm_types.h +3 -0
@@ -945,6 +945,9 @@ struct mm_struct {*/ seqcount_t mm_lock_seq;#endif +#ifdef CONFIG_FUTEX +atomic64_t futex_unique_id; +#endif unsigned long hiwater_rss;/* High-watermark of RSS usage */
include/linux/power_supply.h +3 -3
@@ -360,9 +360,9 @@ struct power_supply_vbat_ri_table {* @charge_voltage_max_uv: maintenance charging voltage that is usually a bit * lower than the constant_charge_voltage_max_uv. We can apply this settings * charge_current_max_ua until we get back up to this voltage. -* @safety_timer_minutes: maintenance charging safety timer, with an expiry -* time in minutes. We will only use maintenance charging in this setting -* for a certain amount of time, then we will first move to the next +* @charge_safety_timer_minutes: maintenance charging safety timer, with an +* expiry time in minutes. We will only use maintenance charging in this +* setting for a certain amount of time, then we will first move to the next * maintenance charge current and voltage pair in respective array and wait * for the next safety timer timeout, or, if we reached the last maintencance * charging setting, disable charging until we reach
include/linux/sched.h +1 -1
@@ -1712,7 +1712,7 @@ extern struct pid __rcu *cad_pid;* I am cleaning dirty pages from some other bdi. */ #define PF_KTHREAD 0x00200000/* I am a kernel thread */ #define PF_RANDOMIZE 0x00400000/* Randomize virtual address space */ -#define PF__HOLE__00800000 0x00800000 +#define PF_NO_NOTIFY_SIGNAL 0x00800000/* see no_notify_signal_save() */ #define PF__HOLE__01000000 0x01000000#define PF__HOLE__02000000 0x02000000#define PF_NO_SETAFFINITY 0x04000000/* Userland is not allowed to meddle with cpus_mask */
include/linux/sched/signal.h +25 -2
@@ -2,6 +2,7 @@#ifndef _LINUX_SCHED_SIGNAL_H#define _LINUX_SCHED_SIGNAL_H +#include <linux/cleanup.h> #include <linux/rculist.h> #include <linux/signal.h> #include <linux/sched.h>
@@ -380,14 +381,36 @@ static inline int task_sigpending(struct task_struct *p)return unlikely (test_tsk_thread_flag (p,TIF_SIGPENDING )); } +/* Prevent TIF_NOTIFY_SIGNAL from interrupting this task. */ +static inline unsigned int no_notify_signal_save (void ) +{ +unsigned int flags = current->flags; + + current->flags |=PF_NO_NOTIFY_SIGNAL ; +return flags; +} + +/* Restore the previous PF_NO_NOTIFY_SIGNAL state. */ +static inline void no_notify_signal_restore (unsigned int flags) +{ +current_restore_flags (flags,PF_NO_NOTIFY_SIGNAL ); +} + +DEFINE_LOCK_GUARD_0 (no_notify_signal, + _T->flags =no_notify_signal_save (), +no_notify_signal_restore (_T->flags), + unsigned int flags) +static inline int signal_pending (struct task_struct *p) {/* * TIF_NOTIFY_SIGNAL isn't really a signal, but it requires the same * behavior in terms of ensuring that we break out of wait loops -* so that notify signal callbacks can be processed. +* so that notify signal callbacks can be processed. Not for a task +* that asked not to be interrupted by it, see no_notify_signal_save(). */ -if (unlikely (test_tsk_thread_flag (p,TIF_NOTIFY_SIGNAL ))) +if (unlikely (test_tsk_thread_flag (p,TIF_NOTIFY_SIGNAL )) && +likely (!(READ_ONCE (p->flags) &PF_NO_NOTIFY_SIGNAL )))return 1 ;return task_sigpending (p); }
include/linux/sched/user.h +5 -3
@@ -23,11 +23,13 @@ struct user_struct {struct hlist_node uidhash_node;kuid_t uid; -#if defined(CONFIG_PERF_EVENTS ) || defined(CONFIG_BPF_SYSCALL ) || \ - defined(CONFIG_NET ) || defined(CONFIG_IO_URING ) || \ +#if defined(CONFIG_NET ) || defined(CONFIG_IO_URING ) || \ defined(CONFIG_VFIO_PCI_ZDEV_KVM ) ||IS_ENABLED (CONFIG_IOMMUFD ) || \ defined(CONFIG_SECRETMEM ) -atomic_long_t locked_vm; +atomic_long_t locked_vm;/* pinned pages charged to RLIMIT_MEMLOCK */ +#endif +#ifdef CONFIG_PERF_EVENTS +atomic_long_t perf_mlock;/* perf buffer pages within perf_event_mlock_kb */ #endif #ifdef CONFIG_WATCH_QUEUE atomic_t nr_watches;/* The number of watches this user currently has */
include/linux/srcutiny.h +0 -4
@@ -11,7 +11,6 @@#ifndef _LINUX_SRCU_TINY_H#define _LINUX_SRCU_TINY_H -#include <linux/irq_work_types.h> #include <linux/swait.h> struct srcu_struct {
@@ -25,21 +24,18 @@ struct srcu_struct {struct rcu_head *srcu_cb_head;/* Pending callbacks: Head. */ struct rcu_head **srcu_cb_tail;/* Pending callbacks: Tail. */ struct work_struct srcu_work;/* For driving grace periods. */ -struct irq_work srcu_irq_work;/* Defer schedule_work() to irq work. */ #ifdef CONFIG_DEBUG_LOCK_ALLOC struct lockdep_map dep_map;#endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ };void srcu_drive_gp (struct work_struct *wp); -void srcu_tiny_irq_work (struct irq_work *irq_work);#define __SRCU_STRUCT_INIT (name, __ignored, ___ignored) \ { \ .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq), \ .srcu_cb_tail = &name.srcu_cb_head, \ .srcu_work = __WORK_INITIALIZER(name.srcu_work, srcu_drive_gp), \ - .srcu_irq_work = { .func = srcu_tiny_irq_work }, \ __SRCU_DEP_MAP_INIT(name) \ }
include/linux/unicode.h +1 -0
@@ -51,6 +51,7 @@ struct unicode_map {unsigned int version;const struct utf8data *ntab[UTF8_NMAX ];const struct utf8data_table *tables; +struct rcu_head rcu; };int utf8_validate (const struct unicode_map *um,const struct qstr *str);
include/net/af_vsock.h +3 -0
@@ -216,6 +216,9 @@ void vsock_remove_connected(struct vsock_sock *vsk);struct sock *vsock_find_bound_socket (struct sockaddr_vm *addr);struct sock *vsock_find_connected_socket (struct sockaddr_vm *src,struct sockaddr_vm *dst); +bool vsock_check_source (const struct vsock_sock *vsk, +const struct vsock_transport *transport, +const struct sockaddr_vm *src);void vsock_remove_sock (struct vsock_sock *vsk);void vsock_for_each_connected_socket (struct vsock_transport *transport,void (*fn)(struct sock *sk));
include/net/ax25.h +6 -0
@@ -252,6 +252,11 @@ typedef struct ax25_cb {struct sk_buff_head reseq_queue;struct sk_buff_head ack_queue;struct sk_buff_head frag_queue; +/* I frames numbered by ax25_kick(), waiting to go to the device */ +struct sk_buff_head xmit_queue; +/* serialises V(S)/V(A) and the write, ack and xmit queues */ +spinlock_t lock; +unsigned char xmit_running;unsigned char window;struct timer_list timer, dtimer;struct sock *sk;/* Backlink to socket */
@@ -306,6 +311,7 @@ static inline __be16 ax25_type_trans(struct sk_buff *skb, struct net_device *devextern struct hlist_head ax25_list;extern spinlock_t ax25_list_lock;void ax25_cb_add (ax25_cb *); +ax25_cb *ax25_cb_add_unique (ax25_cb *ax25);struct sock *ax25_find_listener (ax25_address *,int ,struct net_device *,int );struct sock *ax25_get_socket (ax25_address *,ax25_address *,int ); ax25_cb *ax25_find_cb(const ax25_address *, ax25_address *, ax25_digi *,
include/net/codel_impl.h +1 -0
@@ -158,6 +158,7 @@ static struct sk_buff *codel_dequeue(void *ctx,bool drop;if (!skb) { + vars->first_above_time =0 ; vars->dropping = false;return skb; }
include/net/ipv6.h +0 -2
@@ -25,8 +25,6 @@ struct ip_tunnel_info;#define SIN6_LEN_RFC2133 24 -#define IPV6_MAXPLEN 65535 -/* * NextHeader field of IPv6 header */
include/net/netfilter/nf_tables_ipv6.h +2 -2
@@ -42,7 +42,7 @@ static inline int __nft_set_pktinfo_ipv6_validate(struct nft_pktinfo *pkt)if (ip6h->version !=6 )return -1 ; - pkt_len =ntohs (ip6h->payload_len); + pkt_len =ipv6_payload_len (pkt->skb, ip6h); skb_len = pkt->skb->len -skb_network_offset (pkt->skb);if (pkt_len +sizeof (*ip6h) > skb_len)return -1 ;
@@ -86,7 +86,7 @@ static inline int nft_set_pktinfo_ipv6_ingress(struct nft_pktinfo *pkt)if (ip6h->version !=6 ) goto inhdr_error; - pkt_len =ntohs (ip6h->payload_len); + pkt_len =ipv6_payload_len (pkt->skb, ip6h);if (pkt_len +sizeof (*ip6h) > pkt->skb->len) { idev =__in6_dev_get (nft_in (pkt));__IP6_INC_STATS (nft_net (pkt), idev,IPSTATS_MIB_INTRUNCATEDPKTS );
include/net/netrom.h +2 -16
@@ -46,6 +46,7 @@ enum {#define NR_COND_REJECT 0x02#define NR_COND_PEER_RX_BUSY 0x04#define NR_COND_OWN_RX_BUSY 0x08 +#define NR_COND_FRAG_DISCARD 0x10#define NR_DEFAULT_T1 120000/* Outstanding frames - 120 seconds */ #define NR_DEFAULT_T2 5000/* Response delay - 5 seconds */
@@ -74,7 +75,7 @@ struct nr_sock {unsigned short vs, vr, va, vl;unsigned char n2, n2count;unsigned long t1, t2, t4, idle; -unsigned short fraglen; +unsigned int fraglen;struct timer_list t1timer;struct timer_list t2timer;struct timer_list t4timer;
@@ -114,7 +115,6 @@ struct nr_node {unsigned char count;struct nr_route routes[3 ];refcount_t refcount; -spinlock_t node_lock; };/*********************************************************************
@@ -144,20 +144,6 @@ static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh) } } -/* nr_node_lock and nr_node_unlock also hold/put the node's refcounter. -*/ -static __inline__void nr_node_lock (struct nr_node *nr_node) -{ -nr_node_hold (nr_node); -spin_lock_bh (&nr_node->node_lock); -} - -static __inline__void nr_node_unlock (struct nr_node *nr_node) -{ -spin_unlock_bh (&nr_node->node_lock); -nr_node_put (nr_node); -} -#define nr_neigh_for_each (__nr_neigh, list) \ hlist_for_each_entry(__nr_neigh, list, neigh_node)
include/net/rose.h +35 -10
70 lines not on this page · raw message
io_uring/cancel.c +26 -3
@@ -70,7 +70,16 @@ static bool io_cancel_cb(struct io_wq_work *work, void *data) struct io_kiocb *req = container_of(work, struct io_kiocb, work);struct io_cancel_data *cd = data; -return io_cancel_req_match (req, cd); +if (!io_cancel_req_match (req, cd)) +return false; +/* +* Pending work is gone once it has matched. Work that is running may +* park the request where the same cancellation looks next. Don't make +* it skip the request as one that it has dealt with. +*/ +if (cd->flags & (IORING_ASYNC_CANCEL_ALL |IORING_ASYNC_CANCEL_ANY )) + req->cancel_seq_set = false; +return true; } static int io_async_cancel_one(struct io_uring_task *tctx,
@@ -115,6 +124,8 @@ int io_try_cancel(struct io_uring_task *tctx, struct io_cancel_data *cd,*/ if (!ret)return 0 ; +if (ret == -EALREADY ) + cd->running = true; ret =io_poll_cancel (ctx, cd, issue_flags);if (ret != -ENOENT )
@@ -171,6 +182,7 @@ static int __io_async_cancel(struct io_cancel_data *cd,struct io_tctx_node *node;int ret, nr =0 ; + cd->running = false; do { ret = io_try_cancel(tctx, cd, issue_flags); if (ret == -ENOENT)
@@ -184,6 +196,9 @@ static int __io_async_cancel(struct io_cancel_data *cd,io_ring_submit_lock (ctx, issue_flags); ret = -ENOENT ;list_for_each_entry (node, &ctx->tctx_list, ctx_node) { +/* has been done above, don't count what is running there */ +if (all && node->task->io_uring == tctx) +continue ; ret =io_async_cancel_one (node->task->io_uring, cd);if (ret != -ENOENT ) {if (!all)
@@ -192,7 +207,15 @@ static int __io_async_cancel(struct io_cancel_data *cd, } }io_ring_submit_unlock (ctx, issue_flags); -return all ? nr : ret; +if (all) +return nr; +/* +* The worker may be done with the work that was found running, and +* flagged, above. That isn't the same as not having found it. +*/ +if (ret == -ENOENT && cd->running) + ret = -EALREADY ; +return ret; }int io_async_cancel (struct io_kiocb *req,unsigned int issue_flags)
@@ -304,7 +327,7 @@ int io_sync_cancel(struct io_ring_ctx *ctx, void __user *arg)if (ret != -EALREADY ) goto out; -if (sc.timeout.tv_sec !=-1UL || sc.timeout.tv_nsec !=-1UL ) { +if (sc.timeout.tv_sec !=-1 || sc.timeout.tv_nsec !=-1 ) {struct timespec64 ts = { .tv_sec = sc.timeout.tv_sec, .tv_nsec = sc.timeout.tv_nsec
io_uring/cancel.h +2 -0
@@ -11,6 +11,8 @@ struct io_cancel_data {u8 opcode;u32 flags;int seq; +/* io_try_cancel() has found it being run by io-wq, and flagged it */ +bool running; };int io_async_cancel_prep (struct io_kiocb *req,const struct io_uring_sqe *sqe);
io_uring/futex.c +5 -2
@@ -307,6 +307,8 @@ int io_futexv_wait(struct io_kiocb *req, unsigned int issue_flags)*/ __set_current_state (TASK_RUNNING );hlist_add_head (&req->hash_node, &ctx->futex_list); +if (io_wq_cancel_seen (req, issue_flags)) +__io_futex_cancel (ctx, req); }else { iof->futexv_unqueued =1 ;if (woken !=-1 )
@@ -348,9 +350,10 @@ int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags) &ifd->q, &hb);if (!ret) {hlist_add_head (&req->hash_node, &ctx->futex_list); -io_ring_submit_unlock (ctx, issue_flags); -futex_queue (&ifd->q, hb,NULL ); +if (io_wq_cancel_seen (req, issue_flags)) +__io_futex_cancel (ctx, req); +io_ring_submit_unlock (ctx, issue_flags);return IOU_ISSUE_SKIP_COMPLETE ; }
io_uring/io-wq.c +98 -12
113 lines not on this page · raw message
io_uring/io_uring.c +132 -35
167 lines not on this page · raw message
io_uring/io_uring.h +43 -1
44 lines not on this page · raw message
io_uring/poll.c +37 -4
41 lines not on this page · raw message
io_uring/timeout.c +70 -21
91 lines not on this page · raw message
kernel/futex/core.c +24 -23
47 lines not on this page · raw message
kernel/trace/trace_events_hist.c +27 -25
52 lines not on this page · raw message
mm/huge_memory.c +60 -21
81 lines not on this page · raw message
net/ax25/af_ax25.c +67 -14
81 lines not on this page · raw message
net/ax25/ax25_in.c +52 -3
55 lines not on this page · raw message
net/ax25/ax25_out.c +95 -26
121 lines not on this page · raw message
net/ax25/ax25_std_in.c +44 -0
44 lines not on this page · raw message
net/ax25/ax25_subr.c +36 -8
44 lines not on this page · raw message
net/bridge/netfilter/nf_conntrack_bridge.c +2 -2
Lines of this file are not shown. View the raw message.
net/iucv/af_iucv.c +25 -17
42 lines not on this page · raw message
net/mac802154/scan.c +38 -13
51 lines not on this page · raw message
net/netfilter/nft_byteorder.c +20 -31
51 lines not on this page · raw message
net/netrom/nr_route.c +193 -190
383 lines not on this page · raw message
net/rose/af_rose.c +67 -6
73 lines not on this page · raw message
net/rose/rose_in.c +43 -1
44 lines not on this page · raw message
net/rose/rose_link.c +47 -0
47 lines not on this page · raw message
net/rose/rose_route.c +170 -30
200 lines not on this page · raw message
net/rose/rose_timer.c +79 -4
83 lines not on this page · raw message
net/socket.c +51 -3
54 lines not on this page · raw message
net/vmw_vsock/af_vsock.c +40 -9
49 lines not on this page · raw message
net/vmw_vsock/virtio_transport_common.c +8 -1
Lines of this file are not shown. View the raw message.
security/keys/keyring.c +81 -71
152 lines not on this page · raw message
security/keys/trusted-keys/trusted_tpm1.c +3 -1
Lines of this file are not shown. View the raw message.
security/keys/trusted-keys/trusted_tpm2.c +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/ftrace/test.d/filter/event-filter-incomplete.tc new file +24 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.12.115 kernel.
All users of the 6.12 kernel series must upgrade.
The updated 6.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.12.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/nios2/include/asm/checksum.h | 2 arch/s390/mm/fault.c | 11 arch/s390/pci/pci_sysfs.c | 3 arch/x86/hyperv/hv_init.c | 3 arch/x86/kernel/kvm.c | 32 arch/x86/kvm/mmu/mmu.c | 4 arch/x86/kvm/vmx/nested.c | 4 block/blk-zoned.c | 37 block/blk.h | 4 block/bsg-lib.c | 13 block/genhd.c | 2 crypto/asymmetric_keys/restrict.c | 8 drivers/base/regmap/internal.h | 1 drivers/base/regmap/regcache-maple.c | 9 drivers/base/regmap/regcache.c | 18 drivers/gpio/gpio-mxc.c | 67 - drivers/gpio/gpiolib.c | 9 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 21 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 25 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 drivers/gpu/drm/drm_exec.c | 73 + drivers/gpu/drm/i915/display/intel_dmc.c | 21 drivers/gpu/drm/vc4/vc4_hdmi.c | 20 drivers/gpu/drm/xe/xe_exec.c | 7 drivers/gpu/drm/xe/xe_vm.c | 31 drivers/gpu/drm/xe/xe_vm.h | 2 drivers/hv/channel_mgmt.c | 12 drivers/hv/connection.c | 1 drivers/hv/vmbus_drv.c | 1 drivers/i2c/busses/i2c-qcom-cci.c | 4 drivers/i2c/busses/i2c-viai2c-wmt.c | 22 drivers/md/dm-cache-target.c | 59 - drivers/md/dm-crypt.c | 3 drivers/md/dm-ebs-target.c | 3 drivers/md/dm-integrity.c | 6 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 10 drivers/net/wireless/intersil/p54/fwio.c | 42 - drivers/pci/pci.c | 15 drivers/pinctrl/pinctrl-amd.c | 9 drivers/pinctrl/qcom/pinctrl-ipq5018.c | 10 drivers/power/supply/ds2780_battery.c | 2 drivers/power/supply/generic-adc-battery.c | 9 drivers/s390/net/ctcm_mpc.c | 3 drivers/scsi/libiscsi.c | 14 drivers/scsi/libsas/sas_expander.c | 14 drivers/scsi/mpi3mr/mpi3mr_app.c | 2 drivers/scsi/scsi_transport_fc.c | 6 drivers/scsi/scsi_transport_iscsi.c | 2 drivers/scsi/scsi_transport_sas.c | 6 drivers/scsi/st.c | 18 drivers/scsi/xen-scsifront.c | 1 drivers/soc/tegra/fuse/tegra-apbmisc.c | 2 drivers/spi/spi-tegra114.c | 7 drivers/target/iscsi/iscsi_target_configfs.c | 26 drivers/ufs/core/ufs_bsg.c | 2 fs/afs/internal.h | 2 fs/afs/super.c | 2 fs/autofs/waitq.c | 25 fs/coredump.c | 16 fs/ext4/ext4.h | 2 fs/ext4/extents_status.c | 7 fs/ext4/extents_status.h | 1 fs/ext4/super.c | 13 fs/fat/dir.c | 44 + fs/namei.c | 3 fs/notify/mark.c | 11 fs/ntfs3/ntfs_fs.h | 1 fs/ntfs3/super.c | 29 fs/ocfs2/dlm/dlmcommon.h | 2 fs/ocfs2/dlm/dlmdebug.c | 5 fs/ocfs2/dlm/dlmrecovery.c | 2 fs/pipe.c | 6 fs/smb/client/cifssmb.c | 13 fs/smb/client/connect.c | 21 fs/smb/client/smb2ops.c | 7 fs/smb/server/smb2pdu.c | 5 fs/tracefs/event_inode.c | 16 fs/unicode/utf8-core.c | 21 fs/xfs/libxfs/xfs_sb.c | 17 fs/xfs/xfs_fsmap.c | 2 fs/xfs/xfs_ioctl.c | 2 fs/xfs/xfs_iops.c | 2 include/drm/drm_exec.h | 15 include/linux/bsg-lib.h | 3 include/linux/cgroup-defs.h | 5 include/linux/fsnotify_backend.h | 1 include/linux/futex.h | 14 include/linux/huge_mm.h | 2 include/linux/io_uring_types.h | 3 include/linux/ipv6.h | 22 include/linux/key-type.h | 1 include/linux/key.h | 5 include/linux/maple_tree.h | 4 include/linux/mm_types.h | 3 include/linux/power_supply.h | 6 include/linux/sched.h | 2 include/linux/sched/signal.h | 27 include/linux/sched/user.h | 8 include/linux/srcutiny.h | 4 include/linux/unicode.h | 1 include/net/af_vsock.h | 3 include/net/ax25.h | 6 include/net/codel_impl.h | 1 include/net/ipv6.h | 2 include/net/netfilter/nf_tables_ipv6.h | 4 include/net/netrom.h | 18 include/net/rose.h | 45 - io_uring/cancel.c | 29 io_uring/cancel.h | 2 io_uring/futex.c | 7 io_uring/io-wq.c | 110 ++ io_uring/io-wq.h | 4 io_uring/io_uring.c | 167 +++- io_uring/io_uring.h | 44 + io_uring/kbuf.c | 2 io_uring/napi.c | 4 io_uring/net.c | 26 io_uring/poll.c | 41 - io_uring/rw.c | 18 io_uring/sqpoll.c | 7 io_uring/tctx.c | 1 io_uring/timeout.c | 91 +- io_uring/uring_cmd.c | 2 io_uring/waitid.c | 19 kernel/cgroup/cgroup.c | 6 kernel/events/core.c | 33 kernel/exit.c | 2 kernel/fork.c | 12 kernel/futex/core.c | 47 - kernel/pid_namespace.c | 5 kernel/printk/printk.c | 2 kernel/ptrace.c | 6 kernel/rcu/srcutiny.c | 19 kernel/sched/ext.c | 18 kernel/signal.c | 4 kernel/trace/ftrace.c | 4 kernel/trace/ring_buffer.c | 13 kernel/trace/trace.c | 13 kernel/trace/trace_events_filter.c | 15 kernel/trace/trace_events_hist.c | 52 - kernel/trace/trace_events_synth.c | 10 kernel/trace/trace_probe.c | 3 kernel/trace/trace_synth.h | 1 kernel/watch_queue.c | 16 kernel/workqueue.c | 24 mm/filemap.c | 9 mm/huge_memory.c | 81 +- mm/internal.h | 6 mm/khugepaged.c | 3 mm/pagewalk.c | 6 net/ax25/af_ax25.c | 81 +- net/ax25/ax25_ds_in.c | 2 net/ax25/ax25_in.c | 55 + net/ax25/ax25_out.c | 121 ++- net/ax25/ax25_std_in.c | 44 + net/ax25/ax25_subr.c | 44 - net/bluetooth/l2cap_core.c | 7 net/bluetooth/l2cap_sock.c | 2 net/bridge/br_multicast.c | 13 net/bridge/br_netfilter_ipv6.c | 2 net/bridge/netfilter/nf_conntrack_bridge.c | 4 net/core/page_pool.c | 3 net/ipv4/fib_semantics.c | 2 net/ipv4/tcp.c | 18 net/ipv4/tcp_cong.c | 4 net/ipv4/tcp_dctcp.c | 4 net/ipv4/tcp_minisocks.c | 2 net/ipv4/tcp_output.c | 2 net/ipv4/udp.c | 11 net/ipv6/calipso.c | 6 net/ipv6/ip6_input.c | 2 net/ipv6/ip6_offload.c | 7 net/ipv6/output_core.c | 7 net/iucv/af_iucv.c | 42 - net/mac802154/ieee802154_i.h | 7 net/mac802154/main.c | 1 net/mac802154/scan.c | 51 - net/mptcp/protocol.c | 14 net/netfilter/ipvs/ip_vs_xmit.c | 2 net/netfilter/nf_conntrack_ovs.c | 2 net/netfilter/nf_log_syslog.c | 2 net/netfilter/nft_byteorder.c | 51 - net/netlink/af_netlink.c | 10 net/netrom/af_netrom.c | 33 net/netrom/nr_in.c | 26 net/netrom/nr_route.c | 383 +++++----- net/rds/rdma_transport.c | 38 net/rose/af_rose.c | 73 + net/rose/rose_in.c | 44 + net/rose/rose_link.c | 47 + net/rose/rose_loopback.c | 2 net/rose/rose_out.c | 1 net/rose/rose_route.c | 200 ++++- net/rose/rose_timer.c | 83 ++ net/sched/act_api.c | 11 net/sched/cls_flower.c | 5 net/sched/sch_cake.c | 2 net/sctp/inqueue.c | 6 net/sctp/socket.c | 33 net/socket.c | 54 + net/tipc/node.c | 2 net/vmw_vsock/af_vsock.c | 49 + net/vmw_vsock/virtio_transport_common.c | 9 samples/pidfd/Makefile | 2 security/keys/key.c | 13 security/keys/keyctl.c | 15 security/keys/keyring.c | 152 ++- security/keys/process_keys.c | 5 security/keys/trusted-keys/trusted_tpm1.c | 4 security/keys/trusted-keys/trusted_tpm2.c | 2 sound/soc/codecs/cs42l52.c | 2 sound/soc/codecs/cs42l56.c | 2 sound/soc/codecs/max98371.c | 2 sound/soc/codecs/nau8822.c | 4 sound/soc/codecs/pcm3168a.c | 2 sound/soc/codecs/wm8978.c | 4 sound/soc/intel/avs/pcm.c | 2 sound/soc/sof/ipc4-topology.c | 16 sound/soc/stm/stm32_spdifrx.c | 2 tools/gpio/Makefile | 6 tools/power/x86/turbostat/turbostat.c | 11 tools/testing/selftests/ftrace/test.d/filter/event-filter-incomplete.tc | 24 224 files changed, 3019 insertions(+), 1191 deletions(-)
Aaron Ahmed (1):
ftrace: Initialize modname and offset in print_rec()
Abdul Wasey (1):
mptcp: move the OoO check back into __mptcp_try_fallback()
Adrian Martinez (1):
KEYS: Fix key_reject_and_link() race with keyring restriction
Adriel Santos (1):
pinctrl: qcom: ipq5018: replace gcc_plltest with pwm2 on gpio12
Aleksandr Khromov (3):
ksmbd: fill in FileSysIdentifier in FS_POSIX_INFORMATION
ksmbd: initialize FileSystemControlFlags in FS_CONTROL_INFORMATION
ksmbd: zero the FS_OBJECT_ID_INFORMATION buffer before filling it in
Alexander Gruhlke (1):
PCI: Don't treat ~0 as ready in pci_dev_wait() with RRS SV
Alexander Stein (1):
gpio: mxc: use BIT() macro
Alice Mikityanska (1):
net/ipv6: Introduce payload_len helpers
Allison Henderson (1):
net/rds: don't let the rdma_cm destroy an id RDS still owns on route failure
Amirmohammad Eftekhar (1):
KVM: nVMX: Reset MMU back to the root MMU if loading L2 state fails for !VM-Entry
Amit Machhiwal (1):
tracing: Do not initialize tracefs work if tracing is disabled
Andy Shevchenko (1):
regcache: Add ->populate() callback to separate from ->init()
Antoine Huret (1):
perf: Update cgroup time when rotating multiplexed events
Aohan Mei (2):
net: rds: fix uninitialized trans dereference in CM event handler net/sched: cls_flower: validate mask pointer after nla_next()
Ashutosh Desai (1):
ax25: fix OOB read after address header strip in ax25_rcv()
Aswin Karuvally (1):
s390/ctcm: Prevent XID null dereference
Austin Schuh (1):
io_uring/wait: wake real-time waiters from hard interrupt context
Avi Weiss (1):
ASoC: stm32: spdifrx: fix synchronization state check
Aviv Vaknin (1):
pid_namespace: make zap_pid_ns_processes() freezable
Bartosz Golaszewski (1):
gpio: mxc: use lock guards for the generic GPIO chip lock
Ben Cressey (2):
dm-crypt: fix a tiny race condition in crypt_dec_pending
dm-integrity: fix infinite loop on discard with large tag size
Benjamin Marzinski (1):
dm cache: fix issue with background work locking
Bernard Pidoux (32):
rose: set SOCK_DESTROY in rose_kill_by_device() for prompt cleanup
rose: disconnect orphaned STATE_2 sockets when device is gone
rose: release netdev ref and destroy orphaned incoming sockets
rose: clear neighbour pointer in rose_kill_by_device()
rose: don't free fd-owned sockets when reaping in the heartbeat
rose: keep the route needed for routing loop detection
rose: guard rose_transmit_link() against a NULL neighbour
rose: use timer_shutdown_sync() for t0timer teardown
rose: don't warn on stray CALL_ACCEPTED/CLEAR_CONFIRMATION in state 3
rose: hold a reference on incoming sockets queued for accept()
ax25: bound REJ-driven fast retransmits with the existing N2 counter
rose: purge rose_neigh->queue on final teardown
rose: clear stale N(R)/N(S) before (re)transmitting a data frame
netrom: bound fragment reassembly in nr_queue_rx_frame()
ax25: check frame length in ax25_decode() and ax25_rx_iframe()
netrom: use a single lock for the node and neighbour lists
netrom: look up and update routes in one critical section
netrom: clear nr_neigh->ax25 under the routing lock in nr_link_failed()
netrom: fix nr_node leak when nr_del_node() removes the last route
rose: clear through routes when a neighbour is removed from the tables
rose: restart the link of a neighbour created over a live AX.25 connection
ax25: serialise the transmission of I frames on a connection
rose: process received frames and send with the socket locked
ax25: don't create two connections for the same link in ax25_send_frame()
ax25: read the connection's ax25_dev only once when walking ax25_list
ax25: wait for ax25_send_frame() before detaching the connections of a device
ax25: don't accept frames on a device that is going down
ax25: send a private copy of each I frame
rose: clear the circuits of a neighbour that restarts the link
ax25: send unacknowledged I frames again when a link is re-established
rose: bring up the link of the preferred route passed over by a connect request
ax25: don't free an incoming SABM skb left on the listener's queue
Bobby Eshleman (1):
virtio: set skb owner of virtio_transport_reset_no_sock() reply
Breno Leitao (2):
net: call getsockopt_iter if available
workqueue: release pwq pools by pool type
Bryam Vargas (1):
net/iucv: fix the recvmsg window update
Carlos Jones Jr (1):
spi: tegra114: assert CS GPIO for every transfer in a message
Carlos Maiolino (1):
xfs: fix capability check in xfs
Cen Zhang (5):
ocfs2/dlm: Protect the recovery list during debugfs reads
keys: Avoid the owner account dereference in named keyring lookup
keys: Check the authorization payload in process keyring searches
keys: Protect the type name while describing a key
keys: Protect the read method check against type removal
Cen Zhang (Microsoft Security FORGE Labs) (3):
tcp: fix use-after-free in do_tcp_getsockopt(TCP_CONGESTION)
tcp: fix use-after-free in do_tcp_getsockopt(TCP_CC_INFO) io_uring/cancel: don't spin on local work the task can't run
Cen Zhang (Microsoft) (1):
watch_queue: Fix note pool publication race in watch_queue_set_size()
Charles Vosburgh (1):
sctp: validate chunk length in the inqueue parser
Chen Cheng (1):
dm-integrity: require stable writes for internal hash modes
Chengfeng Ye (1):
tipc: protect node reset trace dump with node lock
Christian Brauner (14):
afs: free the super info after a grace period
unicode: free the map after a grace period
eventfs: Free the eventfs_inode after an rcu grace period too
namei: test for a negative dentry the way traverse_mounts() does
ntfs3: free the sbi after a grace period
ext4: free the sbi after a grace period
io-wq: order the exit bit against worker creation task work
coredump: hold RCU while releasing parked threads
signal: don't retarget shared signals in a dying thread group
signal: only SIGKILL and the freezers interrupt a coredumping task
ptrace: refuse to change the signal mask of a user worker
fork: release the files of a failed fork after sched_cancel_fork()
signal: allow taks to temporarily block TIF_NOTIFY_SIGNAL
pid_namespace: prevent TIF_NOTIFY_SIGNAL from interrupting the reaper
Christian König (1):
drm/exec: don't immediately add prelocked obj to array of locked objs
Daehyeon Ko (2):
sctp: revalidate output stream after association connect wait vsock/virtio: validate packet source for connected sockets
Damien Le Moal (1):
block: avoid potential deadlock on zone revalidation failure
Dave Stevenson (1):
drm/vc4: hdmi: Move packet RAM enable to PM runtime
David Carlier (2):
ring-buffer: Do not show buffer_meta for CPUs without a buffer
tracing: Take trace_types_lock when dropping the buffer_meta reference
David Rosca (1):
drm/amdgpu: Fix VCE 3 ring align_mask
Dibin Moolakadan Subrahmanian (1):
drm/i915/dmc: Harden DMC firmware payload parsing
Dmitry Kandybka (1):
tracing: Fix ignored return value of resize_buffer_duplicate_size()
Donggeun Yoo (5):
ring-buffer: Fix the sub-buffer array base in rb_meta_subbuf_idx()
tracing: Fix the shift out of bounds in the log2 histogram modifier
tracing: Save the event file instead of the compatible histogram
tracing: Unregister field variable histograms when the command fails
tracing: Fix 64-bit and signed histogram fields on 32-bit kernels
EJ Campbell (1):
x86/kvm: Don't consume async #PF flags on a kernel #PF in NMI context
Enrico Zanda (1):
i2c: viai2c-wmt: Replace dev_err() with dev_err_probe() in probe function
Etienne Perot (1):
cgroup: fix spurious SIGKILL of CLONE_INTO_CGROUP children
Florian Schauer (1):
page_pool: keep frag_offset aligned for odd-sized requests
Florian Westphal (1):
netfilter: nft_byteorder: remove multi-register support
Francesco Lavra (1):
regcache: Do not overwrite error code when finalizing cache after error
Frank Sorenson (2):
smb: client: fix heap overflow in cifs_do_set_acl()
cifs: add revalidation on FSCTL failure in smb2_duplicate_extents()
Genjian Zhang (1):
dm-ebs: fix incorrect device offset check in ebs_ctr()
Gilberto Conde (1):
pinctrl: qcom: ipq5018: add missing pwm3 function on gpio13
Greg Kroah-Hartman (2):
netrom: require full NET/ROM headers in nr_route_frame() Linux 6.12.115
Haris Okanovic (1):
perf: Fix perf_pmu_migrate_context() leaving events behind
Heyang Tan (1):
wifi: p54: validate firmware record lengths
HyeongJun An (6):
ASoC: cs42l56: Put the Limiter Cushion control on the limiter register
ASoC: cs42l52: Fix the NG Type Switch bit
ASoC: pcm3168a: Fix the DAC zero flag polarity bit
ASoC: max98371: Fix the Speaker DHT Min Volume bits
ASoC: wm8978: Fix the 128x oversampling switch bits
ASoC: nau8822: Fix the 128x oversampling switch bits
Hyunwoo Kim (2):
KVM: x86/mmu: Preserve nested TDP shadow page tables if they are used as roots mm/pagewalk: fix stale walk->action escaping walk_pmd_range()
Ido Schimmel (1):
ipv4: udp: Create exceptions before socket matching
Jann Horn (1):
futex: Fix mm reuse handling for FUT_OFF_MMSHARED
Jens Axboe (4):
io_uring/timeout: don't put a sequence target behind the last flush io_uring/timeout: don't flush with the sequence behind the last flush io_uring/timeout: don't lose a cancel as io-wq arms a timeout io_uring/poll: don't loop on HUP with multiple references
Jesse Zhang (2):
drm/amdgpu: don't drop the runtime PM reference twice in amdgpu_gpr drm/amdgpu: free the userptr ranges when a CS fails after parser_bos
Jinhui Guo (1):
soc/tegra: fuse: Add missing newline to APBMISC error message
Joas Antonio dos Santos (1):
calipso: keep BIG TCP payload_len in calipso_skbuff_setattr()
John Ogness (1):
printk: Postpone kthread startup
Jonas Köppeler (1):
net_sched: codel: fix stale state for empty flows in fq_codel
Josef Bacik (29):
io_uring/waitid: own the request before clearing ->head io_uring/cmd: don't leave list poison in ->hash_node io_uring/wait: don't spin on a stuck overflow list io_uring/io-wq: don't lose the signal that ends work io_uring/io-wq: don't hide a link from cancellations
io_uring: don't flood a cancelling task with task_work io_uring/io-wq: don't strand work when a worker exits io_uring/io-wq: don't exit with a creation pending io_uring/io-wq: let cancel find picked up hashed work io_uring/poll: don't lose a cancel as io-wq arms poll
io_uring: don't lose a cancel as io-wq parks a request io_uring/cancel: don't forget that the work was running io_uring/cancel: recognize "no timeout" on 32-bit io_uring/cancel: let CANCEL_ALL find parked requests
io_uring: wake ring pollers for local task_work io_uring/wait: look at all CQ waiters on wake up io_uring/poll: drop stale double poll entry on rearm io_uring/timeout: don't skip over reached sequences io_uring/timeout: keep repeat count on multishot update io_uring/wait: no early -ETIME if min_wait finds work io_uring/napi: make stale entries time out after 60s io_uring/napi: don't busy poll past an expired timeout io_uring/kbuf: handle index wrap in last buffer check io_uring/sqpoll: let the thread sleep on disabled rings
io_uring: don't pass restart error codes to userspace io_uring/net: don't retry recv on uncommitted buffers io_uring/timeout: no ABS update of multishot timeouts io_uring/timeout: don't end a linked timeout with 1
io_uring: look up the file before queueing to io-wq
Joseph Qi (1):
eventfs: fix SRCU read lock leak in eventfs_iterate()
Juanlu Herrero (1):
io_uring/poll: avoid retry wakeup loss when dropping ownership
Jun Yang (1):
net: bridge: mcast: don't truncate the port group walk on teardown
Junjie Cao (1):
netrom: fix reference count leak in nr_rt_device_down
Junyeong Lee (1):
io_uring/waitid: prevent cancel reference wrap
Jérémy Jean (1):
net/sched: fix use-after-free in __tcf_action_put()
K Prateek Nayak (1):
kernel/watch_queue: Use pipe_buf() to retrieve the pipe buffer
Kairui Song (1):
mm, madvise: fix potential workingset node list_lru leaks
Kaiwen Shi (1):
mac802154: fix data race and NULL deref on local->assoc_dev
Karl Mehltretter (1):
power: supply: Fix maintenance charge table kernel-doc
Keith Busch (1):
nios2: fix __wsum type degradation in csum_fold()
Kent Gibson (1):
gpiolib: fix memory leak in gpiod_set_array_value_complex() on error paths
Krystian Kaniewski (1):
ring-buffer: Fix false warning in ring_buffer_map_get_reader()
Kyle Zeng (6):
netlink: reset skb headers before unicast and multicast filtering
pipe: preserve existing fasync readers on writer setup failure
netlink: avoid hashing the network namespace pointer
fsnotify: prevent mark additions during connector teardown
tracing: Reject incomplete event filter expressions
keys: make keyring indexes independent of kernel addresses
Laurence Oberman (2):
scsi: st: Save the visited block for the partition the drive is in
scsi: st: Fix use-after-free race between st_remove() and st_open()
Lee Jones (2):
tracing/histograms: Reject non-stacktrace fields for synthetic stacktrace fields tracing/histograms: Verify event_call identity when updating synth_event refcount
Len Brown (2):
tools/power turbostat: Fix fd_perf leak on reset tools/power turbostat: Fix add_counter issue if > 24 counters.
Linfeng Sun (1):
scsi: target: iscsi: Fix race in discovery auth updates
Loic Poulain (1):
i2c: qcom-cci: Fix HALT_ACK reset request being dropped
Lorenzo Stoakes (ARM) (2):
mm/huge_memory: bypass THP tuneables for huge pfnmap mappings
perf: Track the perf mlock gift separately
Mario Limonciello (1):
pinctrl: amd: Clear S4 wake bits when firmware has _AEI
Martin Kaiser (1):
tracing: probes: error if BTF is required but unavailable
Mashiro Chen (2):
net: netrom: validate source address in nr_find_socket()
net: ax25: fix integer overflow in ax25_rx_fragment()
Matt Fleming (1):
mm/huge_memory: initialise workingset state before folio split
Matteo Croce (1):
fat: stop reading directory entries past the end-of-directory marker
Michael Kelley (2):
x86/hyperv: Avoid using per-cpu output page in hv_apicid_to_vp_index()
Drivers: hv: Don't reset VMBus connection state on error/exit paths
Michael Reeves (1):
regmap: Drop map lock during cache init and exit
Michal Luczaj (1):
vsock: treat TCP_CLOSING as once-established
Ming-Hung Tsai (1):
dm cache: fix demotion stats in passthrough mode
Nicolai Buchwitz (1):
net: bcmgenet: unshare the skb before writing the control block
Niklas Schnelle (1):
s390/pci: Fix leak of uninitialized kernel data in SCLP report
Pauli Virtanen (1):
Bluetooth: L2CAP: refuse __l2cap_chan_add if chan already has conn
Paulo Alcantara (1):
smb: client: fix multiuser mount with krb5
Peng Fan (2):
gpio: mxc: fix both_edges bit operations
gpio: mxc: fix wakeup_pads bit operations
Peter Ujfalusi (1):
ASoC: SOF: ipc4-topology: Fix shift-out-of-bounds for aggregated ALH capture
Sasha Levin (4):
samples: pidfd: fix userprogs typo
tools: gpio: fix building from the top level with O=
Revert "s390/mm: Add missing secure storage access fixups for donated memory" Revert "srcu: Use irq_work to start GP in tiny SRCU"
Sergey Tiraspolsky (1):
ASoC: Intel: avs: Reset the stream unless it is already prepared
Srish Srinivasan (1):
keys/trusted_keys: return immediately after TPM unseal failure
Stanislav Fort (1):
netrom: linearize and validate lengths in nr_rx_frame()
Stanley Jhu (1):
scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies
Stefano Garzarella (1):
KEYS: trusted: Fix blob allocation size in tpm2_key_decode()
Sung Byeongchan (1):
autofs: ignore notification errors from a replaced pipe
Svyatoslav Ryhel (1):
power: supply: generic-adc-battery: Fix temperature IIO channel conversion
Taeyang Lee (2):
tracing: Check operator stack capacity before pushing
tracing: Keep the predicate limit separate from program capacity
Tamaki Yanagawa (1):
io_uring/net: keep recv buffer select length within MAX_RW_COUNT
Tejun Heo (1):
sched_ext: Fix stall when a task enqueued with SCX_ENQ_LAST lands back on its CPU's local DSQ
Tengda Wu (1):
tracing: Fix hist trigger timestamps for buffered events
Thomas Hellström (1):
drm/xe: Bump LRU for external objects on exec and rebind
Timur Kristóf (1):
drm/amdgpu/sdma3: Work around POLL_REGMEM / FENCE hang
Waiman Long (1):
Drivers: hv: Avoid infinite retry loop in init_vp_index()
Weiming Shi (1):
asymmetric_keys: reject trust keys without IDs
Wentao Liang (1):
i2c: viai2c-wmt: Fix clock leak in wmt_i2c_probe()
Xingui Yang (1):
scsi: libsas: Fix SMP IO deadlock during HA resume
Xueqin Luo (1):
power: supply: ds2780: Fix ds2780_get_capacity() returning raw value
Yao Kai (1):
workqueue: Fix unbound pool lifetime for pending pwqs
Yehyeong Lee (4):
scsi: xen/scsifront: Check for a NULL shadow entry on a backend response
scsi: libiscsi: Reject a negative task index from parse_pdu_itt
scsi: libiscsi: Validate the ITT reflected in a Reject PDU
scsi: libiscsi: Validate the task named by a management response
Yun Zhou (1):
xfs: don't hold buffer locks across sync transaction commit in xfs_sync_sb_buf
Zihan Xi (1):
ipv4: avoid divide by zero in fib_rebalance
Zqiang (1):
workqueue: Use raise_softirq() to trigger softirq in irq_work handler