id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
312ec2f0d9d1a5656f76d770bbf1d967e9289aa7 | Analyze and fix the following issue in the Linux kernel code: ASoC: stm32: sai: fix clk prepare imbalance on probe failure | Problem Details:
Make sure to unprepare the parent clock also on probe failures (e.g.
probe deferral).
Fixes: a14bf98c045b ("ASoC: stm32: sai: fix possible circular locking")
Cc: stable@vger.kernel.org # 5.5
Cc: Olivier Moysan <olivier.moysan@st.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: olivier ... | ```diff
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index 0ae1eae2a59e..7a005b4ad304 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -1634,14 +1634,21 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev,
if (of_property_present(np, "#clock... |
e26ff429eaf10c4ef1bc3dabd9bf27eb54b7e1f4 | Analyze and fix the following issue in the Linux kernel code: ASoC: stm32: sai: fix device leak on probe | Problem Details:
Make sure to drop the reference taken when looking up the sync provider
device and its driver data during DAI probe on probe failures and on
unbind.
Note that holding a reference to a device does not prevent its driver
data from going away so there is no point in keeping the reference.
Fixes: 7dd0d83... | ```diff
diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c
index fa821e3fb427..7065aeb0e524 100644
--- a/sound/soc/stm/stm32_sai.c
+++ b/sound/soc/stm/stm32_sai.c
@@ -143,6 +143,7 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client,
}
sai_provider = platform_get_drvdata(pdev);
+ put... |
5583a55e074b33ccd88ac0542fd7cd656a7e2c8c | Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu-qcom: Enable use of all SMR groups when running bare-metal | Problem Details:
Some platforms (e.g. SC8280XP and X1E) support more than 128 stream
matching groups. This is more than what is defined as maximum by the ARM
SMMU architecture specification. Commit 122611347326 ("iommu/arm-smmu-qcom:
Limit the SMR groups to 128") disabled use of the additional groups because
they don't... | ```diff
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index c21a401c71eb..573085349df3 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -432,17 +432,19 @@ static int qcom_smmu_cfg_probe(struct arm_smmu_devi... |
80339b3823bb76d383c82186b55ac836fed3f586 | Analyze and fix the following issue in the Linux kernel code: ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions() | Problem Details:
The sdca_dev_register() function never returns NULL, it returns error
pointers on error. Fix the error checking to match.
Fixes: 4496d1c65bad ("ASoC: SDCA: add function devices")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: ... | ```diff
diff --git a/sound/soc/sdca/sdca_function_device.c b/sound/soc/sdca/sdca_function_device.c
index 91c49d7389db..c6cc880a150e 100644
--- a/sound/soc/sdca/sdca_function_device.c
+++ b/sound/soc/sdca/sdca_function_device.c
@@ -96,8 +96,8 @@ int sdca_dev_register_functions(struct sdw_slave *slave)
func_dev = sd... |
4792c3a4c1470202b0d5bf44b6058cb0fb050ba8 | Analyze and fix the following issue in the Linux kernel code: net: annotate a data-race in __dev_xmit_skb() | Problem Details:
q->limit is read locklessly, add a READ_ONCE().
Fixes: 100dfa74cad9 ("net: dev_queue_xmit() llist adoption")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251121083256.674562-12-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com> | ```diff
diff --git a/net/core/dev.c b/net/core/dev.c
index 53e2496dc429..10042139dbb0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4194,7 +4194,7 @@ no_lock_out:
do {
if (first_n && !defer_count) {
defer_count = atomic_long_inc_return(&q->defer_count);
- if (unlikely(defer_count > q->limit)) {
+ if... |
8d6f8d5c585f02a90a7b0ae4bab83801c1f21262 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: thermal: qcom-tsens: make ipq5018 tsens standalone compatible | Problem Details:
The tsens IP found in the IPQ5018 SoC should not use qcom,tsens-v1 as
fallback since it has no RPM and, as such, must deviate from the
standard v1 init routine as this version of tsens needs to be explicitly
reset and enabled in the driver.
So let's make qcom,ipq5018-tsens a standalone compatible in t... | ```diff
diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index b9f99d109949..e30a48b430a5 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -36,10 +36... |
d26e9f669cc0a6a85cf17180c09a6686db9f4002 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: fix uac2 clock source at terminal parser | Problem Details:
Since 8b3a087f7f65 ("ALSA: usb-audio: Unify virtual type units type to
UAC3 values") usb-audio is using UAC3_CLOCK_SOURCE instead of
bDescriptorSubtype, later refactored with e0ccdef9265 ("ALSA: usb-audio:
Clean up check_input_term()") into parse_term_uac2_clock_source().
This breaks the clock source ... | ```diff
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 72b900505d2c..3af71d42b9b9 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -921,7 +921,7 @@ static int parse_term_uac2_clock_source(struct mixer_build *state,
{
struct uac_clock_source_descriptor *d = p1;
- term->type = UAC3_CLOCK_SOURCE <<... |
9780f535f8e0f20b4632b5a173ead71aa8f095d2 | Analyze and fix the following issue in the Linux kernel code: net: lan966x: Fix the initialization of taprio | Problem Details:
To initialize the taprio block in lan966x, it is required to configure
the register REVISIT_DLY. The purpose of this register is to set the
delay before revisit the next gate and the value of this register depends
on the system clock. The problem is that the we calculated wrong the value
of the system ... | ```diff
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
index b4377b8613c3..8c40db90ee8f 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
@@ -1,11 +1,14 @@
// SPDX-Licens... |
c0087d807ae86cc82cc356e366d2dccf0e3bb225 | Analyze and fix the following issue in the Linux kernel code: s390/vdso: Rename vdso64 to vdso | Problem Details:
Since compat is gone there is only a 64 bit vdso left.
Remove the superfluous "64" suffix everywhere.
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> | ```diff
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index f0a670dcce71..3b8772628fde 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -151,9 +151,9 @@ ifeq ($(KBUILD_EXTMOD),)
# this hack.
prepare: vdso_prepare
vdso_prepare: prepare0
- $(Q)$(MAKE) $(build)=arch/s390/kernel/vdso64 include/generate... |
b3bdfdf1f93c38ea54b93421efc413e91e61f6b3 | Analyze and fix the following issue in the Linux kernel code: s390: Rename head64.S to head.S | Problem Details:
All the code is 64 bit, therefore remove the superfluous suffix.
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> | ```diff
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index ecaee29e724e..7df060b8eb4e 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -36,7 +36,7 @@ CFLAGS_stacktrace.o += -fno-optimize-sibling-calls
CFLAGS_dumpstack.o += -fno-optimize-sibling-calls
CFLAGS_unwind_bc.o +... |
5e811b922ec91cef7b6b2647e93b0c64e626251b | Analyze and fix the following issue in the Linux kernel code: s390/vdso: Use common STABS_DEBUG and DWARF_DEBUG macros | Problem Details:
This simplifies the vDSO linker script. The ELF_DETAILS macro was not
used in addition, as done on arm64 and powerpc, as that would introduce
an empty .modinfo section.
Note that this rearranges the .comment section to follow after all of
the debug sections.
Signed-off-by: Jens Remus <jremus@linux.i... | ```diff
diff --git a/arch/s390/kernel/vdso64/vdso64.lds.S b/arch/s390/kernel/vdso64/vdso64.lds.S
index e4f6551ae898..7bec4de0e8e0 100644
--- a/arch/s390/kernel/vdso64/vdso64.lds.S
+++ b/arch/s390/kernel/vdso64/vdso64.lds.S
@@ -7,6 +7,7 @@
#include <asm/vdso/vsyscall.h>
#include <asm/page.h>
#include <asm/vdso.h>
+#i... |
152c862c172162d1bed85bfb9ecdf62fec9e86ae | Analyze and fix the following issue in the Linux kernel code: iommupt: Fix unlikely flows in increase_top() | Problem Details:
Since increase_top() does it's own READ_ONCE() on top_of_table, the
caller's prior READ_ONCE() could be inconsistent and the first time
through the loop we may actually already have the right level if two
threads are racing map.
In this case new_level will be left uninitialized.
Further all the exits... | ```diff
diff --git a/drivers/iommu/generic_pt/iommu_pt.h b/drivers/iommu/generic_pt/iommu_pt.h
index 0e046fe0eea3..032d04ec7b56 100644
--- a/drivers/iommu/generic_pt/iommu_pt.h
+++ b/drivers/iommu/generic_pt/iommu_pt.h
@@ -683,8 +683,11 @@ static int increase_top(struct pt_iommu *iommu_table, struct pt_range *range,
... |
2381a1b40be4b286062fb3cf67dd7f005692aa2a | Analyze and fix the following issue in the Linux kernel code: iommu/amd: Propagate the error code returned by __modify_irte_ga() in modify_irte_ga() | Problem Details:
The return type of __modify_irte_ga() is int, but modify_irte_ga()
treats it as a bool. Casting the int to bool discards the error code.
To fix the issue, change the type of ret to int in modify_irte_ga().
Fixes: 57cdb720eaa5 ("iommu/amd: Do not flush IRTE when only updating isRun and destination fie... | ```diff
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index a520a109f8d6..a5fb6af4fd2d 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -3380,7 +3380,7 @@ static int __modify_irte_ga(struct amd_iommu *iommu, u16 devid, int index,
static int modify_irte_ga(struct amd_iommu ... |
6f52063db9aabdaabea929b1e998af98c2e8d917 | Analyze and fix the following issue in the Linux kernel code: NFSD: use correct reservation type in nfsd4_scsi_fence_client | Problem Details:
The reservation type argument for the pr_preempt call should match the
one used in nfsd4_block_get_device_info_scsi.
Fixes: f99d4fbdae67 ("nfsd: add SCSI layout support")
Cc: stable@vger.kernel.org
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: C... | ```diff
diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c
index 101cccbee4a3..06769576e309 100644
--- a/fs/nfsd/blocklayout.c
+++ b/fs/nfsd/blocklayout.c
@@ -400,7 +400,8 @@ nfsd4_scsi_fence_client(struct nfs4_layout_stateid *ls, struct nfsd_file *file)
struct block_device *bdev = file->nf_file->f_path.mnt->... |
f7cb94fad4e6cec354a3ea779f91fe5560fb72b6 | Analyze and fix the following issue in the Linux kernel code: xdrgen: Fix union declarations | Problem Details:
Add a missing template file. This file is used when a union is
defined as a public API (ie, "pragma public <union name>;").
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> | ```diff
diff --git a/tools/net/sunrpc/xdrgen/templates/C/union/declaration/close.j2 b/tools/net/sunrpc/xdrgen/templates/C/union/declaration/close.j2
new file mode 100644
index 000000000000..816291184e8c
--- /dev/null
+++ b/tools/net/sunrpc/xdrgen/templates/C/union/declaration/close.j2
@@ -0,0 +1,4 @@
+{# SPDX-License-I... |
42ba5bd2e28b1f9e86303e4d176ae0809a53f0b6 | Analyze and fix the following issue in the Linux kernel code: xdrgen: Fix the variable-length opaque field decoder template | Problem Details:
Ensure that variable-length opaques are decoded into the named
field, and do not overwrite the structure itself.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> | ```diff
diff --git a/tools/net/sunrpc/xdrgen/templates/C/struct/decoder/variable_length_opaque.j2 b/tools/net/sunrpc/xdrgen/templates/C/struct/decoder/variable_length_opaque.j2
index 9a814de54ae8..65698e20d8cd 100644
--- a/tools/net/sunrpc/xdrgen/templates/C/struct/decoder/variable_length_opaque.j2
+++ b/tools/net/sunr... |
f6dc5a36195d3f5be769f60d6987150192dfb099 | Analyze and fix the following issue in the Linux kernel code: io_uring: fix mixed cqe overflow handling | Problem Details:
I started to see zcrx data corruptions. That turned out to be due
to CQ tail pointing to a stale entry which happened to be from
a zcrx request. I.e. the tail is incremented without the CQE
memory being changed.
The culprit is __io_cqring_overflow_flush() passing "cqe32=true"
to io_get_cqe_overflow() ... | ```diff
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 296667ba712c..02339b74ba8d 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -634,6 +634,8 @@ static void __io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool dying)
is_cqe32 = true;
cqe_size <<= 1;
}
+ if (ctx->flags & IOR... |
44c603f35cad3f3b0f58fece99502d81620da9b2 | Analyze and fix the following issue in the Linux kernel code: mfd: sec: Drop a stray semicolon | Problem Details:
A stray and unneeded semicolon was added here by accident, just drop
it.
Fixes: ee19b52c31b3 ("mfd: sec: Use chained IRQs for s2mpg10")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511230909.zk7EkTnb-lkp@intel.com/
Signed-off-by: André Draszik <andre.... | ```diff
diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c
index d992e41e716d..74ac70002d1f 100644
--- a/drivers/mfd/sec-irq.c
+++ b/drivers/mfd/sec-irq.c
@@ -304,7 +304,7 @@ static int sec_irq_init_s2mpg1x(struct sec_pmic_dev *sec_pmic)
default:
return dev_err_probe(sec_pmic->dev, -EINVAL, "Unsupported de... |
ebd61482ffab499208f06b8d3fa183cbe2dd5fa7 | Analyze and fix the following issue in the Linux kernel code: pinctrl: cix: Fix obscure dependency | Problem Details:
When compile-testing for UM-Linux the build fails because
we don't have IOMEM.
Add an explicit dependency.
Fixes: 920500c5fe66 ("pinctrl: cix: Add pin-controller support for sky1")
Reviewed-by: Peter Chen <peter.chen@cixtech.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | ```diff
diff --git a/drivers/pinctrl/cix/Kconfig b/drivers/pinctrl/cix/Kconfig
index 455120dd7318..1529b1af6388 100644
--- a/drivers/pinctrl/cix/Kconfig
+++ b/drivers/pinctrl/cix/Kconfig
@@ -9,6 +9,7 @@ config PINCTRL_SKY1_BASE
config PINCTRL_SKY1
tristate "Cix Sky1 pinctrl driver"
depends on ARCH_CIX || COMPILE_T... |
7c373b3bd03c77fe8f6ea206ed49375eb4d43d13 | Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Reject async flips when selective fetch is enabled | Problem Details:
The selective fetch code doesn't handle asycn flips correctly.
There is a nonsense check for async flips in
intel_psr2_sel_fetch_config_valid() but that only gets called
for modesets/fastsets and thus does nothing for async flips.
Currently intel_async_flip_check_hw() is very unhappy as the
selective ... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 5dca7f96b425..0d527cf22866 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5964,6 +5964,14 @@ static int intel_async_flip_check_uapi(str... |
2d45db63260c6ae3cf007361e04a1c41bd265084 | Analyze and fix the following issue in the Linux kernel code: backlight: lp855x: Fix lp855x.h kernel-doc warnings | Problem Details:
Add a missing struct short description and a missing leading " *" to
lp855x.h to avoid kernel-doc warnings:
Warning: include/linux/platform_data/lp855x.h:126 missing initial short
description on line:
* struct lp855x_platform_data
Warning: include/linux/platform_data/lp855x.h:131 bad line:
Only v... | ```diff
diff --git a/include/linux/platform_data/lp855x.h b/include/linux/platform_data/lp855x.h
index ab222dd05bbc..3b4a891acefe 100644
--- a/include/linux/platform_data/lp855x.h
+++ b/include/linux/platform_data/lp855x.h
@@ -124,12 +124,12 @@ struct lp855x_rom_data {
};
/**
- * struct lp855x_platform_data
+ * str... |
9341d6698f4cfdfc374fb6944158d111ebe16a9d | Analyze and fix the following issue in the Linux kernel code: backlight: led-bl: Add devlink to supplier LEDs | Problem Details:
LED Backlight is a consumer of one or multiple LED class devices, but
devlink is currently unable to create correct supplier-producer links when
the supplier is a class device. It creates instead a link where the
supplier is the parent of the expected device.
One consequence is that removal order is n... | ```diff
diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c
index efc5e380669a..f7ab9b360731 100644
--- a/drivers/video/backlight/led_bl.c
+++ b/drivers/video/backlight/led_bl.c
@@ -210,6 +210,19 @@ static int led_bl_probe(struct platform_device *pdev)
return PTR_ERR(priv->bl_dev);
}
... |
747528729c9b6733839f9c95f300d5bef95ee52c | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-of-dwcmshc: Promote the th1520 reset handling to ip level | Problem Details:
Commit 27e8fe0da3b7 ("mmc: sdhci-of-dwcmshc: Prevent stale command
interrupt handling") clears pending interrupts when resetting
host->pending_reset to ensure no pending stale interrupts after
sdhci_threaded_irq restores interrupts. But this fix is only added for
th1520 platforms, in fact per my test, ... | ```diff
diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
index 5b61401a7f3d..4e256673a098 100644
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
@@ -289,6 +289,19 @@ static void dwcmshc_adma_write_desc(struct sdhci_host *host, void **desc,
sdhc... |
69cc9d4075855661268327c38c9b0e71ac37eb1c | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-of-dwcmshc: Fix command queue support for RK3576 | Problem Details:
When I added command queue engine (CQE) support for the Rockchip eMMC
controller, I missed that RK3576 has a separate platform data struct.
While things are working fine on RK3588 (I tested the ROCK 5B) and
the suspend issue is fixed on the RK3576 (I tested the Sige5), this
results in stability issues.... | ```diff
diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
index c66a8dfad47c..ee0008d91b98 100644
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
@@ -1767,6 +1767,7 @@ static const struct dwcmshc_pltfm_data sdhci_dwcmshc_rk3576_pdata = {
.quirk... |
4b7a59fa700f422217d83a7212ccc6074ebe9cbc | Analyze and fix the following issue in the Linux kernel code: Documentation/arm64: Fix the typo of register names | Problem Details:
The register name 'HWFGWTR_EL2' and 'HWFGRTR_EL2' is wrong, should be 'HFGWTR_EL2' and 'HFGRTR_EL2'.
Find the register description on arm website here,
https://developer.arm.com/documentation/ddi0601/2025-09/AArch64-Registers/HFGWTR-EL2--Hypervisor-Fine-Grained-Write-Trap-Register
https://developer.arm... | ```diff
diff --git a/Documentation/arch/arm64/booting.rst b/Documentation/arch/arm64/booting.rst
index e4f953839f71..26efca09aef3 100644
--- a/Documentation/arch/arm64/booting.rst
+++ b/Documentation/arch/arm64/booting.rst
@@ -391,13 +391,13 @@ Before jumping into the kernel, the following conditions must be met:
... |
081156ce13f8fa4e97b5148dc54d8c0ddf02117b | Analyze and fix the following issue in the Linux kernel code: net: phy: mxl-gpy: fix link properties on USXGMII and internal PHYs | Problem Details:
gpy_update_interface() returns early in case the PHY is internal or
connected via USXGMII. In this case the gigabit master/slave property
as well as MDI/MDI-X status also won't be read which seems wrong.
Always read those properties by moving the logic to retrieve them to
gpy_read_status().
Fixes: fd8... | ```diff
diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
index 221b315203d0..2a873f791733 100644
--- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c
@@ -578,13 +578,7 @@ static int gpy_update_interface(struct phy_device *phydev)
break;
}
- if (phydev->speed == SPEED_2500 || phydev->... |
82fca3d8a4a34667f01ec2351a607135249c9cff | Analyze and fix the following issue in the Linux kernel code: atm/fore200e: Fix possible data race in fore200e_open() | Problem Details:
Protect access to fore200e->available_cell_rate with rate_mtx lock in the
error handling path of fore200e_open() to prevent a data race.
The field fore200e->available_cell_rate is a shared resource used to track
available bandwidth. It is concurrently accessed by fore200e_open(),
fore200e_close(), and... | ```diff
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 4fea1149e003..f62e38571440 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -1374,7 +1374,9 @@ fore200e_open(struct atm_vcc *vcc)
vcc->dev_data = NULL;
+ mutex_lock(&fore200e->rate_mtx);
fore200e->available_cell_rate +... |
d0b8fec8ae50525b57139393d0bb1f446e82ff7e | Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: Fix symetry in ksz_ptp_msg_irq_{setup/free}() | Problem Details:
The IRQ numbers created through irq_create_mapping() are only assigned
to ptpmsg_irq[n].num at the end of the IRQ setup. So if an error occurs
between their creation and their assignment (for instance during the
request_threaded_irq() step), we enter the error path and fail to
release the newly created... | ```diff
diff --git a/drivers/net/dsa/microchip/ksz_ptp.c b/drivers/net/dsa/microchip/ksz_ptp.c
index c8bfbe5e2157..997e4a76d0a6 100644
--- a/drivers/net/dsa/microchip/ksz_ptp.c
+++ b/drivers/net/dsa/microchip/ksz_ptp.c
@@ -1093,19 +1093,19 @@ static int ksz_ptp_msg_irq_setup(struct ksz_port *port, u8 n)
static const ... |
0f80e21bf6229637e193248fbd284c0ec44bc0fd | Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: Free previously initialized ports on init failures | Problem Details:
If a port interrupt setup fails after at least one port has already been
successfully initialized, the gotos miss some resource releasing:
- the already initialized PTP IRQs aren't released
- the already initialized port IRQs aren't released if the failure
occurs in ksz_pirq_setup().
Merge 'out_girq' ... | ```diff
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index a927055423f3..0c10351fe5eb 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -3038,12 +3038,12 @@ static int ksz_setup(struct dsa_switch *ds)
dsa_switch_for_eac... |
25b62cc5b22c45face094ae3e8717258e46d1d19 | Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: Don't free uninitialized ksz_irq | Problem Details:
If something goes wrong at setup, ksz_irq_free() can be called on
uninitialized ksz_irq (for example when ksz_ptp_irq_setup() fails). It
leads to freeing uninitialized IRQ numbers and/or domains.
Use dsa_switch_for_each_user_port_continue_reverse() in the error path
to iterate only over the fully init... | ```diff
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index e684568a4eda..a927055423f3 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -3082,7 +3082,7 @@ out_ptpirq:
ksz_ptp_irq_free(ds, dp->index);
out_pirq:
if (d... |
9e059305be41a5bd27e03458d8333cf30d70be34 | Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: ptp: Fix checks on irq_find_mapping() | Problem Details:
irq_find_mapping() returns a positive IRQ number or 0 if no IRQ is found
but it never returns a negative value. However, during the PTP IRQ setup,
we verify that its returned value isn't negative.
Fix the irq_find_mapping() check to enter the error path when 0 is
returned. Return -EINVAL in such case.... | ```diff
diff --git a/drivers/net/dsa/microchip/ksz_ptp.c b/drivers/net/dsa/microchip/ksz_ptp.c
index 35fc21b1ee48..c8bfbe5e2157 100644
--- a/drivers/net/dsa/microchip/ksz_ptp.c
+++ b/drivers/net/dsa/microchip/ksz_ptp.c
@@ -1139,8 +1139,8 @@ int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)
irq_create_mapping(ptpirq... |
7b3c09e1667977edee11de94a85e2593a7c15e87 | Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: common: Fix checks on irq_find_mapping() | Problem Details:
irq_find_mapping() returns a positive IRQ number or 0 if no IRQ is found
but it never returns a negative value. However, on each
irq_find_mapping() call, we verify that the returned value isn't
negative.
Fix the irq_find_mapping() checks to enter error paths when 0 is
returned. Return -EINVAL in such ... | ```diff
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 933ae8dc6337..e684568a4eda 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -2587,8 +2587,8 @@ static int ksz_irq_phy_setup(struct ksz_device *dev)
irq = ir... |
7526183cfdbe352c51c285762f0e15b7c428ea06 | Analyze and fix the following issue in the Linux kernel code: net: aquantia: Add missing descriptor cache invalidation on ATL2 | Problem Details:
ATL2 hardware was missing descriptor cache invalidation in hw_stop(),
causing SMMU translation faults during device shutdown and module removal:
[ 70.355743] arm-smmu-v3 arm-smmu-v3.5.auto: event 0x10 received:
[ 70.361893] arm-smmu-v3 arm-smmu-v3.5.auto: 0x0002060000000010
[ 70.367948] arm-smmu... | ```diff
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c b/drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c
index 1921741f7311..18b08277d2e1 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c
@@ -15,6 +15,7 @@
#include "aq... |
63c971af40365ee706c7e24f6a7900d693518f09 | Analyze and fix the following issue in the Linux kernel code: drm/fb-helper: Allocate and release fb_info in single place | Problem Details:
Move the calls to drm_fb_helper_alloc_info() from drivers into a
single place in fbdev helpers. Allocates struct fb_info for a new
framebuffer device. Then call drm_fb_helper_single_fb_probe() to
create an fbdev screen buffer. Also release the instance on errors
by calling drm_fb_helper_release_info().... | ```diff
diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
index be703d35f6b7..8bbae94804f8 100644
--- a/drivers/gpu/drm/armada/armada_fbdev.c
+++ b/drivers/gpu/drm/armada/armada_fbdev.c
@@ -44,10 +44,10 @@ int armada_fbdev_driver_fbdev_probe(struct drm_fb_helper *fbh,
s... |
16e802667ed5c97a668b5eb3efb7615cb5f02832 | Analyze and fix the following issue in the Linux kernel code: tools/thermal/thermal-engine: Fix format string bug in thermal-engine | Problem Details:
The error message in the daemon() failure path uses %p format specifier
without providing a corresponding pointer argument, resulting in undefined
behavior and printing garbage values.
Replace %p with %m to properly print the errno error message, which is
the intended behavior when daemon() fails.
Th... | ```diff
diff --git a/tools/thermal/thermal-engine/thermal-engine.c b/tools/thermal/thermal-engine/thermal-engine.c
index 0764dc754771..66b0ba1fcd23 100644
--- a/tools/thermal/thermal-engine/thermal-engine.c
+++ b/tools/thermal/thermal-engine/thermal-engine.c
@@ -374,7 +374,7 @@ int main(int argc, char *argv[])
}
... |
1c6a92a5a5de7ebf94526dee7068926e6d5b1b01 | Analyze and fix the following issue in the Linux kernel code: wifi: nl80211: vendor-cmd: intel: fix a blank kernel-doc line warning | Problem Details:
Delete an empty line prevent a kernel-doc warning:
Warning: ../include/uapi/linux/nl80211-vnd-intel.h:86 bad line:
Fixes: 3d2a2544eae9 ("nl80211: vendor-cmd: add Intel vendor commands for iwlmei usage")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://patch.msgid.link/20251125022834.... | ```diff
diff --git a/include/uapi/linux/nl80211-vnd-intel.h b/include/uapi/linux/nl80211-vnd-intel.h
index 4ed7d0b24512..79ccc9401d50 100644
--- a/include/uapi/linux/nl80211-vnd-intel.h
+++ b/include/uapi/linux/nl80211-vnd-intel.h
@@ -84,7 +84,6 @@ enum iwl_vendor_auth_akm_mode {
*
* @NUM_IWL_MVM_VENDOR_ATTR: numbe... |
4c6b40877b4dc83f61a762a3a35a09dcf744b585 | Analyze and fix the following issue in the Linux kernel code: fs: cosmetic fixes to lru handling | Problem Details:
1. inode_bit_waitqueue() was somehow placed between __inode_add_lru() and
inode_add_lru(). move it up
2. assert ->i_lock is held in __inode_add_lru instead of just claiming it is
needed
3. s/__inode_add_lru/__inode_lru_list_add/ for consistency with itself
(inode_lru_list_del()) and similar ro... | ```diff
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index f784d8b09b04..c00b72e2d339 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1452,7 +1452,7 @@ static void inode_sync_complete(struct inode *inode)
inode_state_clear(inode, I_SYNC);
/* If inode is clean an unused, put it into LRU now... */
... |
24d4da5c2565313c2ad3c43449937a9351a64407 | Analyze and fix the following issue in the Linux kernel code: wifi: ieee80211: correct FILS status codes | Problem Details:
The FILS status codes are set to 108/109, but the IEEE 802.11-2020
spec defines them as 112/113. Update the enum so it matches the
specification and keeps the kernel consistent with standard values.
Fixes: a3caf7440ded ("cfg80211: Add support for FILS shared key authentication offload")
Signed-off-by:... | ```diff
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index d55d8ea3a8be..96439de55f07 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1493,8 +1493,8 @@ enum ieee80211_statuscode {
WLAN_STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL = 99,
WLAN_STATUS_DENIED_DUE_TO_SPEC... |
7fd8720dff2d9c70cf5a1a13b7513af01952ec02 | Analyze and fix the following issue in the Linux kernel code: iomap: allocate s_dio_done_wq for async reads as well | Problem Details:
Since commit 222f2c7c6d14 ("iomap: always run error completions in user
context"), read error completions are deferred to s_dio_done_wq. This
means the workqueue also needs to be allocated for async reads.
Fixes: 222f2c7c6d14 ("iomap: always run error completions in user context")
Reported-by: syzbot... | ```diff
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 00ab58d55c54..38e6653fe3a6 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -734,12 +734,12 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
}
goto out_free_dio;
}
+ }
- if (!wait_for_completion && !inode->i_... |
d7ff85d4b899e02b4b8a8ca9f44f54a06aee1b4d | Analyze and fix the following issue in the Linux kernel code: iomap: fix iomap_read_end() for already uptodate folios | Problem Details:
There are some cases where when iomap_read_end() is called, the folio
may already have been marked uptodate. For example, if the iomap block
needed zeroing, then the folio may have been marked uptodate after the
zeroing.
iomap_read_end() should unlock the folio instead of calling
folio_end_read(), whi... | ```diff
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 089566a36cff..f68fc6ac15e0 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -458,25 +458,26 @@ static void iomap_read_end(struct folio *folio, size_t bytes_submitted)
spin_lock_irq(&ifs->state_lock);
if (!ifs->read_bytes... |
ddb4873286e03e193c5a3bebb5fc6fa820e9ee3a | Analyze and fix the following issue in the Linux kernel code: iomap: always run error completions in user context | Problem Details:
At least zonefs expects error completions to be able to sleep. Because
error completions aren't performance critical, just defer them to workqueue
context unconditionally.
Fixes: 8dcc1a9d90c1 ("fs: New zonefs file system")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/2... | ```diff
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 7659db85083a..765ab6dd6637 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -173,7 +173,18 @@ static void iomap_dio_done(struct iomap_dio *dio)
WRITE_ONCE(dio->submit.waiter, NULL);
blk_wake_io_task(waiter);
- } else if (dio->... |
a74b6c0e53a6df8e8a096b50c06c4f872906368a | Analyze and fix the following issue in the Linux kernel code: um: Don't rename vmap to kernel_vmap | Problem Details:
In order to work around the existence of a vmap symbol in libpcap, the
UML makefile unconditionally redefines vmap to kernel_vmap. However,
this not only affects the actual vmap symbol, but also anything else
named vmap, including a number of struct members in DRM.
This would not be too much of a prob... | ```diff
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 7be0143b5ba3..721b652ffb65 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -46,19 +46,17 @@ ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS)
ARCH_INCLUDE += -I$(srctree)/$(HOST_DIR)/um/shared
KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/um
-# -Dvma... |
54ca9e913e22e364292a484783efc4fcdb6fdc51 | Analyze and fix the following issue in the Linux kernel code: include/linux/fs.h: trivial fix: regualr -> regular | Problem Details:
Trivial fix.
Signed-off-by: Askar Safin <safinaskar@gmail.com>
Link: https://patch.msgid.link/20251120195140.571608-1-safinaskar@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org> | ```diff
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ff69734b9fde..e02700b4e36b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3102,7 +3102,7 @@ static inline bool inode_wrong_type(const struct inode *inode, umode_t mode)
* file_start_write - get write access to a superblock for regular fi... |
bef0202fb77b9b733054838df1d3111406bd21d4 | Analyze and fix the following issue in the Linux kernel code: fs/splice.c: trivial fix: pipes -> pipe's | Problem Details:
Trivial fix.
Signed-off-by: Askar Safin <safinaskar@gmail.com>
Link: https://patch.msgid.link/20251120211316.706725-1-safinaskar@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org> | ```diff
diff --git a/fs/splice.c b/fs/splice.c
index f5094b6d00a0..d338fe56b50b 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1498,7 +1498,7 @@ static int pipe_to_user(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
/*
* For lack of a better implementation, implement vmsplice() to userspace
- * as a simple... |
7b6dcd9bfd869eee7693e45b1817dac8c56e5f86 | Analyze and fix the following issue in the Linux kernel code: fs/namespace: fix reference leak in grab_requested_mnt_ns | Problem Details:
lookup_mnt_ns() already takes a reference on mnt_ns.
grab_requested_mnt_ns() doesn't need to take an extra reference.
Fixes: 78f0e33cd6c93 ("fs/namespace: correctly handle errors returned by grab_requested_mnt_ns")
Signed-off-by: Andrei Vagin <avagin@google.com>
Link: https://patch.msgid.link/20251122... | ```diff
diff --git a/fs/namespace.c b/fs/namespace.c
index 2bad25709b2c..4272349650b1 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -5746,6 +5746,8 @@ static struct mnt_namespace *grab_requested_mnt_ns(const struct mnt_id_req *kreq
if (kreq->mnt_ns_id) {
mnt_ns = lookup_mnt_ns(kreq->mnt_ns_id);
+ if (!mnt... |
73029e73ccd07b64905f441d4f474a9bb91e7027 | Analyze and fix the following issue in the Linux kernel code: x86/cc: Fix enum spelling to fix kernel-doc warnings | Problem Details:
Make the enum name in kernel-doc match the code to prevent kernel-doc warnings:
Warning: include/linux/cc_platform.h:106 Enum value
'CC_ATTR_GUEST_SEV_SNP' not described in enum 'cc_attr'
Warning: include/linux/cc_platform.h:106 Excess enum value
'%CC_ATTR_SEV_SNP' description in 'cc_attr'
... | ```diff
diff --git a/include/linux/cc_platform.h b/include/linux/cc_platform.h
index 7fcec025c5e0..559353ad64ac 100644
--- a/include/linux/cc_platform.h
+++ b/include/linux/cc_platform.h
@@ -74,7 +74,7 @@ enum cc_attr {
CC_ATTR_GUEST_UNROLL_STRING_IO,
/**
- * @CC_ATTR_SEV_SNP: Guest SNP is active.
+ * @CC_ATTR_... |
32bd348be3fa07b26c5ea6b818a161c142dcc2f2 | Analyze and fix the following issue in the Linux kernel code: KVM: Fix last_boosted_vcpu index assignment bug | Problem Details:
In kvm_vcpu_on_spin(), the loop counter 'i' is incorrectly written to
last_boosted_vcpu instead of the actual vCPU index 'idx'. This causes
last_boosted_vcpu to store the loop iteration count rather than the
vCPU index, leading to incorrect round-robin behavior in subsequent
directed yield operations.
... | ```diff
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index b7a0ae2a7b20..cde1eddbaa91 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -4026,7 +4026,7 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me, bool yield_to_kernel_mode)
yielded = kvm_vcpu_yield_to(vcpu);
if (yielded > 0) {
- WRITE_O... |
eb76d0f5553575599561010f24c277cc5b31d003 | Analyze and fix the following issue in the Linux kernel code: drm, fbcon, vga_switcheroo: Avoid race condition in fbcon setup | Problem Details:
Protect vga_switcheroo_client_fb_set() with console lock. Avoids OOB
access in fbcon_remap_all(). Without holding the console lock the call
races with switching outputs.
VGA switcheroo calls fbcon_remap_all() when switching clients. The fbcon
function uses struct fb_info.node, which is set by register... | ```diff
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 11a5b60cb9ce..0b3ee008523d 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -31,9 +31,7 @@
#include <linux/console.h>
#include <linux/export.h>
-#include <linux/pci.h>
#include <linux/s... |
0a8bc1d03e3eefb5d160fd51add3a016f29292e8 | Analyze and fix the following issue in the Linux kernel code: drm/client: log: Implement struct drm_client_funcs.restore | Problem Details:
Restore the log client's output when the DRM core invokes the restore
callback. Follow the existing behavior of fbdev emulation wrt. the
value of the force parameter.
If force is false, acquire the DRM master lock and reprogram the
display. This is the case when the user-space compositor exits and
the... | ```diff
diff --git a/drivers/gpu/drm/clients/drm_log.c b/drivers/gpu/drm/clients/drm_log.c
index 19e55aa0ed74..4d3005273b27 100644
--- a/drivers/gpu/drm/clients/drm_log.c
+++ b/drivers/gpu/drm/clients/drm_log.c
@@ -315,6 +315,18 @@ static void drm_log_client_unregister(struct drm_client_dev *client)
drm_client_releas... |
6915190a50e8f7cf13dcbe534b02845be533b60a | Analyze and fix the following issue in the Linux kernel code: drm/client: Support emergency restore via sysrq for all clients | Problem Details:
Move the sysrq functionality from DRM fbdev helpers to the DRM device
and in-kernel clients, so that it becomes available on all clients.
DRM fbdev helpers support emergency restoration of the console output
via a special key combination. Press SysRq+v to replace the current
compositor with the kernel... | ```diff
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index c2672f369aed..9901534948e5 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -76,7 +76,8 @@ drm-y := \
drm-$(CONFIG_DRM_CLIENT) += \
drm_client.o \
drm_client_event.o \
- drm_client_modeset.o
+ drm_client_modeset.o... |
a748e1dbb2df11fb55ee32a56270341195260b15 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Fix max bytes-per-interval calculation | Problem Details:
The maxpacksize field in struct audioformat represents the maximum number
of bytes per isochronous interval. The current implementation only
special-cases high-speed endpoints and does not account for the different
computations required for SuperSpeed, SuperSpeedPlus, or eUSB2. As a
result, USB audio c... | ```diff
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index 5c235a5ba7e1..074a61215de6 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -684,6 +684,37 @@ snd_usb_find_output_terminal_descriptor(struct usb_host_interface *ctrl_iface,
return NULL;
}
+static unsigned int
+snd_usb_max_bytes_per_inter... |
fe5dbe3110c559a2e6d13f114238621d89cb24f8 | Analyze and fix the following issue in the Linux kernel code: hwmon: (asus-ec-sensors) correct Pro WS TRX50-SAGE WIFI entry | Problem Details:
Add missing temperature and fan sensors to Pro WS TRX50-SAGE WIFI
Also:
- Format VRM names to match the BIOS
- Fix swapped VRM_E and VRM_W entries
Signed-off-by: 小太 <nospam@kota.moe>
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20251125040140.277756-1-e... | ```diff
diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index b56a5a63cc61..61b18b88ee8f 100644
--- a/drivers/hwmon/asus-ec-sensors.c
+++ b/drivers/hwmon/asus-ec-sensors.c
@@ -113,15 +113,19 @@ enum ec_sensors {
ec_sensor_temp_t_sensor,
/* VRM temperature [℃] */
ec_sensor_temp_vrm,
... |
68c7c386714512219e3517ec1097d164aee102fb | Analyze and fix the following issue in the Linux kernel code: mptcp: fix memcg accounting for passive sockets | Problem Details:
The passive sockets never got proper memcg accounting: the msk
socket is associated with the memcg at accept time, but the
passive subflows never got it right.
At accept time, traverse the subflows list and associate each of them
with the msk memcg, and try to do the same at join completion time, if
t... | ```diff
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 2104ab1eda1d..67732d3c502c 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3651,8 +3651,11 @@ static void mptcp_sock_check_graft(struct sock *sk, struct sock *ssk)
write_lock_bh(&sk->sk_callback_lock);
sock = sk->sk_socket;
wr... |
f296b73d17a486fb547caa9c7718401735c8c99c | Analyze and fix the following issue in the Linux kernel code: ipvlan: fix sparse warning about __be32 -> u32 | Problem Details:
Fixed a sparse warning:
ipvlan_core.c:56: warning: incorrect type in argument 1
(different base types) expected unsigned int [usertype] a
got restricted __be32 const [usertype] s_addr
Force cast the s_addr to u32
Signed-off-by: Dmitry Skorodumov <skorodumov.dmitry@huawei.com>
Link: https://patch.msg... | ```diff
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index d7e3ddbcab6f..dea411e132db 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -52,8 +52,8 @@ static u8 ipvlan_get_v4_hash(const void *iaddr)
{
const struct in_addr *ip4_addr = iaddr;
... |
4fe5a00ec70717a7f1002d8913ec6143582b3c8e | Analyze and fix the following issue in the Linux kernel code: net: sched: fix TCF_LAYER_TRANSPORT handling in tcf_get_base_ptr() | Problem Details:
syzbot reported that tcf_get_base_ptr() can be called while transport
header is not set [1].
Instead of returning a dangling pointer, return NULL.
Fix tcf_get_base_ptr() callers to handle this NULL value.
[1]
WARNING: CPU: 1 PID: 6019 at ./include/linux/skbuff.h:3071 skb_transport_header include/li... | ```diff
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index c64fd896b1f9..99ac747b7906 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -536,6 +536,8 @@ static inline unsigned char * tcf_get_base_ptr(struct sk_buff *skb, int layer)
case TCF_LAYER_NETWORK:
return skb_network_header(s... |
7c3acdb998dd723ac791cd4a47f13599d76a1f58 | Analyze and fix the following issue in the Linux kernel code: btrfs: send: add unlikely to all unexpected overflow checks | Problem Details:
There are several checks for unexpected overflows of buffers and path
lengths that makes us fail the send operation with an error if for some
highly unexpected reason they happen. So add the unlikely tag to those
checks to hint the compiler to generate better code, while also making
it more explicit in... | ```diff
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 3d437024e8bc..9da559f79f7f 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -1134,12 +1134,12 @@ static int iterate_dir_item(struct btrfs_root *root, struct btrfs_path *path,
btrfs_dir_item_key_to_cpu(eb, di, &di_key);
if (btrfs_dir_ftype(eb, di)... |
0185c2292c600993199bc6b1f342ad47a9e8c678 | Analyze and fix the following issue in the Linux kernel code: btrfs: don't rewrite ret from inode_permission | Problem Details:
In our user safe ino resolve ioctl we'll just turn any ret into -EACCES
from inode_permission(). This is redundant, and could potentially be
wrong if we had an ENOMEM in the security layer or some such other
error, so simply return the actual return value.
Note: The patch was taken from v5 of fscrypt... | ```diff
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 59cef7e376a0..a10b60439718 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1910,10 +1910,8 @@ static int btrfs_search_path_in_tree_user(struct mnt_idmap *idmap,
ret = inode_permission(idmap, &temp_inode->vfs_inode,
MAY_READ | MAY_E... |
1a332a6d70475d87067038ab0cbda8292da955e1 | Analyze and fix the following issue in the Linux kernel code: btrfs: raid56: remove the "_step" infix | Problem Details:
The following functions are introduced as a middle step for bs > ps
support:
- rbio_streip_step_paddr()
- rbio_pstripe_step_paddr()
- rbio_qstripe_step_paddr()
- sector_step_paddr_in_rbio()
As there is already an existing function without the infix, and has a
different parameter list.
But the existi... | ```diff
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index fca9c73b01ea..f38d8305e46d 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -735,25 +735,25 @@ static unsigned int rbio_paddr_index(const struct btrfs_raid_bio *rbio,
return ret;
}
-static phys_addr_t rbio_stripe_step_paddr(const struct btrf... |
590699d85823f38b74d52a0811ef22ebb61afddc | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix htab_update/reenter_update selftest failure | Problem Details:
Since commit 31158ad02ddb ("rqspinlock: Add deadlock detection
and recovery") the updated path on re-entrancy now reports deadlock
via -EDEADLK instead of the previous -EBUSY.
Also, the way reentrancy was exercised (via fentry/lookup_elem_raw)
has been fragile because lookup_elem_raw may be inlined
(f... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/htab_update.c b/tools/testing/selftests/bpf/prog_tests/htab_update.c
index 2bc85f4814f4..d0b405eb2966 100644
--- a/tools/testing/selftests/bpf/prog_tests/htab_update.c
+++ b/tools/testing/selftests/bpf/prog_tests/htab_update.c
@@ -15,17 +15,17 @@ struct htab_u... |
9ba67fd616d6cfbf8b90c336195819e7494645bb | Analyze and fix the following issue in the Linux kernel code: btrfs: raid56: prepare recover_vertical() to support bs > ps cases | Problem Details:
Currently recover_vertical() assumes that every fs block can be mapped
by one page, this is blocking bs > ps support for raid56.
Prepare recover_vertical() to support bs > ps cases by:
- Introduce recover_vertical_step() helper
Which will recover a full step (min(PAGE_SIZE, sectorsize)).
Now rec... | ```diff
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 209f013e4da9..62bb87d1c258 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -1007,21 +1007,13 @@ static phys_addr_t sector_paddr_in_rbio(struct btrfs_raid_bio *rbio,
* Similar to sector_paddr_in_rbio(), but with extra consideration for
* bs >... |
48f014356698a3525959a9eb343dc67b5a5c6842 | Analyze and fix the following issue in the Linux kernel code: PCI: Validate pci_rebar_size_supported() input | Problem Details:
According to Dan Carpenter, smatch detects issue with size parameter given
to pci_rebar_size_supported():
drivers/pci/rebar.c:142 pci_rebar_size_supported()
error: undefined (user controlled) shift '(((1))) << size'
The problem is this call tree, which uses the 'size' from the user to shift
in BI... | ```diff
diff --git a/drivers/pci/rebar.c b/drivers/pci/rebar.c
index 7f6dece19138..ecdebdeb2dff 100644
--- a/drivers/pci/rebar.c
+++ b/drivers/pci/rebar.c
@@ -139,6 +139,9 @@ bool pci_rebar_size_supported(struct pci_dev *pdev, int bar, int size)
{
u64 sizes = pci_rebar_get_possible_sizes(pdev, bar);
+ if (size < 0... |
68f78bf55b2407947be2be7f854d1310cff607d9 | Analyze and fix the following issue in the Linux kernel code: mm, swap: use SWP_SOLIDSTATE to determine if swap is rotational | Problem Details:
The current non rotational check is unreliable as the device's rotational
status can be changed by a user via sysfs.
Use the more reliable SWP_SOLIDSTATE flag which is set at swapon time, to
ensure the nr_rotate_swap count remains consistent. Plus, it is easy to
read and simple.
Link: https://lkml.k... | ```diff
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 0a822e0d9bf9..c8ac0fd51c4c 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -2910,7 +2910,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
if (p->flags & SWP_CONTINUED)
free_swap_count_continuations(p);
- if (!p->bdev || !bdev_nonrot(p->bde... |
cb65082a0ab44ccdd574d61feb59a857f2b1c914 | Analyze and fix the following issue in the Linux kernel code: mm, swap: fix memory leak in setup_clusters() error path | Problem Details:
Patch series "mm: swap: small fixes and comment cleanups", v2.
This series provides a few small fixes and cleanups for the swap code.
The first patch fixes a memory leak in an error path that was recently
introduced. The subsequent patches include minor logic adjustments and
the removal of redundant ... | ```diff
diff --git a/mm/swapfile.c b/mm/swapfile.c
index cf780fefaf7d..0a822e0d9bf9 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3330,7 +3330,7 @@ static struct swap_cluster_info *setup_clusters(struct swap_info_struct *si,
si->global_cluster = kmalloc(sizeof(*si->global_cluster),
GFP_KERNEL);
if ... |
c23071952394eaef4f06d1b71a90392d2650af0d | Analyze and fix the following issue in the Linux kernel code: mm/swap: fix wrong plist empty check in swap_alloc_slow() | Problem Details:
swap_alloc_slow() was checking `si->avail_list` instead of
`next->avail_list` when verifying if the next swap device is still in the
list, which could cause unnecessary restarts during allocation.
Link: https://lkml.kernel.org/r/20251119114136.594108-1-youngjun.park@lge.com
Fixes: 8e689f8ea45f ("mm/sw... | ```diff
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 94e0f0c54168..cf780fefaf7d 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1374,7 +1374,7 @@ start_over:
* still in the swap_avail_head list then try it, otherwise
* start over if we have not gotten any slots.
*/
- if (plist_node_empty(&si->avail_... |
a9ce09b15761e0f3a413a4a79097d17e19bd3ec1 | Analyze and fix the following issue in the Linux kernel code: mm/damon/tests/sysfs-kunit: fix use after free on error path | Problem Details:
Re-order these frees to avoid dereferencing "sysfs_target" after it has
been freed.
Link: https://lkml.kernel.org/r/aSBq5uSPIqsqH8zO@stanley.mountain
Fixes: ee131696794c ("mm/damon/tests/sysfs-kunit: handle alloc failures on damon_sysfs_test_add_targets()")
Signed-off-by: Dan Carpenter <dan.carpenter@... | ```diff
diff --git a/mm/damon/tests/sysfs-kunit.h b/mm/damon/tests/sysfs-kunit.h
index ce7218469f20..0c665ed255a3 100644
--- a/mm/damon/tests/sysfs-kunit.h
+++ b/mm/damon/tests/sysfs-kunit.h
@@ -76,8 +76,8 @@ static void damon_sysfs_test_add_targets(struct kunit *test)
if (!ctx) {
kfree(sysfs_targets->targets_arr)... |
ccf9eb326b4aabcd61e71d87469cafd6c5f01308 | Analyze and fix the following issue in the Linux kernel code: tools/testing/vma: add missing stub | Problem Details:
vm_flags_reset() is not available in the userland VMA tests, so add a stub
which const-casts vma->vm_flags and avoids the upcoming removal of the
vma->__vm_flags field.
Link: https://lkml.kernel.org/r/4aff8bf7-d367-4ba3-90ad-13eef7a063fa@lucifer.local
Fixes: c5c67c1de357 ("tools/testing/vma: eliminate... | ```diff
diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_internal.h
index be99056c5d56..8c2ac301a00e 100644
--- a/tools/testing/vma/vma_internal.h
+++ b/tools/testing/vma/vma_internal.h
@@ -1549,4 +1549,11 @@ static inline int do_munmap(struct mm_struct *, unsigned long, size_t,
return 0;
}
+s... |
04d31610a7221cca624646241b1f6b3edd6c99fd | Analyze and fix the following issue in the Linux kernel code: zram: fix the issue that the write - back limits might overflow | Problem Details:
When the page size exceeds 4KB, if bd_wb_limit is set to a value that is
not aligned with the page size, it will cause a numerical wrap-around
issue for bd_wb_limit. For example, when the page size is set to 16KB and
bd_wb_limit is set to 3, after one write-back operation, the value of
bd_wb_limit wil... | ```diff
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 3428f647d0a7..1a1159a70fb4 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -566,6 +566,16 @@ static ssize_t writeback_limit_store(struct device *dev,
if (kstrtoull(buf, 10, &val))
return ret;
... |
519912bdaee8ae8529241d4763326e6120489459 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: riscv: Add Svrsw60t59b extension description | Problem Details:
Add description for the Svrsw60t59b extension (PTE Reserved for SW
bits 60:59) extension which was ratified recently in
riscv-non-isa/riscv-iommu.
Link: https://lkml.kernel.org/r/20251113072806.795029-7-zhangchunyan@iscas.ac.cn
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Chunyan... | ```diff
diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
index 543ac94718e8..194ef4754452 100644
--- a/Documentation/devicetree/bindings/riscv/extensions.yaml
+++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
@@ -217,6 +217,12 @@ ... |
c64da3950cf45d5fd87d7754ab4698b8cec01cae | Analyze and fix the following issue in the Linux kernel code: riscv: mm: add userfaultfd write-protect support | Problem Details:
The Svrsw60t59b extension allows to free the PTE reserved bits 60 and 59
for software, this patch uses bit 60 for uffd-wp tracking
Additionally for tracking the uffd-wp state as a PTE swap bit, we borrow
bit 4 which is not involved into swap entry computation.
Link: https://lkml.kernel.org/r/20251113... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index e5f070485bbe..b2eff4789fe2 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -148,6 +148,7 @@ config RISCV
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT && MMU
select HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD if 64BIT && MMU
select HAVE_ARCH_U... |
2a3ebad4db63e86a9443d6bff4a5977320dc09f6 | Analyze and fix the following issue in the Linux kernel code: riscv: mm: add soft-dirty page tracking support | Problem Details:
The Svrsw60t59b extension allows to free the PTE reserved bits 60 and 59
for software, this patch uses bit 59 for soft-dirty.
To add swap PTE soft-dirty tracking, we borrow bit 3 which is available
for swap PTEs on RISC-V systems.
Link: https://lkml.kernel.org/r/20251113072806.795029-5-zhangchunyan@i... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 829d95d173cf..e5f070485bbe 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -142,6 +142,7 @@ config RISCV
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
select HAVE_ARCH_SECCOMP_FILTER
+ select ... |
59f6acb4be0209b1451ac186c6d7d4175889c949 | Analyze and fix the following issue in the Linux kernel code: riscv: add RISC-V Svrsw60t59b extension support | Problem Details:
The Svrsw60t59b extension allows to free the PTE reserved bits 60 and 59
for software to use.
Link: https://lkml.kernel.org/r/20251113072806.795029-4-zhangchunyan@iscas.ac.cn
Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Andr... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 22cda9c452d2..829d95d173cf 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -849,6 +849,20 @@ config RISCV_ISA_ZICBOP
If you don't know what to do here, say Y.
+config RISCV_ISA_SVRSW60T59B
+ bool "Svrsw60t59b extension support for us... |
f59c0924d61aa2a2bb85936a593140f327112787 | Analyze and fix the following issue in the Linux kernel code: mm: userfaultfd: add pgtable_supports_uffd_wp() | Problem Details:
Some platforms can customize the PTE/PMD entry uffd-wp bit making it
unavailable even if the architecture provides the resource. This patch
adds a macro API pgtable_supports_uffd_wp() that allows architectures to
define their specific implementations to check if the uffd-wp bit is
available on which d... | ```diff
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 3f539aabc3b3..5a0d19dec7ba 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -1289,9 +1289,9 @@ static int userfaultfd_register(struct userfaultfd_ctx *ctx,
if (uffdio_register.mode & UFFDIO_REGISTER_MODE_MISSING)
vm_flags |= VM_UFFD_MISSING;
i... |
277a1ae3879a82a15a2e2d6741e38e31ea6487ee | Analyze and fix the following issue in the Linux kernel code: mm: softdirty: add pgtable_supports_soft_dirty() | Problem Details:
Patch series "mm: Add soft-dirty and uffd-wp support for RISC-V", v15.
This patchset adds support for Svrsw60t59b [1] extension which is ratified
now, also add soft dirty and userfaultfd write protect tracking for
RISC-V.
The patches 1 and 2 add macros to allow architectures to define their own
check... | ```diff
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 41b062ce6ad8..2b4ab5718ab5 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1584,8 +1584,6 @@ struct clear_refs_private {
enum clear_refs_types type;
};
-#ifdef CONFIG_MEM_SOFT_DIRTY
-
static inline bool pte_is_pinned(struct vm_area_st... |
07003531e03c864b0711757c8009c7f14c95d1d1 | Analyze and fix the following issue in the Linux kernel code: mm/vmalloc: warn on invalid vmalloc gfp flags | Problem Details:
Patch series "make vmalloc gfp flags usage more apparent", v4.
We should do a better job at enforcing gfp flags for vmalloc. Right now,
we have a kernel-doc for __vmalloc_node_range(), and hope callers pass in
supported flags. If a caller were to pass in an unsupported flag, we may
BUG, silently cle... | ```diff
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 0832f944544c..c97c874b6666 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -3911,6 +3911,28 @@ fail:
return NULL;
}
+/*
+ * See __vmalloc_node_range() for a clear list of supported vmalloc flags.
+ * This gfp lists all flags currently passed through vmalloc. C... |
3e700b715e1cef66371027cefd3761eb8fa6e0d8 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: gup_test: fix comment regarding origin of FOLL_WRITE | Problem Details:
The 'FOLL_WRITE' of the copied source is located in mm_types.h of mm, not
mm.h, so fix it.
Link: https://lkml.kernel.org/r/20251117154012.197499-2-peng8420.li@gmail.com
Signed-off-by: Peng Li <peng8420.li@gmail.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: David Hildenbrand (Red Ha... | ```diff
diff --git a/tools/testing/selftests/mm/gup_test.c b/tools/testing/selftests/mm/gup_test.c
index 75f7134d529d..40c1538a17b4 100644
--- a/tools/testing/selftests/mm/gup_test.c
+++ b/tools/testing/selftests/mm/gup_test.c
@@ -17,7 +17,7 @@
#define MB (1UL << 20)
-/* Just the flags we need, copied from mm.h: *... |
cab812d9c9642ec11b8961b7ea994f4bd0826159 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory.c: introduce folio_split_unmapped | Problem Details:
Unmapped was added as a parameter to __folio_split() and related call
sites to support splitting of folios already in the midst of a migration.
This special case arose for device private folio migration since during
migration there could be a disconnect between source and destination on
the folio size... | ```diff
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index e2e91aa1a042..1d439de1ca2c 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -371,7 +371,8 @@ enum split_type {
bool can_split_folio(struct folio *folio, int caller_pins, int *pextra_pins);
int __split_huge_page_to_list... |
8826f09616b475361774588c3e07260bba548f84 | Analyze and fix the following issue in the Linux kernel code: mm: shmem: allow fallback to smaller large orders for tmpfs mmap() access | Problem Details:
After commit 69e0a3b49003 ("mm: shmem: fix the strategy for the tmpfs
'huge=' options"), we have fixed the large order allocation strategy for
tmpfs, which always tries PMD-sized large folios first, and if that fails,
falls back to smaller large folios. For tmpfs large folio allocation via
mmap(), we ... | ```diff
diff --git a/mm/shmem.c b/mm/shmem.c
index 395ca58ac4a5..fc835b3e4914 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -645,34 +645,23 @@ static unsigned int shmem_huge_global_enabled(struct inode *inode, pgoff_t index
* the mTHP interface, so we still use PMD-sized huge order to
* check whether global control... |
776bde7caf80f6af72b087cafe7d9f607b14716d | Analyze and fix the following issue in the Linux kernel code: mm: thp: use folio_batch to handle THP splitting in deferred_split_scan() | Problem Details:
The maintenance of the folio->_deferred_list is intricate because it's
reused in a local list.
Here are some peculiarities:
1) When a folio is removed from its split queue and added to a local
on-stack list in deferred_split_scan(), the ->split_queue_len isn't
updated, leading to an in... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index bfcb5d895f67..13684e5376e8 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -3888,21 +3888,22 @@ static int __folio_split(struct folio *folio, unsigned int new_order,
struct lruvec *lruvec;
int expected_refs;
- if (old_order > 1 &&
- !l... |
fb410d8b89e89ef61b18326f07c477f563b631f6 | Analyze and fix the following issue in the Linux kernel code: mm: use leaf entries in debug pgtable + remove is_swap_pte() | Problem Details:
Remove invocations of is_swap_pte() in mm/debug_vm_pgtable.c and use
softleaf_from_pte() and softleaf_is_swap() as necessary to replace this
usage.
We update the test code to use a 'true' swap entry throughout so we are
guaranteed this is not a non-swap entry, so all asserts continue to
operate correc... | ```diff
diff --git a/include/linux/swapops.h b/include/linux/swapops.h
index 0a4b3f51ecf5..a66ac4f2105c 100644
--- a/include/linux/swapops.h
+++ b/include/linux/swapops.h
@@ -120,12 +120,6 @@ static inline unsigned long swp_offset_pfn(swp_entry_t entry)
return swp_offset(entry) & SWP_PFN_MASK;
}
-/* check whether ... |
c093cf451094a9a03c4d4929bc30122a53038b7b | Analyze and fix the following issue in the Linux kernel code: mm: correctly handle UFFD PTE markers | Problem Details:
Patch series "mm: remove is_swap_[pte, pmd]() + non-swap entries,
introduce leaf entries", v3.
There's an established convention in the kernel that we treat leaf page
tables (so far at the PTE, PMD level) as containing 'swap entries' should
they be neither empty (i.e. p**_none() evaluating true) nor ... | ```diff
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 54c6cc7fe9c6..94c4d68f0818 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -233,40 +233,48 @@ static inline bool userfaultfd_huge_must_wait(struct userfaultfd_ctx *ctx,
{
struct vm_area_struct *vma = vmf->vma;
pte_t *ptep, pte;
- bool ret = tru... |
8a0e4bdddd1c998b894d879a1d22f1e745606215 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: merge uniform_split_supported() and non_uniform_split_supported() | Problem Details:
uniform_split_supported() and non_uniform_split_supported() share
significantly similar logic.
The only functional difference is that uniform_split_supported() includes
an additional check on the requested @new_order.
The reason for this check comes from the following two aspects:
* some file syst... | ```diff
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index b74708dc5b5f..19d4a5f52ca2 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -374,10 +374,8 @@ int __split_huge_page_to_list_to_order(struct page *page, struct list_head *list
unsigned int new_order, bool unmapped);
int... |
fe9d31fd1ab6cb53e45d9d6b0bb7a62d8365fe2b | Analyze and fix the following issue in the Linux kernel code: mm/hmm/test: fix error handling in dmirror_device_init | Problem Details:
dmirror_device_init() calls device_initialize() which sets the device
reference count to 1, but fails to call put_device() when error occurs
after dev_set_name() or cdev_device_add() failures. This results in
memory leaks of struct device objects. Additionally,
dmirror_device_remove() lacks the final... | ```diff
diff --git a/lib/test_hmm.c b/lib/test_hmm.c
index 72a8b2f38d8a..8af169d3873a 100644
--- a/lib/test_hmm.c
+++ b/lib/test_hmm.c
@@ -1740,20 +1740,25 @@ static int dmirror_device_init(struct dmirror_device *mdevice, int id)
ret = dev_set_name(&mdevice->device, "hmm_dmirror%u", id);
if (ret)
- return ret;
+... |
50d0598cf2c9d33e1f08c3b1a357752ea8a9b94a | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: fix kernel-doc comments for folio_split() and related | Problem Details:
try_folio_split_to_order(), folio_split, __folio_split(), and
__split_unmapped_folio() do not have correct kernel-doc comment format.
Fix them.
[ziy@nvidia.com: kernel-doc fixup]
Link: https://lkml.kernel.org/r/BE7AC5F3-9E64-4923-861D-C2C4E0CB91EB@nvidia.com
[ziy@nvidia.com: add newline to fix an e... | ```diff
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index a06924cf4065..9f7f7d772fe5 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -386,9 +386,9 @@ static inline int split_huge_page_to_order(struct page *page, unsigned int new_o
return split_huge_page_to_list_to_order(page, ... |
a7ef12c64fd991c0f42b2e1bf0c4f09068575864 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: add split_huge_page_to_order() | Problem Details:
Patch series "Optimize folio split in memory failure", v5.
This patchset optimizes folio split operations in memory failure code by
always splitting a folio to min_order_for_split() to minimize unusable
pages, even if min_order_for_split() is non zero and memory failure code
would take the failed path... | ```diff
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 396d9e3d1d46..a06924cf4065 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -381,6 +381,10 @@ static inline int split_huge_page_to_list_to_order(struct page *page, struct lis
{
return __split_huge_page_to_list_to_order(... |
2a1351cd4176ee1809b0900d386919d03b7652f8 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: add pmd folio to ds_queue in do_huge_zero_wp_pmd() | Problem Details:
We add pmd folio into ds_queue on the first page fault in
__do_huge_pmd_anonymous_page(), so that we can split it in case of memory
pressure. This should be the same for a pmd folio during wp page fault.
Commit 1ced09e0331f ("mm: allocate THP on hugezeropage wp-fault") miss to
add it to ds_queue, whi... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 81e511f1ed26..a2a2fda2bff8 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1233,6 +1233,7 @@ static void map_anon_folio_pmd(struct folio *folio, pmd_t *pmd,
count_vm_event(THP_FAULT_ALLOC);
count_mthp_stat(HPAGE_PMD_ORDER, MTHP_STAT_ANON_FAULT_... |
c3228747107705d47c7e9a03598a434a0380cb73 | Analyze and fix the following issue in the Linux kernel code: gpu/drm/nouveau: enable THP support for GPU memory migration | Problem Details:
Enable MIGRATE_VMA_SELECT_COMPOUND support in nouveau driver to take
advantage of THP zone device migration capabilities.
Update migration and eviction code paths to handle compound page sizes
appropriately, improving memory bandwidth utilization and reducing
migration overhead for large GPU memory al... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c
index d34288ebe7d2..58071652679d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dmem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c
@@ -50,6 +50,7 @@
*/
#define DMEM_CHUNK_SIZE (2UL << 20)
#define DMEM_CHUNK_NPAGES (D... |
65edfda6f3f2e58f757485a056e4f1775a1404a8 | Analyze and fix the following issue in the Linux kernel code: mm/rmap: extend rmap and migration support device-private entries | Problem Details:
Add device-private THP support to reverse mapping infrastructure, enabling
proper handling during migration and walk operations.
The key changes are:
- add_migration_pmd()/remove_migration_pmd(): Handle device-private
entries during folio migration and splitting
- page_vma_mapped_walk(): Recognize d... | ```diff
diff --git a/mm/damon/ops-common.c b/mm/damon/ops-common.c
index f61d6dde13dc..971df8a16ba4 100644
--- a/mm/damon/ops-common.c
+++ b/mm/damon/ops-common.c
@@ -75,12 +75,24 @@ void damon_ptep_mkold(pte_t *pte, struct vm_area_struct *vma, unsigned long addr
void damon_pmdp_mkold(pmd_t *pmd, struct vm_area_struct... |
1452468447da77e846bda51c3a298ce843395d9c | Analyze and fix the following issue in the Linux kernel code: KVM: s390: fix missing present bit for gmap puds | Problem Details:
For hugetlbs, gmap puds have the present bit set. For normal puds (which
point to ptes), the bit is not set. This is in contrast to the normal
userspace puds, which always have the bit set for present pmds.
This causes issues when ___pte_offset_map() is modified to only check for
the present bit.
T... | ```diff
diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
index 8ff6bba107e8..22c448b32340 100644
--- a/arch/s390/mm/gmap.c
+++ b/arch/s390/mm/gmap.c
@@ -599,8 +599,9 @@ int __gmap_link(struct gmap *gmap, unsigned long gaddr, unsigned long vmaddr)
| _SEGMENT_ENTRY_GMAP_UC
| _SEGMENT_ENTRY;
} else
-... |
894f475f88e06c0f352c829849560790dbdedbe5 | Analyze and fix the following issue in the Linux kernel code: PCI/PM: Reinstate clearing state_saved in legacy and !PM codepaths | Problem Details:
When a PCI device is suspended, it is normally the PCI core's job to save
Config Space and put the device into a low power state. However drivers
are allowed to assume these responsibilities. When they do, the PCI core
can tell by looking at the state_saved flag in struct pci_dev: The flag
is cleare... | ```diff
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 302d61783f6c..327b21c48614 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -629,6 +629,8 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
struct pci_dev *pci_dev = to_pci_dev(dev);
struct p... |
31d3354f42c0da34415164a1f621a195caa1f1bc | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: verify that hardware supports the flush page address | Problem Details:
Ensure that the DMA address of the framebuffer flush page is not larger
than its hardware register.
On GPUs older than Hopper, the register for the address can hold up to a
40-bit address (right-shifted by 8 so that it fits in the 32-bit
register), and on Hopper and later it can be 52 bits (64-bit reg... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb100.c
index 1c78c8853617..170776cc82fb 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb100.c
@@ -15,6 +15,9 @@ gb100_fb_sysmem_flush_page_init(struct ... |
04d98b3452331fa53ec3b698b66273af6ef73288 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: restrict the flush page to a 32-bit address | Problem Details:
The flush page DMA address is stored in a special register that is not
associated with the GPU's standard DMA range. For example, on Turing,
the GPU's MMU can handle 47-bit addresses, but the flush page address
register is limited to 40 bits.
At the point during device initialization when the flush p... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
index 8a286a9349ac..7ce1b65e2c1c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
@@ -279,7 +279,7 @@ nvkm_fb_ctor(const struct nvkm_fb_func *f... |
bcc9a4a0bca3aee4303fa4a20302e57b24ac8f68 | Analyze and fix the following issue in the Linux kernel code: PCI: dwc: Fix wrong PORT_LOGIC_LTSSM_STATE_MASK definition | Problem Details:
As per DesignWare Cores PCI Express Controller Databook, section 5.50,
SII: Debug Signals, cxpl_debug_info[63:0]:
[5:0] smlh_ltssm_state: LTSSM current state. Encoding is same as the
dedicated smlh_ltssm_state output.
The mask should be 6 bits, from 0 to 5. Hence, fix the mask definition.
Fixes:... | ```diff
diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h
index e995f692a1ec..24bfa5231923 100644
--- a/drivers/pci/controller/dwc/pcie-designware.h
+++ b/drivers/pci/controller/dwc/pcie-designware.h
@@ -97,7 +97,7 @@
#define PORT_LANE_SKEW_INSERT_MASK GENMASK(23,... |
27392612c8823f4b65240949eb0dc77de946285d | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: selftests: vgic_irq: Fix GUEST_ASSERT_IAR_EMPTY() helper | Problem Details:
No, 0 is not a spurious INTID. Never been, never was.
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://msgid.link/20251120172540.2267180-43-maz@kernel.org
Signed-off-by: Oliver Upton <oupton@kernel.org> | ```diff
diff --git a/tools/testing/selftests/kvm/arm64/vgic_irq.c b/tools/testing/selftests/kvm/arm64/vgic_irq.c
index 6338f5bbdb70..a77562b2976a 100644
--- a/tools/testing/selftests/kvm/arm64/vgic_irq.c
+++ b/tools/testing/selftests/kvm/arm64/vgic_irq.c
@@ -205,7 +205,7 @@ static void kvm_inject_call(kvm_inject_cmd cm... |
281c6c06e2a7bc331cbe02ad21f1390820d28d59 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: GICv2: Handle LR overflow when EOImode==0 | Problem Details:
Similarly to the GICv3 version, handle the EOIcount-driven deactivation
by walking the overflow list.
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://msgid.link/20251120172540.2267180-38-maz@kernel.org
Signe... | ```diff
diff --git a/arch/arm64/kvm/vgic/vgic-v2.c b/arch/arm64/kvm/vgic/vgic-v2.c
index 9a2de03f74c3..bbd4d003fde8 100644
--- a/arch/arm64/kvm/vgic/vgic-v2.c
+++ b/arch/arm64/kvm/vgic/vgic-v2.c
@@ -100,6 +100,8 @@ static void vgic_v2_fold_lr(struct kvm_vcpu *vcpu, u32 val)
vgic_put_irq(vcpu->kvm, irq);
}
+static ... |
ca3c34da3644a24daf248be5dba72783c338dad4 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: GICv3: Handle in-LR deactivation when possible | Problem Details:
Even when we have either an LR overflow or SPIs in flight, it is
extremely likely that the interrupt being deactivated is still in
the LRs, and that going all the way back to the the generic trap
handling code is a waste of time.
Instead, try and deactivate in place when possible, and only if
this fai... | ```diff
diff --git a/arch/arm64/kvm/hyp/vgic-v3-sr.c b/arch/arm64/kvm/hyp/vgic-v3-sr.c
index f2f585455144..71199e1a9294 100644
--- a/arch/arm64/kvm/hyp/vgic-v3-sr.c
+++ b/arch/arm64/kvm/hyp/vgic-v3-sr.c
@@ -792,7 +792,7 @@ static void __vgic_v3_bump_eoicount(void)
write_gicreg(hcr, ICH_HCR_EL2);
}
-static void __v... |
70fd60bdedc9ff4c4830a8b379fb65e6ba1e819f | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: GICv3: Set ICH_HCR_EL2.TDIR when interrupts overflow LR capacity | Problem Details:
Now that we are ready to handle deactivation through ICV_DIR_EL1,
set the trap bit if we have active interrupts outside of the LRs.
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://msgid.link/20251120172540.2... | ```diff
diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c
index 9fcee5121fe5..09f86bf6fe7b 100644
--- a/arch/arm64/kvm/vgic/vgic-v3.c
+++ b/arch/arm64/kvm/vgic/vgic-v3.c
@@ -45,6 +45,13 @@ void vgic_v3_configure_hcr(struct kvm_vcpu *vcpu,
ICH_HCR_EL2_VGrp0DIE : ICH_HCR_EL2_VGrp0EIE;
cpuif-... |
3cfd59f81e0f3fbdf8a1b2f576bdc63ab6cc3277 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: GICv3: Handle LR overflow when EOImode==0 | Problem Details:
Now that we can identify interrupts that have not made it into the LRs,
it becomes relatively easy to use EOIcount to walk the overflow list.
What is a bit odd is that we compute a fake LR for the original
state of the interrupt, clear the active bit, and feed into the existing
logic for processing. I... | ```diff
diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c
index 312226cc2565..d4f27f451c8f 100644
--- a/arch/arm64/kvm/vgic/vgic-v3.c
+++ b/arch/arm64/kvm/vgic/vgic-v3.c
@@ -112,16 +112,62 @@ static void vgic_v3_fold_lr(struct kvm_vcpu *vcpu, u64 val)
vgic_put_irq(vcpu->kvm, irq);
}
+stati... |
0dc433e79ad031801842e3d8bc5d9729e14f5067 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Add LR overflow handling documentation | Problem Details:
Add a bit of documentation describing how we are dealing with LR
overflow. This is mostly a braindump of how things are expected
to work. For now anyway.
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://msgid... | ```diff
diff --git a/arch/arm64/kvm/vgic/vgic.c b/arch/arm64/kvm/vgic/vgic.c
index 6dd5a10081e2..7ee253a9fb77 100644
--- a/arch/arm64/kvm/vgic/vgic.c
+++ b/arch/arm64/kvm/vgic/vgic.c
@@ -825,7 +825,86 @@ static int compute_ap_list_depth(struct kvm_vcpu *vcpu,
return count;
}
-/* Requires the VCPU's ap_list_lock to... |
567ebfedb5bd204a8ce6a11695f02730f1bf57f4 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: vgic-v3: Fix GICv3 trapping in protected mode | Problem Details:
As we are about to start trapping a bunch of extra things, augment
the pKVM trap description with all the registers trapped by ICH_HCR_EL2.TC,
making them legal instead of resulting in a UNDEF injection in the guest.
While we're at it, ensure that pKVM captures the vgic model so that it
can be checked... | ```diff
diff --git a/arch/arm64/kvm/hyp/nvhe/pkvm.c b/arch/arm64/kvm/hyp/nvhe/pkvm.c
index 43bde061b65d..8911338961c5 100644
--- a/arch/arm64/kvm/hyp/nvhe/pkvm.c
+++ b/arch/arm64/kvm/hyp/nvhe/pkvm.c
@@ -337,6 +337,9 @@ static void pkvm_init_features_from_host(struct pkvm_hyp_vm *hyp_vm, const struc
/* CTR_EL0 is alwa... |
7c9580f44f90f7a4c11fc7831efe323ebe446091 | Analyze and fix the following issue in the Linux kernel code: mm/filemap: fix logic around SIGBUS in filemap_map_pages() | Problem Details:
Chris noticed that filemap_map_pages() calculates can_map_large only once
for the first page in the fault around range. The value is not valid for
the following pages in the range and must be recalculated.
Instead of recalculating can_map_large on each iteration, pass down
file_end to filemap_map_fol... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index 2f1e7e283a51..024b71da5224 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3682,8 +3682,9 @@ static vm_fault_t filemap_map_folio_range(struct vm_fault *vmf,
struct folio *folio, unsigned long start,
unsigned long addr, unsigned int nr_pages,
unsigned l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.