Skip to contentSkip to conversation

Linux 6.12.104

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Aug 19 Stable branch

lore
Share & tools
lore
author maintainer
#1 lore raw
In reply to Greg Kroah-Hartman
Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml +15 -1
index 0304f074cf08..2793afc7f85c 100644
@@ -25,6 +25,16 @@ properties:
     maxItems: 1
 
   clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: core
+      - const: iface
+
+  power-domains:
     maxItems: 1
 
 required:
@@ -42,6 +52,10 @@ examples:
       compatible = "qcom,sm8550-inline-crypto-engine",
                    "qcom,inline-crypto-engine";
       reg = <0x01d88000 0x8000>;
-      clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
+      clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>,
+               <&gcc GCC_UFS_PHY_AHB_CLK>;
+      clock-names = "core",
+                    "iface";
+      power-domains = <&gcc UFS_PHY_GDSC>;
     };
 ...
MAINTAINERS +5 -0
index d765c62c80ea..d5d394a5ad6b 100644
@@ -8849,6 +8849,11 @@ F:	drivers/base/firmware_loader/
 F:	rust/kernel/firmware.rs
 F:	include/linux/firmware.h
 
+FIXED-LAYOUT NVMEM LAYOUT DRIVER
+M:	Mathieu Dubois-Briand <[email protected]>
+S:	Maintained
+F:	drivers/nvmem/layouts/fixed-layout.c
+
 FLEXTIMER FTM-QUADDEC DRIVER
 M:	Patrick Havelange <[email protected]>
 L:	[email protected]
Makefile +1 -1
index f3bacdc021a4..69eb37d9d488 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 6
 PATCHLEVEL = 12
-SUBLEVEL = 103
+SUBLEVEL = 104
 EXTRAVERSION =
 NAME = Baby Opossum Posse
 
arch/arm/boot/dts/broadcom/bcm-ns.dtsi +1 -1
index d0d5f7e52a91..f08d0a27de0b 100644
@@ -138,7 +138,7 @@ axi@18000000 {
 
 			/* PCIe Controller 2 */
 			<0x00014000 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00014000 1 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00014000 1 &gic GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
 			<0x00014000 2 &gic GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
 			<0x00014000 3 &gic GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
 			<0x00014000 4 &gic GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
arch/arm/mach-npcm/platsmp.c +2 -0
index 41891d3aa124..4c1fc9983746 100644
@@ -32,6 +32,7 @@ static int npcm7xx_smp_boot_secondary(unsigned int cpu,
 		goto out;
 	}
 	gcr_base = of_iomap(gcr_np, 0);
+	of_node_put(gcr_np);
 	if (!gcr_base) {
 		pr_err("could not iomap gcr");
 		ret = -ENOMEM;
@@ -60,6 +61,7 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus)
 		return;
 	}
 	scu_base = of_iomap(scu_np, 0);
+	of_node_put(scu_np);
 	if (!scu_base) {
 		pr_err("could not iomap scu");
 		return;
arch/arm64/boot/dts/broadcom/bcm2712.dtsi +0 -2
index 209f99b1ceae..c8e809d77b3f 100644
@@ -279,8 +279,6 @@ IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
 					  IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
-					  IRQ_TYPE_LEVEL_LOW)>,
-			     <GIC_PPI 12 (GIC_CPU_MASK_SIMPLE(4) |
 					  IRQ_TYPE_LEVEL_LOW)>;
 	};
 };
arch/s390/kvm/pci.c +62 -24

148 lines not on this page · raw message

arch/s390/kvm/pci.h +2 -0
index ff0972dd5e71..fdf8c7bf4ed0 100644
@@ -22,6 +22,8 @@ struct kvm_zdev {
 	struct kvm *kvm;
 	struct zpci_fib fib;
 	struct list_head entry;
+	struct user_struct *user_account;
+	struct mm_struct *mm_account;
 };
 
 struct zpci_gaite {
arch/x86/kvm/mmu/mmu.c +3 -0
index 9be2b10ff4f0..b5a5e5c3cc5a 100644
@@ -2291,6 +2291,9 @@ static union kvm_mmu_page_role kvm_mmu_child_role(u64 *sptep, bool direct,
 	role.direct = direct;
 	role.passthrough = 0;
 
+	WARN_ON_ONCE(role.invalid);
+	role.invalid = 0;
+
 	/*
 	 * If the guest has 4-byte PTEs then that means it's using 32-bit,
 	 * 2-level, non-PAE paging. KVM shadows such guests with PAE paging
arch/x86/kvm/svm/sev.c +12 -0
index 6cec696461da..bd0344bacaf1 100644
@@ -2972,6 +2972,7 @@ void __init sev_set_cpu_caps(void)
 void __init sev_hardware_setup(void)
 {
 	unsigned int eax, ebx, ecx, edx, sev_asid_count, sev_es_asid_count;
+	struct sev_platform_init_args init_args = {0};
 	bool sev_snp_supported = false;
 	bool sev_es_supported = false;
 	bool sev_supported = false;
@@ -3088,6 +3089,15 @@ void __init sev_hardware_setup(void)
 	sev_supported_vmsa_features = 0;
 	if (sev_es_debug_swap_enabled)
 		sev_supported_vmsa_features |= SVM_SEV_FEAT_DEBUG_SWAP;
+
+	if (!sev_enabled)
+		return;
+
+	/*
+	 * Do both SNP and SEV initialization at KVM module load.
+	 */
+	init_args.probe = true;
+	sev_platform_init(&init_args);
 }
 
 void sev_hardware_unsetup(void)
@@ -3103,6 +3113,8 @@ void sev_hardware_unsetup(void)
 
 	misc_cg_set_capacity(MISC_CG_RES_SEV, 0);
 	misc_cg_set_capacity(MISC_CG_RES_SEV_ES, 0);
+
+	sev_platform_shutdown();
 }
 
 int sev_cpu_init(struct svm_cpu_data *sd)
block/blk-mq.c +11 -27
index 5bfaa8e4b9cf..6af42682af7d 100644
@@ -2989,7 +2989,7 @@ static struct request *blk_mq_get_new_requests(struct request_queue *q,
 /*
  * Check if there is a suitable cached request and return it.
  */
-static struct request *blk_mq_peek_cached_request(struct blk_plug *plug,
+static struct request *blk_mq_get_cached_request(struct blk_plug *plug,
 		struct request_queue *q, blk_opf_t opf)
 {
 	enum hctx_type type = blk_mq_get_hctx_type(opf);
@@ -3005,27 +3005,10 @@ static struct request *blk_mq_peek_cached_request(struct blk_plug *plug,
 		return NULL;
 	if (op_is_flush(rq->cmd_flags) != op_is_flush(opf))
 		return NULL;
+	rq_list_pop(&plug->cached_rqs);
 	return rq;
 }
 
-static void blk_mq_use_cached_rq(struct request *rq, struct blk_plug *plug,
-		struct bio *bio)
-{
-	if (rq_list_pop(&plug->cached_rqs) != rq)
-		WARN_ON_ONCE(1);
-
-	/*
-	 * If any qos ->throttle() end up blocking, we will have flushed the
-	 * plug and hence killed the cached_rq list as well. Pop this entry
-	 * before we throttle.
-	 */
-	rq_qos_throttle(rq->q, bio);
-
-	blk_mq_rq_time_init(rq, 0);
-	rq->cmd_flags = bio->bi_opf;
-	INIT_LIST_HEAD(&rq->queuelist);
-}
-
 static bool bio_unaligned(const struct bio *bio, struct request_queue *q)
 {
 	unsigned int bs_mask = queue_logical_block_size(q) - 1;
@@ -3063,7 +3046,7 @@ void blk_mq_submit_bio(struct bio *bio)
 	/*
 	 * If the plug has a cached request for this queue, try to use it.
 	 */
-	rq = blk_mq_peek_cached_request(plug, q, bio->bi_opf);
+	rq = blk_mq_get_cached_request(plug, q, bio->bi_opf);
 
 	/*
 	 * A BIO that was released from a zone write plug has already been
@@ -3121,12 +3104,15 @@ void blk_mq_submit_bio(struct bio *bio)
 	}
 
 new_request:
-	if (!rq) {
+	if (rq) {
+		rq_qos_throttle(rq->q, bio);
+		blk_mq_rq_time_init(rq, blk_time_get_ns());
+		rq->cmd_flags = bio->bi_opf;
+		INIT_LIST_HEAD(&rq->queuelist);
+	} else {
 		rq = blk_mq_get_new_requests(q, plug, bio, nr_segs);
 		if (unlikely(!rq))
 			goto queue_exit;
-	} else {
-		blk_mq_use_cached_rq(rq, plug, bio);
 	}
 
 	trace_block_getrq(bio);
@@ -3165,12 +3151,10 @@ void blk_mq_submit_bio(struct bio *bio)
 	return;
 
 queue_exit:
-	/*
-	 * Don't drop the queue reference if we were trying to use a cached
-	 * request and thus didn't acquire one.
-	 */
 	if (!rq)
 		blk_queue_exit(q);
+	else
+		rq_list_add_head(&plug->cached_rqs, rq);
 }
 
 #ifdef CONFIG_BLK_MQ_STACKING
drivers/ata/pata_sl82c105.c +3 -1
index 93882e976ede..2a5ce46af5a0 100644
@@ -264,6 +264,7 @@ static struct ata_port_operations sl82c105_port_ops = {
 static int sl82c105_bridge_revision(struct pci_dev *pdev)
 {
 	struct pci_dev *bridge;
+	u8 revision;
 
 	/*
 	 * The bridge should be part of the same device, but function 0.
@@ -285,8 +286,9 @@ static int sl82c105_bridge_revision(struct pci_dev *pdev)
 	/*
 	 * We need to find function 0's revision, not function 1
 	 */
+	revision = bridge->revision;
 	pci_dev_put(bridge);
-	return bridge->revision;
+	return revision;
 }
 
 static void sl82c105_fixup(struct pci_dev *pdev)
drivers/counter/microchip-tcb-capture.c +2 -2
index 461f57f66631..fbd1afe178a3 100644
@@ -309,7 +309,7 @@ static int mchp_tc_probe(struct platform_device *pdev)
 	char clk_name[7];
 	struct regmap *regmap;
 	struct clk *clk[3];
-	int channel;
+	u32 channel;
 	int ret, i;
 
 	counter = devm_counter_alloc(&pdev->dev, sizeof(*priv));
@@ -343,7 +343,7 @@ static int mchp_tc_probe(struct platform_device *pdev)
 
 		priv->channel[i] = channel;
 
-		snprintf(clk_name, sizeof(clk_name), "t%d_clk", channel);
+		snprintf(clk_name, sizeof(clk_name), "t%u_clk", channel);
 
 		clk[i] = of_clk_get_by_name(np->parent, clk_name);
 		if (IS_ERR(clk[i])) {
drivers/crypto/ccp/sev-dev.c +12 -5
index d668f9318c28..d6a0773d6da8 100644
@@ -226,6 +226,7 @@ static int sev_cmd_buffer_len(int cmd)
 	case SEV_CMD_SNP_GUEST_REQUEST:		return sizeof(struct sev_data_snp_guest_request);
 	case SEV_CMD_SNP_CONFIG:		return sizeof(struct sev_user_data_snp_config);
 	case SEV_CMD_SNP_COMMIT:		return sizeof(struct sev_data_snp_commit);
+	case SEV_CMD_SNP_VLEK_LOAD:		return sizeof(struct sev_user_data_snp_vlek_load);
 	default:				return 0;
 	}
 
@@ -1117,7 +1118,7 @@ static int __sev_snp_init_locked(int *error)
 	if (!sev_version_greater_or_equal(SNP_MIN_API_MAJOR, SNP_MIN_API_MINOR)) {
 		dev_dbg(sev->dev, "SEV-SNP support requires firmware version >= %d:%d\n",
 			SNP_MIN_API_MAJOR, SNP_MIN_API_MINOR);
-		return 0;
+		return -EOPNOTSUPP;
 	}
 
 	/* SNP_INIT requires MSR_VM_HSAVE_PA to be cleared on all CPUs. */
@@ -1356,12 +1357,9 @@ static int _sev_platform_init_locked(struct sev_platform_init_args *args)
 
 	rc = __sev_snp_init_locked(&args->error);
 	if (rc && rc != -ENODEV) {
-		/*
-		 * Don't abort the probe if SNP INIT failed,
-		 * continue to initialize the legacy SEV firmware.
-		 */
 		dev_err(sev->dev, "SEV-SNP: failed to INIT rc %d, error %#x\n",
 			rc, args->error);
+		return rc;
 	}
 
 	/* Defer legacy SEV/SEV-ES support if allowed by caller/module. */
@@ -2444,6 +2442,15 @@ static void sev_firmware_shutdown(struct sev_device *sev)
 	mutex_unlock(&sev_cmd_mutex);
 }
 
+void sev_platform_shutdown(void)
+{
+	if (!psp_master || !psp_master->sev_data)
+		return;
+
+	sev_firmware_shutdown(psp_master->sev_data);
+}
+EXPORT_SYMBOL_GPL(sev_platform_shutdown);
+
 void sev_dev_destroy(struct psp_device *psp)
 {
 	struct sev_device *sev = psp->sev_data;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
index df77afbd5462..2ec994a6dea6 100644
@@ -4635,6 +4635,8 @@ static void amdgpu_device_unmap_mmio(struct amdgpu_device *adev)
 
 	iounmap(adev->rmmio);
 	adev->rmmio = NULL;
+	if (adev->mman.aper_base_kaddr)
+		iounmap(adev->mman.aper_base_kaddr);
 	adev->mman.aper_base_kaddr = NULL;
 
 	/* Memory manager related */
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +19 -16
index 31f9fb3cfeaa..e161af6276b9 100644
@@ -1909,23 +1909,17 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
 	/* Change the size here instead of the init above so only lpfn is affected */
 	amdgpu_ttm_set_buffer_funcs_status(adev, false);
 #ifdef CONFIG_64BIT
-	if (adev->gmc.xgmi.connected_to_cpu) {
-		void *kaddr = devm_memremap(adev->dev, adev->gmc.aper_base,
-					    adev->gmc.visible_vram_size,
-					    MEMREMAP_WB);
-		if (IS_ERR(kaddr))
-			return PTR_ERR(kaddr);
-		adev->mman.aper_base_kaddr = (__force void __iomem *)kaddr;
-	} else if (adev->gmc.is_app_apu) {
+#ifdef CONFIG_X86
+	if (adev->gmc.xgmi.connected_to_cpu)
+		adev->mman.aper_base_kaddr = ioremap_cache(adev->gmc.aper_base,
+				adev->gmc.visible_vram_size);
+	else if (adev->gmc.is_app_apu)
 		DRM_DEBUG_DRIVER(
 			"No need to ioremap when real vram size is 0\n");
-	} else {
-		adev->mman.aper_base_kaddr = devm_ioremap_wc(adev->dev,
-							     adev->gmc.aper_base,
-							     adev->gmc.visible_vram_size);
-		if (!adev->mman.aper_base_kaddr)
-			return -ENOMEM;
-	}
+	else
+#endif
+		adev->mman.aper_base_kaddr = ioremap_wc(adev->gmc.aper_base,
+				adev->gmc.visible_vram_size);
 #endif
 
 	/*
@@ -2072,6 +2066,8 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
  */
 void amdgpu_ttm_fini(struct amdgpu_device *adev)
 {
+	int idx;
+
 	if (!adev->mman.initialized)
 		return;
 
@@ -2094,7 +2090,14 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)
 	amdgpu_ttm_fw_reserve_vram_fini(adev);
 	amdgpu_ttm_drv_reserve_vram_fini(adev);
 
-	adev->mman.aper_base_kaddr = NULL;
+	if (drm_dev_enter(adev_to_drm(adev), &idx)) {
+
+		if (adev->mman.aper_base_kaddr)
+			iounmap(adev->mman.aper_base_kaddr);
+		adev->mman.aper_base_kaddr = NULL;
+
+		drm_dev_exit(idx);
+	}
 
 	amdgpu_vram_mgr_fini(adev);
 	amdgpu_gtt_mgr_fini(adev);
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +23 -1
index 551638d9ff61..dcc78244dd7c 100644
@@ -1256,8 +1256,30 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)
 
 void dce110_set_avmute(struct pipe_ctx *pipe_ctx, bool enable)
 {
-	if (pipe_ctx != NULL && pipe_ctx->stream_res.stream_enc != NULL)
+	if (pipe_ctx == NULL || pipe_ctx->stream_res.stream_enc == NULL)
+		return;
+
+	if (dc_is_hdmi_signal(pipe_ctx->stream->signal)) {
 		pipe_ctx->stream_res.stream_enc->funcs->set_avmute(pipe_ctx->stream_res.stream_enc, enable);
+
+		/* Wait for three frames to make sure AV mute is sent out.
+		 * Some HDMI sinks need additional GCP packets to properly
+		 * process the mute state, especially after link re-establishment
+		 * with HDMI 2.0 scrambling enabled.
+		 */
+		if (enable && pipe_ctx->stream_res.tg &&
+		    pipe_ctx->stream_res.tg->funcs->is_tg_enabled &&
+		    pipe_ctx->stream_res.tg->funcs->wait_for_state &&
+		    pipe_ctx->stream_res.tg->funcs->is_tg_enabled(pipe_ctx->stream_res.tg)) {
+			int i;
+
+			pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VACTIVE);
+			for (i = 0; i < 3; i++) {
+				pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VBLANK);
+				pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VACTIVE);
+			}
+		}
+	}
 }
 
 static enum audio_dto_source translate_to_dto_source(enum controller_id crtc_id)
