id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a46aaa76ad21de033f188595173e8ae7afefddc0
Analyze and fix the following issue in the Linux kernel code: hfsplus: fix generic/533 test-case failure
Problem Details: The xfstests' test-case generic/533 fails to execute correctly: FSTYP -- hfsplus PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.15.0-rc4+ #8 SMP PREEMPT_DYNAMIC Thu May 1 16:43:22 PDT 2025 MKFS_OPTIONS -- /dev/loop51 MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch generic/533 _check_generic_filesystem: fi...
```diff diff --git a/fs/hfsplus/attributes.c b/fs/hfsplus/attributes.c index 6585bcea731c..704635c65e9a 100644 --- a/fs/hfsplus/attributes.c +++ b/fs/hfsplus/attributes.c @@ -153,14 +153,22 @@ int hfsplus_find_attr(struct super_block *sb, u32 cnid, if (err) goto failed_find_attr; err = hfs_brec_find(fd, hfs_f...
5133b61aaf437e5f25b1b396b14242a6bb0508e2
Analyze and fix the following issue in the Linux kernel code: nfsd: fix heap overflow in NFSv4.0 LOCK replay cache
Problem Details: The NFSv4.0 replay cache uses a fixed 112-byte inline buffer (rp_ibuf[NFSD4_REPLAY_ISIZE]) to store encoded operation responses. This size was calculated based on OPEN responses and does not account for LOCK denied responses, which include the conflicting lock owner as a variable-length field up to 102...
```diff diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 5172dbd0cb05..fa16b34fae50 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -6281,9 +6281,14 @@ nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op) int len = xdr->buf->len - (op_status_offset + XDR_UNIT); so->so_re...
aeb078cebc40d421f61a8f07b0e7919aeb44d751
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: bcm2712-d-rpi-5-b: add fixes for pinctrl/pinctrl_aon
Problem Details: On the -d revision of the bcm2712 the pinctrl differs from the c0 revision. The driver already supports both and distinguishes the two with the compatible string. Update the compatible string and reg length to reflect the different pinctrl. Signed-off-by: Gregor Herburger <gregor.herburger@linutronix...
```diff diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts index 7de24d60bcd1..cbfc82d884c8 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts +++ b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts @@ -35,3 +35,13 @@ "PMIC_SCL", // AON_...
f699e0aa7a1382f52fb6f3e8e26754e7aaad6db6
Analyze and fix the following issue in the Linux kernel code: ARM: dts: BCM5301X: Drop extra NAND controller compatible
Problem Details: Fix the dtbs_check warning introduced when the brcm,brcmnand fallback compatible got removed for iProc machines. Fixes: 4db35366d6dc ("dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc") Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Rob Herring (Arm) <robh...
```diff diff --git a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi index cee08c8a9d72..3fb1b762e492 100644 --- a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi +++ b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi @@ -503,7 +503,7 @@ }; nand_controller: nand-controller@18028000 { - compatible = ...
76701239797698b620f2b7ec713fe08ef50ee664
Analyze and fix the following issue in the Linux kernel code: ARM: dts: BCM5301X: Describe PCIe controllers fully
Problem Details: Tested successfully on BCM47094 SoC using Linux's pcie-iproc-platform driver. This fixes: arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@12000: 'device_type' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml# arch/arm/boot/dts/broadcom/bcm4708-a...
```diff diff --git a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi index d0d5f7e52a91..cee08c8a9d72 100644 --- a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi +++ b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi @@ -95,7 +95,10 @@ axi@18000000 { compatible = "brcm,bus-axi"; reg = <0x18000000 ...
80ebada3dbcc811f3f64fc65e49d87857fe9272b
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: bcm2712: Add V3D device node
Problem Details: Commits 0ad5bc1ce463 ("drm/v3d: fix up register addresses for V3D 7.x") and 6fd9487147c4 ("drm/v3d: add brcm,2712-v3d as a compatible V3D device") added driver support for V3D on BCM2712, but the corresponding device tree node is still missing. Add the V3D device tree node to the BCM2712 DTS. Signed-...
```diff diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-base.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-base.dtsi index 04738bf281eb..dbfba51ebe91 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-base.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-base.dtsi @@ -252,3 +252,7 @@ &pci...
8ed8b02396172b137ca8c78c3cb999ddf4fb0bbf
Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Add debug prints for command submission
Problem Details: Add debug prints to help diagnose issues with incoming command submissions. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Link: https://patch.msgid.link/20260316175642.1451749-1-lizhi.hou@amd.com
```diff diff --git a/drivers/accel/amdxdna/aie2_message.c b/drivers/accel/amdxdna/aie2_message.c index fa2f33c322d4..798128b6b7b7 100644 --- a/drivers/accel/amdxdna/aie2_message.c +++ b/drivers/accel/amdxdna/aie2_message.c @@ -1002,7 +1002,7 @@ int aie2_cmdlist_multi_execbuf(struct amdxdna_hwctx *hwctx, struct amdxdn...
1fbc9b855f08f89ccf933324a5cbd8c53ee94d87
Analyze and fix the following issue in the Linux kernel code: livepatch/klp-build: add terminal color output
Problem Details: Improve the readability of klp-build output by implementing a basic color scheme. When the standard output and error are connected to a terminal, highlight status messages in bold and warning/error prefixes in yellow/red. Acked-by: Song Liu <song@kernel.org> Signed-off-by: Joe Lawrence <joe.lawrence@...
```diff diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build index dc0a23a8908b..d628e2c86078 100755 --- a/scripts/livepatch/klp-build +++ b/scripts/livepatch/klp-build @@ -52,6 +52,15 @@ PATCH_TMP_DIR="$TMP_DIR/tmp" KLP_DIFF_LOG="$DIFF_DIR/diff.log" +# Terminal output colors +read -r COLOR_RESET...
6f93f7b06810d04acc6b106a7d5ecd6000f80545
Analyze and fix the following issue in the Linux kernel code: livepatch/klp-build: Fix inconsistent kernel version
Problem Details: If .config hasn't been synced with auto.conf, any recent changes to CONFIG_LOCALVERSION* may not get reflected in the kernel version name. Use "make syncconfig" to force them to sync, and "make -s kernelrelease" to get the version instead of having to construct it manually. Fixes: 24ebfcd65a87 ("live...
```diff diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build index 809e198a561d..7b82c7503c2b 100755 --- a/scripts/livepatch/klp-build +++ b/scripts/livepatch/klp-build @@ -285,15 +285,14 @@ set_module_name() { # application from appending it with '+' due to a dirty git working tree. set_kernelversi...
b4a53519393521c68ec65f43bfebd64f178e6220
Analyze and fix the following issue in the Linux kernel code: livepatch/klp-build: fix shellcheck complaints
Problem Details: Fix or suppress the following shellcheck warnings: In klp-build line 57: command grep "$@" || true ^--^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). Fix the following warning: In klp-build line 565: local f...
```diff diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build index cf6c2bf694aa..374e1261fd7a 100755 --- a/scripts/livepatch/klp-build +++ b/scripts/livepatch/klp-build @@ -53,6 +53,7 @@ PATCH_TMP_DIR="$TMP_DIR/tmp" KLP_DIFF_LOG="$DIFF_DIR/diff.log" grep0() { + # shellcheck disable=SC2317 comman...
28e367a969b0c54c87ca655ec180715fe469fd14
Analyze and fix the following issue in the Linux kernel code: objtool/klp: fix mkstemp() failure with long paths
Problem Details: The elf_create_file() function fails with EINVAL when the build directory path is long enough to truncate the "XXXXXX" suffix in the 256-byte tmp_name buffer. Simplify the code to remove the unnecessary dirname()/basename() split and concatenation. Instead, allocate the exact number of bytes needed f...
```diff diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index 3da90686350d..2ffe3ebfbe37 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -16,7 +16,6 @@ #include <string.h> #include <unistd.h> #include <errno.h> -#include <libgen.h> #include <ctype.h> #include <linux/align.h> #include <linux/k...
2f2600decb3004938762a3f2d0eba3ea9e01045b
Analyze and fix the following issue in the Linux kernel code: objtool/klp: fix data alignment in __clone_symbol()
Problem Details: Commit 356e4b2f5b80 ("objtool: Fix data alignment in elf_add_data()") corrected the alignment of data within a section (honoring the section's sh_addralign). Apply the same alignment when klp-diff mode clones a symbol, adjusting the new symbol's offset for the output section's sh_addralign. Fixes: dd...
```diff diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c index a3198a63c2f0..c2c4e4968bc2 100644 --- a/tools/objtool/klp-diff.c +++ b/tools/objtool/klp-diff.c @@ -14,6 +14,7 @@ #include <objtool/util.h> #include <arch/special.h> +#include <linux/align.h> #include <linux/objtool_types.h> #include <...
29ab768277617452d88c0607c9299cdc63b6e9ff
Analyze and fix the following issue in the Linux kernel code: PM: runtime: Fix a race condition related to device removal
Problem Details: The following code in pm_runtime_work() may dereference the dev->parent pointer after the parent device has been freed: /* Maybe the parent is now able to suspend. */ if (parent && !parent->power.ignore_children) { spin_unlock(&dev->power.lock); spin_lock(&parent->power.lock); rpm_idle(parent...
```diff diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 0ee8ea971aa4..335288e8b5b3 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -1895,6 +1895,7 @@ void pm_runtime_reinit(struct device *dev) void pm_runtime_remove(struct device *dev) { __pm_runtime_di...
f4c31b07b136839e0fb3026f8a5b6543e3b14d2f
Analyze and fix the following issue in the Linux kernel code: sched: idle: Consolidate the handling of two special cases
Problem Details: There are two special cases in the idle loop that are handled inconsistently even though they are analogous. The first one is when a cpuidle driver is absent and the default CPU idle time power management implemented by the architecture code is used. In that case, the scheduler tick is stopped every t...
```diff diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index b95449165122..a83be0c834dd 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -161,6 +161,14 @@ static int call_cpuidle(struct cpuidle_driver *drv, struct cpuidle_device *dev, return cpuidle_enter(drv, dev, next_state); } +static void ...
3f174274d2249342df00d43fdef25511c3d3565a
Analyze and fix the following issue in the Linux kernel code: spi: fix misleading controller deregistration kernel-doc
Problem Details: The controller reference count is not decremented on deregistration if the controller has been allocated using devm_spi_alloc_host/target(). Amend the kernel-doc for devm_spi_register_controller() and spi_unregister_controller() so that it reflects this (more recent) behaviour. Fixes: 5e844cc37a5c ("...
```diff diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 34aca18a96d8..b5e2f1e1a89e 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3523,7 +3523,8 @@ static void devm_spi_unregister_controller(void *ctlr) * Context: can sleep * * Register a SPI device as with spi_register_controller() which wil...
edc463d72d697ff22da8ba96c0fcb25f3586d9a2
Analyze and fix the following issue in the Linux kernel code: spi: fix misleading controller registration kernel-doc
Problem Details: The controller reference count is not decremented on registration failures (and has not been for a very long time) contrary to what the outdated kernel-doc says. Drop the entire sentence about return values which are now documented in the Return section. Fixes: b885244eb262 ("[PATCH] spi: add spi_dri...
```diff diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index bfc42b75549a..34aca18a96d8 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3388,8 +3388,8 @@ static int spi_controller_id_alloc(struct spi_controller *ctlr, int start, int e * device identification, boards need configuration tables telling wh...
dee0774bbb2abb172e9069ce5ffef579b12b3ae9
Analyze and fix the following issue in the Linux kernel code: spi: fix statistics allocation
Problem Details: The controller per-cpu statistics is not allocated until after the controller has been registered with driver core, which leaves a window where accessing the sysfs attributes can trigger a NULL-pointer dereference. Fix this by moving the statistics allocation to controller allocation while tying its l...
```diff diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 9b2e307dc30a..53dee314d76a 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3049,6 +3049,8 @@ static void spi_controller_release(struct device *dev) struct spi_controller *ctlr; ctlr = container_of(dev, struct spi_controller, dev); + + fre...
8634e05b08ead636e926022f4a98416e13440df9
Analyze and fix the following issue in the Linux kernel code: spi: fix use-after-free on controller registration failure
Problem Details: Make sure to deregister from driver core also in the unlikely event that per-cpu statistics allocation fails during controller registration to avoid use-after-free (of driver resources) and unclocked register accesses. Fixes: 6598b91b5ac3 ("spi: spi.c: Convert statistics to per-cpu u64_stats_t") Cc: s...
```diff diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 61f7bde8c7fb..9b2e307dc30a 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3480,10 +3480,8 @@ int spi_register_controller(struct spi_controller *ctlr) dev_info(dev, "controller is unqueued, this is deprecated\n"); } else if (ctlr->transfer...
804dce6c73fdfa44184ee4e8b09abad7f5da408f
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl_easrc: fix comment typo
Problem Details: The file contains a spelling error in a source comment (funciton). Typos in comments reduce readability and make text searches less reliable for developers and maintainers. Replace 'funciton' with 'function' in the affected comment. This is a comment-only cleanup and does not change behavior. Fixes:...
```diff diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index 6c56134c60cc..599e439b359a 100644 --- a/sound/soc/fsl/fsl_easrc.c +++ b/sound/soc/fsl/fsl_easrc.c @@ -1286,7 +1286,7 @@ static int fsl_easrc_request_context(int channels, struct fsl_asrc_pair *ctx) /* * Release the context * - * This ...
d51c60a498e83c9a79884c8e420f97e3885c9583
Analyze and fix the following issue in the Linux kernel code: media: saa7164: add ioremap return checks and cleanups
Problem Details: Add checks for ioremap return values in saa7164_dev_setup(). If ioremap for BAR0 or BAR2 fails, release the already allocated PCI memory regions, remove the device from the global list, decrement the device count, and return -ENODEV. This prevents potential null pointer dereferences and ensures proper...
```diff diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 74406d5ea0a5..6bcde506adf5 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -888,6 +888,15 @@ static int get_resources(struct saa7164_dev *dev) return -...
2008fb257323cdb0870d070f1c599bc3fed4be9b
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix slab-out-of-bounds in scx_alloc_and_add_sched()
Problem Details: ancestors[] is a flexible array member that needs level + 1 slots to hold all ancestors including self (indices 0..level), but kzalloc_flex() only allocates `level` slots: sch = kzalloc_flex(*sch, ancestors, level); ... sch->ancestors[level] = sch; /* one past the end */ For the root scheduler...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index b942918fa364..ab8150b8de57 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -6365,7 +6365,7 @@ static struct scx_sched *scx_alloc_and_add_sched(struct sched_ext_ops *ops, s32 level = parent ? parent->level + 1 : 0; s32 node, cpu, ret, byp...
0bdf27abaf8940592207be939142451436afe39f
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: add quirk for ASUS Strix G16 G615JMR
Problem Details: The machine is equipped with ALC294 and requires the ALC287_FIXUP_TXNW2781_I2C_ASUS quirk for the amplifier to work properly. Since the machine's PCI SSID is also 1043:1204, HDA_CODEC_QUIRK is used to retain the previous quirk. Link: https://bugzilla.kernel.org/show_bug.cgi?id=221173 Cc: <stable@vger....
```diff diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 190c1dd11bee..327f4dc1b09f 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -7204,6 +7204,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x115d, "A...
a6919f2a01f8fbf807b015e5b26aecae7db8117b
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Sequence GPIO2 on Star Labs StarFighter
Problem Details: The initial StarFighter quirk fixed the runtime suspend pop by muting speakers in the shutup callback before power-down. Further hardware validation showed that the speaker path is controlled directly by LINE2 EAPD on NID 0x1b together with GPIO2 for the external amplifier. Replace the shutup-delay wo...
```diff diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 7294298fce4a..190c1dd11bee 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -1017,12 +1017,30 @@ static int alc269_resume(struct hda_codec *codec) return 0; } -#define STARLABS_...
1d123587525db86cc8f0d2beb35d9e33ca3ade83
Analyze and fix the following issue in the Linux kernel code: drm/xe: Skip over non leaf pte for PRL generation
Problem Details: The check using xe_child->base.children was insufficient in determining if a pte was a leaf node. So explicitly skip over every non-leaf pt and conditionally abort if there is a scenario where a non-leaf pt is interleaved between leaf pt, which results in the page walker skipping over some leaf pt. No...
```diff diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c index 13b355fadd58..2d9ce2c4cb4f 100644 --- a/drivers/gpu/drm/xe/xe_pt.c +++ b/drivers/gpu/drm/xe/xe_pt.c @@ -1655,14 +1655,35 @@ static int xe_pt_stage_unbind_entry(struct xe_ptw *parent, pgoff_t offset, XE_WARN_ON(!level); /* Check for l...
e882626c1747653f1f01ea9d12e278e613b11d0f
Analyze and fix the following issue in the Linux kernel code: mtd: parsers: ofpart: call of_node_get() for dedicated subpartitions
Problem Details: In order to parse sub-partitions, add_mtd_partitions() calls parse_mtd_partitions() for all previously found partitions. Each partition will end up being passed to parse_fixed_partitions(), and its of_node will be treated as the ofpart_node. Commit 7cce81df7d26 ("mtd: parsers: ofpart: fix OF node ref...
```diff diff --git a/drivers/mtd/parsers/ofpart_core.c b/drivers/mtd/parsers/ofpart_core.c index 181ae9616b2e..262c4221d23f 100644 --- a/drivers/mtd/parsers/ofpart_core.c +++ b/drivers/mtd/parsers/ofpart_core.c @@ -75,7 +75,7 @@ static int parse_fixed_partitions(struct mtd_info *master, dedicated = false; } } ...
0c87dea1aab86116211cb37387c404c9e9231c39
Analyze and fix the following issue in the Linux kernel code: mtd: parsers: ofpart: call of_node_put() only in ofpart_fail path
Problem Details: ofpart_none can only be reached after the for_each_child_of_node() loop finishes. for_each_child_of_node() correctly calls of_node_put() for all device nodes it iterates over as long as we don't break or jump out of the loop. Calling of_node_put() inside the ofpart_none path will wrongly decrement the...
```diff diff --git a/drivers/mtd/parsers/ofpart_core.c b/drivers/mtd/parsers/ofpart_core.c index 0029bda165bd..181ae9616b2e 100644 --- a/drivers/mtd/parsers/ofpart_core.c +++ b/drivers/mtd/parsers/ofpart_core.c @@ -195,11 +195,11 @@ static int parse_fixed_partitions(struct mtd_info *master, ofpart_fail: pr_err("%s: ...
54f955ba09367eb9abad6c4afd3bb81c2b7e0b54
Analyze and fix the following issue in the Linux kernel code: mtd: physmap: Drop leftovers of removed code for Baikal SoC
Problem Details: The previous clean up killed the driver along with dropping some calls but missed one place to drop. Do it here. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202603121229.PPSg4X8q-lkp@intel.com/ Reported-by: Mark Brown <broonie@kernel.org> Closes: https:...
```diff diff --git a/drivers/mtd/maps/physmap-core.c b/drivers/mtd/maps/physmap-core.c index 2e31c30d266c..dcda7685fc99 100644 --- a/drivers/mtd/maps/physmap-core.c +++ b/drivers/mtd/maps/physmap-core.c @@ -364,10 +364,6 @@ static int physmap_flash_of_init(struct platform_device *dev) info->maps[i].bankwidth = bankw...
202e42e4aa890172366354b233c42c73107a3f59
Analyze and fix the following issue in the Linux kernel code: s390/bpf: Zero-extend bpf prog return values and kfunc arguments
Problem Details: s390x ABI requires callers to zero-extend unsigned arguments and sign-extend signed arguments, and callees to zero-extend unsigned return values and sign-extend signed return values. s390 BPF JIT currently implements only sign extension. Fix this omission and implement zero extension too. Fixes: 528e...
```diff diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 1f9a6b728beb..d08d159b6319 100644 --- a/arch/s390/net/bpf_jit_comp.c +++ b/arch/s390/net/bpf_jit_comp.c @@ -830,25 +830,34 @@ static int bpf_jit_probe_post(struct bpf_jit *jit, struct bpf_prog *fp, } /* - * Sign-extend the regist...
ab5119735e984f6b724ef1b699c01479949ed1de
Analyze and fix the following issue in the Linux kernel code: KVM: s390: vsie: Avoid injecting machine check on signal
Problem Details: The recent XFER_TO_GUEST_WORK change resulted in a situation, where the vsie code would interpret a signal during work as a machine check during SIE as both use the EINTR return code. The exit_reason of the sie64a function has nothing to do with the kvm_run exit_reason. Rename it and define a specific ...
```diff diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 64a50f0862aa..3039c88daa63 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h @@ -710,6 +710,9 @@ void kvm_arch_crypto_clear_masks(struct kvm *kvm); void kvm_arch_crypto_set_masks(struct kvm...
1ca90f4ae554034d96764577196d8dd0c3bcd05e
Analyze and fix the following issue in the Linux kernel code: KVM: s390: log machine checks more aggressively
Problem Details: KVM will reinject machine checks that happen during guest activity. From a host perspective this machine check is no longer visible and even for the guest, the guest might decide to only kill a userspace program or even ignore the machine check. As this can be a disruptive event nevertheless, we should...
```diff diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 1a702e8ef574..7cb8ce833b62 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -2827,6 +2827,12 @@ void kvm_s390_reinject_machine_check(struct kvm_vcpu *vcpu, int rc; mci.val = mcck_info->mcic; + + /* log machin...
dcf96f7ad556d84d460e5f5cf06061eb1a13c272
Analyze and fix the following issue in the Linux kernel code: KVM: s390: Limit adapter indicator access to mapped page
Problem Details: While we check the address for errors, we don't seem to check the bit offsets and since they are 32 and 64 bits a lot of memory can be reached indirectly via those offsets. Fixes: 84223598778b ("KVM: s390: irq routing for adapter interrupts.") Suggested-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Re...
```diff diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 18932a65ca68..1a702e8ef574 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -2724,6 +2724,9 @@ static unsigned long get_ind_bit(__u64 addr, unsigned long bit_nr, bool swap) bit = bit_nr + (addr % PAGE_SIZE) * 8...
b00be77302d7ec4ad0367bb236494fce7172b730
Analyze and fix the following issue in the Linux kernel code: s390/mm: Add missing secure storage access fixups for donated memory
Problem Details: There are special cases where secure storage access exceptions happen in a kernel context for pages that don't have the PG_arch_1 bit set. That bit is set for non-exported guest secure storage (memory) but is absent on storage donated to the Ultravisor since the kernel isn't allowed to export donated p...
```diff diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index a52aa7a99b6b..191cc53caead 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -441,10 +441,17 @@ void do_secure_storage_access(struct pt_regs *regs) folio = phys_to_folio(addr); if (unlikely(!folio_try_get(folio))) return; - ...
c6cb77c474a32265e21c4871c7992468bf5e7638
Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Don't overwrite KMS surface dirty tracker
Problem Details: We were overwriting the surface's dirty tracker here causing a memory leak. Reported-by: Mika Penttilä <mpenttil@redhat.com> Closes: https://lore.kernel.org/dri-devel/8c53f3c6-c6de-46fe-a8ca-d98dd52b3abe@redhat.com/ Fixes: 965544150d1c ("drm/vmwgfx: Refactor cursor handling") Signed-off-by: Ian Forbes...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 55730e29d3ae..e7bddf840a79 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -771,7 +771,8 @@ err_out: ret = vmw_bo_dirty_add(bo); if (!ret && surface && surface->res.fu...
c7feff27ea0a34540b4820abd0cdf0b5100516d4
Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: fix kernel-doc warnings in vmwgfx_drv.h
Problem Details: Fix 45+ kernel-doc warnings in vmwgfx_drv.h: - spell a struct name correctly - don't have structs between kernel-doc and its struct - end description of struct members with ':' - start all kernel-doc lines with " *" - mark private struct member and enum value with "private:" - add kernel-doc for enum v...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index f2abaf1bda6a..57465f69c687 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h @@ -96,12 +96,17 @@ struct vmwgfx_hash_item { struct vmw_res_func; +struct vmw_bo; +struct vmw_b...
e570593b568f74b8d8367d094400d71bc398118f
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Clean up the WMI Unit Test command interface
Problem Details: Currently, ath12k_wmi_send_unit_test_cmd() provides the interface to send a Unit Test command to firmware. The payload for the command is passed in two separate parameters, struct wmi_unit_test_cmd ut_cmd and u32 *test_args. This interface is strange in that it passes the ut_cmd structure by value in...
```diff diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 8e13c3ec1cc7..8379aa8fe091 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -10027,50 +10027,46 @@ static int ath12k_connect_pdev_htc_service(struct ath12k_base *ab, ...
8ea21435fe36fb853706f4935d78bc11beb63fb4
Analyze and fix the following issue in the Linux kernel code: media: pci: zoran: fix potential memory leak in zoran_probe()
Problem Details: The memory allocated for codec in videocodec_attach() is not freed in one of the error paths, due to an incorrect goto label. Fix the label to free it on error. Fixes: 8f7cc5c0b0eb ("media: staging: media: zoran: introduce zoran_i2c_init") Cc: stable@vger.kernel.org Signed-off-by: Abdun Nihaal <nihaal...
```diff diff --git a/drivers/media/pci/zoran/zoran_card.c b/drivers/media/pci/zoran/zoran_card.c index d81facf735d9..f707bdc1fb0f 100644 --- a/drivers/media/pci/zoran/zoran_card.c +++ b/drivers/media/pci/zoran/zoran_card.c @@ -1373,7 +1373,7 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *en...
a66485a934c7187ae8e36517d40615fa2e961cff
Analyze and fix the following issue in the Linux kernel code: media: em28xx: fix use-after-free in em28xx_v4l2_open()
Problem Details: em28xx_v4l2_open() reads dev->v4l2 without holding dev->lock, creating a race with em28xx_v4l2_init()'s error path and em28xx_v4l2_fini(), both of which free the em28xx_v4l2 struct and set dev->v4l2 to NULL under dev->lock. This race leads to two issues: - use-after-free in v4l2_fh_init() when access...
```diff diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index b0c184f237a7..5f13f63fbdee 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -2126,7 +2126,7 @@ static int em28xx_v4l2_open(struct file *filp) { struct vide...
323f52e02be68889c8630c4a0415ef5b78f9dc63
Analyze and fix the following issue in the Linux kernel code: media: pulse8-cec: Handle partial deinit
Problem Details: In the event that the cec dev node is held open while the adapter is disconnected the serio device will be cleaned up but the cec device won't be. As the serio device is freed but the ping_eeprom_work is not canceled, the next ping will still attempt to send, leading to a kernel oops. This patch both ...
```diff diff --git a/drivers/media/cec/usb/pulse8/pulse8-cec.c b/drivers/media/cec/usb/pulse8/pulse8-cec.c index 0df3af152762..fa5df1062753 100644 --- a/drivers/media/cec/usb/pulse8/pulse8-cec.c +++ b/drivers/media/cec/usb/pulse8/pulse8-cec.c @@ -235,6 +235,9 @@ static int pulse8_send_and_wait_once(struct pulse8 *pulse...
68380ec2161ee61ce4f23001dfb536bbaa8f4979
Analyze and fix the following issue in the Linux kernel code: media: cx231xx: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index b64a37d1acf4..b75535d6abaf 100644 --- a/drivers/media/usb/cx231xx/cx231xx-cards.c +++ b/drivers/media/usb/cx231xx/cx231xx-cards.c @@ -1369,8 +1369,6 @@ void cx231xx_release_resources(struct cx231xx *dev) ...
dbc6798b80481a20f9aff671bc4d529eae63c9e8
Analyze and fix the following issue in the Linux kernel code: media: usbtv: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/media/usb/usbtv/usbtv-core.c b/drivers/media/usb/usbtv/usbtv-core.c index c4bfadbe63c9..6c4facf4f41a 100644 --- a/drivers/media/usb/usbtv/usbtv-core.c +++ b/drivers/media/usb/usbtv/usbtv-core.c @@ -91,7 +91,7 @@ static int usbtv_probe(struct usb_interface *intf, if (usbtv == NULL) retu...
64f47fca95c307c569adb7fec48ffc2891e3b209
Analyze and fix the following issue in the Linux kernel code: media: go7007-loader: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/media/usb/go7007/go7007-loader.c b/drivers/media/usb/go7007/go7007-loader.c index 243aa0ad074c..5747e6e4f2d6 100644 --- a/drivers/media/usb/go7007/go7007-loader.c +++ b/drivers/media/usb/go7007/go7007-loader.c @@ -41,9 +41,7 @@ static int go7007_loader_probe(struct usb_interface *interface,...
f8e1fc918a9fe67103bcda01d20d745f264d00a7
Analyze and fix the following issue in the Linux kernel code: media: vidtv: fix NULL pointer dereference in vidtv_channel_pmt_match_sections
Problem Details: syzbot reported a general protection fault in vidtv_psi_desc_assign [1]. vidtv_psi_pmt_stream_init() can return NULL on memory allocation failure, but vidtv_channel_pmt_match_sections() does not check for this. When tail is NULL, the subsequent call to vidtv_psi_desc_assign(&tail->descriptor, desc) de...
```diff diff --git a/drivers/media/test-drivers/vidtv/vidtv_channel.c b/drivers/media/test-drivers/vidtv/vidtv_channel.c index da20657adc74..5f8c3af87171 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_channel.c +++ b/drivers/media/test-drivers/vidtv/vidtv_channel.c @@ -341,6 +341,10 @@ vidtv_channel_pmt_match_sect...
a0e5a598fe9a4612b852406b51153b881592aede
Analyze and fix the following issue in the Linux kernel code: media: vidtv: fix nfeeds state corruption on start_streaming failure
Problem Details: syzbot reported a memory leak in vidtv_psi_service_desc_init [1]. When vidtv_start_streaming() fails inside vidtv_start_feed(), the nfeeds counter is left incremented even though no feed was actually started. This corrupts the driver state: subsequent start_feed calls see nfeeds > 1 and skip starting ...
```diff diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c index b6203e10e37a..a8a76434989c 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c @@ -237,8 +237,10 @@ static int vidtv_start_feed(stru...
5f8e73bde67e931468bc2a1860d78d72f0c6ba41
Analyze and fix the following issue in the Linux kernel code: media: vidtv: fix pass-by-value structs causing MSAN warnings
Problem Details: vidtv_ts_null_write_into() and vidtv_ts_pcr_write_into() take their argument structs by value, causing MSAN to report uninit-value warnings. While only vidtv_ts_null_write_into() has triggered a report so far, both functions share the same issue. Fix by passing both structs by const pointer instead, a...
```diff diff --git a/drivers/media/test-drivers/vidtv/vidtv_mux.c b/drivers/media/test-drivers/vidtv/vidtv_mux.c index 403fbedb8663..f0134e38a1fb 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_mux.c +++ b/drivers/media/test-drivers/vidtv/vidtv_mux.c @@ -233,7 +233,7 @@ static u32 vidtv_mux_push_pcr(struct vidtv_mu...
dde3c37af95cd6fa301c4906f33d627bc9dd874c
Analyze and fix the following issue in the Linux kernel code: media: dib8000: avoid division by 0 in dib8000_set_dds()
Problem Details: In dib8000_set_dds(), 1 << 26 (67108864) divided by e.g. 1 apparently can't fit into 16-bit variable unit_khz_dds_val, being truncated to 0; this will cause division by 0 while calling dprintk() with debugging enabled (via the module parameter). Use s32 instead of s16 to declare the variable, getting ...
```diff diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c index ebef27bcc989..d291113291e0 100644 --- a/drivers/media/dvb-frontends/dib8000.c +++ b/drivers/media/dvb-frontends/dib8000.c @@ -2695,7 +2695,7 @@ static void dib8000_viterbi_state(struct dib8000_state *state, u8 onoff...
f7a4c78bfeb320299c1b641500fe7761eadbd101
Analyze and fix the following issue in the Linux kernel code: HID: logitech-hidpp: Prevent use-after-free on force feedback initialisation failure
Problem Details: Presently, if the force feedback initialisation fails when probing the Logitech G920 Driving Force Racing Wheel for Xbox One, an error number will be returned and propagated before the userspace infrastructure (sysfs and /dev/input) has been torn down. If userspace ignores the errors and continues to ...
```diff diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index c3d53250a760..65bfad405ac5 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -4487,10 +4487,12 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id) if (!r...
2b658c1c442ec1cd9eec5ead98d68662c40fe645
Analyze and fix the following issue in the Linux kernel code: HID: bpf: prevent buffer overflow in hid_hw_request
Problem Details: right now the returned value is considered to be always valid. However, when playing with HID-BPF, the return value can be arbitrary big, because it's the return value of dispatch_hid_bpf_raw_requests(), which calls the struct_ops and we have no guarantees that the value makes sense. Fixes: 8bd0488b5e...
```diff diff --git a/drivers/hid/bpf/hid_bpf_dispatch.c b/drivers/hid/bpf/hid_bpf_dispatch.c index 892aca026ffa..33af17fdc729 100644 --- a/drivers/hid/bpf/hid_bpf_dispatch.c +++ b/drivers/hid/bpf/hid_bpf_dispatch.c @@ -444,6 +444,8 @@ hid_bpf_hw_request(struct hid_bpf_ctx *ctx, __u8 *buf, size_t buf__sz, (u...
5d4c6c132ea9a967d48890dd03e6a786c060e968
Analyze and fix the following issue in the Linux kernel code: selftests/hid: fix compilation when bpf_wq and hid_device are not exported
Problem Details: This can happen in situations when CONFIG_HID_SUPPORT is set to no, or some complex situations where struct bpf_wq is not exported. So do the usual dance of hiding them before including vmlinux.h, and then redefining them and make use of CO-RE to have the correct offsets. Reported-by: kernel test rob...
```diff diff --git a/tools/testing/selftests/hid/progs/hid_bpf_helpers.h b/tools/testing/selftests/hid/progs/hid_bpf_helpers.h index 80ab60905865..cdca912f3afd 100644 --- a/tools/testing/selftests/hid/progs/hid_bpf_helpers.h +++ b/tools/testing/selftests/hid/progs/hid_bpf_helpers.h @@ -6,8 +6,10 @@ #define __HID_BPF_H...
dad98c5b2a05ef744af4c884c97066a3c8cdad61
Analyze and fix the following issue in the Linux kernel code: jfs: avoid -Wtautological-constant-out-of-range-compare warning again
Problem Details: The comparison of an __s8 value against DTPAGEMAXSLOT is still trivially true, causing a harmless (default disabled) warning with clang: fs/jfs/jfs_dtree.c:4419:25: error: result of comparison of constant 128 with expression of type 's8' (aka 'signed char') is always false [-Werror,-Wtautological-cons...
```diff diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index 7669e268fe35..ac0f79fafaca 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c @@ -4412,11 +4412,8 @@ bool check_dtpage(dtpage_t *p) } } else { int fsi; - /* When there are free slots, freelist must be a valid slot index in - * 1~DTROOTM...
5e3486e64094c28a526543f1e8aa0d5964b7f02d
Analyze and fix the following issue in the Linux kernel code: mmc: sdhci: fix timing selection for 1-bit bus width
Problem Details: When 1-bit bus width is used with HS200/HS400 capabilities set, mmc_select_hs200() returns 0 without actually switching. This causes mmc_select_timing() to skip mmc_select_hs(), leaving eMMC in legacy mode (26MHz) instead of High Speed SDR (52MHz). Per JEDEC eMMC spec section 5.3.2, 1-bit mode support...
```diff diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ac7e11f37af7..fec9329e1edb 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -4532,8 +4532,15 @@ int sdhci_setup_host(struct sdhci_host *host) * their platform code before calling sdhci_add_host(), and we * won't ...
e98f926e5a2d8023a74ec2ba7a973b5d76610f4e
Analyze and fix the following issue in the Linux kernel code: mmc: core: Validate UHS/DDR/HS200 timing selection for 1-bit bus width
Problem Details: UHS/DDR/HS200 modes require at least 4-bit bus support. Host controllers that lack relevant capability registers rely on paring properties provided by firmware, which may incorrectly set these modes. Now that mmc_validate_host_caps() has been introduced to validate such configuration violations, let's ...
```diff diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 88c95dbfd9cf..a457c88fdcbc 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -624,12 +624,24 @@ static int mmc_validate_host_caps(struct mmc_host *host) return -EINVAL; } + /* UHS/DDR/HS200 modes require at least 4-b...
ba3402f6c85bbeee5c11732c3aa4050a717e8f8f
Analyze and fix the following issue in the Linux kernel code: spi: geni-qcom: Fix CPHA and CPOL mode change detection
Problem Details: setup_fifo_params computes mode_changed from spi->mode flags but tests it against SE_SPI_CPHA and SE_SPI_CPOL, which are register offsets, not SPI mode bits. This causes CPHA and CPOL updates to be skipped on mode switches, leaving the controller with stale clock phase and polarity settings. Fix this ...
```diff diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c index 43ce47f2454c..772b7148ba5f 100644 --- a/drivers/spi/spi-geni-qcom.c +++ b/drivers/spi/spi-geni-qcom.c @@ -359,9 +359,9 @@ static int setup_fifo_params(struct spi_device *spi_slv, writel((spi_slv->mode & SPI_LOOP) ? LOOPBACK_ENABLE :...
09e70e4f119ff650d24c96161fd2f62ac7e424b0
Analyze and fix the following issue in the Linux kernel code: regmap: Synchronize cache for the page selector
Problem Details: If the selector register is represented in each page, its value according to the debugfs is stale because it gets synchronized only after the real page switch happens. Hence the regmap cache initialisation from the HW inherits outdated data in the selector register. Synchronize cache for the page sele...
```diff diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 607c1246d994..e388b19850e3 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1545,6 +1545,7 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg, unsigned int val_num) { ...
1ef3e1c278eb7bda1cc09a508c3fe65d2e567c77
Analyze and fix the following issue in the Linux kernel code: regmap: Synchronize cache for the page selector
Problem Details: If the selector register is represented in each page, its value according to the debugfs is stale because it gets synchronized only after the real page switch happens. Hence the regmap cache initialisation from the HW inherits outdated data in the selector register. Synchronize cache for the page sele...
```diff diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index f888a83aa9c3..b2b26f07f4e3 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1542,6 +1542,7 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg, unsigned int val_num) { ...
dc3b90751d6ffa8865e09a81645a539b9de6d642
Analyze and fix the following issue in the Linux kernel code: kbuild: Reduce the number of compiler-generated suffixes for clang thin-lto build
Problem Details: The current clang thin-lto build often produces lots of symbols with suffix. The following is a partial list of such function call symbols: ... ethnl_module_fw_flash_ntf.llvm.7631589765585346066 __nf_conntrack_alloc.llvm.6438426151906658917 tcp_can_early_drop.llvm.11937612064648250727 ...
```diff diff --git a/Makefile b/Makefile index 1d5c0ab9ed5c..6b8e9fca2752 100644 --- a/Makefile +++ b/Makefile @@ -1045,6 +1045,7 @@ endif ifdef CONFIG_LTO_CLANG ifdef CONFIG_LTO_CLANG_THIN CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit +KBUILD_LDFLAGS += $(call ld-option,--lto-whole-program-visibility -mllvm -always-r...
756a0e011cfca0b45a48464aa25b05d9a9c2fb0b
Analyze and fix the following issue in the Linux kernel code: locking: Fix rwlock support in <linux/spinlock_up.h>
Problem Details: Architecture support for rwlocks must be available whether or not CONFIG_DEBUG_SPINLOCK has been defined. Move the definitions of the arch_{read,write}_{lock,trylock,unlock}() macros such that these become visbile if CONFIG_DEBUG_SPINLOCK=n. This patch prepares for converting do_raw_{read,write}_trylo...
```diff diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index 1e84e71ca495..3a50976471d7 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h @@ -48,16 +48,6 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock) lock->slock = 1; } -/* - * Read-write spinlocks. N...
891626973b2faf468565a253ca55373e0b9675de
Analyze and fix the following issue in the Linux kernel code: lockdep: Raise default stack trace limits when KASAN is enabled
Problem Details: KASAN-enabled kernels with LOCKDEP and PREEMPT_FULL hit "BUG: MAX_STACK_TRACE_ENTRIES too low!" within 9-23 hours of normal desktop use. The root cause is a feedback loop between KASAN slab tracking and lockdep: every KASAN-tracked slab allocation saves a stack trace via stack_trace_save() -> arch_sta...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 4e2dfbbd3d78..e51e3c5a6538 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1617,14 +1617,22 @@ config LOCKDEP_STACK_TRACE_BITS int "Size for MAX_STACK_TRACE_ENTRIES (as Nth power of 2)" depends on LOCKDEP && !LOCKDEP_SMALL range 10 26 + d...
acb38872d4cbec5b6825345d9d757e21d2d9d953
Analyze and fix the following issue in the Linux kernel code: jump_label: remove workaround for old compilers in initializations
Problem Details: The extra braces for the initialization of the anonymous union members were added in commit cd8d860dcce9 ("jump_label: Fix anonymous union initialization") to compensate for limitations in gcc < 4.6. Versions of gcc this old are not supported anymore, so drop the workaround. Signed-off-by: Thomas Wei...
```diff diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index e494b360d36d..b9c7b0ebf7b9 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -87,13 +87,6 @@ struct static_key { atomic_t enabled; #ifdef CONFIG_JUMP_LABEL /* - * Note: - * To make anonymous unions work wi...
68bcd8b6e0b10d902f7fc8bf3f08f335f5d1640e
Analyze and fix the following issue in the Linux kernel code: locking/rwsem: Fix logic error in rwsem_del_waiter()
Problem Details: Commit 1ea4b473504b ("locking/rwsem: Remove the list_head from struct rw_semaphore") introduced a logic error in rwsem_del_waiter(). The root cause of this issue is an inconsistency in the return values of __rwsem_del_waiter() and rwsem_del_waiter(). Specifically, __rwsem_del_waiter() returns true whe...
```diff diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c index ba4cb74de064..bf647097369c 100644 --- a/kernel/locking/rwsem.c +++ b/kernel/locking/rwsem.c @@ -370,7 +370,7 @@ bool __rwsem_del_waiter(struct rw_semaphore *sem, struct rwsem_waiter *waiter) { if (list_empty(&waiter->list)) { sem->first_wa...
77f58db7391e227f8ff6ef5d83966347d759daed
Analyze and fix the following issue in the Linux kernel code: ntfs: fix ignoring unreachable code warnings
Problem Details: Detected by Smatch. inode.c:1796 load_attribute_list_mount() warn: ignoring unreachable code. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
```diff diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index 0c202a03360f..314741a40369 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c @@ -1761,7 +1761,7 @@ static int load_attribute_list_mount(struct ntfs_volume *vol, /* The attribute list cannot be sparse. */ if (lcn < 0) { ntfs_error(sb, "ntfs_rl_vcn_t...
068a35fd7293c20ba35cc3f19ce981c038cc9328
Analyze and fix the following issue in the Linux kernel code: ntfs: fix inconsistent indenting warnings
Problem Details: Detected by Smatch. ndex.c:2041 ntfs_index_walk_up() warn: inconsistent indenting mft.c:2462 ntfs_mft_record_alloc() warn: inconsistent indenting Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
```diff diff --git a/fs/ntfs/index.c b/fs/ntfs/index.c index 42251bdb6f5a..2080f3969137 100644 --- a/fs/ntfs/index.c +++ b/fs/ntfs/index.c @@ -2007,43 +2007,43 @@ struct index_entry *ntfs_index_walk_down(struct index_entry *ie, struct ntfs_ind static struct index_entry *ntfs_index_walk_up(struct index_entry *ie, st...
4e59f8a1a82beaa49d7796648fc4dc538eff6485
Analyze and fix the following issue in the Linux kernel code: ntfs: fix variable dereferenced before check warnings
Problem Details: Detected by Smatch. lcnalloc.c:736 ntfs_cluster_alloc() error: we previously assumed 'rl' could be null (see line 719) inode.c:3275 ntfs_inode_close() warn: variable dereferenced before check 'tmp_nis' (see line 3255) attrib.c:4952 ntfs_attr_remove() warn: variable dereferenced before check 'n...
```diff diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index 7c523eb87894..1477dbd3af82 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c @@ -4941,23 +4941,19 @@ int ntfs_attr_exist(struct ntfs_inode *ni, const __le32 type, __le16 *name, int ntfs_attr_remove(struct ntfs_inode *ni, const __le32 type, __le16 *name,...
a73258681279bceb4e9210d86204bae14d3ea795
Analyze and fix the following issue in the Linux kernel code: ntfs: fix WSL ea restore condition
Problem Details: Use NTFS_VOL_GID(not NTFS_VOL_UID) for restoring the gid, and call ntfs_ea_get_wsl_inode() only when $EA_INFORMATION exists. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
```diff diff --git a/fs/ntfs/ea.c b/fs/ntfs/ea.c index 5b108d0ccec7..386eb0c5f303 100644 --- a/fs/ntfs/ea.c +++ b/fs/ntfs/ea.c @@ -368,7 +368,7 @@ int ntfs_ea_get_wsl_inode(struct inode *inode, dev_t *rdevp, unsigned int flags) i_uid_write(inode, le32_to_cpu(v)); } - if (!(flags & NTFS_VOL_UID)) { + if (!(flags ...
8c229b4aa00262c13787982e998c61c0783285e0
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Compute PSR entry_setup_frames into intel_crtc_state
Problem Details: PSR entry_setup_frames is currently computed directly into struct intel_dp:intel_psr:entry_setup_frames. This causes a problem if mode change gets rejected after PSR compute config: Psr_entry_setup_frames computed for this rejected state is in intel_dp:intel_psr:entry_setup_frame. Fix this by computing...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index e189f8c39ccb..d3a9ace4c9d1 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1188,6 +1188,7 @@ struct intel_crtc_s...
65852b56bfa929f99e28c96fd98b02058959da7f
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Disable PSR on update_m_n and update_lrr
Problem Details: PSR/PR parameters might change based on update_m_n or update_lrr. Disable on update_m_n and update_lrr to ensure proper parameters are taken into use on next PSR enable in intel_psr_post_plane_update. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15771 Fixes: 2bc98c6f97af ("drm/i915/...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 5041a5a138d1..7e0e4c3bf985 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3112,6 +3112,8 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *...
c03222d061fc5d150d696e7c3a91e58a620c7e65
Analyze and fix the following issue in the Linux kernel code: media: fimc: check return value of clk_enable in runtime_resume
Problem Details: In fimc_runtime_resume(), the return value of clk_enable(fimc->clock[CLK_GATE]) was not checked. If enabling the clock fails, subsequent register accesses (fimc_hw_reset() and capture/m2m resume) may trigger a bus error or undefined behavior. Fix this by checking the return value. If clk_enable() fail...
```diff diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-core.c b/drivers/media/platform/samsung/exynos4-is/fimc-core.c index 2c9edd0a559b..57e573949e54 100644 --- a/drivers/media/platform/samsung/exynos4-is/fimc-core.c +++ b/drivers/media/platform/samsung/exynos4-is/fimc-core.c @@ -1020,11 +1020,15 @@ err_s...
f3e969a5b54304cab6891a58d9dd8b29072bde4c
Analyze and fix the following issue in the Linux kernel code: media: ti: vpe: Add missing v4l2_device_unregister in vip_remove()
Problem Details: The v4l2_device is registered during probe but was not being unregistered during remove. Add the missing v4l2_device_unregister() call to properly clean up resources. Fixes: fc2873aa4a21 ("media: ti: vpe: Add the VIP driver") Cc: stable@vger.kernel.org Signed-off-by: Felix Gu <ustc.gu@gmail.com> Revie...
```diff diff --git a/drivers/media/platform/ti/vpe/vip.c b/drivers/media/platform/ti/vpe/vip.c index a4b616a5ece7..0e91e87bda9b 100644 --- a/drivers/media/platform/ti/vpe/vip.c +++ b/drivers/media/platform/ti/vpe/vip.c @@ -3641,6 +3641,7 @@ static void vip_remove(struct platform_device *pdev) } v4l2_ctrl_handler_...
7254b31a13aaa0c2c0f9ffbc335b718656117ff4
Analyze and fix the following issue in the Linux kernel code: media: videobuf2: Set vma_flags in vb2_dma_sg_mmap
Problem Details: vb2_dma_contig sets VMA flags VM_DONTEXPAND and VM_DONTDUMP and I do not see a reason why vb2_dma_sg should behave differently. This avoids hitting `WARN_ON(!(vma->vm_flags & VM_DONTEXPAND));` in drm_gem_mmap_obj() during mmap() of an imported dma-buf from the out of tree Apple ISP camera capture drive...
```diff diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c index 982021d547e5..b1d0695cda26 100644 --- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c +++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c @@ -345,6 +345,7 @@ static int vb2_dma_sg_mma...
d8944192615e3f0bb00a64dfe2e93edbb6e0a5f9
Analyze and fix the following issue in the Linux kernel code: media: docs: Fix typo 'hardwares' to 'hardware'
Problem Details: Fix incorrect plural form of the uncountable noun 'hardware' in the legacy DVB audio documentation. Signed-off-by: Nauman Sabir <officialnaumansabir@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
```diff diff --git a/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst b/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst index 81b762ef17c4..99ffda355204 100644 --- a/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst +++ b/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst @@ -444,7...
678f946b40586a276421b2b4b6201665d6709119
Analyze and fix the following issue in the Linux kernel code: gpib: ni_usb: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/gpib/ni_usb/ni_usb_gpib.c b/drivers/gpib/ni_usb/ni_usb_gpib.c index a24cd6521362..0bbc13ecebf9 100644 --- a/drivers/gpib/ni_usb/ni_usb_gpib.c +++ b/drivers/gpib/ni_usb/ni_usb_gpib.c @@ -2431,7 +2431,6 @@ static int ni_usb_driver_probe(struct usb_interface *interface, const struct usb stat...
d35da40ec364ff9e763e7fd3198ca14cf39d39bf
Analyze and fix the following issue in the Linux kernel code: gpib: agilent_82357a: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/gpib/agilent_82357a/agilent_82357a.c b/drivers/gpib/agilent_82357a/agilent_82357a.c index e1349afbf933..770ba6eb40d1 100644 --- a/drivers/gpib/agilent_82357a/agilent_82357a.c +++ b/drivers/gpib/agilent_82357a/agilent_82357a.c @@ -1479,7 +1479,7 @@ static int agilent_82357a_driver_probe(stru...
bf3e24a9bff52303f5058c83cc6c7d7b2ef4958f
Analyze and fix the following issue in the Linux kernel code: gpib: lpvo_usb: rename driver symbol prefix
Problem Details: The LPVO driver apparently includes a more or less verbatim copy of the USB skeleton driver. Replace the "skel_" symbol prefix with "lpvo_" and rename the "usb_skel" struct "lpvo" to avoid symbol name clashes and make this a bit more palatable. Signed-off-by: Johan Hovold <johan@kernel.org> Link: htt...
```diff diff --git a/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c b/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c index ee781d2f0b8e..389dde5a8481 100644 --- a/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +++ b/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c @@ -51,10 +51,10 @@ MODULE_DESCRIPTION("GPIB driver for LPVO usb devices"...
6f770b73d0311a5b099277653199bb6421c4fed2
Analyze and fix the following issue in the Linux kernel code: dma: swiotlb: add KMSAN annotations to swiotlb_bounce()
Problem Details: When a device performs DMA to a bounce buffer, KMSAN is unaware of the write and does not mark the data as initialized. When swiotlb_bounce() later copies the bounce buffer back to the original buffer, memcpy propagates the uninitialized shadow to the original buffer, causing false positive uninit-val...
```diff diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index d8e6f1d889d5..9fd73700ddcf 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -30,6 +30,7 @@ #include <linux/gfp.h> #include <linux/highmem.h> #include <linux/io.h> +#include <linux/kmsan-checks.h> #include <linux/iommu-helper.h> #...
4bc7bc457922742d38915458e630195e761c1efd
Analyze and fix the following issue in the Linux kernel code: HID: intel-thc-hid: Set HID_PHYS with PCI BDF
Problem Details: Currently HID_PHYS is empty, which means userspace tools (e.g. fwupd) that depend on it for distinguishing the devices, are unable to do so. Other drivers like i2c-hid, usbhid, surface-hid, all populate it. With this change it's set to, for example: HID_PHYS=0000:00:10.0 Each function has just a sing...
```diff diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c index f9fcb398673b..8075992e8732 100644 --- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c +++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c @@ -127,6 +127,7 @@ i...
9ba4ef6847ba53dea92efce47c9e044fbf6d6dcf
Analyze and fix the following issue in the Linux kernel code: pinctrl: realtek: Fix error check for devm_platform_ioremap_resource()
Problem Details: Replace NULL check with IS_ERR() for devm_platform_ioremap_resource() return value. Use dev_err_probe() for error handling to maintain consistency with the rest of the probe function. Fixes: b7f698b22b8b ("pinctrl: realtek: Switch to use devm functions") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Sig...
```diff diff --git a/drivers/pinctrl/realtek/pinctrl-rtd.c b/drivers/pinctrl/realtek/pinctrl-rtd.c index 60dfb39bc986..7836a15afe44 100644 --- a/drivers/pinctrl/realtek/pinctrl-rtd.c +++ b/drivers/pinctrl/realtek/pinctrl-rtd.c @@ -574,8 +574,9 @@ int rtd_pinctrl_probe(struct platform_device *pdev, const struct rtd_pinc...
eb2d16a7d599dc9d4df391b5e660df9949963786
Analyze and fix the following issue in the Linux kernel code: af_key: validate families in pfkey_send_migrate()
Problem Details: syzbot was able to trigger a crash in skb_put() [1] Issue is that pfkey_send_migrate() does not check old/new families, and that set_ipsecrequest() @family argument was truncated, thus possibly overfilling the skb. Validate families early, do not wait set_ipsecrequest(). [1] skbuff: skb_over_panic:...
```diff diff --git a/net/key/af_key.c b/net/key/af_key.c index 571200433aa9..bc91aeeb74bb 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -3518,7 +3518,7 @@ static int set_sadb_kmaddress(struct sk_buff *skb, const struct xfrm_kmaddress * static int set_ipsecrequest(struct sk_buff *skb, uint8_t proto,...
29fe3a61bcdce398ee3955101c39f89c01a8a77e
Analyze and fix the following issue in the Linux kernel code: xfrm: prevent policy_hthresh.work from racing with netns teardown
Problem Details: A XFRM_MSG_NEWSPDINFO request can queue the per-net work item policy_hthresh.work onto the system workqueue. The queued callback, xfrm_hash_rebuild(), retrieves the enclosing struct net via container_of(). If the net namespace is torn down before that work runs, the associated struct net may already h...
```diff diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 66ac93e65264..2140ee7b102d 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -4282,6 +4282,8 @@ static void xfrm_policy_fini(struct net *net) unsigned int sz; int dir; + disable_work_sync(&net->xfrm.policy_hthresh.work); ...
618a9db0158b1c51fd33822cf804f5a09f829837
Analyze and fix the following issue in the Linux kernel code: sched_ext: Use kobject_put() for kobject_init_and_add() failure in scx_alloc_and_add_sched()
Problem Details: kobject_init_and_add() failure requires kobject_put() for proper cleanup, but the error paths were using kfree(sch) possibly leaking the kobject name. The kset_create_and_add() failure was already using kobject_put() correctly. Switch the kobject_init_and_add() error paths to use kobject_put(). As the...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 2f70effcc4a6..b942918fa364 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -6353,6 +6353,10 @@ static struct scx_sched_pnode *alloc_pnode(struct scx_sched *sch, int node) return pnode; } +/* + * Allocate and initialize a new scx_sched. ...
0c66b0da006415880444ec821e3cb66a89273865
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix cgroup double-put on sub-sched abort path
Problem Details: The abort path in scx_sub_enable_workfn() fell through to out_put_cgrp, double-putting the cgroup ref already owned by sch->cgrp. It also skipped kthread_flush_work() needed to flush the disable path. Relocate the abort block above err_unlock_and_disable so it falls through to err_disable. Fixes: 337...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 9202c6d7a771..2f70effcc4a6 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -7050,6 +7050,13 @@ static void scx_sub_enable_workfn(struct kthread_work *work) ret = 0; goto out_unlock; +out_put_cgrp: + cgroup_put(cgrp); +out_unlock: + mut...
3518fd4c780d4fa4c0e2cedd95c0f8bc5d8b457f
Analyze and fix the following issue in the Linux kernel code: Revert "gpio: Access `gpio_bus_type` in gpiochip_setup_dev()"
Problem Details: This reverts commit cc11f4ef666fbca02c8a2f11d0184d57e6b75579. Commit cc11f4ef666f ("gpio: Access `gpio_bus_type` in gpiochip_setup_dev()") moved the bus type assignment from gpiochip_add_data_with_key() to gpiochip_setup_dev(). This change introduced a bug where dev_printk() and friends might access ...
```diff diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index e287ab0d21fc..9130f2e001ac 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -908,8 +908,6 @@ static int gpiochip_setup_dev(struct gpio_chip *gc) struct fwnode_handle *fwnode = dev_fwnode(&gdev->dev); int ret; - gdev->dev...
4071437cd2aac6b9d48f160d46cfb35ecbb11136
Analyze and fix the following issue in the Linux kernel code: gpio: kempld: Simplify the bit level register accesses
Problem Details: The hardware uses 8 bit registers but supports configurations with up to 16 GPIO, so all GPIO registers come in pairs. Most accesses to single bits is done using the kempld_gpio_bitop() and kempld_gpio_get_bit() functions, which take a register index and bit offset as parameter. These functions apply a...
```diff diff --git a/drivers/gpio/gpio-kempld.c b/drivers/gpio/gpio-kempld.c index 923aad3ab4d4..532e4000879a 100644 --- a/drivers/gpio/gpio-kempld.c +++ b/drivers/gpio/gpio-kempld.c @@ -17,8 +17,8 @@ #define KEMPLD_GPIO_MAX_NUM 16 #define KEMPLD_GPIO_MASK(x) (BIT((x) % 8)) -#define KEMPLD_GPIO_DIR_NUM(x) (0x40 ...
bbee90e750262bfb406d66dc65c46d616d2b6673
Analyze and fix the following issue in the Linux kernel code: gpio: of: clear OF_POPULATED on hog nodes in remove path
Problem Details: The previously set OF_POPULATED flag should be cleared on the hog nodes when removing the chip. Cc: stable@vger.kernel.org Fixes: 63636d956c455 ("gpio: of: Add DT overlay support for GPIO hogs") Acked-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com...
```diff diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index c512d735e85f..b5610a847e72 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -1187,7 +1187,14 @@ int of_gpiochip_add(struct gpio_chip *chip) void of_gpiochip_remove(struct gpio_chip *chip) { - of_node_put(dev_of...
ce5ae93d1a216680460040c7c0465a6e3b629dec
Analyze and fix the following issue in the Linux kernel code: ata: libata-core: disable LPM on ADATA SU680 SSD
Problem Details: ADATA SU680 SSDs suffer from NCQ read and write commands timeouts or bus errors when link power management (LPM) is enabled. Flag these devices with the ATA_QUIRK_NOLPM quirk to prevent the use of LPM and avoid these command failures. Reported-by: Mohammad Khaled Bayan <mhd.khaled.bayan@gmail.com> Clo...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 6c4e567b6582..374993031895 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4188,6 +4188,9 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = { { "ST3320[68]13AS", "SD1[5-9]", ATA_QUIRK_NONCQ | ...
ac57eb3b7d2ad649025b5a0fa207315f755ac4f6
Analyze and fix the following issue in the Linux kernel code: drm/i915/dmc: Fix an unlikely NULL pointer deference at probe
Problem Details: intel_dmc_update_dc6_allowed_count() oopses when DMC hasn't been initialized, and dmc is thus NULL. That would be the case when the call path is intel_power_domains_init_hw() -> {skl,bxt,icl}_display_core_init() -> gen9_set_dc_state() -> intel_dmc_update_dc6_allowed_count(), as intel_power_domains_ini...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.c b/drivers/gpu/drm/i915/display/intel_display_power_well.c index db185a859133..fba9fa41f827 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power_well.c +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c @@ -806,7 +806,7 @@ v...
a1488456f70655f7a95f846c8fbadbe61daf292c
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: debug: simulate Wi-Fi 7 SER L0/L1 without PS mode
Problem Details: Current triggers of Wi-Fi 7 SER (system error recovery) L0/L1 simulation don't yet guarantee working with PS mode. So, leave PS mode first before triggering them for now. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.li...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c index d461ffc6dc9e..82849d109cc3 100644 --- a/drivers/net/wireless/realtek/rtw89/debug.c +++ b/drivers/net/wireless/realtek/rtw89/debug.c @@ -3552,6 +3552,8 @@ static int rtw89_dbg_trigger_l1_error_by_halt_h2c_b...
bda294ed0ed05ada2a832b19a55dd4a6fa72b1a1
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: Drop malformed AMPDU frames with abnormal PN
Problem Details: Fix connection issue caused by AMPDU frames with abnormal PN patterns (out-of-order packets with correct MPDU sequence numbers but paired with abnormal PN values, which is next PN of previous in-order packet). This is causing packet drops, low throughput and disconnections. It is observed in fields wit...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 18dbf3664f0a..9d3f651798ff 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -3272,6 +3272,114 @@ out: rcu_read_unlock(); } +static void __rtw89_c...
9a38ef92aaa2d3c02ae1f6f1cacc3d3a8cf19db6
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: mac: remove A-die off setting for RTL8852C and RTL8922A
Problem Details: Fix timing issue of A-die off followed by XTAL off. Otherwise, device might get lost potentially. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260310080146.31113-4-pkshih@realtek.com
```diff diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c.c b/drivers/net/wireless/realtek/rtw89/rtw8852c.c index e62a7288c8aa..7ea0a8905282 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852c.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852c.c @@ -463,7 +463,7 @@ static int rtw8852c_pwr_off_func(struct r...
e1b6b5af5d1725c9474baf3846f717a738f7e000
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: rtl8192d: fix typo in H2C wait counter names
Problem Details: Rename local variables in rtl92d_fill_h2c_cmd() from wait_writeh2c_limmit/wait_h2c_limmit to wait_writeh2c_limit/wait_h2c_limit. No functional change. Signed-off-by: Jaime Saguillo Revilla <jaime.saguillo@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realt...
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c index aa54dbde6ea8..a255a5061d77 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c @@ -212,9 +21...
fc25b384fc0bb983fe383e8392b6c2f4aafec77d
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: usb: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index d35ed56d6db9..9a64df9eed39 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -986,7 +986,6 @@ int rtl_usb_probe(struct usb_interface *intf, init_...
c2a21f35cea43c3287a4f314b7aab22ea7234122
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/usb.c b/drivers/net/wireless/realtek/rtw89/usb.c index da1b7ce8089e..64f0c0ec5ed4 100644 --- a/drivers/net/wireless/realtek/rtw89/usb.c +++ b/drivers/net/wireless/realtek/rtw89/usb.c @@ -935,7 +935,7 @@ static int rtw89_usb_intf_init(struct rtw89_dev *rtwdev, if...
bbb15e71156cd9f5e1869eee7207a06ea8e96c39
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: fix device leak on probe failure
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. This driver takes a reference to the USB device during probe but does not to relea...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index 433b06c8d8a6..718940ebba31 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -1041,7 +1041,7 @@ static int rtw_usb_intf_init(struct rtw_dev *rtwdev, ...
711b8add39294393a086b5c0e51f0c8d79a89f4d
Analyze and fix the following issue in the Linux kernel code: wifi: rtl8xxxu: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c b/drivers/net/wireless/realtek/rtl8xxxu/core.c index d1b1474cba67..cb6c8859a918 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c @@ -7686,7 +7686,7 @@ static int rtl8xxxu_probe(struct usb_interf...
68e7d359a5eeea75197626c800d082955032e30a
Analyze and fix the following issue in the Linux kernel code: wifi: rtl818x: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c index f7e0f6573180..1d21c468a236 100644 --- a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c +++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c @@ -1475,8 +1475,6 @@ static int rtl8187_...
f8a2fc809bfeb49130709b31a4d357a049f28547
Analyze and fix the following issue in the Linux kernel code: wifi: rtl8xxxu: fix potential use of uninitialized value
Problem Details: The local variables 'mcs' and 'nss' in rtl8xxxu_update_ra_report() are passed to rtl8xxxu_desc_to_mcsrate() as output parameters. If the helper function encounters an unhandled rate index, it may return without setting these values, leading to the use of uninitialized stack data. Remove the helper rtl...
```diff diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c b/drivers/net/wireless/realtek/rtl8xxxu/core.c index b4efc6f00a37..d1b1474cba67 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c @@ -4697,20 +4697,6 @@ static const struct ieee80211_rate rtl8xxx...
6955d6bca0531ffbbaeecac844b7bae84345b3fb
Analyze and fix the following issue in the Linux kernel code: drm/atomic: Add affected colorops with affected planes
Problem Details: When drm_atomic_add_affected_planes() adds a plane to the atomic state, the associated colorops are not guaranteed to be included. This can leave colorop state out of the transaction when planes are pulled in implicitly (eg. during modeset or internal commits). Also add affected colorops when adding a...
```diff diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 04925166df98..dd9f27cfe991 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1587,6 +1587,7 @@ drm_atomic_add_affected_planes(struct drm_atomic_state *state, const struct drm_crtc_state *old_crtc_stat...
0d9710aeb6959ae244f255986187562fa50504b9
Analyze and fix the following issue in the Linux kernel code: drm/colorop: Preserve bypass value in duplicate_state()
Problem Details: __drm_atomic_helper_colorop_duplicate_state() unconditionally sets state->bypass = true after copying the existing state. This override causes the new atomic state to no longer reflect the currently committed hardware state. Since the bypass property directly controls whether the colorop is active in ...
```diff diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c index 647cf881f413..566816e3c6f0 100644 --- a/drivers/gpu/drm/drm_colorop.c +++ b/drivers/gpu/drm/drm_colorop.c @@ -462,8 +462,6 @@ static void __drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colo if (state->data) ...
5044a0b0307a3377dabbb0a2a653a30e388d16cc
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: glymur: Fix deprecated cpu compatibles
Problem Details: The generic Qualcomm Oryon CPU compatible used by the Glymur SoC is deprecated and incorrect since it uses a single compatible to describe two different core variants. It is now replaced with two different core-specific compatibles based on MIDR part and variant number. CPUS 0-5: MIDR_EL1[PART_NUM] - ...
```diff diff --git a/arch/arm64/boot/dts/qcom/glymur.dtsi b/arch/arm64/boot/dts/qcom/glymur.dtsi index e269cec7942c..5de4b2801321 100644 --- a/arch/arm64/boot/dts/qcom/glymur.dtsi +++ b/arch/arm64/boot/dts/qcom/glymur.dtsi @@ -33,7 +33,7 @@ cpu0: cpu@0 { device_type = "cpu"; - compatible = "qcom,oryon"; + ...
c252c12d1f55bd5737e3b8e7839914ccdc7a701c
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Fix typo issue in kvm_vm_init_features()
Problem Details: Most of VM feature detections are integer OR operations, and integer assignment operation will clear previous integer OR operation. So here change all integer assignment operations to integer OR operations. Fixes: 82db90bf461b ("LoongArch: KVM: Move feature detection in kvm_vm_init_features()") Signed...
```diff diff --git a/arch/loongarch/kvm/vm.c b/arch/loongarch/kvm/vm.c index 17b3d5b36cfc..8cc5ee1c53ef 100644 --- a/arch/loongarch/kvm/vm.c +++ b/arch/loongarch/kvm/vm.c @@ -49,8 +49,8 @@ static void kvm_vm_init_features(struct kvm *kvm) kvm->arch.kvm_features |= BIT(KVM_LOONGARCH_VM_FEAT_PMU); /* Enable all PV...
b254c629a963f0b9d635902f3f979bddbc65f90f
Analyze and fix the following issue in the Linux kernel code: LoongArch: BPF: Make arch_protect_bpf_trampoline() return 0
Problem Details: Occasionally there exist "text_copy_cb: operation failed" when executing the bpf selftests, the reason is copy_to_kernel_nofault() failed and the ecode of ESTAT register is 0x4 (PME: Page Modification Exception) due to the pte is not writeable. The root cause is that there is another place to set the p...
```diff diff --git a/arch/loongarch/net/bpf_jit.c b/arch/loongarch/net/bpf_jit.c index e8e0ad34928c..9cb796e16379 100644 --- a/arch/loongarch/net/bpf_jit.c +++ b/arch/loongarch/net/bpf_jit.c @@ -1574,6 +1574,11 @@ void arch_free_bpf_trampoline(void *image, unsigned int size) bpf_prog_pack_free(image, size); } +int...
8a69d02481ff97683952e94b9d1eae29b45f88fd
Analyze and fix the following issue in the Linux kernel code: LoongArch: Fix calling smp_processor_id() in preemptible code
Problem Details: Fix the warning: BUG: using smp_processor_id() in preemptible [00000000] code: systemd/1 caller is larch_insn_text_copy+0x40/0xf0 Simply changing it to raw_smp_processor_id() is not enough: if preempt and CPU hotplug happens after raw_smp_processor_id() but before calling stop_machine(), the CPU ...
```diff diff --git a/arch/loongarch/kernel/inst.c b/arch/loongarch/kernel/inst.c index bf037f0c6b26..25fdb933119d 100644 --- a/arch/loongarch/kernel/inst.c +++ b/arch/loongarch/kernel/inst.c @@ -263,14 +263,20 @@ int larch_insn_text_copy(void *dst, void *src, size_t len) .dst = dst, .src = src, .len = len, - ...