drivers/gpu/drm/bridge/parade-ps8640.c +21 -6
index 14d4dcf239da..61ea855e55d8 100644
@@ -258,8 +258,14 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
 	addr_len[PAGE0_SWAUX_LENGTH - base] = (len == 0) ? SWAUX_NO_PAYLOAD :
 					      ((len - 1) & SWAUX_LENGTH_MASK);
 
-	regmap_bulk_write(map, PAGE0_SWAUX_ADDR_7_0, addr_len,
-			  ARRAY_SIZE(addr_len));
+	ret = regmap_bulk_write(map, PAGE0_SWAUX_ADDR_7_0, addr_len,
+				ARRAY_SIZE(addr_len));
+	if (ret) {
+		DRM_DEV_ERROR(dev,
+			      "failed to write AUX address %#x, len %zu: %d\n",
+			      msg->address, len, ret);
+		return ret;
+	}
 
 	if (len && (request == DP_AUX_NATIVE_WRITE ||
 		    request == DP_AUX_I2C_WRITE)) {
@@ -275,13 +281,22 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
 		}
 	}
 
-	regmap_write(map, PAGE0_SWAUX_CTRL, SWAUX_SEND);
+	ret = regmap_write(map, PAGE0_SWAUX_CTRL, SWAUX_SEND);
+	if (ret) {
+		DRM_DEV_ERROR(dev, "failed to start AUX transfer: %d\n", ret);
+		return ret;
+	}
 
 	/* Zero delay loop because i2c transactions are slow already */
-	regmap_read_poll_timeout(map, PAGE0_SWAUX_CTRL, data,
-				 !(data & SWAUX_SEND), 0, 50 * 1000);
+	ret = regmap_read_poll_timeout(map, PAGE0_SWAUX_CTRL, data,
+				       !(data & SWAUX_SEND), 0, 50 * 1000);
+	if (ret) {
+		DRM_DEV_ERROR(dev, "failed to complete AUX transfer: %d\n",
+			      ret);
+		return ret;
+	}
 
-	regmap_read(map, PAGE0_SWAUX_STATUS, &data);
+	ret = regmap_read(map, PAGE0_SWAUX_STATUS, &data);
 	if (ret) {
 		DRM_DEV_ERROR(dev, "failed to read PAGE0_SWAUX_STATUS: %d\n",
 			      ret);
drivers/hwmon/ads7828.c +6 -5
index 436637264056..20ef4992f5bb 100644
@@ -106,12 +106,11 @@ static int ads7828_probe(struct i2c_client *client)
 	struct ads7828_data *data;
 	struct device *hwmon_dev;
 	unsigned int vref_mv = ADS7828_INT_VREF_MV;
-	unsigned int vref_uv;
+	int vref_uv;
 	bool diff_input = false;
 	bool ext_vref = false;
 	unsigned int regval;
 	enum ads7828_chips chip;
-	struct regulator *reg;
 
 	data = devm_kzalloc(dev, sizeof(struct ads7828_data), GFP_KERNEL);
 	if (!data)
@@ -125,9 +124,11 @@ static int ads7828_probe(struct i2c_client *client)
 	} else if (dev->of_node) {
 		diff_input = of_property_read_bool(dev->of_node,
 						   "ti,differential-input");
-		reg = devm_regulator_get_optional(dev, "vref");
-		if (!IS_ERR(reg)) {
-			vref_uv = regulator_get_voltage(reg);
+		vref_uv = devm_regulator_get_enable_read_voltage(dev, "vref");
+		if (vref_uv < 0) {
+			if (vref_uv != -ENODEV)
+				return vref_uv;
+		} else {
 			vref_mv = DIV_ROUND_CLOSEST(vref_uv, 1000);
 			if (vref_mv < ADS7828_EXT_VREF_MV_MIN ||
 			    vref_mv > ADS7828_EXT_VREF_MV_MAX)
drivers/hwmon/corsair-psu.c +2 -2
index 4ab73bcef1d1..61d1b22bc63e 100644
@@ -709,7 +709,7 @@ static int vendor_show(struct seq_file *seqf, void *unused)
 {
 	struct corsairpsu_data *priv = seqf->private;
 
-	seq_printf(seqf, "%s\n", priv->vendor);
+	seq_printf(seqf, "%.*s\n", REPLY_SIZE, priv->vendor);
 
 	return 0;
 }
@@ -719,7 +719,7 @@ static int product_show(struct seq_file *seqf, void *unused)
 {
 	struct corsairpsu_data *priv = seqf->private;
 
-	seq_printf(seqf, "%s\n", priv->product);
+	seq_printf(seqf, "%.*s\n", REPLY_SIZE, priv->product);
 
 	return 0;
 }
drivers/hwmon/ltc4282.c +12 -8
index e1c0d02b564b..5f7ab813051c 100644
@@ -15,6 +15,7 @@
 #include <linux/hwmon-sysfs.h>
 #include <linux/i2c.h>
 #include <linux/math.h>
+#include <linux/math64.h>
 #include <linux/minmax.h>
 #include <linux/module.h>
 #include <linux/mod_devicetable.h>
@@ -142,7 +143,7 @@ struct ltc4282_state {
 	 */
 	struct ltc4282_cache in0_1_cache[LTC4282_CHAN_VGPIO];
 	u32 vsense_max;
-	long power_max;
+	s64 power_max;
 	u32 rsense;
 	u16 vdd;
 	u16 vfs_out;
@@ -621,13 +622,12 @@ static int ltc4282_read(struct device *dev, enum hwmon_sensor_types type,
 }
 
 static int ltc4282_write_power_byte(const struct ltc4282_state *st, u32 reg,
-				    long val)
+				    s64 val)
 {
 	u32 power;
 	u64 temp;
 
-	if (val > st->power_max)
-		val = st->power_max;
+	val = clamp(val, 0, st->power_max);
 
 	temp = val * int_pow(U8_MAX, 2) * st->rsense;
 	power = DIV64_U64_ROUND_CLOSEST(temp,
@@ -637,7 +637,7 @@ static int ltc4282_write_power_byte(const struct ltc4282_state *st, u32 reg,
 }
 
 static int ltc4282_write_power_word(const struct ltc4282_state *st, u32 reg,
-				    long val)
+				    u64 val)
 {
 	u64 temp = int_pow(U16_MAX, 2) * st->rsense, temp_2;
 	__be16 __raw;
@@ -946,8 +946,11 @@ static int ltc4282_curr_reset_hist(struct ltc4282_state *st)
 static int ltc4282_write_curr(struct ltc4282_state *st, u32 attr,
 			      long val)
 {
+	s32 ulimit = min_t(u64, INT_MAX,
+			   div_u64((u64)INT_MAX * DECA * MICRO, st->rsense));
+	u64 val64 = clamp(val, 0, ulimit);
 	/* need to pass it in millivolt */
-	u32 in = DIV_ROUND_CLOSEST_ULL((u64)val * st->rsense, DECA * MICRO);
+	u32 in = DIV_ROUND_CLOSEST_ULL(val64 * st->rsense, DECA * MICRO);
 
 	switch (attr) {
 	case hwmon_curr_max:
@@ -1254,7 +1257,8 @@ static int ltc4282_set_max_limits(struct ltc4282_state *st)
 		return ret;
 
 	/* Power is given by ISENSE * Vout. */
-	st->power_max = DIV_ROUND_CLOSEST(st->vsense_max * DECA * MILLI, st->rsense) * st->vfs_out;
+	st->power_max = DIV_ROUND_CLOSEST_ULL((u64)st->vsense_max * DECA * MILLI,
+					      st->rsense) * st->vfs_out;
 	ret = ltc4282_write_power_byte(st, LTC4282_POWER_MAX, st->power_max);
 	if (ret)
 		return ret;
@@ -1421,7 +1425,7 @@ static int ltc4282_setup(struct ltc4282_state *st, struct device *dev)
 	if (!ret) {
 		int reg_val;
 
-		switch (val) {
+		switch (st->vsense_max) {
 		case 12500:
 			reg_val = 0;
 			break;
drivers/hwmon/nzxt-smart2.c +5 -1
index 66c5886f411a..8ff3ebc1bb4c 100644
@@ -760,7 +760,11 @@ static int nzxt_smart2_hid_probe(struct hid_device *hdev,
 
 	hid_device_io_start(hdev);
 
-	init_device(drvdata, UPDATE_INTERVAL_DEFAULT_MS);
+	ret = init_device(drvdata, UPDATE_INTERVAL_DEFAULT_MS);
+	if (ret) {
+		dev_err(&hdev->dev, "init_device failed: %d\n", ret);
+		goto out_hw_close;
+	}
 
 	drvdata->hwmon =
 		hwmon_device_register_with_info(&hdev->dev, "nzxtsmart2", drvdata,
drivers/hwmon/pmbus/lm25066.c +3 -2
index c36c124d1a2d..f0bf3b153331 100644
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/i2c.h>
 #include <linux/log2.h>
+#include <linux/math.h>
 #include <linux/of.h>
 #include "pmbus.h"
 
@@ -540,8 +541,8 @@ static int lm25066_probe(struct i2c_client *client)
 	if (of_property_read_u32(client->dev.of_node, "shunt-resistor-micro-ohms", &shunt))
 		shunt = 1000;
 
-	info->m[PSC_CURRENT_IN] = info->m[PSC_CURRENT_IN] * shunt / 1000;
-	info->m[PSC_POWER] = info->m[PSC_POWER] * shunt / 1000;
+	info->m[PSC_CURRENT_IN] = DIV_ROUND_CLOSEST_ULL((u64)info->m[PSC_CURRENT_IN] * shunt, 1000);
+	info->m[PSC_POWER] = DIV_ROUND_CLOSEST_ULL((u64)info->m[PSC_POWER] * shunt, 1000);
 
 #if IS_ENABLED(CONFIG_SENSORS_LM25066_REGULATOR)
 	/* LM25056 doesn't support OPERATION */
drivers/input/evdev.c +16 -11
index b5cbb57ee5f6..2fa5b8a13131 100644
@@ -21,6 +21,7 @@
 #include <linux/init.h>
 #include <linux/input/mt.h>
 #include <linux/major.h>
+#include <linux/nospec.h>
 #include <linux/device.h>
 #include <linux/cdev.h>
 #include "input-compat.h"
@@ -67,8 +68,10 @@ static size_t evdev_get_mask_cnt(unsigned int type)
 		[EV_SND]	= SND_CNT,
 		[EV_FF]		= FF_CNT,
 	};
+	unsigned long mask = array_index_mask_nospec(type, EV_CNT);
 
-	return (type < EV_CNT) ? counts[type] : 0;
+	/* Returns 0 for out-of-bounds types, including speculatively */
+	return counts[type & mask] & mask;
 }
 
 /* requires the buffer lock to be held */
@@ -146,11 +149,11 @@ static void __evdev_queue_syn_dropped(struct evdev_client *client)
 	struct timespec64 ts = ktime_to_timespec64(ev_time[client->clk_type]);
 	struct input_event ev;
 
+	memset(&ev, 0, sizeof(ev));
 	ev.input_event_sec = ts.tv_sec;
 	ev.input_event_usec = ts.tv_nsec / NSEC_PER_USEC;
 	ev.type = EV_SYN;
 	ev.code = SYN_DROPPED;
-	ev.value = 0;
 
 	client->buffer[client->head++] = ev;
 	client->head &= client->bufsize - 1;
@@ -218,20 +221,20 @@ static void __pass_event(struct evdev_client *client,
 	client->head &= client->bufsize - 1;
 
 	if (unlikely(client->head == client->tail)) {
+		struct input_event ev;
+
+		memset(&ev, 0, sizeof(ev));
+		ev.input_event_sec = event->input_event_sec;
+		ev.input_event_usec = event->input_event_usec;
+		ev.type = EV_SYN;
+		ev.code = SYN_DROPPED;
+
 		/*
 		 * This effectively "drops" all unconsumed events, leaving
 		 * EV_SYN/SYN_DROPPED plus the newest event in the queue.
 		 */
 		client->tail = (client->head - 2) & (client->bufsize - 1);
-
-		client->buffer[client->tail] = (struct input_event) {
-			.input_event_sec = event->input_event_sec,
-			.input_event_usec = event->input_event_usec,
-			.type = EV_SYN,
-			.code = SYN_DROPPED,
-			.value = 0,
-		};
-
+		client->buffer[client->tail] = ev;
 		client->packet_head = client->tail;
 	}
 
@@ -253,6 +256,8 @@ static void evdev_pass_values(struct evdev_client *client,
 	if (client->revoked)
 		return;
 
+	memset(&event, 0, sizeof(event));
+
 	ts = ktime_to_timespec64(ev_time[client->clk_type]);
 	event.input_event_sec = ts.tv_sec;
 	event.input_event_usec = ts.tv_nsec / NSEC_PER_USEC;
drivers/misc/fastrpc.c +14 -5
index c0ef145c8297..576cd9e5b807 100644
@@ -469,6 +469,7 @@ static void fastrpc_channel_ctx_free(struct kref *ref)
 
 	cctx = container_of(ref, struct fastrpc_channel_ctx, refcount);
 
+	idr_destroy(&cctx->ctx_idr);
 	kfree(cctx);
 }
 
@@ -1279,10 +1280,12 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl,  u32 kernel,
 	}
 
 	if (err == -ERESTARTSYS) {
+		spin_lock(&fl->lock);
 		list_for_each_entry_safe(buf, b, &fl->mmaps, node) {
 			list_del(&buf->node);
 			list_add_tail(&buf->node, &fl->cctx->invoke_interrupted_mmaps);
 		}
+		spin_unlock(&fl->lock);
 	}
 
 	if (err)
@@ -1643,7 +1646,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)
 		dev_err(&cctx->rpdev->dev, "No session available\n");
 		mutex_destroy(&fl->mutex);
 		kfree(fl);
-
+		fastrpc_channel_ctx_put(cctx);
 		return -EBUSY;
 	}
 
@@ -1871,9 +1874,6 @@ static int fastrpc_req_munmap_impl(struct fastrpc_user *fl, struct fastrpc_buf *
 				      &args[0]);
 	if (!err) {
 		dev_dbg(dev, "unmmap\tpt 0x%09lx OK\n", buf->raddr);
-		spin_lock(&fl->lock);
-		list_del(&buf->node);
-		spin_unlock(&fl->lock);
 		fastrpc_buf_free(buf);
 	} else {
 		dev_err(dev, "unmmap\tpt 0x%09lx ERROR\n", buf->raddr);
@@ -1887,6 +1887,7 @@ static int fastrpc_req_munmap(struct fastrpc_user *fl, char __user *argp)
 	struct fastrpc_buf *buf = NULL, *iter, *b;
 	struct fastrpc_req_munmap req;
 	struct device *dev = fl->sctx->dev;
+	int err;
 
 	if (copy_from_user(&req, argp, sizeof(req)))
 		return -EFAULT;
@@ -1894,6 +1895,7 @@ static int fastrpc_req_munmap(struct fastrpc_user *fl, char __user *argp)
 	spin_lock(&fl->lock);
 	list_for_each_entry_safe(iter, b, &fl->mmaps, node) {
 		if ((iter->raddr == req.vaddrout) && (iter->size == req.size)) {
+			list_del(&iter->node);
 			buf = iter;
 			break;
 		}
@@ -1906,7 +1908,14 @@ static int fastrpc_req_munmap(struct fastrpc_user *fl, char __user *argp)
 		return -EINVAL;
 	}
 
-	return fastrpc_req_munmap_impl(fl, buf);
+	err = fastrpc_req_munmap_impl(fl, buf);
+	if (err) {
+		spin_lock(&fl->lock);
+		list_add_tail(&buf->node, &fl->mmaps);
+		spin_unlock(&fl->lock);
+	}
+
+	return err;
 }
 
 static int fastrpc_req_mmap(struct fastrpc_user *fl, char __user *argp)
drivers/misc/mei/client.c +15 -10
index be011cef12e5..ccc40f900830 100644
@@ -447,18 +447,24 @@ static void mei_io_tx_list_free_cl(struct list_head *head,
 }
 
 /**
- * mei_io_list_free_fp - free cb from a list that matches file pointer
+ * mei_io_rd_list_free_fp - free cb from a rd_completed list that matches file pointer
  *
- * @head: io list
+ * @cl: host client
  * @fp: file pointer (matching cb file object), may be NULL
  */
-static void mei_io_list_free_fp(struct list_head *head, const struct file *fp)
+static void mei_io_rd_list_free_fp(struct mei_cl *cl, const struct file *fp)
 {
 	struct mei_cl_cb *cb, *next;
+	LIST_HEAD(cmpl_list);
 
-	list_for_each_entry_safe(cb, next, head, list)
+	spin_lock(&cl->rd_completed_lock);
+	list_for_each_entry_safe(cb, next, &cl->rd_completed, list)
 		if (!fp || fp == cb->fp)
-			mei_io_cb_free(cb);
+			list_move(&cb->list, &cmpl_list);
+	spin_unlock(&cl->rd_completed_lock);
+
+	list_for_each_entry_safe(cb, next, &cmpl_list, list)
+		mei_io_cb_free(cb);
 }
 
 /**
@@ -587,9 +593,7 @@ int mei_cl_flush_queues(struct mei_cl *cl, const struct file *fp)
 		mei_io_list_flush_cl(&cl->dev->ctrl_rd_list, cl);
 		mei_cl_free_pending(cl);
 	}
-	spin_lock(&cl->rd_completed_lock);
-	mei_io_list_free_fp(&cl->rd_completed, fp);
-	spin_unlock(&cl->rd_completed_lock);
+	mei_io_rd_list_free_fp(cl, fp);
 
 	return 0;
 }
@@ -1426,7 +1430,7 @@ void mei_cl_add_rd_completed(struct mei_cl *cl, struct mei_cl_cb *cb)
 }
 
 /**
- * mei_cl_del_rd_completed - free read completed callback with lock
+ * mei_cl_del_rd_completed - unlink read completed callback with lock and free it
  *
  * @cl: host client
  * @cb: callback block
@@ -1435,8 +1439,9 @@ void mei_cl_add_rd_completed(struct mei_cl *cl, struct mei_cl_cb *cb)
 void mei_cl_del_rd_completed(struct mei_cl *cl, struct mei_cl_cb *cb)
 {
 	spin_lock(&cl->rd_completed_lock);
-	mei_io_cb_free(cb);
+	list_del_init(&cb->list);
 	spin_unlock(&cl->rd_completed_lock);
+	mei_io_cb_free(cb);
 }
 
 /**
drivers/mtd/nand/spi/core.c +59 -15

121 lines not on this page · raw message

drivers/net/bonding/bond_alb.c +6 -4
index 7edf0fd58c34..ce6a3a0a2e15 100644
@@ -1535,8 +1535,8 @@ void bond_alb_monitor(struct work_struct *work)
 	struct bonding *bond = container_of(work, struct bonding,
 					    alb_work.work);
 	struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
+	struct slave *slave, *curr;
 	struct list_head *iter;
-	struct slave *slave;
 
 	if (!bond_has_slaves(bond)) {
 		atomic_set(&bond_info->tx_rebalance_counter, 0);
@@ -1598,9 +1598,11 @@ void bond_alb_monitor(struct work_struct *work)
 			 * because a slave was disabled then
 			 * it can now leave promiscuous mode.
 			 */
-			dev_set_promiscuity(rtnl_dereference(bond->curr_active_slave)->dev,
-					    -1);
-			bond_info->primary_is_promisc = 0;
+			curr = rtnl_dereference(bond->curr_active_slave);
+			if (bond_info->primary_is_promisc && curr) {
+				dev_set_promiscuity(curr->dev, -1);
+				bond_info->primary_is_promisc = 0;
+			}
 
 			rtnl_unlock();
 			rcu_read_lock();
drivers/net/ethernet/amd/pds_core/core.h +1 -0
index becd3104473c..4dbfe2373b3a 100644
@@ -170,6 +170,7 @@ struct pdsc {
 	struct timer_list wdtimer;
 	unsigned int wdtimer_period;
 	struct work_struct health_work;
+	bool health_stopped;
 	struct devlink_health_reporter *fw_reporter;
 	u32 fw_recoveries;
 
drivers/net/ethernet/amd/pds_core/main.c +12 -2
index c78b17d230a8..9526223a7297 100644
@@ -464,8 +464,10 @@ static void pdsc_stop_health_thread(struct pdsc *pdsc)
 		return;
 
 	timer_shutdown_sync(&pdsc->wdtimer);
-	if (pdsc->health_work.func)
-		cancel_work_sync(&pdsc->health_work);
+	if (pdsc->health_work.func && !pdsc->health_stopped) {
+		disable_work_sync(&pdsc->health_work);
+		pdsc->health_stopped = true;
+	}
 }
 
 static void pdsc_restart_health_thread(struct pdsc *pdsc)
@@ -473,6 +475,10 @@ static void pdsc_restart_health_thread(struct pdsc *pdsc)
 	if (pdsc->pdev->is_virtfn)
 		return;
 
+	if (pdsc->health_stopped) {
+		enable_work(&pdsc->health_work);
+		pdsc->health_stopped = false;
+	}
 	timer_setup(&pdsc->wdtimer, pdsc_wdtimer_cb, 0);
 	mod_timer(&pdsc->wdtimer, jiffies + 1);
 }
@@ -544,7 +550,11 @@ static pci_ers_result_t pdsc_pci_error_detected(struct pci_dev *pdev,
 						pci_channel_state_t error)
 {
 	if (error == pci_channel_io_frozen) {
+		struct pdsc *pdsc = pci_get_drvdata(pdev);
+
 		pdsc_reset_prepare(pdev);
+		if (!pdev->is_virtfn)
+			cancel_work_sync(&pdsc->pci_reset_work);
 		return PCI_ERS_RESULT_NEED_RESET;
 	}
 
drivers/net/ethernet/aquantia/atlantic/aq_ring.c +47 -4

68 lines not on this page · raw message

drivers/net/ethernet/aquantia/atlantic/aq_ring.h +1 -0
index d627ace850ff..67503c512676 100644
@@ -199,6 +199,7 @@ void aq_ring_update_queue_state(struct aq_ring_s *ring);
 void aq_ring_queue_wake(struct aq_ring_s *ring);
 void aq_ring_queue_stop(struct aq_ring_s *ring);
 bool aq_ring_tx_clean(struct aq_ring_s *self);
+void aq_ring_tx_deinit(struct aq_ring_s *self);
 int aq_xdp_xmit(struct net_device *dev, int num_frames,
 		struct xdp_frame **frames, u32 flags);
 int aq_ring_rx_clean(struct aq_ring_s *self,
drivers/net/ethernet/aquantia/atlantic/aq_vec.c +1 -1
index 9769ab4f9bef..62b5967b6dcc 100644
@@ -275,7 +275,7 @@ void aq_vec_deinit(struct aq_vec_s *self)
 
 	for (i = 0U; self->tx_rings > i; ++i) {
 		ring = self->ring[i];
-		aq_ring_tx_clean(&ring[AQ_VEC_TX_ID]);
+		aq_ring_tx_deinit(&ring[AQ_VEC_TX_ID]);
 		aq_ring_rx_deinit(&ring[AQ_VEC_RX_ID]);
 	}
 
drivers/net/ethernet/broadcom/bnxt/bnxt.c +33 -17

125 lines not on this page · raw message

drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -0
index 37fb74f18eee..f50fe72f83ac 100644
@@ -1300,6 +1300,7 @@ struct bnxt_vnic_info {
 #define BNXT_VNIC_RSSCTX_FLAG		0x40
 	struct ethtool_rxfh_context *rss_ctx;
 	u32		vnic_id;
+	u16		default_rx_ring;
 };
 
 struct bnxt_rss_ctx {
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c +5 -2
index 6dfa0ab74c33..02276b9ac5c6 100644
@@ -494,12 +494,15 @@ static int bnxt_ptp_enable(struct ptp_clock_info *ptp_info,
 		return rc;
 	case PTP_CLK_REQ_PPS:
 		/* Configure PHC PPS IN */
-		rc = bnxt_ptp_cfg_pin(bp, 0, BNXT_PPS_PIN_PPS_IN);
+		pin_id = 0;
+		if (!on)
+			break;
+		rc = bnxt_ptp_cfg_pin(bp, pin_id, BNXT_PPS_PIN_PPS_IN);
 		if (rc)
 			return rc;
 		rc = bnxt_ptp_cfg_event(bp, BNXT_PPS_EVENT_INTERNAL);
 		if (!rc)
-			ptp->pps_info.pins[0].event = BNXT_PPS_EVENT_INTERNAL;
+			ptp->pps_info.pins[pin_id].event = BNXT_PPS_EVENT_INTERNAL;
 		return rc;
 	default:
 		netdev_err(ptp->bp->dev, "Unrecognized PIN function\n");
drivers/net/ethernet/cisco/enic/enic_main.c +3 -2
index a432783756d8..e474cef72063 100644
@@ -3141,8 +3141,9 @@ static void enic_remove(struct pci_dev *pdev)
 	if (netdev) {
 		struct enic *enic = netdev_priv(netdev);
 
-		cancel_work_sync(&enic->reset);
-		cancel_work_sync(&enic->change_mtu_work);
+		disable_work_sync(&enic->reset);
+		disable_work_sync(&enic->tx_hang_reset);
+		disable_work_sync(&enic->change_mtu_work);
 		unregister_netdev(netdev);
 		enic_dev_deinit(enic);
 		vnic_dev_close(enic->vdev);
drivers/net/ethernet/freescale/fec_main.c +9 -2
index d8189c433847..22cd47d19ce2 100644
@@ -3323,8 +3323,15 @@ static void fec_enet_free_buffers(struct net_device *ndev)
 
 	for (q = 0; q < fep->num_rx_queues; q++) {
 		rxq = fep->rx_queue[q];
-		for (i = 0; i < rxq->bd.ring_size; i++)
-			page_pool_put_full_page(rxq->page_pool, rxq->rx_skb_info[i].page, false);
+		for (i = 0; i < rxq->bd.ring_size; i++) {
+			struct page *page = rxq->rx_skb_info[i].page;
+
+			if (!page)
+				continue;
+
+			page_pool_put_full_page(rxq->page_pool, page, false);
+			rxq->rx_skb_info[i].page = NULL;
+		}
 
 		for (i = 0; i < XDP_STATS_TOTAL; i++)
 			rxq->stats[i] = 0;
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c +0 -1
index 1a972b093a42..cc1d04d05e4b 100644
@@ -1282,7 +1282,6 @@ static void hix5hd2_dev_remove(struct platform_device *pdev)
 	struct net_device *ndev = platform_get_drvdata(pdev);
 	struct hix5hd2_priv *priv = netdev_priv(ndev);
 
-	netif_napi_del(&priv->napi);
 	unregister_netdev(ndev);
 	mdiobus_unregister(priv->bus);
 	mdiobus_free(priv->bus);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +1 -5
index 79858b06c97b..786aefc3d107 100644
@@ -11930,12 +11930,8 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
 	if (ret)
 		goto err_ptp_uninit;
 
-	if (hdev->hw.mac.media_type != HNAE3_MEDIA_TYPE_COPPER) {
+	if (hdev->hw.mac.media_type != HNAE3_MEDIA_TYPE_COPPER)
 		hdev->hw.mac.req_autoneg = hdev->hw.mac.autoneg;
-		if (hdev->hw.mac.autoneg == AUTONEG_DISABLE &&
-		    hdev->hw.mac.speed != SPEED_UNKNOWN)
-			hdev->hw.mac.req_speed = hdev->hw.mac.speed;
-	}
 
 	ret = hclge_set_autoneg_speed_dup(hdev);
 	if (ret) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c +4 -2
index b26fc848430f..14f3d01e440c 100644
@@ -78,10 +78,12 @@ static void otx2_get_egress_burst_cfg(struct otx2_nic *nic, u32 burst,
 	if (burst) {
 		*burst_exp = ilog2(burst) ? ilog2(burst) - 1 : 0;
 		tmp = burst - rounddown_pow_of_two(burst);
-		if (burst < max_mantissa)
+		if (burst <= max_mantissa) {
 			*burst_mantissa = tmp * 2;
-		else
+		} else {
+			WARN_ON(*burst_exp < 7);
 			*burst_mantissa = tmp / (1ULL << (*burst_exp - 7));
+		}
 	} else {
 		*burst_exp = MAX_BURST_EXPONENT;
 		*burst_mantissa = max_mantissa;
drivers/net/ethernet/marvell/prestera/prestera_pci.c +3 -0
index 35857dc19542..5db2c9e5e077 100644
@@ -684,6 +684,9 @@ static int prestera_fw_hdr_parse(struct prestera_fw *fw)
 	struct prestera_fw_header *hdr;
 	u32 magic;
 
+	if (fw->bin->size < sizeof(*hdr))
+		return -EINVAL;
+
 	hdr = (struct prestera_fw_header *)fw->bin->data;
 
 	magic = be32_to_cpu(hdr->magic_number);
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +7 -9
index 0b82a6a133d6..74f68b70ad1c 100644
@@ -1025,13 +1025,11 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev)
 
 	tracer = kvzalloc(sizeof(*tracer), GFP_KERNEL);
 	if (!tracer)
-		return ERR_PTR(-ENOMEM);
+		return NULL;
 
 	tracer->work_queue = create_singlethread_workqueue("mlx5_fw_tracer");
-	if (!tracer->work_queue) {
-		err = -ENOMEM;
+	if (!tracer->work_queue)
 		goto free_tracer;
-	}
 
 	tracer->dev = dev;
 
@@ -1073,7 +1071,7 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev)
 	destroy_workqueue(tracer->work_queue);
 free_tracer:
 	kvfree(tracer);
-	return ERR_PTR(err);
+	return NULL;
 }
 
 static int fw_tracer_event(struct notifier_block *nb, unsigned long action, void *data);
@@ -1084,7 +1082,7 @@ int mlx5_fw_tracer_init(struct mlx5_fw_tracer *tracer)
 	struct mlx5_core_dev *dev;
 	int err;
 
-	if (IS_ERR_OR_NULL(tracer))
+	if (!tracer)
 		return 0;
 
 	if (!tracer->str_db.loaded)
@@ -1134,7 +1132,7 @@ int mlx5_fw_tracer_init(struct mlx5_fw_tracer *tracer)
 /* Stop tracer + Cleanup HW resources */
 void mlx5_fw_tracer_cleanup(struct mlx5_fw_tracer *tracer)
 {
-	if (IS_ERR_OR_NULL(tracer))
+	if (!tracer)
 		return;
 
 	mutex_lock(&tracer->state_lock);
@@ -1163,7 +1161,7 @@ void mlx5_fw_tracer_cleanup(struct mlx5_fw_tracer *tracer)
 /* Free software resources (Buffers, etc ..) */
 void mlx5_fw_tracer_destroy(struct mlx5_fw_tracer *tracer)
 {
-	if (IS_ERR_OR_NULL(tracer))
+	if (!tracer)
 		return;
 
 	mlx5_core_dbg(tracer->dev, "FWTracer: Destroy\n");
@@ -1215,7 +1213,7 @@ int mlx5_fw_tracer_reload(struct mlx5_fw_tracer *tracer)
 	struct mlx5_core_dev *dev;
 	int err;
 
-	if (IS_ERR_OR_NULL(tracer))
+	if (!tracer)
 		return 0;
 
 	dev = tracer->dev;
drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h +1 -0
index efb34de4cb7a..692ac2f21d94 100644
@@ -30,6 +30,7 @@ enum {
 	MLX5E_TC_FLOW_FLAG_FAILED                = MLX5E_TC_FLOW_BASE + 9,
 	MLX5E_TC_FLOW_FLAG_SAMPLE                = MLX5E_TC_FLOW_BASE + 10,
 	MLX5E_TC_FLOW_FLAG_USE_ACT_STATS         = MLX5E_TC_FLOW_BASE + 11,
+	MLX5E_TC_FLOW_FLAG_PEER                  = MLX5E_TC_FLOW_BASE + 12,
 };
 
 struct mlx5e_tc_flow_parse_attr {
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +3 -1
index 8878990254f4..a5ae17931067 100644
@@ -2161,7 +2161,8 @@ static void mlx5e_tc_del_flow(struct mlx5e_priv *priv,
 	if (mlx5e_is_eswitch_flow(flow)) {
 		struct mlx5_devcom_comp_dev *devcom = flow->priv->mdev->priv.eswitch->devcom;
 
-		if (!mlx5_devcom_for_each_peer_begin(devcom)) {
+		if (flow_flag_test(flow, PEER) ||
+		    !mlx5_devcom_for_each_peer_begin(devcom)) {
 			mlx5e_tc_del_fdb_flow(priv, flow);
 			return;
 		}
@@ -4605,6 +4606,7 @@ static int mlx5e_tc_add_fdb_peer_flow(struct flow_cls_offload *f,
 	else
 		in_mdev = priv->mdev;
 
+	flow_flags |= BIT(MLX5E_TC_FLOW_FLAG_PEER);
 	parse_attr = flow->attr->parse_attr;
 	peer_flow = __mlx5e_add_fdb_flow(peer_priv, f, flow_flags,
 					 parse_attr->filter_dev,
drivers/net/thunderbolt/main.c +22 -11
index 5d7d11d75b0b..ceaba08cd378 100644
@@ -389,11 +389,16 @@ static void tbnet_tear_down(struct tbnet *net, bool send_logout)
 				break;
 		}
 
-		tb_ring_stop(net->rx_ring.ring);
-		tb_ring_stop(net->tx_ring.ring);
-		tbnet_free_buffers(&net->rx_ring);
-		tbnet_free_buffers(&net->tx_ring);
-
+		/* Tear the paths down before stopping the rings.  This mirrors
+		 * tbnet_connected_work(), which enables the paths last so the
+		 * Rx ring is primed before packets can arrive.  Stopping a
+		 * ring zeroes its descriptor base and tbnet_free_buffers()
+		 * unmaps and frees the frame buffers, leaving anything still
+		 * in flight with nowhere to drain to;
+		 * __tb_path_deactivate_hop() then waits for the hop's
+		 * 'pending' bit, which on some host routers never clears in
+		 * that state.
+		 */
 		ret = tb_xdomain_disable_paths(net->xd,
 					       net->local_transmit_path,
 					       net->tx_ring.ring->hop,
@@ -402,6 +407,11 @@ static void tbnet_tear_down(struct tbnet *net, bool send_logout)
 		if (ret)
 			netdev_warn(net->dev, "failed to disable DMA paths\n");
 
+		tb_ring_stop(net->rx_ring.ring);
+		tb_ring_stop(net->tx_ring.ring);
+		tbnet_free_buffers(&net->rx_ring);
+		tbnet_free_buffers(&net->tx_ring);
+
 		tb_xdomain_release_in_hopid(net->xd, net->remote_transmit_path);
 		net->remote_transmit_path = 0;
 	}
@@ -928,12 +938,8 @@ static int tbnet_open(struct net_device *dev)
 
 	netif_carrier_off(dev);
 
-	flags = RING_FLAG_FRAME;
-	/* Only enable full E2E if the other end supports it too */
-	if (tbnet_e2e && net->svc->prtcstns & TBNET_E2E)
-		flags |= RING_FLAG_E2E;
-
-	ring = tb_ring_alloc_tx(xd->tb->nhi, -1, TBNET_RING_SIZE, flags);
+	ring = tb_ring_alloc_tx(xd->tb->nhi, -1, TBNET_RING_SIZE,
+				RING_FLAG_FRAME);
 	if (!ring) {
 		netdev_err(dev, "failed to allocate Tx ring\n");
 		return -ENOMEM;
@@ -952,6 +958,11 @@ static int tbnet_open(struct net_device *dev)
 	sof_mask = BIT(TBIP_PDF_FRAME_START);
 	eof_mask = BIT(TBIP_PDF_FRAME_END);
 
+	flags = RING_FLAG_FRAME;
+	/* Only enable full E2E if the other end supports it too */
+	if (tbnet_e2e && net->svc->prtcstns & TBNET_E2E)
+		flags |= RING_FLAG_E2E;
+
 	ring = tb_ring_alloc_rx(xd->tb->nhi, -1, TBNET_RING_SIZE, flags,
 				net->tx_ring.ring->hop, sof_mask,
 				eof_mask, tbnet_start_poll, net);
drivers/net/usb/ax88179_178a.c +3 -1
index b034ef8a73ea..cf40b604f135 100644
@@ -1493,8 +1493,10 @@ ax88179_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
 
 	headroom = skb_headroom(skb) - 8;
 
-	if ((dev->net->features & NETIF_F_SG) && skb_linearize(skb))
+	if ((dev->net->features & NETIF_F_SG) && skb_linearize(skb)) {
+		dev_kfree_skb_any(skb);
 		return NULL;
+	}
 
 	if ((skb_header_cloned(skb) || headroom < 0) &&
 	    pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) {
drivers/net/usb/ipheth.c +10 -1
index a19789b57190..a86d0a4dbd28 100644
@@ -490,6 +490,7 @@ static int ipheth_open(struct net_device *net)
 	if (retval)
 		return retval;
 
+	enable_delayed_work(&dev->carrier_work);
 	schedule_delayed_work(&dev->carrier_work, IPHETH_CARRIER_CHECK_TIMEOUT);
 	return retval;
 }
@@ -499,7 +500,11 @@ static int ipheth_close(struct net_device *net)
 	struct ipheth_device *dev = netdev_priv(net);
 
 	netif_stop_queue(net);
-	cancel_delayed_work_sync(&dev->carrier_work);
+	/* A TX URB can still complete with an error after this point and
+	 * try to re-arm the carrier work. Disable it instead of cancelling
+	 * it, so that such a schedule_delayed_work() is a no-op.
+	 */
+	disable_delayed_work_sync(&dev->carrier_work);
 	return 0;
 }
 
@@ -633,6 +638,10 @@ static int ipheth_probe(struct usb_interface *intf,
 	}
 
 	INIT_DELAYED_WORK(&dev->carrier_work, ipheth_carrier_check_work);
+	/* Armed only between ipheth_open() and ipheth_close(). Start out
+	 * disabled so the enable/disable counts balance from the first open.
+	 */
+	disable_delayed_work(&dev->carrier_work);
 
 	retval = ipheth_alloc_urbs(dev);
 	if (retval) {
drivers/net/veth.c +14 -8
index 918a7130011d..2feb694f58bb 100644
@@ -865,18 +865,24 @@ static struct sk_buff *veth_xdp_rcv_skb(struct veth_rq *rq,
 
 	skb_reset_mac_header(skb);
 
-	/* check if bpf_xdp_adjust_tail was used */
-	off = xdp->data_end - orig_data_end;
-	if (off != 0)
-		__skb_put(skb, off); /* positive on grow, negative on shrink */
-
 	/* XDP frag metadata (e.g. nr_frags) are updated in eBPF helpers
-	 * (e.g. bpf_xdp_adjust_tail), we need to update data_len here.
+	 * (e.g. bpf_xdp_adjust_tail). Remove the old fragment contribution
+	 * from skb->len before updating data_len, then add the new one back.
 	 */
-	if (xdp_buff_has_frags(xdp))
+	skb->len -= skb->data_len;
+	if (xdp_buff_has_frags(xdp)) {
 		skb->data_len = skb_shinfo(skb)->xdp_frags_size;
-	else
+		skb->len += skb->data_len;
+	} else {
 		skb->data_len = 0;
+	}
+
+	/* Synchronize the skb tail with XDP's updated linear area. */
+	off = xdp->data_end - orig_data_end;
+	if (off != 0) {
+		skb_set_tail_pointer(skb, xdp->data_end - xdp->data);
+		skb->len += off; /* positive on grow, negative on shrink */
+	}
 
 	skb->protocol = eth_type_trans(skb, rq->dev);
 
drivers/net/vxlan/vxlan_core.c +1 -1
index fdc46f52c7fc..3c62957907ba 100644
@@ -4462,7 +4462,7 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
 	if (change_igmp && vxlan_addr_multicast(&dst->remote_ip))
 		err = vxlan_multicast_leave(vxlan);
 
-	if (conf.age_interval != vxlan->cfg.age_interval)
+	if (netif_running(dev) && conf.age_interval != vxlan->cfg.age_interval)
 		mod_timer(&vxlan->age_timer, jiffies);
 
 	netdev_adjacent_change_commit(dst->remote_dev, lowerdev, dev);
drivers/nvmem/core.c +2 -22
index 2edc9cea2bda..2ba16adaf731 100644
@@ -811,7 +811,7 @@ static int nvmem_validate_keepouts(struct nvmem_device *nvmem)
 	return 0;
 }
 
-static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
+int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
 {
 	struct device *dev = &nvmem->dev;
 	struct device_node *child;
@@ -863,29 +863,13 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nod
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(nvmem_add_cells_from_dt);
 
 static int nvmem_add_cells_from_legacy_of(struct nvmem_device *nvmem)
 {
 	return nvmem_add_cells_from_dt(nvmem, nvmem->dev.of_node);
 }
 
-static int nvmem_add_cells_from_fixed_layout(struct nvmem_device *nvmem)
-{
-	struct device_node *layout_np;
-	int err = 0;
-
-	layout_np = of_nvmem_layout_get_container(nvmem);
-	if (!layout_np)
-		return 0;
-
-	if (of_device_is_compatible(layout_np, "fixed-layout"))
-		err = nvmem_add_cells_from_dt(nvmem, layout_np);
-
-	of_node_put(layout_np);
-
-	return err;
-}
-
 int nvmem_layout_register(struct nvmem_layout *layout)
 {
 	int ret;
@@ -1038,10 +1022,6 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
 			goto err_remove_cells;
 	}
 
-	rval = nvmem_add_cells_from_fixed_layout(nvmem);
-	if (rval)
-		goto err_remove_cells;
-
 	dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name);
 
 	rval = device_add(&nvmem->dev);
drivers/nvmem/internals.h +2 -0
index 18fed57270e5..f6d452b6a28f 100644
@@ -35,6 +35,8 @@ struct nvmem_device {
 	bool			sysfs_cells_populated;
 };
 
+int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np);
+
 #if IS_ENABLED(CONFIG_OF)
 int nvmem_layout_bus_register(void);
 void nvmem_layout_bus_unregister(void);
drivers/nvmem/layouts.c +0 -11
index 7ebe53249035..0e84d65b42d4 100644
@@ -125,11 +125,6 @@ static int nvmem_layout_create_device(struct nvmem_device *nvmem,
 	return 0;
 }
 
-static const struct of_device_id of_nvmem_layout_skip_table[] = {
-	{ .compatible = "fixed-layout", },
-	{}
-};
-
 static int nvmem_layout_bus_populate(struct nvmem_device *nvmem,
 				     struct device_node *layout_dn)
 {
@@ -142,12 +137,6 @@ static int nvmem_layout_bus_populate(struct nvmem_device *nvmem,
 		return 0;
 	}
 
-	/* Fixed layouts are parsed manually somewhere else for now */
-	if (of_match_node(of_nvmem_layout_skip_table, layout_dn)) {
-		pr_debug("%s() - skipping %pOF node\n", __func__, layout_dn);
-		return 0;
-	}
-
 	if (of_node_check_flag(layout_dn, OF_POPULATED_BUS)) {
 		pr_debug("%s() - skipping %pOF, already populated\n",
 			 __func__, layout_dn);
drivers/nvmem/layouts/Makefile +1 -0
index 4940c9db0665..dd6c6c70b1a9 100644
@@ -3,6 +3,7 @@
 # Makefile for nvmem layouts.
 #
 
+obj-$(CONFIG_NVMEM_LAYOUTS) += fixed-layout.o
 obj-$(CONFIG_NVMEM_LAYOUT_SL28_VPD) += sl28vpd.o
 obj-$(CONFIG_NVMEM_LAYOUT_ONIE_TLV) += onie-tlv.o
 obj-$(CONFIG_NVMEM_LAYOUT_U_BOOT_ENV) += u-boot-env.o
drivers/nvmem/layouts/fixed-layout.c new file +58 -0

58 lines not on this page · raw message

drivers/pinctrl/renesas/pinctrl-rzg2l.c +2 -2
index 17e27879fd62..6fd79907f17e 100644
@@ -1478,7 +1478,7 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
 			break;
 
 		default:
-			return -EOPNOTSUPP;
+			return -ENOTSUPP;
 		}
 	}
 
@@ -1560,7 +1560,7 @@ static int rzg2l_pinctrl_pinconf_group_get(struct pinctrl_dev *pctldev,
 
 		/* Check config matching between to pin  */
 		if (i && prev_config != *config)
-			return -EOPNOTSUPP;
+			return -ENOTSUPP;
 
 		prev_config = *config;
 	}
drivers/ptp/ptp_ocp.c +3 -1
index bd9919c01e50..fce46b88458f 100644
@@ -1914,9 +1914,11 @@ ptp_ocp_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req,
 	if (err)
 		return err;
 
+	snprintf(buf, sizeof(buf), "%.*s", OCP_BOARD_ID_LEN,
+		 (const char *)bp->board_id);
 	err = devlink_info_version_fixed_put(req,
 			DEVLINK_INFO_VERSION_GENERIC_BOARD_ID,
-			bp->board_id);
+			buf);
 	if (err)
 		return err;
 
drivers/s390/crypto/zcrypt_ccamisc.c +13 -7
index 6790afd517ec..48d36d5a8711 100644
@@ -938,7 +938,8 @@ static int _ip_cprb_helper(u16 cardnr, u16 domain,
 			   const u8 *clr_key_value,
 			   int clr_key_bit_size,
 			   u8 *key_token,
-			   int *key_token_size)
+			   int *key_token_size,
+			   bool scrub)
 {
 	int rc, n;
 	u8 *mem, *ptr;
@@ -1077,7 +1078,7 @@ static int _ip_cprb_helper(u16 cardnr, u16 domain,
 	*key_token_size = t->len;
 
 out:
-	free_cprbmem(mem, PARMBSIZE, 0);
+	free_cprbmem(mem, PARMBSIZE, scrub);
 	return rc;
 }
 
@@ -1120,28 +1121,32 @@ int cca_clr2cipherkey(u16 card, u16 dom, u32 keybitsize, u32 keygenflags,
 	 * 4/4 COMPLETE the secure cipher key import
 	 */
 	rc = _ip_cprb_helper(card, dom, "AES     ", "FIRST   ", "MIN3PART",
-			     exorbuf, keybitsize, token, &tokensize);
+			     exorbuf, keybitsize, token, &tokensize,
+			     true);
 	if (rc) {
 		ZCRYPT_DBF_ERR("%s clear key import 1/4 with CSNBKPI2 failed, rc=%d\n",
 			       __func__, rc);
 		goto out;
 	}
 	rc = _ip_cprb_helper(card, dom, "AES     ", "ADD-PART", NULL,
-			     clrkey, keybitsize, token, &tokensize);
+			     clrkey, keybitsize, token, &tokensize,
+			     true);
 	if (rc) {
 		ZCRYPT_DBF_ERR("%s clear key import 2/4 with CSNBKPI2 failed, rc=%d\n",
 			       __func__, rc);
 		goto out;
 	}
 	rc = _ip_cprb_helper(card, dom, "AES     ", "ADD-PART", NULL,
-			     exorbuf, keybitsize, token, &tokensize);
+			     exorbuf, keybitsize, token, &tokensize,
+			     true);
 	if (rc) {
 		ZCRYPT_DBF_ERR("%s clear key import 3/4 with CSNBKPI2 failed, rc=%d\n",
 			       __func__, rc);
 		goto out;
 	}
 	rc = _ip_cprb_helper(card, dom, "AES     ", "COMPLETE", NULL,
-			     NULL, keybitsize, token, &tokensize);
+			     NULL, keybitsize, token, &tokensize,
+			     true);
 	if (rc) {
 		ZCRYPT_DBF_ERR("%s clear key import 4/4 with CSNBKPI2 failed, rc=%d\n",
 			       __func__, rc);
@@ -1158,7 +1163,8 @@ int cca_clr2cipherkey(u16 card, u16 dom, u32 keybitsize, u32 keygenflags,
 	*keybufsize = tokensize;
 
 out:
-	kfree(token);
+	memzero_explicit(exorbuf, sizeof(exorbuf));
+	kfree_sensitive(token);
 	return rc;
 }
 EXPORT_SYMBOL(cca_clr2cipherkey);
drivers/scsi/scsi_debug.c +2 -2
index 9a194cf64528..de54596bbae9 100644
@@ -3772,8 +3772,8 @@ static bool comp_write_worker(struct sdeb_store_info *sip, u64 lba, u32 num,
 	if (!res)
 		return res;
 	if (rest)
-		res = memcmp(fsp, arr + ((num - rest) * lb_size),
-			     rest * lb_size);
+		res = !memcmp(fsp, arr + ((num - rest) * lb_size),
+			      rest * lb_size);
 	if (!res)
 		return res;
 	if (compare_only)
drivers/spi/spi-fsl-dspi.c +7 -6
index e26363ae7489..bc7479c834ff 100644
@@ -746,8 +746,12 @@ static void dspi_setup_accel(struct fsl_dspi *dspi)
 	struct spi_transfer *xfer = dspi->cur_transfer;
 	bool odd = !!(dspi->len & 1);
 
-	/* No accel for frames not multiple of 8 bits at the moment */
-	if (xfer->bits_per_word % 8)
+	/*
+	 * No accel for DMA transfers or frames not multiples of 8 bits at the
+	 * moment.
+	 */
+	if (dspi->devtype_data->trans_mode == DSPI_DMA_MODE ||
+	    xfer->bits_per_word % 8)
 		goto no_accel;
 
 	if (!odd && dspi->len <= dspi->devtype_data->fifo_size * 2) {
@@ -756,10 +760,7 @@ static void dspi_setup_accel(struct fsl_dspi *dspi)
 		dspi->oper_bits_per_word = 8;
 	} else {
 		/* Start off with maximum supported by hardware */
-		if (dspi->devtype_data->trans_mode == DSPI_XSPI_MODE)
-			dspi->oper_bits_per_word = 32;
-		else
-			dspi->oper_bits_per_word = 16;
+		dspi->oper_bits_per_word = 32;
 
 		/*
 		 * And go down only if the buffer can't be sent with
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +3 -0
index fe458912e0ec..56938ff47235 100644
@@ -372,6 +372,9 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
 		pbuf = rtw_get_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, &len, limit_new);
 
 		if (pbuf) {
+			if (len < 6)
+				goto check_next_ie;
+
 			/* check if oui matches... */
 			if (memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)))
 				goto check_next_ie;
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +1 -1
index 41fda671036b..22c29d1955f5 100644
@@ -904,7 +904,7 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram
 			p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _AUTH_IE_OFFSET_, WLAN_EID_CHALLENGE, (int *)&len,
 				pkt_len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_);
 
-			if (!p)
+			if (!p || len != WLAN_AUTH_CHALLENGE_LEN)
 				goto authclnt_fail;
 
 			memcpy((void *)(pmlmeinfo->chg_txt), (void *)(p + 2), len);
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +3 -0
index c71394214c5f..57fb1f2c1152 100644
@@ -730,6 +730,9 @@ int WMM_param_handler(struct adapter *padapter, struct ndis_80211_var_ie *pIE)
 		return false;
 	}
 
+	if (pIE->length != WLAN_WMM_LEN)
+		return false;
+
 	if (!memcmp(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element)))
 		return false;
 	else
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +4 -0
index 96d4da546725..1b1b29e81de7 100644
@@ -2041,6 +2041,8 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struc
 
 	/* Skip the ratio tap header */
 	skb_pull(skb, rtap_len);
+	if (skb->len < dot11_hdr_len)
+		goto fail;
 
 	dot11_hdr = (struct ieee80211_hdr *)skb->data;
 	frame_control = le16_to_cpu(dot11_hdr->frame_control);
@@ -2053,6 +2055,8 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struc
 			qos_len = 2;
 		if ((frame_control & 0x0300) == 0x0300)
 			dot11_hdr_len += 6;
+		if (skb->len < dot11_hdr_len + qos_len + snap_len)
+			goto fail;
 
 		memcpy(dst_mac_addr, dot11_hdr->addr1, sizeof(dst_mac_addr));
 		memcpy(src_mac_addr, dot11_hdr->addr2, sizeof(src_mac_addr));
drivers/thermal/thermal_hwmon.c +2 -1
index 112188c15c30..3162a1a8cbb6 100644
@@ -215,7 +215,8 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
 	if (new_hwmon_device)
 		hwmon_device_unregister(hwmon->device);
  free_mem:
-	kfree(hwmon);
+	if (new_hwmon_device)
+		kfree(hwmon);
 
 	return result;
 }
drivers/thunderbolt/eeprom.c +8 -1
index eb241b270f79..6e76c3432a9a 100644
@@ -392,9 +392,16 @@ static int tb_drom_parse_entry_port(struct tb_switch *sw,
 			return -EIO;
 		}
 		port->link_nr = entry->link_nr;
-		if (entry->has_dual_link_port)
+		if (entry->has_dual_link_port) {
+			if (entry->dual_link_port_nr > sw->config.max_port_number) {
+				tb_sw_warn(sw,
+					"port entry has invalid dual link port number %u\n",
+					entry->dual_link_port_nr);
+				return -EIO;
+			}
 			port->dual_link_port =
 				&port->sw->ports[entry->dual_link_port_nr];
+		}
 	}
 	return 0;
 }
drivers/thunderbolt/icm.c +1 -1
index 7859bccc592d..a29cd07f5187 100644
@@ -2291,7 +2291,7 @@ static int icm_usb4_switch_op(struct tb_switch *sw, u16 opcode, u32 *metadata,
 	if (tx_data_len) {
 		request.data_len_valid |= ICM_USB4_SWITCH_DATA_VALID;
 		if (tx_data_len < ARRAY_SIZE(request.data))
-			request.data_len_valid =
+			request.data_len_valid |=
 				tx_data_len & ICM_USB4_SWITCH_DATA_LEN_MASK;
 		memcpy(request.data, tx_data, tx_data_len * sizeof(u32));
 	}
drivers/thunderbolt/tb.c +1 -1
index 4ef8e67e9987..afcba22f5013 100644
@@ -597,7 +597,7 @@ static int tb_consumed_dp_bandwidth(struct tb *tb,
 				    int *consumed_up,
 				    int *consumed_down)
 {
-	int group_reserved[MAX_GROUPS] = {};
+	int group_reserved[MAX_GROUPS + 1] = {};
 	struct tb_cm *tcm = tb_priv(tb);
 	struct tb_tunnel *tunnel;
 	bool downstream;
drivers/tty/serial/8250/8250_dma.c +7 -5
index 3b6452e759d5..5a83e5269b41 100644
@@ -211,11 +211,12 @@ void serial8250_rx_dma_flush(struct uart_8250_port *p)
 {
 	struct uart_8250_dma *dma = p->dma;
 
-	if (dma->rx_running) {
-		dmaengine_pause(dma->rxchan);
-		__dma_rx_complete(p);
-		dmaengine_terminate_async(dma->rxchan);
-	}
+	if (!dma || !dma->rxchan || !dma->rx_running)
+		return;
+
+	dmaengine_pause(dma->rxchan);
+	__dma_rx_complete(p);
+	dmaengine_terminate_async(dma->rxchan);
 }
 EXPORT_SYMBOL_GPL(serial8250_rx_dma_flush);
 
@@ -324,6 +325,7 @@ void serial8250_release_dma(struct uart_8250_port *p)
 
 	/* Release RX resources */
 	dmaengine_terminate_sync(dma->rxchan);
+	dma->rx_running = 0;
 	dma_free_coherent(dma->rxchan->device->dev, dma->rx_size, dma->rx_buf,
 			  dma->rx_addr);
 	dma_release_channel(dma->rxchan);
drivers/tty/serial/qcom_geni_serial.c +22 -21

83 lines not on this page · raw message

drivers/tty/vt/keyboard.c +4 -1
index 00caf1c2bcee..5d1e107574d1 100644
@@ -1403,7 +1403,7 @@ static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)
 	struct keyboard_notifier_param param = { .vc = vc, .value = keycode, .down = down };
 	int rc;
 
-	tty = vc->port.tty;
+	tty = tty_port_tty_get(&vc->port);
 
 	if (tty && (!tty->driver_data)) {
 		/* No driver data? Strange. Okay we fix it then. */
@@ -1463,9 +1463,12 @@ static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)
 		 * characters get aren't echoed locally. This makes key repeat
 		 * usable with slow applications and under heavy loads.
 		 */
+		tty_kref_put(tty);
 		return;
 	}
 
+	tty_kref_put(tty);
+
 	param.shift = shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate;
 	param.ledstate = kbd->ledflagstate;
 	key_map = key_maps[shift_final];
drivers/tty/vt/vt_ioctl.c +2 -0
index da82a79c1511..1e8e5c161124 100644
@@ -408,6 +408,8 @@ static int vt_k_ioctl(struct tty_struct *tty, unsigned int cmd,
 	/* this could be folded into KDSKBMODE, but for compatibility
 	   reasons it is not so easy to fold KDGKBMETA into KDGKBMODE */
 	case KDSKBMETA:
+		if (!perm)
+			return -EPERM;
 		return vt_do_kdskbmeta(console, arg);
 
 	case KDGKBMETA:
drivers/usb/atm/cxacru.c +2 -0
index 08faf82ec31d..cf506afaaa0a 100644
@@ -700,6 +700,8 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
 	ret = offd;
 	usb_dbg(instance->usbatm, "cm %#x\n", cm);
 fail:
+	if (ret < 0)
+		usb_kill_urb(instance->rcv_urb);
 	mutex_unlock(&instance->cm_serialize);
 err:
 	return ret;
drivers/usb/cdns3/cdnsp-gadget.c +2 -2
index fb192b120d77..89d3d8167e59 100644
@@ -154,9 +154,9 @@ static void cdnsp_set_apb_timeout_value(struct cdnsp_device *pdev)
 	offset = cdnsp_find_next_ext_cap(base, offset, D_XEC_PRE_REGS_CAP);
 	reg = base + offset + REG_CHICKEN_BITS_3_OFFSET;
 
-	val  = le32_to_cpu(readl(reg));
+	val  = readl(reg);
 	val = CHICKEN_APB_TIMEOUT_SET(val, cdns->override_apb_timeout);
-	writel(cpu_to_le32(val), reg);
+	writel(val, reg);
 }
 
 static void cdnsp_set_chicken_bits_2(struct cdnsp_device *pdev, u32 bit)
drivers/usb/gadget/function/f_ncm.c +1 -1
index a6a14500b650..1b47fbe989e1 100644
@@ -1171,7 +1171,7 @@ static int ncm_unwrap_ntb(struct gether *port,
 	unsigned char	*ntb_ptr = skb->data;
 	__le16		*tmp;
 	unsigned	index, index2;
-	int		ndp_index;
+	unsigned int	ndp_index;
 	unsigned	dg_len, dg_len2;
 	unsigned	ndp_len;
 	unsigned	block_len;
drivers/vdpa/mlx5/core/mr.c +2 -1
index c7a20278bc3c..27abbe69b55c 100644
@@ -234,7 +234,8 @@ static int create_direct_keys(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_mr *
 		cmds[i].out = cmd_mem->out;
 		cmds[i].outlen = sizeof(cmd_mem->out);
 		cmds[i].in = cmd_mem->in;
-		cmds[i].inlen = struct_size(cmd_mem, mtt, mttcount);
+		cmds[i].inlen = struct_size(cmd_mem, mtt, mttcount) -
+				offsetof(struct mlx5_create_mkey_mem, in);
 
 		fill_create_direct_mr(mvdev, dmr, cmd_mem);
 
drivers/vhost/vdpa.c +8 -1
index 2464c9de6771..a47fdcb61bf3 100644
@@ -1102,6 +1102,7 @@ static int vhost_vdpa_pa_map(struct vhost_vdpa *v,
 	unsigned int gup_flags = FOLL_LONGTERM;
 	unsigned long npages, cur_base, map_pfn, last_pfn = 0;
 	unsigned long lock_limit, sz2pin, nchunks, i;
+	unsigned long page_offset;
 	u64 start = iova;
 	long pinned;
 	int ret = 0;
@@ -1114,7 +1115,13 @@ static int vhost_vdpa_pa_map(struct vhost_vdpa *v,
 	if (perm & VHOST_ACCESS_WO)
 		gup_flags |= FOLL_WRITE;
 
-	npages = PFN_UP(size + (iova & ~PAGE_MASK));
+	page_offset = iova & ~PAGE_MASK;
+	if (size > ULONG_MAX - page_offset) {
+		ret = -EINVAL;
+		goto free;
+	}
+
+	npages = PFN_UP(size + page_offset);
 	if (!npages) {
 		ret = -EINVAL;
 		goto free;
drivers/vhost/vhost.c +8 -0
index 68027fd993e3..f966fc094f12 100644
@@ -2125,6 +2125,14 @@ static long vhost_vring_set_num_addr(struct vhost_dev *d,
 		BUG();
 	}
 
+	/*
+	 * The metadata cache holds the IOTLB mapping that backed the previous
+	 * desc/avail/used addresses and vring size, both of which are being
+	 * replaced here.  iotlb_access_ok() takes a cache hit as proof that the
+	 * region was validated, so the stale entries have to go.
+	 */
+	__vhost_vq_meta_reset(vq);
+
 	mutex_unlock(&vq->mutex);
 
 	return r;
drivers/video/fbdev/core/bitblit.c +7 -2
index bed8ba18222b..8f6a2d1736d3 100644
@@ -274,9 +274,14 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, bool enable,
 	if (!vc->vc_font.data)
 		return;
 
- 	c = scr_readw((u16 *) vc->vc_pos);
+	c = scr_readw((u16 *) vc->vc_pos);
 	attribute = get_attribute(info, c);
-	src = vc->vc_font.data + ((c & charmask) * (w * vc->vc_font.height));
+	c &= charmask;
+
+	/* Clamp to font size, same as bit_putcs_aligned() */
+	if (c >= vc->vc_font.charcount)
+		c = 0;
+	src = vc->vc_font.data + (c * (w * vc->vc_font.height));
 
 	if (par->cursor_state.image.data != src ||
 	    par->cursor_reset) {
drivers/watchdog/bd96801_wdt.c +2 -3
index 12b74fd2bc05..a25b7cf1488b 100644
@@ -169,7 +169,6 @@ static int bd96801_set_wdt_mode(struct wdtbd96801 *w, unsigned int hw_margin,
 	int fastng, slowng, type, ret, reg, mask;
 	struct device *dev = w->dev;
 
-
 	if (hw_margin_min * 1000 > FASTNG_MAX_US) {
 		dev_err(dev, "Unsupported fast timeout %u uS [max %u]\n",
 			hw_margin_min * 1000, FASTNG_MAX_US);
@@ -258,10 +257,10 @@ static int bd96801_set_heartbeat_from_hw(struct wdtbd96801 *w,
 	fast = FASTNG_MIN << sel;
 
 	sel = (val & BD96801_WD_RATIO_MASK) + 1;
-	w->wdt.max_hw_heartbeat_ms = (fast << sel) / USEC_PER_MSEC;
+	w->wdt.max_hw_heartbeat_ms = (fast << sel) / 10;
 
 	if ((conf_reg & BD96801_WD_TYPE_MASK) == BD96801_WD_TYPE_WIN)
-		w->wdt.min_hw_heartbeat_ms = fast / USEC_PER_MSEC;
+		w->wdt.min_hw_heartbeat_ms = fast / 10;
 
 	return 0;
 }
fs/binfmt_misc.c +2 -1
index f85ee577c34d..3c4852bb8ccc 100644
@@ -983,7 +983,8 @@ static int bm_fill_super(struct super_block *sb, struct fs_context *fc)
 		/* last one */ {""}
 	};
 
-	if (WARN_ON(user_ns != current_user_ns()))
+	/* The fscontext fd may have been passed to another user namespace. */
+	if (user_ns != current_user_ns())
 		return -EINVAL;
 
 	/* Never exec off this instance and never let anything stack on it. */
fs/btrfs/inode.c +1 -0
index f60f8bf38dc5..ab7f19ca2145 100644
@@ -9684,6 +9684,7 @@ ssize_t btrfs_do_encoded_write(struct kiocb *iocb, struct iov_iter *from,
 	}
 	kvfree(folios);
 out:
+	extent_changeset_free(data_reserved);
 	if (ret >= 0)
 		iocb->ki_pos += encoded->len;
 	return ret;
fs/crypto/policy.c +1 -1
index 701259991277..6fc526d7f424 100644
@@ -532,7 +532,7 @@ int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg)
 		return -EFAULT;
 	policy.version = version;
 
-	if (!inode_owner_or_capable(&nop_mnt_idmap, inode))
+	if (!inode_owner_or_capable(file_mnt_idmap(filp), inode))
 		return -EACCES;
 
 	ret = mnt_want_write_file(filp);
fs/namespace.c +5 -0
index 94c06c842902..a596381dba1c 100644
@@ -4229,6 +4229,11 @@ SYSCALL_DEFINE3(fsmount, int, fs_fd, unsigned int, flags,
 		ret = PTR_ERR(newmount.mnt);
 		goto err_unlock;
 	}
+	if (newmount.mnt->mnt_sb->s_flags & SB_NOUSER) {
+		mntput(newmount.mnt);
+		ret = -EINVAL;
+		goto err_unlock;
+	}
 	newmount.dentry = dget(fc->root);
 	newmount.mnt->mnt_flags = mnt_flags;
 
fs/nfs/nfs4proc.c +5 -0
index 840789e182ef..facd4e28770b 100644
@@ -10585,6 +10585,7 @@ static void nfs41_free_stateid_release(void *calldata)
 	struct nfs_free_stateid_data *data = calldata;
 	struct nfs_client *clp = data->server->nfs_client;
 
+	nfs_sb_deactive(data->server->super);
 	nfs_put_client(clp);
 	kfree(calldata);
 }
@@ -10626,6 +10627,10 @@ static int nfs41_free_stateid(struct nfs_server *server,
 
 	if (!refcount_inc_not_zero(&clp->cl_count))
 		return -EIO;
+	if (!nfs_sb_active(server->super)) {
+		nfs_put_client(clp);
+		return -EIO;
+	}
 
 	nfs4_state_protect(server->nfs_client, NFS_SP4_MACH_CRED_STATEID,
 		&task_setup.rpc_client, &msg);
fs/overlayfs/super.c +2 -1
index c3d84eafde9f..bd0c548cf1ee 100644
@@ -1299,7 +1299,8 @@ int ovl_fill_super(struct super_block *sb, struct fs_context *fc)
 	int err;
 
 	err = -EIO;
-	if (WARN_ON(fc->user_ns != current_user_ns()))
+	/* The fscontext fd may have been passed to another user namespace. */
+	if (fc->user_ns != current_user_ns())
 		goto out_err;
 
 	sb->s_d_op = &ovl_dentry_operations;
fs/smb/client/sess.c +1 -1
index a11a6ebae386..458d6922826f 100644
@@ -259,9 +259,9 @@ int cifs_try_adding_channels(struct cifs_ses *ses)
 				cifs_dbg(VFS, "failed to open extra channel on iface:%pIS rc=%d\n",
 					 &iface->sockaddr,
 					 rc);
-				kref_put(&iface->refcount, release_iface);
 				/* failure to add chan should increase weight */
 				iface->weight_fulfilled++;
+				kref_put(&iface->refcount, release_iface);
 				continue;
 			}
 
fs/tracefs/event_inode.c +2 -2
index 02d56ed6ad20..ad182f9fbb48 100644
@@ -849,7 +849,7 @@ struct eventfs_inode *eventfs_create_events_dir(const char *name, struct dentry
  */
 static void eventfs_remove_rec(struct eventfs_inode *ei, int level)
 {
-	struct eventfs_inode *ei_child;
+	struct eventfs_inode *ei_child, *tmp;
 
 	/*
 	 * Check recursion depth. It should never be greater than 3:
@@ -862,7 +862,7 @@ static void eventfs_remove_rec(struct eventfs_inode *ei, int level)
 		return;
 
 	/* search for nested folders or files */
-	list_for_each_entry(ei_child, &ei->children, list)
+	list_for_each_entry_safe(ei_child, tmp, &ei->children, list)
 		eventfs_remove_rec(ei_child, level + 1);
 
 	list_del_rcu(&ei->list);
fs/verity/measure.c +9 -6
index 175d2f1bc089..91ce39ced77b 100644
@@ -121,11 +121,11 @@ __bpf_kfunc int bpf_get_fsverity_digest(struct file *file, struct bpf_dynptr *di
 {
 	struct bpf_dynptr_kern *digest_ptr = (struct bpf_dynptr_kern *)digest_p;
 	const struct inode *inode = file_inode(file);
-	u32 dynptr_sz = __bpf_dynptr_size(digest_ptr);
+	u64 dynptr_sz = __bpf_dynptr_size(digest_ptr);
 	struct fsverity_digest *arg;
 	const struct fsverity_info *vi;
 	const struct fsverity_hash_alg *hash_alg;
-	int out_digest_sz;
+	u64 out_digest_sz;
 
 	if (dynptr_sz < sizeof(struct fsverity_digest))
 		return -EINVAL;
@@ -143,17 +143,20 @@ __bpf_kfunc int bpf_get_fsverity_digest(struct file *file, struct bpf_dynptr *di
 
 	hash_alg = vi->tree_params.hash_alg;
 
+	out_digest_sz = dynptr_sz - sizeof(struct fsverity_digest);
+	if (out_digest_sz < hash_alg->digest_size)
+		return -EOVERFLOW;
+
 	arg->digest_algorithm = hash_alg - fsverity_hash_algs;
 	arg->digest_size = hash_alg->digest_size;
 
-	out_digest_sz = dynptr_sz - sizeof(struct fsverity_digest);
-
 	/* copy digest */
-	memcpy(arg->digest, vi->file_digest,  min_t(int, hash_alg->digest_size, out_digest_sz));
+	memcpy(arg->digest, vi->file_digest, hash_alg->digest_size);
 
 	/* fill the extra buffer with zeros */
 	if (out_digest_sz > hash_alg->digest_size)
-		memset(arg->digest + arg->digest_size, 0, out_digest_sz - hash_alg->digest_size);
+		memset(arg->digest + hash_alg->digest_size, 0,
+		       out_digest_sz - hash_alg->digest_size);
 
 	return 0;
 }
include/linux/netdevice.h +4 -7
index ea9b40b196de..5c5e1c814ff2 100644
@@ -297,9 +297,11 @@ struct hh_cache {
  * We could use other alignment values, but we must maintain the
  * relationship HH alignment <= LL alignment.
  */
-#define LL_RESERVED_SPACE(dev) \
-	((((dev)->hard_header_len + READ_ONCE((dev)->needed_headroom)) \
+#define LL_RESERVED_SPACE_EX(dev, hlen) \
+	((((hlen) + READ_ONCE((dev)->needed_headroom)) \
 	  & ~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
+#define LL_RESERVED_SPACE(dev) \
+	LL_RESERVED_SPACE_EX(dev, (dev)->hard_header_len)
 #define LL_RESERVED_SPACE_EXTRA(dev,extra) \
 	((((dev)->hard_header_len + READ_ONCE((dev)->needed_headroom) + (extra)) \
 	  & ~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
@@ -3189,11 +3191,6 @@ static inline bool dev_validate_header(const struct net_device *dev,
 	if (len < dev->min_header_len)
 		return false;
 
-	if (capable(CAP_SYS_RAWIO)) {
-		memset(ll_header + len, 0, dev->hard_header_len - len);
-		return true;
-	}
-
 	if (dev->header_ops && dev->header_ops->validate)
 		return dev->header_ops->validate(ll_header, len);
 
include/linux/netfilter/ipset/ip_set.h +1 -1
index b98331572ad2..cadae9b2578f 100644
@@ -273,7 +273,7 @@ struct ip_set {
 	/* Number of elements (vs timeout) */
 	u32 elements;
 	/* Size of the dynamic extensions (vs timeout) */
-	size_t ext_size;
+	atomic64_t ext_size;
 	/* Element data size */
 	size_t dsize;
 	/* Offsets to extensions in elements */
include/linux/nvmem-provider.h +6 -0
index 3ebeaa0ded00..2eb3edc638db 100644
@@ -238,6 +238,12 @@ static inline int nvmem_layout_register(struct nvmem_layout *layout)
 
 static inline void nvmem_layout_unregister(struct nvmem_layout *layout) {}
 
+static inline int nvmem_add_cells_from_dt(struct nvmem_device *nvmem,
+					  struct device_node *np)
+{
+	return -EOPNOTSUPP;
+}
+
 #endif /* CONFIG_NVMEM */
 
 #if IS_ENABLED(CONFIG_NVMEM) && IS_ENABLED(CONFIG_OF)
include/linux/psp-sev.h +3 -0
index 613a8209bed2..6a4435cfa977 100644
@@ -947,6 +947,7 @@ int sev_do_cmd(int cmd, void *data, int *psp_ret);
 void *psp_copy_user_blob(u64 uaddr, u32 len);
 void *snp_alloc_firmware_page(gfp_t mask);
 void snp_free_firmware_page(void *addr);
+void sev_platform_shutdown(void);
 
 #else	/* !CONFIG_CRYPTO_DEV_SP_PSP */
 
@@ -981,6 +982,8 @@ static inline void *snp_alloc_firmware_page(gfp_t mask)
 
 static inline void snp_free_firmware_page(void *addr) { }
 
+static inline void sev_platform_shutdown(void) { }
+
 #endif	/* CONFIG_CRYPTO_DEV_SP_PSP */
 
 #endif	/* __PSP_SEV_H__ */
include/net/act_api.h +19 -0
index 539ea6693a24..76c31ce80fe5 100644
@@ -270,6 +270,25 @@ int tcf_action_check_ctrlact(int action, struct tcf_proto *tp,
 struct tcf_chain *tcf_action_set_ctrlact(struct tc_action *a, int action,
 					 struct tcf_chain *newchain);
 
+/* Range check for a control action supplied by user space.
+ *
+ * This is the same test tcf_action_check_ctrlact() applies to the primary
+ * control action, factored out for the *fallback* control actions
+ * (act_gact's TCA_GACT_PROB.paction and act_police's TCA_POLICE_RESULT),
+ * which must not reach tcf_action_check_ctrlact() because they have no
+ * goto_chain to allocate.  Without it, user space can store kernel-internal
+ * verdicts such as TC_ACT_CONSUMED, which is TC_ACT_VALUE_MAX + 1 and is
+ * deliberately not part of the UAPI value range.
+ */
+static inline bool tcf_action_valid(int action)
+{
+	int opcode = TC_ACT_EXT_OPCODE(action);
+
+	if (!opcode)
+		return action <= TC_ACT_VALUE_MAX;
+	return opcode <= TC_ACT_EXT_OPCODE_MAX || action == TC_ACT_UNSPEC;
+}
+
 #ifdef CONFIG_INET
 DECLARE_STATIC_KEY_FALSE(tcf_frag_xmit_count);
 #endif
include/net/addrconf.h +2 -2
index 3650adc635ad..e7dc5175e236 100644
@@ -382,8 +382,8 @@ static inline struct inet6_dev *in6_dev_get(const struct net_device *dev)
 
 	rcu_read_lock();
 	idev = rcu_dereference(dev->ip6_ptr);
-	if (idev)
-		refcount_inc(&idev->refcnt);
+	if (idev && !refcount_inc_not_zero(&idev->refcnt))
+		idev = NULL;
 	rcu_read_unlock();
 	return idev;
 }
include/net/ip_vs.h +21 -20

97 lines not on this page · raw message

include/net/route.h +2 -0
index cbb4d5523062..76f526e051aa 100644
@@ -258,6 +258,8 @@ int fib_dump_info_fnhe(struct sk_buff *skb, struct netlink_callback *cb,
 		       u32 table_id, struct fib_info *fi,
 		       int *fa_index, int fa_start, unsigned int flags);
 
+void fnhe_update_pmtu(struct fib_nh_exception *fnhe, u32 new, u32 orig);
+
 static inline void ip_rt_put(struct rtable *rt)
 {
 	/* dst_release() accepts a NULL parameter.
include/net/sch_generic.h +1 -0
index d3e1f91f81cd..1b461d181647 100644
@@ -101,6 +101,7 @@ struct Qdisc {
 	struct hlist_node       hash;
 	u32			handle;
 	u32			parent;
+	int			depth;
 
 	struct netdev_queue	*dev_queue;
 
kernel/bpf/verifier.c +8 -7
index 77183b436da5..275c9fabc955 100644
@@ -13565,11 +13565,12 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
 		return -EACCES;
 	}
 
-	/* In case of 'scalar += pointer', dst_reg inherits pointer type and id.
-	 * The id may be overwritten later if we create a new variable offset.
+	/* For 'scalar += pointer', dst_reg inherits the complete pointer
+	 * register state. Individual fields may be adjusted later by pointer
+	 * arithmetic. Callers guarantee that below does not overwrite off_reg.
 	 */
-	dst_reg->type = ptr_reg->type;
-	dst_reg->id = ptr_reg->id;
+	if (dst_reg != ptr_reg)
+		*dst_reg = *ptr_reg;
 
 	if (!check_reg_sane_offset(env, off_reg, ptr_reg->type) ||
 	    !check_reg_sane_offset(env, ptr_reg, ptr_reg->type))
@@ -13631,7 +13632,7 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
 		}
 		break;
 	case BPF_SUB:
-		if (dst_reg == off_reg) {
+		if (dst_reg != ptr_reg) {
 			/* scalar -= pointer.  Creates an unknown scalar */
 			verbose(env, "R%d tried to subtract pointer from scalar\n",
 				dst);
@@ -14490,8 +14491,8 @@ static int adjust_reg_min_max_vals(struct bpf_verifier_env *env,
 				err = mark_chain_precision(env, insn->dst_reg);
 				if (err)
 					return err;
-				return adjust_ptr_min_max_vals(env, insn,
-							       src_reg, dst_reg);
+				off_reg = *dst_reg;
+				return adjust_ptr_min_max_vals(env, insn, src_reg, &off_reg);
 			}
 		} else if (ptr_reg) {
 			/* pointer += scalar */
kernel/futex/core.c +58 -27

108 lines not on this page · raw message

kernel/sched/psi.c +6 -0
index 7d0f8fdd48a3..a6fc7ea51d2e 100644
@@ -1130,6 +1130,12 @@ void psi_cgroup_free(struct cgroup *cgroup)
 		return;
 
 	cancel_delayed_work_sync(&cgroup->psi->avgs_work);
+	/*
+	 * A psi_schedule_rtpoll_work() call racing the last trigger's
+	 * destruction may have re-armed the timer after psi_trigger_destroy()
+	 * deleted it. Spurious firing while the group is alive is harmless.
+	 */
+	timer_shutdown_sync(&cgroup->psi->rtpoll_timer);
 	free_percpu(cgroup->psi->pcpu);
 	/* All triggers must be removed by now */
 	WARN_ONCE(cgroup->psi->rtpoll_states, "psi: trigger leak\n");
kernel/trace/ring_buffer.c +2 -2
index fcd2363d1296..3f90c7f752eb 100644
@@ -6756,7 +6756,7 @@ int ring_buffer_subbuf_order_set(struct trace_buffer *buffer, int order)
 
 		cpu_buffer = buffer->buffers[cpu];
 
-		if (cpu_buffer->mapped) {
+		if (atomic_read(&cpu_buffer->resize_disabled)) {
 			err = -EBUSY;
 			goto error;
 		}
@@ -7604,7 +7604,7 @@ static __init int test_ringbuffer(void)
 
  out_free:
 	for_each_online_cpu(cpu) {
-		if (!rb_threads[cpu])
+		if (IS_ERR_OR_NULL(rb_threads[cpu]))
 			break;
 		kthread_stop(rb_threads[cpu]);
 	}
kernel/trace/trace_events.c +2 -0
index 1630d2b7fbc4..ac50babaeea0 100644
@@ -3072,6 +3072,7 @@ void trace_event_eval_update(struct trace_eval_map **map, int len)
 	int last_i;
 	int i;
 
+	mutex_lock(&event_mutex);
 	down_write(&trace_event_sem);
 	list_for_each_entry_safe(call, p, &ftrace_events, list) {
 		/* events are usually grouped together with systems */
@@ -3105,6 +3106,7 @@ void trace_event_eval_update(struct trace_eval_map **map, int len)
 		cond_resched();
 	}
 	up_write(&trace_event_sem);
+	mutex_unlock(&event_mutex);
 }
 
 static bool event_in_systems(struct trace_event_call *call,
lib/fortify_kunit.c +77 -62

278 lines not on this page · raw message

mm/huge_memory.c +29 -14

25 lines not on this page · raw message

mm/swapfile.c +1 -1
index 552df432c37f..ed0a5ed25e65 100644

Lines of this file are not shown. View the raw message.

mm/vmscan.c +22 -3
index deeb4310fd54..20f4cb33d8e8 100644

Lines of this file are not shown. View the raw message.

net/atm/common.c +9 -5
index 196c36269b34..413863861bca 100644

Lines of this file are not shown. View the raw message.

net/bridge/br_mrp.c +2 -4
index 5fd22bb4f5b6..a837ff7d6f36 100644

Lines of this file are not shown. View the raw message.

net/bridge/netfilter/ebt_nflog.c +16 -1
index 61bf8f4465ab..426f8adc912c 100644

Lines of this file are not shown. View the raw message.

net/bridge/netfilter/nf_conntrack_bridge.c +1 -0
index 6482de4d8750..e4dae5fe0b0d 100644

Lines of this file are not shown. View the raw message.

net/core/dev.c +7 -3
index ce5a1ab86ab5..5c037fe70d48 100644

Lines of this file are not shown. View the raw message.

net/core/sock.c +0 -1
index 4a09e780406f..e8b03cf3a428 100644

Lines of this file are not shown. View the raw message.

net/core/xdp.c +1 -1
index 8a3ea90e8cf9..251708f648e1 100644

Lines of this file are not shown. View the raw message.

net/devlink/dev.c +1 -0
index 13c73f50da3d..fc109acd4e84 100644

Lines of this file are not shown. View the raw message.

net/ipv4/fib_semantics.c +60 -41

101 lines not on this page · raw message

net/ipv4/inet_connection_sock.c +16 -4
index 5ff45bc85442..91dcdb7567ac 100644

Lines of this file are not shown. View the raw message.

net/ipv4/route.c +29 -0
index 2b8c29a29c4a..28d83b3baae3 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp_bpf.c +2 -0
index 132ffc13087f..0e7e12117913 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp_input.c +1 -1
index e57917aefd50..2fb68455679a 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp_ipv4.c +214 -75

289 lines not on this page · raw message

net/ipv4/udp_offload.c +3 -1
index 99688014901e..04246d1f8b3e 100644

Lines of this file are not shown. View the raw message.

net/ipv6/ip6_tunnel.c +3 -0
index b788a06bd3a5..1446c4eae681 100644

Lines of this file are not shown. View the raw message.

net/ipv6/route.c +4 -4
index 2ce05303e403..e602dd3e7ee3 100644

Lines of this file are not shown. View the raw message.

net/mac802154/scan.c +4 -0
index 775809ee0206..c6f3748936cc 100644

Lines of this file are not shown. View the raw message.

net/ncsi/ncsi-netlink.c +4 -0
index 2f872d064396..8cc538358f6a 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipset/ip_set_bitmap_gen.h +2 -2
index cb48a2b9cb9f..cf8468bf987d 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipset/ip_set_core.c +3 -3
index f51a1af31513..29bf5ee74fe3 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipset/ip_set_hash_gen.h +1 -1
index 4c1082e38e3d..81d7f601ed06 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipset/ip_set_list_set.c +2 -2
index 83e1fdcc752d..9d6ab69ca1a3 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipvs/ip_vs_conn.c +12 -29

41 lines not on this page · raw message

net/netfilter/ipvs/ip_vs_core.c +35 -33

68 lines not on this page · raw message

net/netfilter/ipvs/ip_vs_ctl.c +64 -13

77 lines not on this page · raw message

net/netfilter/ipvs/ip_vs_est.c +7 -3
index 3492108bb3b9..64fbf2aa4cce 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipvs/ip_vs_lc.c +2 -2
index c2764505e380..cd1a860ebaec 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipvs/ip_vs_proto_sctp.c +1 -3
index 3dbd3096e163..fb8af6b15a39 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipvs/ip_vs_proto_tcp.c +0 -2
index 1ac9c233537d..944efd34290c 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipvs/ip_vs_sync.c +2 -5
index 3402675bf521..4c6e25398536 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipvs/ip_vs_xmit.c +1 -1
index b85420a3a14c..240378e37741 100644

Lines of this file are not shown. View the raw message.

net/netfilter/nf_conntrack_proto.c +6 -0
index f36727ed91e1..6ffa1f21d985 100644

Lines of this file are not shown. View the raw message.

net/netfilter/nf_conntrack_proto_sctp.c +8 -4
index 0dd55d3fba38..ef51f0babf94 100644

Lines of this file are not shown. View the raw message.

net/netfilter/nf_conntrack_proto_tcp.c +88 -44

132 lines not on this page · raw message

net/openvswitch/datapath.c +26 -3
index 7af539d63c06..8436a560ab1f 100644

Lines of this file are not shown. View the raw message.

net/openvswitch/flow.c +7 -4
index b80bd3a90773..52e261ce91e8 100644

Lines of this file are not shown. View the raw message.

net/packet/af_packet.c +47 -25

72 lines not on this page · raw message

net/sched/act_ct.c +25 -4
index a7bf52369cae..ba6d257abdc0 100644

Lines of this file are not shown. View the raw message.

net/sched/act_gact.c +5 -0
index e949280eb800..565860cccba6 100644

Lines of this file are not shown. View the raw message.

net/sched/act_police.c +6 -0
index 8555125ed34d..81d5f61be17e 100644

Lines of this file are not shown. View the raw message.

net/sched/cls_api.c +16 -1
index c5aeff709ca6..51a09d555310 100644

Lines of this file are not shown. View the raw message.

net/sched/cls_route.c +26 -9
index b9c58c040c30..38469cdcb22d 100644

Lines of this file are not shown. View the raw message.

net/sched/sch_api.c +9 -0
index 709d851d0b1e..9a23fef527a2 100644

Lines of this file are not shown. View the raw message.

net/sched/sch_cake.c +0 -1
index 2f33739036bb..43908ec23169 100644

Lines of this file are not shown. View the raw message.

net/sctp/associola.c +10 -1
index 44f06c5f1f25..f409b9f6b228 100644

Lines of this file are not shown. View the raw message.

net/sctp/outqueue.c +1 -0
index 0dc6b8ab9963..242282a26425 100644

Lines of this file are not shown. View the raw message.

net/sctp/sm_make_chunk.c +1 -2
index 27a7739a7d42..b6eb79ef6a55 100644

Lines of this file are not shown. View the raw message.

net/sctp/sm_statefuns.c +5 -1
index 818878f484a7..b9c7d06544c1 100644

Lines of this file are not shown. View the raw message.

net/smc/af_smc.c +2 -1
index 8d740f588a77..8e95839161aa 100644

Lines of this file are not shown. View the raw message.

net/smc/smc_llc.c +2 -1
index 018ce8133b02..149d63cff667 100644

Lines of this file are not shown. View the raw message.

net/smc/smc_rx.c +10 -9
index e7a6c2602e78..c5d96b116b55 100644

Lines of this file are not shown. View the raw message.

net/tipc/node.c +10 -5
index f3332d564c63..34c2c4e82517 100644

Lines of this file are not shown. View the raw message.

net/tls/tls_sw.c +15 -1
index 2b875369d523..ceca15b43f35 100644

Lines of this file are not shown. View the raw message.

net/vmw_vsock/virtio_transport.c +8 -6
index b6569b0ca2bb..e7dff5c3d4ac 100644

Lines of this file are not shown. View the raw message.

net/xdp/xdp_umem.c +2 -0
index 9ec7bd948acc..81ffda550107 100644

Lines of this file are not shown. View the raw message.

security/integrity/ima/ima_appraise.c +7 -2
index f7770c24995b..b5c573332fa8 100644

Lines of this file are not shown. View the raw message.

security/integrity/ima/ima_main.c +39 -0
index 2f3f267e7216..a0948057209e 100644

Lines of this file are not shown. View the raw message.

sound/usb/endpoint.c +4 -2
index eeee2886dc21..c573d74641d4 100644

Lines of this file are not shown. View the raw message.

sound/usb/midi2.c +9 -0
index 19c979df36bb..e66b595ebde8 100644

Lines of this file are not shown. View the raw message.

sound/usb/usx2y/usX2Yhwdep.c +2 -0
index 9fd6a86cc08e..2cc0f90a23be 100644

Lines of this file are not shown. View the raw message.

sound/usb/usx2y/usx2yhwdeppcm.c +2 -0
index 1b1496adb47e..0b8dd9e3f984 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/bpf/prog_tests/sockmap_basic.c +3 -3
index fb08c565d6aa..99522cf68dc8 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/bpf/prog_tests/sockmap_listen.c +11 -10
index 1cfed83156b0..b04b8188b151 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/bpf/test_maps.c +6 -7
index 905d5981ace1..6f080cc7eb96 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc +5 -11
index c300eb020262..e2322693d0c3 100644

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

author maintainer
#0 lore raw

I'm announcing the release of the 6.12.104 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

------------

 Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml |   16 
 MAINTAINERS                                                             |    5 
 Makefile                                                                |    2 
 arch/arm/boot/dts/broadcom/bcm-ns.dtsi                                  |    2 
 arch/arm/mach-npcm/platsmp.c                                            |    2 
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi                               |    2 
 arch/s390/kvm/pci.c                                                     |   86 ++
 arch/s390/kvm/pci.h                                                     |    2 
 arch/x86/kvm/mmu/mmu.c                                                  |    3 
 arch/x86/kvm/svm/sev.c                                                  |   12 
 block/blk-mq.c                                                          |   38 -
 drivers/ata/pata_sl82c105.c                                             |    4 
 drivers/counter/microchip-tcb-capture.c                                 |    4 
 drivers/crypto/ccp/sev-dev.c                                            |   17 
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c                              |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c                                 |   35 -
 drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c               |   24 
 drivers/gpu/drm/bridge/parade-ps8640.c                                  |   27 
 drivers/hwmon/ads7828.c                                                 |   11 
 drivers/hwmon/corsair-psu.c                                             |    4 
 drivers/hwmon/ltc4282.c                                                 |   20 
 drivers/hwmon/nzxt-smart2.c                                             |    6 
 drivers/hwmon/pmbus/lm25066.c                                           |    5 
 drivers/input/evdev.c                                                   |   27 
 drivers/misc/fastrpc.c                                                  |   19 
 drivers/misc/mei/client.c                                               |   25 
 drivers/mtd/nand/spi/core.c                                             |   74 ++
 drivers/net/bonding/bond_alb.c                                          |   10 
 drivers/net/ethernet/amd/pds_core/core.h                                |    1 
 drivers/net/ethernet/amd/pds_core/main.c                                |   14 
 drivers/net/ethernet/aquantia/atlantic/aq_ring.c                        |   51 +
 drivers/net/ethernet/aquantia/atlantic/aq_ring.h                        |    1 
 drivers/net/ethernet/aquantia/atlantic/aq_vec.c                         |    2 
 drivers/net/ethernet/broadcom/bnxt/bnxt.c                               |   50 +
 drivers/net/ethernet/broadcom/bnxt/bnxt.h                               |    1 
 drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c                           |    7 
 drivers/net/ethernet/cisco/enic/enic_main.c                             |    5 
 drivers/net/ethernet/freescale/fec_main.c                               |   11 
 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c                           |    1 
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c                 |    6 
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c                    |    6 
 drivers/net/ethernet/marvell/prestera/prestera_pci.c                    |    3 
 drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c                |   16 
 drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h                    |    1 
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c                         |    4 
 drivers/net/thunderbolt/main.c                                          |   33 -
 drivers/net/usb/ax88179_178a.c                                          |    4 
 drivers/net/usb/ipheth.c                                                |   11 
 drivers/net/veth.c                                                      |   22 
 drivers/net/vxlan/vxlan_core.c                                          |    2 
 drivers/nvmem/core.c                                                    |   24 
 drivers/nvmem/internals.h                                               |    2 
 drivers/nvmem/layouts.c                                                 |   11 
 drivers/nvmem/layouts/Makefile                                          |    1 
 drivers/nvmem/layouts/fixed-layout.c                                    |   58 ++
 drivers/pinctrl/renesas/pinctrl-rzg2l.c                                 |    4 
 drivers/ptp/ptp_ocp.c                                                   |    4 
 drivers/s390/crypto/zcrypt_ccamisc.c                                    |   20 
 drivers/scsi/scsi_debug.c                                               |    4 
 drivers/spi/spi-fsl-dspi.c                                              |   13 
 drivers/staging/rtl8723bs/core/rtw_ieee80211.c                          |    3 
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c                           |    2 
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c                          |    3 
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c                       |    4 
 drivers/thermal/thermal_hwmon.c                                         |    3 
 drivers/thunderbolt/eeprom.c                                            |    9 
 drivers/thunderbolt/icm.c                                               |    2 
 drivers/thunderbolt/tb.c                                                |    2 
 drivers/tty/serial/8250/8250_dma.c                                      |   12 
 drivers/tty/serial/qcom_geni_serial.c                                   |   43 -
 drivers/tty/vt/keyboard.c                                               |    5 
 drivers/tty/vt/vt_ioctl.c                                               |    2 
 drivers/usb/atm/cxacru.c                                                |    2 
 drivers/usb/cdns3/cdnsp-gadget.c                                        |    4 
 drivers/usb/gadget/function/f_ncm.c                                     |    2 
 drivers/vdpa/mlx5/core/mr.c                                             |    3 
 drivers/vhost/vdpa.c                                                    |    9 
 drivers/vhost/vhost.c                                                   |    8 
 drivers/video/fbdev/core/bitblit.c                                      |    9 
 drivers/watchdog/bd96801_wdt.c                                          |    5 
 fs/binfmt_misc.c                                                        |    3 
 fs/btrfs/inode.c                                                        |    1 
 fs/crypto/policy.c                                                      |    2 
 fs/namespace.c                                                          |    5 
 fs/nfs/nfs4proc.c                                                       |    5 
 fs/overlayfs/super.c                                                    |    3 
 fs/smb/client/sess.c                                                    |    2 
 fs/tracefs/event_inode.c                                                |    4 
 fs/verity/measure.c                                                     |   15 
 include/linux/netdevice.h                                               |   11 
 include/linux/netfilter/ipset/ip_set.h                                  |    2 
 include/linux/nvmem-provider.h                                          |    6 
 include/linux/psp-sev.h                                                 |    3 
 include/net/act_api.h                                                   |   19 
 include/net/addrconf.h                                                  |    4 
 include/net/ip_vs.h                                                     |   41 -
 include/net/route.h                                                     |    2 
 include/net/sch_generic.h                                               |    1 
 kernel/bpf/verifier.c                                                   |   15 
 kernel/futex/core.c                                                     |   85 ++
 kernel/sched/psi.c                                                      |    6 
 kernel/trace/ring_buffer.c                                              |    4 
 kernel/trace/trace_events.c                                             |    2 
 lib/fortify_kunit.c                                                     |  139 ++--
 mm/huge_memory.c                                                        |   43 +
 mm/swapfile.c                                                           |    2 
 mm/vmscan.c                                                             |   25 
 net/atm/common.c                                                        |   14 
 net/bridge/br_mrp.c                                                     |    6 
 net/bridge/netfilter/ebt_nflog.c                                        |   17 
 net/bridge/netfilter/nf_conntrack_bridge.c                              |    1 
 net/core/dev.c                                                          |   10 
 net/core/sock.c                                                         |    1 
 net/core/xdp.c                                                          |    2 
 net/devlink/dev.c                                                       |    1 
 net/ipv4/fib_semantics.c                                                |  101 ++-
 net/ipv4/inet_connection_sock.c                                         |   20 
 net/ipv4/route.c                                                        |   29 +
 net/ipv4/tcp_bpf.c                                                      |    2 
 net/ipv4/tcp_input.c                                                    |    2 
 net/ipv4/tcp_ipv4.c                                                     |  289 +++++++---
 net/ipv4/udp_offload.c                                                  |    4 
 net/ipv6/ip6_tunnel.c                                                   |    3 
 net/ipv6/route.c                                                        |    8 
 net/mac802154/scan.c                                                    |    4 
 net/ncsi/ncsi-netlink.c                                                 |    4 
 net/netfilter/ipset/ip_set_bitmap_gen.h                                 |    4 
 net/netfilter/ipset/ip_set_core.c                                       |    6 
 net/netfilter/ipset/ip_set_hash_gen.h                                   |    2 
 net/netfilter/ipset/ip_set_list_set.c                                   |    4 
 net/netfilter/ipvs/ip_vs_conn.c                                         |   41 -
 net/netfilter/ipvs/ip_vs_core.c                                         |   68 +-
 net/netfilter/ipvs/ip_vs_ctl.c                                          |   77 ++
 net/netfilter/ipvs/ip_vs_est.c                                          |   10 
 net/netfilter/ipvs/ip_vs_lc.c                                           |    4 
 net/netfilter/ipvs/ip_vs_proto_sctp.c                                   |    4 
 net/netfilter/ipvs/ip_vs_proto_tcp.c                                    |    2 
 net/netfilter/ipvs/ip_vs_sync.c                                         |    7 
 net/netfilter/ipvs/ip_vs_xmit.c                                         |    2 
 net/netfilter/nf_conntrack_proto.c                                      |    6 
 net/netfilter/nf_conntrack_proto_sctp.c                                 |   12 
 net/netfilter/nf_conntrack_proto_tcp.c                                  |  132 +++-
 net/openvswitch/datapath.c                                              |   29 -
 net/openvswitch/flow.c                                                  |   11 
 net/packet/af_packet.c                                                  |   72 +-
 net/sched/act_ct.c                                                      |   29 -
 net/sched/act_gact.c                                                    |    5 
 net/sched/act_police.c                                                  |    6 
 net/sched/cls_api.c                                                     |   17 
 net/sched/cls_route.c                                                   |   35 -
 net/sched/sch_api.c                                                     |    9 
 net/sched/sch_cake.c                                                    |    1 
 net/sctp/associola.c                                                    |   11 
 net/sctp/outqueue.c                                                     |    1 
 net/sctp/sm_make_chunk.c                                                |    3 
 net/sctp/sm_statefuns.c                                                 |    6 
 net/smc/af_smc.c                                                        |    3 
 net/smc/smc_llc.c                                                       |    3 
 net/smc/smc_rx.c                                                        |   19 
 net/tipc/node.c                                                         |   15 
 net/tls/tls_sw.c                                                        |   16 
 net/vmw_vsock/virtio_transport.c                                        |   14 
 net/xdp/xdp_umem.c                                                      |    2 
 security/integrity/ima/ima_appraise.c                                   |    9 
 security/integrity/ima/ima_main.c                                       |   39 +
 sound/usb/endpoint.c                                                    |    6 
 sound/usb/midi2.c                                                       |    9 
 sound/usb/usx2y/usX2Yhwdep.c                                            |    2 
 sound/usb/usx2y/usx2yhwdeppcm.c                                         |    2 
 tools/testing/selftests/bpf/prog_tests/sockmap_basic.c                  |    6 
 tools/testing/selftests/bpf/prog_tests/sockmap_listen.c                 |   21 
 tools/testing/selftests/bpf/test_maps.c                                 |   13 
 tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc     |   16 
 173 files changed, 1920 insertions(+), 868 deletions(-)

Ahmad Byagowi (1):
ptp: ocp: Fix board ID over-read

Al Viro (1):
mount: honour SB_NOUSER in the new mount API

Aleksandr Nogikh (1):
usb: atm: cxacru: properly kill rcv_urb on error in cxacru_cm()

Alexander Usyskin (1):
mei: pull kvfree out of spinlock

Anandu Krishnan E (1):
misc: fastrpc: fix channel ctx ref leak when session alloc fails

Anna Schumaker (1):
NFS: Pin the 'struct nfs_server' during a FREE_STATEID call

Asad Kamal (1):
Revert "drm/amdgpu: fix aperture mapping leak"

Ashish Kalra (3):
crypto: ccp - Add new SEV/SNP platform shutdown API
KVM: SVM: Add support to initialize SEV/SNP functionality in KVM
crypto: ccp - Abort doing SEV INIT if SNP INIT fails

Babanpreet Singh (1):
counter: microchip-tcb-capture: Fix DT channel validation

Bart Van Assche (1):
block: Reorder the request allocation code in blk_mq_submit_bio()

Baul Lee (5):
ALSA: usb-audio: fix OOB write on Type II inbound URBs
net: bridge: mrp: fix uninitialised bytes on the wire
ALSA: usx2y: bound the hwdep mmap fault offset
vxlan: do not arm the ageing timer on a device that is down
sctp: keep chunk->transport in step with the list it is queued on

Bryam Vargas (1):

      thunderbolt: Bound the DROM dual link port number before indexing sw->ports

Cen Zhang (Microsoft) (1):
net/openvswitch: check Ethernet header length in key_extract()

Chengfeng Ye (3):
netfilter: ebt_nflog: pin the NFLOG backend
ipv4: fix use-after-free in fib_nhc_update_mtu() bpf, sockmap: Fix sk_redir use-after-free in send verdict

Christian Borntraeger (1):
vdpa/mlx5: Fix buffer length in create_direct_keys()

Christian Brauner (2):
ovl: don't warn when the mount is completed from another user namespace
binfmt_misc: don't warn when the mount is completed from another user namespace

Claudiu Beznea (1):
pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP

Cunhao Lu (1):
serial: 8250_dma: Clear stale RX state on shutdown

Daming Li (1):
net: smc: fix splice entry lifetime imbalance in smc_rx_splice

Daniel Drake (1):
arm64: dts: broadcom: bcm2712: Remove non-functional EL2 virtual timer

Dmitry Antipov (1):
btrfs: fix memory leak in btrfs_do_encoded_write()

Dmitry Torokhov (2):
Input: evdev - sanitize event type index when fetching event masks
Input: evdev - fix information leak in evdev_pass_values()

Doruk Tan Ozturk (2):
net: usb: ipheth: fix carrier_work UAF on disconnect net/packet: reset the MAC header on the packet-socket transmit path

Eddie Lin (1):
misc: fastrpc: fix memory leak in fastrpc_channel_ctx_free

Ekansh Gupta (1):
misc: fastrpc: Remove buffer from list prior to unmap operation

Eric Biggers (2):
fsverity: Fix bpf_get_fsverity_digest() dynptr assumptions
fsverity: Fix silent truncation in bpf_get_fsverity_digest()

Eric Dumazet (2):
net: remove WARN_ON_ONCE() from sk_mc_loop() net/atm: fix slab-out-of-bounds read in vcc_setsockopt()

Fan XinRan (1):
net: thunderbolt: Tear down DMA paths before stopping the rings

Fan Ye (1):
Revert "net: thunderbolt: Enable end-to-end flow control also in transmit"

Farhan Ali (3):
KVM: s390: pci: Fix memory accounting for pinned/unpinned pages
KVM: s390: pci: Fix missing error codes and memory unaccounting
KVM: s390: pci: Fix resource leak on IRQ registration failure

Greg Kroah-Hartman (1):

      Linux 6.12.104

Guenter Roeck (4):
hwmon: (pmbus/lm25066) Fix PMBus coefficient calculations
hwmon: (ltc4282) Avoid overflow in maximum power calculation
hwmon: (ltc4282) Clamp negative current limits
hwmon: (ltc4282) Fix parsing adi,current-limit-sense-microvolt

Guillaume Morin (1):

      swapfile: call cond_resched() before locking si->lock

Harald Freudenberger (1):
s390/zcrypt: Fix missing mem scrub at clear key import in cca_clr2cipherkey()

Harshal Dev (1):
dt-bindings: crypto: qcom,ice: Fix missing power-domain and iface clk

Henry Martin (1):
net/ncsi: fix heap OOB read in NCSI_CMD_SEND_CMD payload length

Hongyan Xu (1):
ata: pata_sl82c105: fix bridge revision use-after-free

Hui Su (1):
ring-buffer: Fix crash passing ERR_PTR to kthread_stop()

Hyunjung Ko (2):
net/sched: act_ct: fix sk_buff leak when the header checks reject a packet net/sched: act_gact, act_police: range check the fallback control action

Jamal Hadi Salim (2):
net/sched: cls_route: fix fastmap use-after-free on filter net/sched: cls_api: Always acquire rtnl_lock when destroying locked classifiers

Jan Sebastian Götte (1):
serial: qcom-geni: fix TX DMA buffer flush

Jiawen Liu (1):
net: hisilicon: hix5hd2_gmac: remove redundant NAPI delete

Jiayuan Chen (1):
tcp: fix TFO max_qlen accounting across reuseport migration

Jijie Shao (1):
net: hns3: fix speed configuration residue after driver reload

Jordan Rife (5):
bpf: tcp: Make mem flags configurable through bpf_iter_tcp_realloc_batch
bpf: tcp: Make sure iter->batch always contains a full bucket snapshot
bpf: tcp: Get rid of st_bucket_done
bpf: tcp: Use bpf_tcp_iter_batch_item for bpf_tcp_iter_state batch items
bpf: tcp: Avoid socket skips and repeats during iteration

Jose Fernandez (Anthropic) (1):
bpf: tcp: Fix use-after-free in bpf_iter_tcp_established_batch()

Joshua Rogers (2):
vt: add permission check for KDSKBMETA ioctl
vt: stabilize tty reference in kbd_keycode with tty_port_tty_get

Jozsef Kadlecsik (1):
netfilter: ipset: switch ext_size to atomic64_t

Julian Anastasov (4):
ipvs: avoid out-of-bounds write in ip_vs_nat_icmp
ipvs: return the csum validation for forward hook
ipvs: add totalconns for dest
ipvs: properly update the overload flag on dest edit

Jun Yang (2):
vhost: reset the vring metadata cache on vring reconfiguration
tipc: read le->link under the node lock in tipc_node_link_down()

Junrui Luo (1):

      misc: fastrpc: take fl->lock when moving mmaps on interrupted invoke

Keegan Freyhof (1):
bnxt_en: Fix PTP PPS setting bug

Kees Cook (2):
kunit/fortify: Replace "volatile" with OPTIMIZER_HIDE_VAR() kunit/fortify: Add back "volatile" for sizeof() constants

Keith Busch (2):
blk-mq: pop cached request if it is usable
blk-mq: reinsert cached request to the list

Keno Fischer (1):
futex: Prevent robust futex exit race some more

Kyle Zeng (2):
ipvs: clear IPv4 options after rebasing tunnel ICMP errors
ipv6: prevent in6_dev_get() from resurrecting inet6_dev

Larisa Grigore (1):
spi: spi-fsl-dspi: Avoid setup_accel logic for DMA transfers

Lincoln Wallace (1):
ima: fix out-of-bounds read in xattr_verify()

Lorenzo Stoakes (ARM) (1):
mm/huge_memory: fix huge_zero_pfn race

Mahanta Jambigi (1):
net/smc: fix qentry overwrite for CONFIRM_LINK and ADD_LINK_CONT in smc_llc_event_handler()

Mariano Baragiola (1):
staging: rtl8723bs: validate monitor transmit frame lengths

Martin Kaiser (1):
selftests/ftrace: refactor eprobes test to fix argument checks

Mathieu Dubois-Briand (1):
nvmem: layouts: Add fixed-layout driver

Matthew Rosato (1):
KVM: s390: pci: Fix aisb calculation

Matti Vaittinen (1):
watchdog: bd96801_wdt: Fix timeout for enabled WDG

Maximilian Immanuel Brandtner (1):
tls: don't abort the connection on signal-interrupted sends

Mehmet Fide (1):
net: fec: do not release NULL pages when RX buffer allocation fails

Michael Guralnik (1):
net/mlx5: fw_tracer, return NULL on create error

Michael Roth (1):
crypto: ccp - Fix checks for SNP_VLEK_LOAD input buffer length

Michael Wu (1):
tracing: Fix race between update_event_fields and, event_define_fields

Michal Luczaj (3):
selftests/bpf: Fail unbound UDP on sockmap update selftests/bpf: Ensure UDP sockets are bound selftests/bpf: Adapt sockmap update error handling

Mikhail Kshevetskiy (3):
mtd: spinand: fix direct mapping creation sizes
mtd: spinand: try a regular dirmap if creating a dirmap for continuous reading fails
mtd: spinand: repeat reading in regular mode if continuous reading fails

Mimi Zohar (1):
ima: Instantiate file_truncate and path_truncate hooks

Muhammad Bilal (2):
staging: rtl8723bs: fix OOB read in rtw_get_wpa_ie()
staging: rtl8723bs: fix OOB read in WMM_param_handler()

Nathan Gao (1):
tcp: do not change rcv_ssthresh in tcp_measure_rcv_mss()

Nikhil P. Rao (2):
pds_core: keep the health thread stopped during reset
pds_core: cancel pending PCI reset work on AER recovery

Or Har-Toov (1):
devlink: fix net namespace reference leak in reload

Panagiotis Petrakopoulos (1):
staging: rtl8723bs: fix missing shared-key auth challenge length check

Pawel Laszczak (1):
usb: cdnsp: fix incorrect endian conversions for APB timeout register

Pengpeng Hou (2):
drm/bridge: ps8640: propagate AUX transfer register errors
net: prestera: validate firmware header length

Qihang Tang (3):
packet: use consistent hard_header_len in non-ring send paths
packet: use consistent hard_header_len in TX_RING send path
net: remove CAP_SYS_RAWIO zero-padding in dev_validate_header

Qing Luo (1):
sctp: fix addip_serial increment on ASCONF_ACK allocation failure

Qing Ming (1):
sctp: clear new_transport when removing a peer

Qingshuang Fu (2):
hwmon: (nzxt-smart2) Check return value of init_device() in probe
hwmon: (ads7828) Fix external VREF regulator handling

Rafael J. Wysocki (1):
Revert "thermal/drivers/hwmon: Cleanup coding style a bit"

Ray Wu (2):
drm/amd/display: Add AV mute wait frames to dce110_set_avmute drm/amd/display: Check for tg ops in dce110_set_avmute

Rik van Riel (1):
fbdev: bitblit: bound-check glyph index in bit_cursor()

Rosen Penev (1):
ARM: dts: BCM5301X: fix PCIe controller 2 second interrupt

Satish Kharat (1):
enic: fix tx_hang_reset use-after-free on device removal

Sean Christopherson (1):
KVM: x86/mmu: WARN and clear role.invalid when creating a child shadow page

Sergey V. Frolov (1):
net: octeontx2-pf: Fix UB in shift operation

Shay Drory (1):
net/mlx5e: TC, Check if flow is PEER before acquiring devcom lock

Shravya KN (3):
bnxt_en: Move RSS table fill outside __bnxt_hwrm_vnic_set_rss()
bnxt_en: Determine and store default RX ring in vnic structure
bnxt_en: Refresh VNIC default ring on queue restart if needed

Shuangpeng Bai (2):
smb: client: Fix use-after-free in cifs_try_adding_channels()
eventfs: Fix use-after-free in eventfs_remove_rec()

Sidraya Jayagond (1):
net/smc: fix TOCTOU race between smc_listen_out() and listener close

Sonali Pradhan (1):
usb: gadget: f_ncm: Use unsigned int for ndp_index

Stanislav Fomichev (1):
xsk: require at least 16 bytes of TX metadata

Sun Jian (2):
net: fix skb length accounting after generic XDP frag adjustment
veth: fix skb length accounting after XDP frag adjustment

Takashi Iwai (1):
ALSA: usb: Fix UAF at delayed release of MIDI2 EPs

Tejun Heo (1):
sched/psi: Shut down rtpoll_timer in psi_cgroup_free()

Toke Høiland-Jørgensen (1):
net/sched: sch_cake: drop WARN_ON(1) for malformed packets in ACK filter

Vincent Donnefort (1):
ring-buffer: Prevent subbuf order change when resizing is disabled

Weiming Shi (2):
vsock/virtio: read virtqueues under worker locks vsock/virtio: avoid refilling the RX queue after teardown

Wilken Gottwalt (1):
hwmon: (corsair-psu) fix possible out-of-bounds access on missing string termination

Xiang Mei (Microsoft) (2):
bonding: alb: re-check primary_is_promisc under RTNL in bond_alb_monitor
bpf: tcp: fix double sock release on batch realloc

Xin Long (1):
sctp: clear control chunk transport if it is being removed

Xu Rao (3):
thunderbolt: icm: Preserve USB4 proxy data-valid bit
scsi: scsi_debug: Negate wrapped memcmp() result
thunderbolt: Fix bandwidth group reservation indexing

Xuanqiang Luo (1):
udp: fix potential use-after-free in tunnel segmentation

Yangyu Chen (2):
net: atlantic: free stranded TX buffers on ring deinit
net: atlantic: free RX pages of consumed but not refilled buffers

Yi Cong (1):

      net: usb: ax88179_178a: fix skb leak in ax88179_tx_fixup()

Yiyang Chen (1):
bpf: Preserve pointer state for commuted arithmetic

Yousef Alhouseen (1):
vhost/vdpa: reject overflowing PA map page counts on 32-bit

Yuejie Shi (1):
ipv6: fix Route Information option length validation

Yuho Choi (1):
ARM: npcm: Fix OF node refcount leaks in SMP setup

Yuxiang Yang (1):
sctp: fix use-after-free of cached ASCONF chunk

Zeng Jingxiang (1):
mm/vmscan: wake up flushers conditionally to avoid cgroup OOM

Zhan Xusheng (1):
fscrypt: use the mount idmap for the owner check in fscrypt_ioctl_set_policy()

Zhiling Zou (5):
ipvs: stop estimator after disabled calc phase
net: openvswitch: reallocate update replies for mismatched IDs
netfilter: bridge: release template ct on non-IP path
xdp: reject clones that overrun skb_shared_info tailroom
ip6_tunnel: clear skb2->cb[] in ip6ip6_err()

Zihan Xi (4):
packet: synchronize pressure clearing with ring reconfiguration
mac802154: fix netdev use-after-free in beacon worker
ipv4: Fix fib_nlmsg_size() for RTA_VIA nexthops
netfilter: nf_conntrack: defer invalid log until after unlock

Zijie Huang (1):
net/sched: reject overly deep qdisc hierarchies

chanyoung (1):
tls: don't leave a full plaintext sk_msg ring unpushed