id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
5b027c74f3ee8979193c50d31187edfa31acc0db
Analyze and fix the following issue in the Linux kernel code: ASoC: sdw_utils: Call init callbacks on the correct codec DAI
Problem Details: asoc_sdw_rtd_init() needs to call the rtd_init() callbacks for each codec in a dailink. It was finding the codecs by looking for the matching DAI name in codec_info_list[] but this isn't correct, because the DAI name isn't guaranteed to be unique. Parts using the same codec driver (so the same DAI name...
```diff diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c index bf382aa07e92..ccf149f949e8 100644 --- a/sound/soc/sdw_utils/soc_sdw_utils.c +++ b/sound/soc/sdw_utils/soc_sdw_utils.c @@ -841,6 +841,19 @@ struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_part(const u64 adr) } EXP...
baaecfcac559bcac73206df447eb5c385fa22f2a
Analyze and fix the following issue in the Linux kernel code: kconfig: fix static linking of nconf
Problem Details: When running make nconfig with a static linking host toolchain, the libraries are linked in an incorrect order, resulting in errors similar to the following: $ MAKEFLAGS='HOSTCC=cc\ -static' make nconfig /usr/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/14.2.1/../../../../lib64/libpanel.a(p_new.o):...
```diff diff --git a/scripts/kconfig/nconf-cfg.sh b/scripts/kconfig/nconf-cfg.sh index a20290b1a37d..4d08453f9bdb 100755 --- a/scripts/kconfig/nconf-cfg.sh +++ b/scripts/kconfig/nconf-cfg.sh @@ -6,8 +6,9 @@ set -eu cflags=$1 libs=$2 -PKG="ncursesw menuw panelw" -PKG2="ncurses menu panel" +# Keep library order for s...
946d462346d2ded161cfd3dc62a61d7050d9f9ec
Analyze and fix the following issue in the Linux kernel code: kbuild: prefer ${NM} in check-function-names.sh
Problem Details: The check-function-names.sh scripts invokes 'nm' directly and this can be problematic during cross-compilation when the toolchain is different from the system's default (e.g. LLVM=1). scripts/check-function-names.sh: nm: not found Let's prefer the ${NM} variable which is already set by kbuild. Howe...
```diff diff --git a/scripts/check-function-names.sh b/scripts/check-function-names.sh index 410042591cfc..08071133e5a5 100755 --- a/scripts/check-function-names.sh +++ b/scripts/check-function-names.sh @@ -13,7 +13,7 @@ if [ ! -f "$objfile" ]; then exit 1 fi -bad_symbols=$(nm "$objfile" | awk '$2 ~ /^[TtWw]$/ {pr...
fb8a6c18fb9a6561f7a15b58b272442b77a242dd
Analyze and fix the following issue in the Linux kernel code: dm: clear cloned request bio pointer when last clone bio completes
Problem Details: Stale rq->bio values have been observed to cause double-initialization of cloned bios in request-based device-mapper targets, leading to use-after-free and double-free scenarios. One such case occurs when using dm-multipath on top of a PCIe NVMe namespace, where cloned request bios are freed during bl...
```diff diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 5e0854669614..923252fb57ae 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -109,14 +109,21 @@ static void end_clone_bio(struct bio *clone) */ tio->completed += nr_bytes; + if (!is_last) + return; + /* + * At this moment we know this...
c84e21a89b77731d69d27c74e92f99b39a5a54ef
Analyze and fix the following issue in the Linux kernel code: dm-verity: fix up various workqueue-related comments
Problem Details: Replace obsolete mentions of "tasklets" with "softirq context", and "workqueue" with "kworker". This reflects the fact that the implementation of the "try_verify_in_tasklet" dm-verity option now accesses softirq context using either the BH workqueue API or inline execution, not the tasklet API. The o...
```diff diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c index bb86145bed12..a78b290c2e41 100644 --- a/drivers/md/dm-verity-target.c +++ b/drivers/md/dm-verity-target.c @@ -254,9 +254,9 @@ static int verity_verify_level(struct dm_verity *v, struct dm_verity_io *io, data = dm_bufio_get(v->bu...
c698b7f417801fcd79f0dc844250b3361d38e6b8
Analyze and fix the following issue in the Linux kernel code: dm-integrity: fix a typo in the code for write/discard race
Problem Details: If we send a write followed by a discard, it may be possible that the discarded data end up being overwritten by the previous write from the journal. The code tries to prevent that, but there was a typo in this logic that made it not being activated as it should be. Note that if we end up here the sec...
```diff diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 170bf67a2edd..79d60495454a 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -2411,7 +2411,7 @@ offload_to_thread: new_pos = find_journal_node(ic, dio->range.logical_sector, &next_sector); if (unlikely(new_p...
e9f5a55b70ae6187ab64ef2d1232ae2738e31d1f
Analyze and fix the following issue in the Linux kernel code: dm: use READ_ONCE in dm_blk_report_zones
Problem Details: The functon dm_blk_report_zones reads md->zone_revalidate_map, however it may change while the function is running. Use READ_ONCE. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Fixes: 37f53a2c60d0 ("dm: fix dm_blk_report_zones") Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
```diff diff --git a/drivers/md/dm-zone.c b/drivers/md/dm-zone.c index bc4e45862a22..f29acf64429a 100644 --- a/drivers/md/dm-zone.c +++ b/drivers/md/dm-zone.c @@ -50,7 +50,7 @@ int dm_blk_report_zones(struct gendisk *disk, sector_t sector, { struct mapped_device *md = disk->private_data; struct dm_table *map; - st...
24c405fdbe215c45e57bba672cc42859038491ee
Analyze and fix the following issue in the Linux kernel code: dm: fix unlocked test for dm_suspended_md
Problem Details: The function dm_blk_report_zones tests if the device is suspended with the "dm_suspended_md" call. However, this function is called without holding any locks, so the device may be suspended just after it. Move the call to dm_suspended_md after dm_get_live_table, so that the device can't be suspended a...
```diff diff --git a/drivers/md/dm-zone.c b/drivers/md/dm-zone.c index c95e417194b3..bc4e45862a22 100644 --- a/drivers/md/dm-zone.c +++ b/drivers/md/dm-zone.c @@ -60,11 +60,13 @@ int dm_blk_report_zones(struct gendisk *disk, sector_t sector, * Zone revalidation during __bind() is in progress, but this * call is...
3a115d42922cffc91b303992eadf220111d66c31
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: s4: fix mmc clock assignment
Problem Details: MMC A and C are mis-represented as having their "clkin0" input connected to xtal while it is actually connected to the MMC clock, probably in an attempt to provide 24MHz to the device on this input. Fix this and assign the clock to 24MHz to actually provide the required rate. Fixes: 3ab9d54b5d84 ("ar...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi index f314f07062ab..dfc0a30a6e61 100644 --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi @@ -819,13 +819,16 @@ reg = <0x0 0xfe088000 0x0 0x800>; interrupts = ...
86124a8becb43eed3103f2459399daee8af2c99d
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: s4: assign mmc b clock to 24MHz
Problem Details: The amlogic MMC driver operate with the assumption that MMC clock is configured to provide 24MHz. It uses this path for low rates such as 400kHz. This assumption did hold true until but it now, but it is apparently not the case with s4. The clock has been reported to provide 1GHz instead. This is most...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi index 9d99ed2994df..f314f07062ab 100644 --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi @@ -838,6 +838,9 @@ clock-names = "core", "clkin0", "clkin1"; resets ...
f2a3f51365bf672dab4b58d1e8954926a9196b44
Analyze and fix the following issue in the Linux kernel code: i2c: imx-lpi2c: change to PIO mode in system-wide suspend/resume progress
Problem Details: EDMA resumes early and suspends late in the system power transition sequence, while LPI2C enters the NOIRQ stage for both suspend and resume. This means LPI2C resources become available before EDMA is fully resumed. Once IRQs are enabled, a slave device may immediately trigger an LPI2C transfer. If the...
```diff diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c index 2a0962a0b441..d882126c1778 100644 --- a/drivers/i2c/busses/i2c-imx-lpi2c.c +++ b/drivers/i2c/busses/i2c-imx-lpi2c.c @@ -592,6 +592,13 @@ static bool is_use_dma(struct lpi2c_imx_struct *lpi2c_imx, struct i2c_msg *msg) if...
c0c50e3743e467ec4752c638e10e97f89c8644e2
Analyze and fix the following issue in the Linux kernel code: i2c: qcom-geni: make sure I2C hub controllers can't use SE DMA
Problem Details: The I2C Hub controller is a simpler GENI I2C variant that doesn't support DMA at all, add a no_dma flag to make sure it nevers selects the SE DMA mode with mappable 32bytes long transfers. Fixes: cacd9643eca7 ("i2c: qcom-geni: add support for I2C Master Hub variant") Signed-off-by: Neil Armstrong <nei...
```diff diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index 3a04016db2c3..ae609bdd2ec4 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -116,6 +116,7 @@ struct geni_i2c_dev { dma_addr_t dma_addr; struct dma_chan *tx_c; struct dma_ch...
4b16ad0bf821d4aceb050e9f569dc329883f1c5b
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix missing <asm/stackpage/nvhe.h> include
Problem Details: Include <asm/stackpage/nvhe.h> for kvm_arm_hyp_stack_base declaration which fixes the following sparse warning: arch/arm64/kvm/arm.c:63:1: warning: symbol 'kvm_arm_hyp_stack_base' was not declared. Should it be static? Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Link: https://patch.msgid.lin...
```diff diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index 4703f0e15102..0e1d18b90376 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -40,6 +40,7 @@ #include <asm/kvm_pkvm.h> #include <asm/kvm_ptrauth.h> #include <asm/sections.h> +#include <asm/stacktrace/nvhe.h> #include <kvm/arm_hype...
cd98e73492102a2ff54923f08c37a2780979ac4c
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: DRM_ROCKCHIP should depend on ARCH_ROCKCHIP
Problem Details: Rockchip display hardware is only available on Rockchip SoCs. Hence add a dependency on ARCH_ROCKCHIP, to prevent asking the user about this driver when configuring a kernel without Rockchip platform support. Before, this dependency was implicit through a hard dependency on ROCKCHIP_IOMMU. Fixes: 02...
```diff diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 025bd770f499..1479b8c4ed40 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -2,6 +2,7 @@ config DRM_ROCKCHIP tristate "DRM Support for Rockchip" depends on DRM + depends on ARCH_ROC...
d7f1b4bdc7108be1b178e1617b5f45c8918e88d7
Analyze and fix the following issue in the Linux kernel code: efi/cper: Fix cper_bits_to_str buffer handling and return value
Problem Details: The return value calculation was incorrect: `return len - buf_size;` Initially `len = buf_size`, then `len` decreases with each operation. This results in a negative return value on success. Fix by returning `buf_size - len` which correctly calculates the actual number of bytes written. Fixes: a976d7...
```diff diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c index 0232bd040f61..bd99802cb0ca 100644 --- a/drivers/firmware/efi/cper.c +++ b/drivers/firmware/efi/cper.c @@ -162,7 +162,7 @@ int cper_bits_to_str(char *buf, int buf_size, unsigned long bits, len -= size; str += size; } - return le...
0ea84089dbf62a92dc7889c79e6b18fc89260808
Analyze and fix the following issue in the Linux kernel code: ata: libata-scsi: avoid Non-NCQ command starvation
Problem Details: When a non-NCQ command is issued while NCQ commands are being executed, ata_scsi_qc_issue() indicates to the SCSI layer that the command issuing should be deferred by returning SCSI_MLQUEUE_XXX_BUSY. This command deferring is correct and as mandated by the ACS specifications since NCQ and non-NCQ comm...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b96105481784..e888f2445692 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5644,6 +5644,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host) mutex_init(&ap->scsi_scan_mutex); INIT_DELAYED_WORK(&ap->hot...
b91a565ed14fcf900b4d95e86882b4b763860986
Analyze and fix the following issue in the Linux kernel code: drm/sysfb: Remove duplicate declarations
Problem Details: Commit 6046b49bafff ("drm/sysfb: Share helpers for integer validation") and commit e8c086880b2b ("drm/sysfb: Share helpers for screen_info validation") added duplicate function declarations. Remove the latter ones. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes: e8c086880b2b ("drm/sysfb:...
```diff diff --git a/drivers/gpu/drm/sysfb/drm_sysfb_helper.h b/drivers/gpu/drm/sysfb/drm_sysfb_helper.h index da670d7eeb2e..de96bfe7562c 100644 --- a/drivers/gpu/drm/sysfb/drm_sysfb_helper.h +++ b/drivers/gpu/drm/sysfb/drm_sysfb_helper.h @@ -54,15 +54,6 @@ const struct drm_format_info *drm_sysfb_get_format_si(struct d...
d33d77044c37aa97f24e3e3adf2f781aba774db2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8183-kukui: Clean up IT6505 regulator supply
Problem Details: Align the name of the regulator with the design schematic. Also fix up the gpio property to the new "gpios" property name, and add the GPIO_ACTIVE_HIGH flag. The flag is actively ignored in Linux in favor of the old "enable-active-high" property; nevertheless it is the correct description. Signed-off-...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi index 4b87d4940c8c..a8e257b21a88 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi @@ -44,10 +44,10 @@ clock-output-names = "clk32k"; }...
1ec5e098ef5f9cefdaccca3747b5e3802fb8b2bf
Analyze and fix the following issue in the Linux kernel code: iio: pressure: abp2030pa: fix typo in Kconfig description
Problem Details: Replace "I2C" with "SPI" in the SPI module description. Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
```diff diff --git a/drivers/iio/pressure/Kconfig b/drivers/iio/pressure/Kconfig index 0d25842aa414..838a8340c4c0 100644 --- a/drivers/iio/pressure/Kconfig +++ b/drivers/iio/pressure/Kconfig @@ -38,7 +38,7 @@ config ABP2030PA_SPI depends on SPI_MASTER select ABP2030PA help - Say Y here to build I2C bus support ...
aec5445dd7c8c6c84d46f2dbf07967ac54393595
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt6795: Fix issues in SCPSYS node
Problem Details: Add the "mediatek,mt6795-scpsys" compatible to the SCPSYS node and remove #power-domain-cells (retaining it only in the power controller subnode) to resolve dtbs_check warnings. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi index 58833e5135c8..ae2aaa51c9ad 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -287,9 +287,8 @@ }; scpsys: syscon@10006000 { - compatible = "syscon...
178c08fd8ce53c77910fb16cc99e932049b6c6e8
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt6331: Fix VCAM IO regulator name
Problem Details: The ldo-vcamio regulator is named "vcam_io", however, the binding only allows "vcamio" as name: change it to the latter to resolve a dtbs_check warning. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt6331.dtsi b/arch/arm64/boot/dts/mediatek/mt6331.dtsi index 243afbffa21f..7e7b96e8ca6f 100644 --- a/arch/arm64/boot/dts/mediatek/mt6331.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6331.dtsi @@ -217,7 +217,7 @@ }; mt6331_vcamio_reg: ldo-vcamio { - regulator-n...
f8a6e5eac701369afb5d69aba875dc5fec93003d
Analyze and fix the following issue in the Linux kernel code: Input: adp5589 - remove a leftover header file
Problem Details: In commit 3bdbd0858df6 ("Input: adp5589: remove the driver") the last user of include/linux/input/adp5589.h was removed along with the whole driver, thus the header file can be also removed. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.c...
```diff diff --git a/include/linux/input/adp5589.h b/include/linux/input/adp5589.h deleted file mode 100644 index 0e4742c8c81e..000000000000 --- a/include/linux/input/adp5589.h +++ /dev/null @@ -1,180 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Analog Devices ADP5589/ADP5585 I/O Expander and QWERTY Key...
3879cffd9d07aa0377c4b8835c4f64b4fb24ac78
Analyze and fix the following issue in the Linux kernel code: net/sched: sch_qfq: do not free existing class in qfq_change_class()
Problem Details: Fixes qfq_change_class() error case. cl->qdisc and cl should only be freed if a new class and qdisc were allocated, or we risk various UAF. Fixes: 462dbc9101ac ("pkt_sched: QFQ Plus: fair-queueing service at DRR cost") Reported-by: syzbot+07f3f38f723c335f106d@syzkaller.appspotmail.com Closes: https:/...
```diff diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index f4013b547438..9d59090bbe93 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -529,8 +529,10 @@ set_change_agg: return 0; destroy_class: - qdisc_put(cl->qdisc); - kfree(cl); + if (!existing) { + qdisc_put(cl->qdisc); + kfree(cl); + }...
e3bd7bdf5ffe49d8381e42843f6e98cd0c78a1e8
Analyze and fix the following issue in the Linux kernel code: bpf: Return proper address for non-zero offsets in insn array
Problem Details: The map_direct_value_addr() function of the instruction array map incorrectly adds offset to the resulting address. This is a bug, because later the resolve_pseudo_ldimm64() function adds the offset. Fix it. Corresponding selftests are added in a consequent commit. Fixes: 493d9e0d6083 ("bpf, x86: add ...
```diff diff --git a/kernel/bpf/bpf_insn_array.c b/kernel/bpf/bpf_insn_array.c index c96630cb75bf..37b43102953e 100644 --- a/kernel/bpf/bpf_insn_array.c +++ b/kernel/bpf/bpf_insn_array.c @@ -126,7 +126,7 @@ static int insn_array_map_direct_value_addr(const struct bpf_map *map, u64 *imm, return -EINVAL; /* from B...
e463b6de9da17995a2ddabf199cc00c65a8a5392
Analyze and fix the following issue in the Linux kernel code: bpf: drop KF_ACQUIRE flag on BPF kfunc bpf_get_root_mem_cgroup()
Problem Details: With the BPF verifier now treating pointers to struct types returned from BPF kfuncs as implicitly trusted by default, there is no need for bpf_get_root_mem_cgroup() to be annotated with the KF_ACQUIRE flag. bpf_get_root_mem_cgroup() does not acquire any references, but rather simply returns a NULL po...
```diff diff --git a/mm/bpf_memcontrol.c b/mm/bpf_memcontrol.c index 716df49d7647..f95cd5d16f4c 100644 --- a/mm/bpf_memcontrol.c +++ b/mm/bpf_memcontrol.c @@ -13,12 +13,12 @@ __bpf_kfunc_start_defs(); /** * bpf_get_root_mem_cgroup - Returns a pointer to the root memory cgroup * - * The function has KF_ACQUIRE sema...
6a069876eb1402478900ee0eb7d7fe276bb1f4e3
Analyze and fix the following issue in the Linux kernel code: rust: bitops: fix missing _find_* functions on 32-bit ARM
Problem Details: On 32-bit ARM, you may encounter linker errors such as this one: ld.lld: error: undefined symbol: _find_next_zero_bit >>> referenced by rust_binder_main.43196037ba7bcee1-cgu.0 >>> drivers/android/binder/rust_binder_main.o:(<rust_binder_main::process::Process>::insert_or_update_handle)...
```diff diff --git a/rust/helpers/bitops.c b/rust/helpers/bitops.c index 5d0861d29d3f..e79ef9e6d98f 100644 --- a/rust/helpers/bitops.c +++ b/rust/helpers/bitops.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/bitops.h> +#include <linux/find.h> void rust_helper___set_bit(unsigned long nr, un...
cf055f8c000445aa688c53a706ef4f580818eedb
Analyze and fix the following issue in the Linux kernel code: selftests: drv-net: fix RPS mask handling for high CPU numbers
Problem Details: The RPS bitmask bounds check uses ~(RPS_MAX_CPUS - 1) which equals ~15 = 0xfff0, only allowing CPUs 0-3. Change the mask to ~((1UL << RPS_MAX_CPUS) - 1) = ~0xffff to allow CPUs 0-15. Fixes: 5ebfb4cc3048 ("selftests/net: toeplitz test") Reviewed-by: Nimrod Oren <noren@nvidia.com> Signed-off-by: Gal Pr...
```diff diff --git a/tools/testing/selftests/drivers/net/hw/toeplitz.c b/tools/testing/selftests/drivers/net/hw/toeplitz.c index d23b3b0c20a3..285bb17df9c2 100644 --- a/tools/testing/selftests/drivers/net/hw/toeplitz.c +++ b/tools/testing/selftests/drivers/net/hw/toeplitz.c @@ -485,8 +485,8 @@ static void parse_rps_bit...
9d48c62f6b4ed70ebeea70f52ddb1c6d8613bed4
Analyze and fix the following issue in the Linux kernel code: selftests: drv-net: fix RPS mask handling in toeplitz test
Problem Details: The toeplitz.py test passed the hex mask without "0x" prefix (e.g., "300" for CPUs 8,9). The toeplitz.c strtoul() call wrongly parsed this as decimal 300 (0x12c) instead of hex 0x300. Pass the prefixed mask to toeplitz.c, and the unprefixed one to sysfs. Fixes: 9cf9aa77a1f6 ("selftests: drv-net: hw: ...
```diff diff --git a/tools/testing/selftests/drivers/net/hw/toeplitz.py b/tools/testing/selftests/drivers/net/hw/toeplitz.py index d2db5ee9e358..d288c57894f6 100755 --- a/tools/testing/selftests/drivers/net/hw/toeplitz.py +++ b/tools/testing/selftests/drivers/net/hw/toeplitz.py @@ -94,12 +94,14 @@ def _configure_rps(cf...
ddf96c393a33aef4887e2e406c76c2f8cda1419c
Analyze and fix the following issue in the Linux kernel code: ipv6: Fix use-after-free in inet6_addr_del().
Problem Details: syzbot reported use-after-free of inet6_ifaddr in inet6_addr_del(). [0] The cited commit accidentally moved ipv6_del_addr() for mngtmpaddr before reading its ifp->flags for temporary addresses in inet6_addr_del(). Let's move ipv6_del_addr() down to fix the UAF. [0]: BUG: KASAN: slab-use-after-free i...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index b66217d1b2f8..27ab9d7adc64 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3112,12 +3112,12 @@ static int inet6_addr_del(struct net *net, int ifindex, u32 ifa_flags, in6_ifa_hold(ifp); read_unlock_bh(&idev->lock); - ipv6_del...
9a6f0c4d5796ab89b5a28a890ce542344d58bd69
Analyze and fix the following issue in the Linux kernel code: dst: fix races in rt6_uncached_list_del() and rt_del_uncached_list()
Problem Details: syzbot was able to crash the kernel in rt6_uncached_list_flush_dev() in an interesting way [1] Crash happens in list_del_init()/INIT_LIST_HEAD() while writing list->prev, while the prior write on list->next went well. static inline void INIT_LIST_HEAD(struct list_head *list) { WRITE_ONCE(list->next,...
```diff diff --git a/net/core/dst.c b/net/core/dst.c index e9d35f49c9e7..1dae26c51ebe 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -68,6 +68,7 @@ void dst_init(struct dst_entry *dst, struct dst_ops *ops, dst->lwtstate = NULL; rcuref_init(&dst->__rcuref, 1); INIT_LIST_HEAD(&dst->rt_uncached); + dst->rt_unca...
d23564955811da493f34412d7de60fa268c8cb50
Analyze and fix the following issue in the Linux kernel code: net: hv_netvsc: reject RSS hash key programming without RX indirection table
Problem Details: RSS configuration requires a valid RX indirection table. When the device reports a single receive queue, rndis_filter_device_add() does not allocate an indirection table, accepting RSS hash key updates in this state leads to a hang. Fix this by gating netvsc_set_rxfh() on ndc->rx_table_sz and return -...
```diff diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 3d47d749ef9f..cbd52cb79268 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -1750,6 +1750,9 @@ static int netvsc_set_rxfh(struct net_device *dev, rxfh->hfunc != ETH_RSS_HASH_TOP) re...
969994f03237aa99c1add0606fa4343245d9a2cc
Analyze and fix the following issue in the Linux kernel code: net: sxgbe: fix typo in comment
Problem Details: Fix a misspelling in the sxgbe_mtl_init() function comment. "Algorith" should be spelled as "Algorithm". Signed-off-by: Jinseok Kim <always.starving0@gmail.com> Link: https://patch.msgid.link/20260112044147.2844-1-always.starving0@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_mtl.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_mtl.c index 298a7402e39c..66e6de64626c 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_mtl.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_mtl.c @@ -25,7 +25,7 @@ static void sxgbe_mtl_init(void __iomem...
b853b94e848216b82ecaa0d5d3c7f6c9066e32a4
Analyze and fix the following issue in the Linux kernel code: ipv6: Allow for nexthop device mismatch with "onlink"
Problem Details: IPv4 allows for a nexthop device mismatch when the "onlink" keyword is specified: # ip link add name dummy1 up type dummy # ip address add 192.0.2.1/24 dev dummy1 # ip link add name dummy2 up type dummy # ip route add 198.51.100.0/24 nexthop via 192.0.2.2 dev dummy2 Error: Nexthop has invalid gat...
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a3e051dc66ee..00a8318f33a7 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -3419,11 +3419,8 @@ static int ip6_route_check_nh_onlink(struct net *net, err = ip6_nh_lookup_table(net, cfg, gw_addr, tbid, 0, &res); if (!err && !(res.fib6_flags & RT...
ce0f92dc737c65d705d83ea9529d8fb9a2194241
Analyze and fix the following issue in the Linux kernel code: selftests: net: py: teach cmd() how to print itself
Problem Details: Teach cmd() how to print itself, to make debug prints easier. Example output (leading # due to ksft_pr()): # CMD: /root/ksft-net-drv/drivers/net/gro # EXIT: 1 # STDOUT: ipv6 with ext header does coalesce: # STDERR: Expected {200 }, Total 1 packets # Received {100 [!=200]100 [...
```diff diff --git a/tools/testing/selftests/net/lib/py/utils.py b/tools/testing/selftests/net/lib/py/utils.py index 824f039d384c..37243103aee3 100644 --- a/tools/testing/selftests/net/lib/py/utils.py +++ b/tools/testing/selftests/net/lib/py/utils.py @@ -41,7 +41,9 @@ class cmd: self.ret = None self.k...
69cb6ca52da095d300cf42666c903ae787a762dd
Analyze and fix the following issue in the Linux kernel code: tools/net/ynl: suppress jobserver warning in ynltool version detection
Problem Details: When building ynltool with parallel make (-jN), a warning is emitted: make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. The warning trips up local runs of NIPA's ingest_mdir.py, which correctly fails on make warnings. This occurs because SRC_VERSION uses $(shell ma...
```diff diff --git a/tools/net/ynl/ynltool/Makefile b/tools/net/ynl/ynltool/Makefile index f5b1de32daa5..48b0f32050f0 100644 --- a/tools/net/ynl/ynltool/Makefile +++ b/tools/net/ynl/ynltool/Makefile @@ -13,7 +13,7 @@ endif CFLAGS += -I../lib -I../generated -I../../../include/uapi/ SRC_VERSION := \ - $(shell make --...
d7507a94a07202234236d7f94bed6015ca645ae6
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Treat exit_code as an unsigned 64-bit value through all of KVM
Problem Details: Fix KVM's long-standing buggy handling of SVM's exit_code as a 32-bit value. Per the APM and Xen commit d1bd157fbc ("Big merge the HVM full-virtualisation abstractions.") (which is arguably more trustworthy than KVM), offset 0x70 is a single 64-bit value: 070h 63:0 EXITCODE Track exit_code as a si...
```diff diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index 50ece197c98a..edde36097ddc 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h @@ -137,8 +137,7 @@ struct __attribute__ ((__packed__)) vmcb_control_area { u32 int_vector; u32 int_state; u8 reserved_3[4]; - u32 ...
217463aa329ea9a2efafd1bbfa6787e8df9091b9
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Add a helper to detect VMRUN failures
Problem Details: Add a helper to detect VMRUN failures so that KVM can guard against its own long-standing bug, where KVM neglects to set exitcode[63:32] when synthesizing a nested VMFAIL_INVALID VM-Exit. This will allow fixing KVM's mess of treating exitcode as two separate 32-bit values without breaking KVM-on-KVM w...
```diff diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index 5b741f8ed170..666b5a36c15d 100644 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@ -1167,7 +1167,7 @@ int nested_svm_vmexit(struct vcpu_svm *svm) vmcb12->control.exit_info_1 = vmcb02->control.exit_info_1; vmcb12...
de0dc71188ca54cfe13fac5c4334715fb37fe8ce
Analyze and fix the following issue in the Linux kernel code: KVM: x86: align the code with kvm_x86_call()
Problem Details: The use of static_call_cond() is essentially the same as static_call() on x86 (e.g. static_call() now handles a NULL pointer as a NOP), and then the kvm_x86_call() is added to improve code readability and maintainability for keeping consistent code style. Fixes 8d032b683c29 ("KVM: TDX: create/destroy ...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index fe9d324da72a..386cdb775fd4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -13307,7 +13307,7 @@ void kvm_arch_pre_destroy_vm(struct kvm *kvm) #endif kvm_mmu_pre_destroy_vm(kvm); - static_call_cond(kvm_x86_vm_pre_destroy)(kvm); + kvm_x86...
ead63640d4e72e6f6d464f4e31f7fecb79af8869
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Ignore -EBUSY when checking nested events from vcpu_block()
Problem Details: Ignore -EBUSY when checking nested events after exiting a blocking state while L2 is active, as exiting to userspace will generate a spurious userspace exit, usually with KVM_EXIT_UNKNOWN, and likely lead to the VM's demise. Continuing with the wakeup isn't perfect either, as *something* has gone side...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index e4418409b468..fe9d324da72a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -11597,8 +11597,7 @@ static inline int vcpu_block(struct kvm_vcpu *vcpu) if (is_guest_mode(vcpu)) { int r = kvm_check_nested_events(vcpu); - WARN_ON_ONCE(r ==...
d23051f59a5b4eb1f6163cf27e07b8cfcaeb4758
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Tag sev_supported_vmsa_features as read-only after init
Problem Details: Tag sev_supported_vmsa_features with __ro_after_init as it's configured by sev_hardware_setup() and never written after initial configuration (and if it were, that'd be a blatant bug). Opportunistically relocate the variable out of the module params area now that sev_es_debug_swap_enabled is gone (whi...
```diff diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 9b92f0cccfe6..28150506b18c 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -53,8 +53,6 @@ module_param_named(sev_es, sev_es_enabled, bool, 0444); static bool sev_snp_enabled = true; module_param_named(sev_snp, sev_snp_enabl...
cea6e6e8717e81de266aa496f44088b2b960aa32
Analyze and fix the following issue in the Linux kernel code: drm/atomic: verify that gamma/degamma LUTs are not too big
Problem Details: The kernel specifies LUT table sizes in a separate property, however it doesn't enforce it as a maximum. Some drivers implement max size check on their own in the atomic_check path. Other drivers simply ignore the issue. Perform LUT size validation in the generic place. Reviewed-by: Thomas Zimmermann ...
```diff diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index dff1fdefcbeb..dc013a22bf26 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -413,10 +413,19 @@ static int drm_atomic_crtc_set_property(struct drm_crtc *crtc, } else if (property ==...
ca59e33f5a1f642d13ae0e558fdbdd9aaa9fe203
Analyze and fix the following issue in the Linux kernel code: drm/atomic: add max_size check to drm_property_replace_blob_from_id()
Problem Details: The function drm_property_replace_blob_from_id() allows checking whether the blob size is equal to a predefined value. In case of variable-size properties (like the gamma / degamma LUTs) we might want to check for the blob size against the maximum, allowing properties of the size lesser than the max su...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c index 2e3ee78999d9..8c5912b59e19 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c @@ -1676,8 +1676,8 @@...
66c9c0cfe765af7f30eac880da0fa047aea8617d
Analyze and fix the following issue in the Linux kernel code: drm/mode_object: add drm_object_immutable_property_get_value()
Problem Details: We have a helper to get property values for non-atomic drivers and another one default property values for atomic drivers. In some cases we need the ability to get value of immutable property, no matter what kind of driver it is. Implement new property-related helper, drm_object_immutable_property_get_...
```diff diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c index b45d501b10c8..2d943a610b88 100644 --- a/drivers/gpu/drm/drm_mode_object.c +++ b/drivers/gpu/drm/drm_mode_object.c @@ -385,6 +385,31 @@ int drm_object_property_get_default_value(struct drm_mode_object *obj, } EXPORT_SYMBOL...
456c4f5ff0c886fd49daaa4dec13160df872bbc3
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/kms/nv50-: Assert we hold nv50_disp->lock in nv50_head_flush_*
Problem Details: Now that we've had one bug that occurred in nouveau as the result of nv50_head_flush_* being called without the appropriate locks, let's add some lockdep asserts to make sure this doesn't happen in the future. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> L...
```diff diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c index 3dd742b4f823..e32ed1db6c56 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/head.c +++ b/drivers/gpu/drm/nouveau/dispnv50/head.c @@ -43,6 +43,9 @@ nv50_head_flush_clr(struct nv50_head *head, union nv50_head_atom_...
9e9bc6be0fa0b6b6b73f4f831f3b77716d0a8d9e
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/disp/nv50-: Set lock_core in curs507a_prepare
Problem Details: For a while, I've been seeing a strange issue where some (usually not all) of the display DMA channels will suddenly hang, particularly when there is a visible cursor on the screen that is being frequently updated, and especially when said cursor happens to go between two screens. While this brings bac...
```diff diff --git a/drivers/gpu/drm/nouveau/dispnv50/curs507a.c b/drivers/gpu/drm/nouveau/dispnv50/curs507a.c index a95ee5dcc2e3..1a889139cb05 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/curs507a.c +++ b/drivers/gpu/drm/nouveau/dispnv50/curs507a.c @@ -84,6 +84,7 @@ curs507a_prepare(struct nv50_wndw *wndw, struct nv5...
fff010c776f715904ba0823bb347eac00dccffa2
Analyze and fix the following issue in the Linux kernel code: dt-bindings: riscv: update ratified version of h, svinval, svnapot, svpbmt
Problem Details: The descriptions for h, svinval, svnapot, and svpbmt extensions currently reference the "20191213 version of the privileged ISA specification". While an Unprivileged ISA document exists with that date, there is no corresponding ratified Privileged ISA specification. These extensions were ratified in t...
```diff diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml index 565cb2cbb49b..6a4697b36b8d 100644 --- a/Documentation/devicetree/bindings/riscv/extensions.yaml +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml @@ -117,8 +117,9 @@ p...
7edf6f7ef5345e1b4202912ca98aaa7c73e1e82c
Analyze and fix the following issue in the Linux kernel code: ACPI: PM: s2idle: Add module parameter for LPS0 constraints checking
Problem Details: Commit 32ece31db4df ("ACPI: PM: s2idle: Only retrieve constraints when needed") attempted to avoid useless evaluation of LPS0 _DSM Function 1 in lps0_device_attach() because pm_debug_messages_on might never be set (and that is the case on production systems most of the time), but it turns out that LPS0...
```diff diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 2a9edb53d5d4..cc3c83e4cc23 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -28,6 +28,10 @@ static bool sleep_no_lps0 __read_mostly; module_param(sleep_no_lps0, bool, 0644); MODULE_PARM_DESC(sleep_no_lps0, "Do no...
84164acba33158208c2b0e8e5607bdd43edc0dd4
Analyze and fix the following issue in the Linux kernel code: nvmet: do not copy beyond sybsysnqn string length
Problem Details: Commit edd17206e363 ("nvmet: remove redundant subsysnqn field from ctrl") replaced ctrl->subsysnqn with ctrl->subsys->subsysnqn. This change works as expected because both point to strings with the same data. However, their memory allocation lengths differ. ctrl->subsysnqn had the fixed size defined as...
```diff diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c index 96648ec2fadb..67c423a8b052 100644 --- a/drivers/nvme/target/passthru.c +++ b/drivers/nvme/target/passthru.c @@ -150,7 +150,7 @@ static u16 nvmet_passthru_override_id_ctrl(struct nvmet_req *req) * code path with duplicate ctrl ...
f947d9e77b26238b821b5227afb4fee8c7ea0d5a
Analyze and fix the following issue in the Linux kernel code: nvme/host: fixup some typos
Problem Details: Fix up some minor typos in the nvme host driver and a comment style to conform to the standard kernel style. Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.o...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 69cb04406b47..74cbbf48a981 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -25,7 +25,8 @@ struct nvme_tcp_queue; -/* Define the socket priority to use for connections were it is desirable +/* + * Define the socket pr...
01464a3fdf91c041a381d93a1b6fefbdb819a46f
Analyze and fix the following issue in the Linux kernel code: PCI/portdrv: Fix potential resource leak
Problem Details: pcie_port_probe_service() unconditionally calls get_device() (unless it fails). So drop that reference also unconditionally as it's fine for a PCIe driver to not have a remove callback. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-b...
```diff diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c index 38a41ccf79b9..a0991da48213 100644 --- a/drivers/pci/pcie/portdrv.c +++ b/drivers/pci/pcie/portdrv.c @@ -557,10 +557,10 @@ static int pcie_port_remove_service(struct device *dev) pciedev = to_pcie_device(dev); driver = to_service_dr...
d1f9dc67238e716a4cc0ffd7014f501775d5f3ed
Analyze and fix the following issue in the Linux kernel code: perf Documentation: Correct branch stack sampling call-stack option
Problem Details: The correct call-stack option for branch stack sampling should be "stack" instead of "call_stack". Correct it. $perf record -e instructions -j call_stack -- sleep 1 unknown branch filter call_stack, check man page Usage: perf record [<options>] [<command>] or: perf record [<options>] -- <command...
```diff diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt index c402e74172f6..178f483140ed 100644 --- a/tools/perf/Documentation/perf-record.txt +++ b/tools/perf/Documentation/perf-record.txt @@ -455,7 +455,7 @@ following filters are defined: - no_tx: only when the targe...
f136fc491b2a48dbfcb98cac372303dc0e18f0c1
Analyze and fix the following issue in the Linux kernel code: perf genelf: Switch from SHA-1 to BLAKE2s for build ID generation
Problem Details: Recent patches [1] [2] added an implementation of SHA-1 to perf and made it be used for build ID generation. I had understood the choice of SHA-1, which is a legacy algorithm, to be for backwards compatibility. It turns out, though, that there's no backwards compatibility requirement here other than ...
```diff diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c index a1cd5196f4ec..14882def9704 100644 --- a/tools/perf/util/genelf.c +++ b/tools/perf/util/genelf.c @@ -18,8 +18,8 @@ #include <dwarf.h> #endif +#include "blake2s.h" #include "genelf.h" -#include "sha1.h" #include "../util/jitdump.h" #inc...
b6ee9b6e206b288921c14c906eebf4b32fe0c0d8
Analyze and fix the following issue in the Linux kernel code: libsubcmd: Fix null intersection case in exclude_cmds()
Problem Details: When there is no exclusion occurring from the cmds list - for example - cmds contains ["read-vdso32"] and excludes contains ["archive"] - the main loop completes with ci == cj == 0. In the original code the loop processing the remaining elements in the list was conditional: if (ci != cj) { ...} S...
```diff diff --git a/tools/lib/subcmd/help.c b/tools/lib/subcmd/help.c index ddaeb4eb3e24..db94aa685b73 100644 --- a/tools/lib/subcmd/help.c +++ b/tools/lib/subcmd/help.c @@ -97,11 +97,13 @@ void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes) ei++; } } - if (ci != cj) { - while (ci < cmds->cnt...
60b590de8b30dad8b11e9e4fba0df2eae81afb98
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Fix a missing kunmap_local() in sev_gmem_post_populate()
Problem Details: sev_gmem_post_populate() needs to unmap the target vaddr after copy_from_user() to the vaddr fails. Fixes: dee5a47cc7a4 ("KVM: SEV: Add KVM_SEV_SNP_LAUNCH_UPDATE command") Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Michael Roth <michael.roth@amd.com> Link: https://patch.msgid.link/2...
```diff diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index f59c65abe3cf..261d9ef8631b 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -2296,6 +2296,7 @@ static int sev_gmem_post_populate(struct kvm *kvm, gfn_t gfn_start, kvm_pfn_t pf void *vaddr = kmap_local_pfn(pfn + i); i...
abec464767b5d26f0612250d511c18f420826ca1
Analyze and fix the following issue in the Linux kernel code: perf callchain: Fix srcline printing with inlines
Problem Details: sample__fprintf_callchain() was using map__fprintf_srcline() which won't report inline line numbers. Fix by using the srcline from the callchain and falling back to the map variant. Fixes: 25da4fab5f66e659 ("perf evsel: Move fprintf methods to separate source file") Reviewed-by: James Clark <james.cl...
```diff diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c index 10f1a03c2860..5521d00bff2c 100644 --- a/tools/perf/util/evsel_fprintf.c +++ b/tools/perf/util/evsel_fprintf.c @@ -185,8 +185,12 @@ int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment, if (print_dso ...
8ad1b6c1e63d25f5465b7a8aa403bdcee84b86f9
Analyze and fix the following issue in the Linux kernel code: igc: Reduce TSN TX packet buffer from 7KB to 5KB per queue
Problem Details: The previous 7 KB per queue caused TX unit hangs under heavy timestamping load. Reducing to 5 KB avoids these hangs and matches the TSN recommendation in I225/I226 SW User Manual Section 7.5.4. The 8 KB "freed" by this change is currently unused. This reduction is not expected to impact throughput, as...
```diff diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index 498ba1522ca4..9482ab11f050 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -443,9 +443,10 @@ #define IGC_TXPBSIZE_DEFAULT ( \ IGC_TXPB...
6990dc392a9ab10e52af37e0bee8c7b753756dc4
Analyze and fix the following issue in the Linux kernel code: igc: fix race condition in TX timestamp read for register 0
Problem Details: The current HW bug workaround checks the TXTT_0 ready bit first, then reads TXSTMPL_0 twice (before and after reading TXSTMPH_0) to detect whether a new timestamp was captured by timestamp register 0 during the workaround. This sequence has a race: if a new timestamp is captured after checking the TXT...
```diff diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c index b7b46d863bee..7aae83c108fd 100644 --- a/drivers/net/ethernet/intel/igc/igc_ptp.c +++ b/drivers/net/ethernet/intel/igc/igc_ptp.c @@ -774,36 +774,43 @@ static void igc_ptp_tx_reg_to_stamp(struct igc_adapter *ada...
41a9a6826f20a524242a6c984845c4855f629841
Analyze and fix the following issue in the Linux kernel code: igc: Restore default Qbv schedule when changing channels
Problem Details: The Multi-queue Priority (MQPRIO) and Earliest TxTime First (ETF) offloads utilize the Time Sensitive Networking (TSN) Tx mode. This mode is always coupled to IEEE 802.1Qbv time aware shaper (Qbv). Therefore, the driver sets a default Qbv schedule of all gates opened and a cycle time of 1s. This schedu...
```diff diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index e94c1922b97a..3172cdbca9cc 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1565,8 +1565,8 @@ static int igc_ethtool_set_channels(struct ...
01139a2ce532d77379e1593230127caa261a8036
Analyze and fix the following issue in the Linux kernel code: ice: Fix incorrect timeout ice_release_res()
Problem Details: The commit 5f6df173f92e ("ice: implement and use rd32_poll_timeout for ice_sq_done timeout") converted ICE_CTL_Q_SQ_CMD_TIMEOUT from jiffies to microseconds. But the ice_release_res() function was missed, and its logic still treats ICE_CTL_Q_SQ_CMD_TIMEOUT as a jiffies value. So correct the issue by ...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index 046bc9c65c51..785bf5cc1b25 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c @@ -2251,7 +2251,7 @@ void ice_release_res(struct ice_hw *hw, enum ic...
a9d45c22ed120cdd15ff56d0a6e4700c46451901
Analyze and fix the following issue in the Linux kernel code: ice: Avoid detrimental cleanup for bond during interface stop
Problem Details: When the user issues an administrative down to an interface that is the primary for an aggregate bond, the prune lists are being purged. This breaks communication to the secondary interface, which shares a prune list on the main switch block while bonded together. For the primary interface of an aggre...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 9ebbe1bff214..98010354db15 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -3809,22 +3809,31 @@ int ice_vsi_add_vlan_zero(struct ice_vsi *vsi) int ice_v...
8439016c3b8b5ab687c2420317b1691585106611
Analyze and fix the following issue in the Linux kernel code: ice: initialize ring_stats->syncp
Problem Details: The u64_stats_sync structure is empty on 64-bit systems. However, on 32-bit systems it contains a seqcount_t which needs to be initialized. While the memory is zero-initialized, a lack of u64_stats_init means that lockdep won't get initialized properly. Fix this by adding u64_stats_init() calls to the ...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 15621707fbf8..9ebbe1bff214 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -398,6 +398,8 @@ static int ice_vsi_alloc_ring_stats(struct ice_vsi *vsi) ...
bffacdb80b93b7b5e96b26fad64cc490a6c7d6c7
Analyze and fix the following issue in the Linux kernel code: bpf: Recognize special arithmetic shift in the verifier
Problem Details: cilium bpf_wiregard.bpf.c when compiled with -O1 fails to load with the following verifier log: 192: (79) r2 = *(u64 *)(r10 -304) ; R2=pkt(r=40) R10=fp0 fp-304=pkt(r=40) ... 227: (85) call bpf_skb_store_bytes#9 ; R0=scalar() 228: (bc) w2 = w0 ; R0=scalar() R2=scalar(sm...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 02a43cafbb25..9d3ad2876d8f 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -15491,6 +15491,35 @@ static bool is_safe_to_compute_dst_reg_range(struct bpf_insn *insn, } } +static int maybe_fork_scalars(struct bpf_verifier_env ...
951d79017e8a0af6db4a167a89746b4a0924626b
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix verifier_arena_globals1 failure with 64K page
Problem Details: With 64K page on arm64, verifier_arena_globals1 failed like below: ... libbpf: map 'arena': failed to create: -E2BIG ... #509/1 verifier_arena_globals1/check_reserve1:FAIL ... For 64K page, if the number of arena pages is (1UL << 20), the total memory will exceed 4G and this will cause map...
```diff diff --git a/tools/testing/selftests/bpf/progs/verifier_arena_globals1.c b/tools/testing/selftests/bpf/progs/verifier_arena_globals1.c index 14afef3d6442..83182ddbfb95 100644 --- a/tools/testing/selftests/bpf/progs/verifier_arena_globals1.c +++ b/tools/testing/selftests/bpf/progs/verifier_arena_globals1.c @@ -9...
d2f7cd20a7c7742b83d2c899044d4f2a851a4a7d
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix sk_bypass_prot_mem failure with 64K page
Problem Details: The current selftest sk_bypass_prot_mem only supports 4K page. When running with 64K page on arm64, the following failure happens: ... check_bypass:FAIL:no bypass unexpected no bypass: actual 3 <= expected 32 ... #385/1 sk_bypass_prot_mem/TCP :FAIL ... check_bypass:FAIL:no bypass unexpec...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/sk_bypass_prot_mem.c b/tools/testing/selftests/bpf/prog_tests/sk_bypass_prot_mem.c index e4940583924b..e2c867fd5244 100644 --- a/tools/testing/selftests/bpf/prog_tests/sk_bypass_prot_mem.c +++ b/tools/testing/selftests/bpf/prog_tests/sk_bypass_prot_mem.c @@ -5...
2465a08d433dd4ae0c4eecdb8e79c54b7c5e5a55
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix dmabuf_iter/lots_of_buffers failure with 64K page
Problem Details: On arm64 with 64K page , I observed the following test failure: ... subtest_dmabuf_iter_check_lots_of_buffers:FAIL:total_bytes_read unexpected total_bytes_read: actual 4696 <= expected 65536 #97/3 dmabuf_iter/lots_of_buffers:FAIL With 4K page on x86, the total_bytes_read is 4593. With 6...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c b/tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c index e442be9dde7e..fb2cea710db3 100644 --- a/tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c +++ b/tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c @@ -233,7 +233,7 @@ static void s...
3db5306b0bd562ac0fe7eddad26c60ebb6f5fdd4
Analyze and fix the following issue in the Linux kernel code: time/sched_clock: Use ACCESS_PRIVATE() to evaluate hrtimer::function
Problem Details: This dereference of sched_clock_timer::function was missed when the hrtimer callback function pointer was marked private. Fixes: 04257da0c99c ("hrtimers: Make callback function pointer private") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https...
```diff diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c index f39111830ca3..f3aaef695b8c 100644 --- a/kernel/time/sched_clock.c +++ b/kernel/time/sched_clock.c @@ -215,7 +215,7 @@ void sched_clock_register(u64 (*read)(void), int bits, unsigned long rate) update_clock_read_data(&rd); - if (sched...
e383f0961422f983451ac4dd6aed1a3d3311f2be
Analyze and fix the following issue in the Linux kernel code: i2c: riic: Move suspend handling to NOIRQ phase
Problem Details: Commit 53326135d0e0 ("i2c: riic: Add suspend/resume support") added suspend support for the Renesas I2C driver and following this change on RZ/G3E the following WARNING is seen on entering suspend ... [ 134.275704] Freezing remaining freezable tasks completed (elapsed 0.001 seconds) [ 134.285536] --...
```diff diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c index 3e8f126cb7f7..9e3595b3623e 100644 --- a/drivers/i2c/busses/i2c-riic.c +++ b/drivers/i2c/busses/i2c-riic.c @@ -670,12 +670,39 @@ static const struct riic_of_data riic_rz_t2h_info = { static int riic_i2c_suspend(struct device *dev...
7517e899e1b87b4c22a92c7e40d8733c48e4ec3c
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Fix memory bandwidth counter width for Hygon
Problem Details: The memory bandwidth calculation relies on reading the hardware counter and measuring the delta between samples. To ensure accurate measurement, the software reads the counter frequently enough to prevent it from rolling over twice between reads. The default Memory Bandwidth Monitoring (MBM) counter w...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 10de1594d328..6ebff44a3f75 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -1021,8 +1021,19 @@ void resctrl_cpu_detect(struct cpuinfo_x86 *c) c->x86_cache_occ_scale = ebx; ...
8441c7d3bd6c5a52ab2ecf77e43a5bf262004f5c
Analyze and fix the following issue in the Linux kernel code: cxl: Check for invalid addresses returned from translation functions on errors
Problem Details: Translation functions may return an invalid address in case of errors. If the address is not checked the further use of the invalid value will cause an address corruption. Consistently check for a valid address returned by translation functions. Use RESOURCE_SIZE_MAX to indicate an invalid address for...
```diff diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c index a470099a69f1..eb5a3a7640c6 100644 --- a/drivers/cxl/core/hdm.c +++ b/drivers/cxl/core/hdm.c @@ -530,7 +530,7 @@ resource_size_t cxl_dpa_size(struct cxl_endpoint_decoder *cxled) resource_size_t cxl_dpa_resource_start(struct cxl_endpoint_decode...
2fa8961d3a6a1c2395d8d560ffed2c782681bade
Analyze and fix the following issue in the Linux kernel code: nvmet-tcp: fixup hang in nvmet_tcp_listen_data_ready()
Problem Details: When the socket is closed while in TCP_LISTEN a callback is run to flush all outstanding packets, which in turns calls nvmet_tcp_listen_data_ready() with the sk_callback_lock held. So we need to check if we are in TCP_LISTEN before attempting to get the sk_callback_lock() to avoid a deadlock. Link: ht...
```diff diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c index d5966d007ba3..549a4786d1c3 100644 --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -2004,14 +2004,13 @@ static void nvmet_tcp_listen_data_ready(struct sock *sk) trace_sk_data_ready(sk); + if (sk->sk_state != TCP_LIS...
31707572108da55a005e7fed32cc3869c16b7c16
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix wrong P2P device link id issue
Problem Details: Wrong P2P device link id value of 0 was introduced in ath12k_mac_op_tx() by [1]. During the P2P negotiation process, there is only one scan vdev with link ID 15. Currently, the device link ID is incorrectly set to 0 in ath12k_mac_op_tx() during the P2P negotiation process, which leads to TX failures. ...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 8476a1ff308d..e0e49f782bf8 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -9173,7 +9173,10 @@ static void ath12k_mac_op_tx(struct ieee80211_hw *hw, return; }...
f88e9fc30a261d63946ddc6cc6a33405e6aa27c3
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix dead lock while flushing management frames
Problem Details: Commit [1] converted the management transmission work item into a wiphy work. Since a wiphy work can only run under wiphy lock protection, a race condition happens in below scenario: 1. a management frame is queued for transmission. 2. ath12k_mac_op_flush() gets called to flush pending frames associat...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index ed2ac2fe12f0..8476a1ff308d 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -12143,6 +12143,9 @@ static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee8...
8b8d6ee53dfdee61b0beff66afe3f712456e707a
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix scan state stuck in ABORTING after cancel_remain_on_channel
Problem Details: Scan finish workqueue was introduced in __ath12k_mac_scan_finish() by [1]. During ath12k_mac_op_cancel_remain_on_channel(), scan state is set to ABORTING and should be reset to IDLE in the queued work. However, wiphy_work_cancel() is called before exiting ath12k_mac_op_cancel_remain_on_channel(), whic...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 088b5ffd0797..ed2ac2fe12f0 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -13344,7 +13344,7 @@ static int ath12k_mac_op_cancel_remain_on_channel(struct ieee80211_hw...
39c90b1a1dbe6d7c49d19da6e5aec00980c55d8b
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: cancel scan only on active scan vdev
Problem Details: Cancel the scheduled scan request only on the vdev that has an active scan running. Currently, ahvif->links_map is used to obtain the links, but this includes links for which no scan is scheduled. In failure cases where the scan fails due to an invalid channel definition, other links which are not yet ...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index f7a2a544bef2..088b5ffd0797 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -5495,7 +5495,8 @@ static void ath12k_mac_op_cancel_hw_scan(struct ieee80211_hw *hw, f...
6ee98aabdc700b5705e4f1833e2edc82a826b53b
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Add missing resctrl initialization for Hygon
Problem Details: Hygon CPUs supporting Platform QoS features currently undergo partial resctrl initialization through resctrl_cpu_detect() in the Hygon BSP init helper and AMD/Hygon common initialization code. However, several critical data structures remain uninitialized for Hygon CPUs in the following paths: - get_...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 3792ab4819dc..10de1594d328 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -825,7 +825,8 @@ static __init bool get_mem_config(void) if (boot_cpu_data.x86_vendor == X86_VENDO...
24abe1f238e7d7ac56be6374c52a3c13dab84f69
Analyze and fix the following issue in the Linux kernel code: drm/mediatek: Convert legacy DRM logging to drm_* helpers in mtk_crtc.c
Problem Details: Replace DRM_ERROR() and DRM_DEBUG_DRIVER() calls in drivers/gpu/drm/mediatek/mtk_crtc.c with the corresponding drm_err() and drm_dbg_driver() helpers. The drm_*() logging helpers take a struct drm_device * argument, allowing the DRM core to prefix log messages with the correct device name and instance...
```diff diff --git a/drivers/gpu/drm/mediatek/mtk_crtc.c b/drivers/gpu/drm/mediatek/mtk_crtc.c index 991cdb3d7d5f..6ad712c0339a 100644 --- a/drivers/gpu/drm/mediatek/mtk_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_crtc.c @@ -225,13 +225,14 @@ static void mtk_crtc_mode_set_nofb(struct drm_crtc *crtc) static int mtk_crt...
cd644b805da8a253198718741bf363c4c58862ff
Analyze and fix the following issue in the Linux kernel code: USB: serial: f81232: fix incomplete serial port generation
Problem Details: The Fintek F81532A/534A/535/536 family relies on the F81534A_CTRL_CMD_ENABLE_PORT (116h) register during initialization to both determine serial port status and control port creation. If the driver experiences fast load/unload cycles, the device state may becomes unstable, resulting in the incomplete g...
```diff diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 530b77fc2f78..9262a2ac97f5 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial/f81232.c @@ -70,7 +70,6 @@ MODULE_DEVICE_TABLE(usb, combined_id_table); #define F81232_REGISTER_REQUEST 0xa0 #define F81232_GET_REGISTER 0...
613f3255a35a95f52575dd8c60b7ac9d711639ce
Analyze and fix the following issue in the Linux kernel code: PCI: sophgo: Disable L0s and L1 on Sophgo 2044 PCIe Root Ports
Problem Details: Sophgo 2044 Root Ports advertise L0 and L1 capabilities without supporting them. Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enabled ASPM on all device tree platforms, the issue became evident and the SG2044 Root Port started breaking. Henc...
```diff diff --git a/drivers/pci/controller/dwc/pcie-sophgo.c b/drivers/pci/controller/dwc/pcie-sophgo.c index ad4baaa34ffa..044088898819 100644 --- a/drivers/pci/controller/dwc/pcie-sophgo.c +++ b/drivers/pci/controller/dwc/pcie-sophgo.c @@ -161,6 +161,22 @@ static void sophgo_pcie_msi_enable(struct dw_pcie_rp *pp) ...
dc7901b5a1563a9c9eb29b3b0b0dac3162065cd8
Analyze and fix the following issue in the Linux kernel code: platform/x86: ISST: Store and restore all domains data
Problem Details: The suspend/resume callbacks currently only store and restore the configuration for power domain 0. However, other power domains may also have modified configurations that need to be preserved across suspend/ resume cycles. Extend the store/restore functionality to handle all power domains. Fixes: 91...
```diff diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c index f587709ddd47..13b11c3a2ec4 100644 --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c @@ -1...
0e5aef2795008c80c515f6fa04e377c6e5715958
Analyze and fix the following issue in the Linux kernel code: platform/x86: ISST: Add missing write block check
Problem Details: If writes are blocked, then return error during SST-CP enable command. Add missing write block check in this code path. Fixes: 8bed9ff7dbcc ("platform/x86: ISST: Process read/write blocked feature status") Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: stable@vger.kernel....
```diff diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c index 34bff2f65a83..f587709ddd47 100644 --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c @@ -6...
40b94ec7edbbb867c4e26a1a43d2b898f04b93c5
Analyze and fix the following issue in the Linux kernel code: null_blk: fix kmemleak by releasing references to fault configfs items
Problem Details: When CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION is enabled, the null-blk driver sets up fault injection support by creating the timeout_inject, requeue_inject, and init_hctx_fault_inject configfs items as children of the top-level nullbX configfs group. However, when the nullbX device is removed, the ref...
```diff diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index c7c0fb79a6bf..4c0632ab4e1b 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -665,12 +665,22 @@ static void nullb_add_fault_config(struct nullb_device *dev) configfs_add_default_group(&dev->init_hc...
ef5749ef8b307bf8717945701b1b79d036af0a15
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Prevent excessive number of frames
Problem Details: In this case, the user constructed the parameters with maxpacksize 40 for rate 22050 / pps 1000, and packsize[0] 22 packsize[1] 23. The buffer size for each data URB is maxpacksize * packets, which in this example is 40 * 6 = 240; When the user performs a write operation to send audio data into the ALS...
```diff diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 54d01dfd820f..263abb36bb2d 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -1553,7 +1553,7 @@ static int prepare_playback_urb(struct snd_usb_substream *subs, for (i = 0; i < ctx->packets; i++) { counts = snd_usb_endpoint_next_packet_size(ep, ct...
dc2d5ddb193e363187bae2ad358245642d2721fb
Analyze and fix the following issue in the Linux kernel code: drm/gud: fix NULL fb and crtc dereferences on USB disconnect
Problem Details: On disconnect drm_atomic_helper_disable_all() is called which sets both the fb and crtc for a plane to NULL before invoking a commit. This causes a kernel oops on every display disconnect. Add guards for those dereferences. Cc: <stable@vger.kernel.org> # 6.18.x Fixes: 73cfd166e045 ("drm/gud: Replace...
```diff diff --git a/drivers/gpu/drm/gud/gud_pipe.c b/drivers/gpu/drm/gud/gud_pipe.c index 76d77a736d84..4b77be94348d 100644 --- a/drivers/gpu/drm/gud/gud_pipe.c +++ b/drivers/gpu/drm/gud/gud_pipe.c @@ -457,27 +457,20 @@ int gud_plane_atomic_check(struct drm_plane *plane, struct drm_plane_state *old_plane_state = drm...
5a16e131ddbacdd7acfb8cab6ff0ca1c57339600
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix the common combophy + SATA on QNAP TSx33 devices
Problem Details: The common used SATA controller on all TSx33 devices is actually SATA2. So move the SATA controller + combophy enablement to their correct position between shared dtsi and board devicetrees. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/20260104191448.2693309-3-heiko@s...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts index 9a7d58e7ccc0..e76502180788 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts @@ -18,8 +18,8 @@ }; }; -/* connecte...
6a0243c4020636482797acfd48d7d9b0ea2f2a20
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/cirrus_scodec_test: Fix test suite name
Problem Details: Change the test suite name string to "snd-hda-cirrus-scodec-test". It was incorrectly named "snd-hda-scodec-cs35l56-test", a leftover from when the code under test was actually in the cs35l56 driver. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 2144833e7b414 ("ALSA: hda: cirrus...
```diff diff --git a/sound/hda/codecs/side-codecs/cirrus_scodec_test.c b/sound/hda/codecs/side-codecs/cirrus_scodec_test.c index 159ac80a9314..dc35932b6b22 100644 --- a/sound/hda/codecs/side-codecs/cirrus_scodec_test.c +++ b/sound/hda/codecs/side-codecs/cirrus_scodec_test.c @@ -320,7 +320,7 @@ static struct kunit_case ...
b9fecf0dddfc55cd7d02b0011494da3c613f7cde
Analyze and fix the following issue in the Linux kernel code: ARM: VDSO: Patch out __vdso_clock_getres() if unavailable
Problem Details: The vDSO code hides symbols which are non-functional. __vdso_clock_getres() was not added to this list when it got introduced. Fixes: 052e76a31b4a ("ARM: 8931/1: Add clock_getres entry point") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel...
```diff diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c index e38a30477f3d..566c40f0f7c7 100644 --- a/arch/arm/kernel/vdso.c +++ b/arch/arm/kernel/vdso.c @@ -161,6 +161,7 @@ static void __init patch_vdso(void *ehdr) vdso_nullpatch_one(&einfo, "__vdso_gettimeofday"); vdso_nullpatch_one(&einfo, "__vdso...
d782e6e7aa798a2c28f30f984ea6dcdb63f51674
Analyze and fix the following issue in the Linux kernel code: dt-bindings: PCI: loongson: Document msi-parent property
Problem Details: Loongson PCI controllers found in LS2K1000/2000 SoCs (loongson,ls2k-pci), 7A1000/2000 bridge chips (loongson,ls7a-pci), and RS780E bridge chips (loongson,rs780e-pci) all have their paired MSI controllers. Though only the one in LS2K2000 SoC is described in devicetree, we should document the property f...
```diff diff --git a/Documentation/devicetree/bindings/pci/loongson.yaml b/Documentation/devicetree/bindings/pci/loongson.yaml index e5bba63aa947..26e77218b901 100644 --- a/Documentation/devicetree/bindings/pci/loongson.yaml +++ b/Documentation/devicetree/bindings/pci/loongson.yaml @@ -32,6 +32,8 @@ properties: mi...
c5e96e54eca3876d4ce8857e2e22adbe9f44f4a2
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/cirrus_scodec_test: Fix incorrect setup of gpiochip
Problem Details: Set gpiochip parent to the struct device of the dummy GPIO driver so that the software node will be associated with the GPIO chip. The recent commit e5d527be7e698 ("gpio: swnode: don't use the swnode's name as the key for GPIO lookup") broke cirrus_scodec_test, because the software node no longer gets...
```diff diff --git a/sound/hda/codecs/side-codecs/cirrus_scodec_test.c b/sound/hda/codecs/side-codecs/cirrus_scodec_test.c index 3cca750857b6..159ac80a9314 100644 --- a/sound/hda/codecs/side-codecs/cirrus_scodec_test.c +++ b/sound/hda/codecs/side-codecs/cirrus_scodec_test.c @@ -103,6 +103,7 @@ static int cirrus_scodec_...
88f2bf22d99b4a89f5ec3d3dec07271368499c3c
Analyze and fix the following issue in the Linux kernel code: RDMA/rtrs-srv: Fix error print in process_info_req()
Problem Details: rtrs_srv_change_state() returns bool (true on success) therefore there is no reason to print error when it fails as it always will be 0. Signed-off-by: Grzegorz Prajsner <grzegorz.prajsner@ionos.com> Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com> Link: https://patch.msgid.link/20260107161517.56...
```diff diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c index 09f4a16b4403..2e09811a10b2 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c @@ -883,7 +883,7 @@ static int process_info_req(struct rtrs_srv_con *con, get_device(&s...
83835f7c07b523c7ca2a5ad0a511670b5810539e
Analyze and fix the following issue in the Linux kernel code: RDMA/rtrs-srv: fix SG mapping
Problem Details: This fixes the following error on the server side: RTRS server session allocation failed: -EINVAL caused by the caller of the `ib_dma_map_sg()`, which does not expect less mapped entries, than requested, which is in the order of things and can be easily reproduced on the machine with enabled IOMMU...
```diff diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c index 7a402eb8e0bf..adb798e2a54a 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c @@ -595,7 +595,7 @@ static int map_cont_bufs(struct rtrs_srv_path *srv_path) srv_p...
c8c6fb886f57d5bf71fb6de6334a143608d35707
Analyze and fix the following issue in the Linux kernel code: ata: libata: Print features also for ATAPI devices
Problem Details: Commit d633b8a702ab ("libata: print feature list on device scan") added a print of the features supported by the device for ATA_DEV_ATA and ATA_DEV_ZAC devices, but not for ATA_DEV_ATAPI devices. Fix this by printing the features also for ATAPI devices. Before changes: ata1.00: ATAPI: Slimtype DVD A ...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 2e7df131fdde..ddf9a7b28a59 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3119,6 +3119,9 @@ int ata_dev_configure(struct ata_device *dev) dma_dir_string); ata_dev_config_lpm(dev); + + if (print_i...
89531b68fc293e91187bf0992147e8d22c65cff3
Analyze and fix the following issue in the Linux kernel code: ata: libata: Add DIPM and HIPM to ata_dev_print_features() early return
Problem Details: ata_dev_print_features() is supposed to return early and not print anything if there are no features supported. However, commit b1f5af54f1f5 ("ata: libata-core: Advertize device support for DIPM and HIPM features") added additional features to ata_dev_print_features() without updating the early return...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 9301c262eabb..2e7df131fdde 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2872,7 +2872,8 @@ static void ata_dev_config_lpm(struct ata_device *dev) static void ata_dev_print_features(struct ata_device *dev) {...
a6bee5e5243ad02cae575becc4c83df66fc29573
Analyze and fix the following issue in the Linux kernel code: ata: libata: Add cpr_log to ata_dev_print_features() early return
Problem Details: ata_dev_print_features() is supposed to return early and not print anything if there are no features supported. However, commit fe22e1c2f705 ("libata: support concurrent positioning ranges log") added another feature to ata_dev_print_features() without updating the early return conditional. Add the m...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 0d9e527fa8ff..9301c262eabb 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2872,7 +2872,7 @@ static void ata_dev_config_lpm(struct ata_device *dev) static void ata_dev_print_features(struct ata_device *dev) {...
ce83767ea323baf8509a75eb0c783cd203e14789
Analyze and fix the following issue in the Linux kernel code: ata: libata-sata: Improve link_power_management_supported sysfs attribute
Problem Details: The link_power_management_supported sysfs attribute is currently set as true even for ata ports that lack a .set_lpm() callback, e.g. dummy ports. This is a bit silly, because while writing to the link_power_management_policy sysfs attribute will make ata_scsi_lpm_store() update ap->target_lpm_policy ...
```diff diff --git a/drivers/ata/libata-sata.c b/drivers/ata/libata-sata.c index b2817a2995d6..04e1e774645e 100644 --- a/drivers/ata/libata-sata.c +++ b/drivers/ata/libata-sata.c @@ -909,7 +909,7 @@ static bool ata_scsi_lpm_supported(struct ata_port *ap) struct ata_link *link; struct ata_device *dev; - if (ap->fl...
8f3fb33f8f3f825c708ece800c921977c157f9b6
Analyze and fix the following issue in the Linux kernel code: ata: libata: Call ata_dev_config_lpm() for ATAPI devices
Problem Details: Commit d360121832d8 ("ata: libata-core: Introduce ata_dev_config_lpm()") introduced ata_dev_config_lpm(). However, it only called this function for ATA_DEV_ATA and ATA_DEV_ZAC devices, not for ATA_DEV_ATAPI devices. Additionally, commit d99a9142e782 ("ata: libata-core: Move device LPM quirk settings t...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 09d8c035fcdf..0d9e527fa8ff 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3116,6 +3116,8 @@ int ata_dev_configure(struct ata_device *dev) ata_mode_string(xfer_mask), cdb_intr_string, atapi_an...
ea4d4ea6d10a561043922d285f1765c7e4bfd32a
Analyze and fix the following issue in the Linux kernel code: ata: ahci: Do not read the per port area for unimplemented ports
Problem Details: An AHCI HBA specifies the number of ports it supports using CAP.NP. The HBA is free to only make a subset of the number of ports available using the PI (Ports Implemented) register. libata currently creates dummy ports for HBA ports that are provided by the HBA, but which are marked as "unavailable" u...
```diff diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 7a7f88b3fa2b..931d0081169b 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -2094,13 +2094,13 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (ap->flags & ATA_FLAG_EM) ap->em_message_type = hpriv->...
8dc33b7c995e3e08087053b79cf919fba61e3669
Analyze and fix the following issue in the Linux kernel code: regulator: bd71828: rename IC specific entities
Problem Details: The new ROHM BD72720 PMIC has similarities with the BD71828. It makes sense to support the regulator control for both PMICs using the same driver. It is often more clear to have the IC specific functions and globals named starting with the chip-name. So, as a preparatory step, prefix the BD71828 specif...
```diff diff --git a/drivers/regulator/bd71828-regulator.c b/drivers/regulator/bd71828-regulator.c index 87de87793fa1..8c006bff89a8 100644 --- a/drivers/regulator/bd71828-regulator.c +++ b/drivers/regulator/bd71828-regulator.c @@ -28,7 +28,7 @@ struct bd71828_regulator_data { int reg_init_amnt; }; -static const st...
cbd46cbc5470f9cb0bbeff70561a3dd3e0769fe1
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Add quirk for Asus Zephyrus G14 2025 using CS35L56, fix speakers
Problem Details: Just like GA403U, this GA403W needs to remap woofers to DAC1. Similarly to other Asus devices, headphones/headset MIC is not working, however the pin config alone is not enough to fix it. From Windows dump of GA403W: 0x12, 0x90a60140 # Correctly set by codec out of the box 0x13, 0x90a60550 0x14,...
```diff diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 61c7372e6307..dbbe8b498583 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -6817,6 +6817,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8f42, "H...
8e29db1b08808f709231e6fd4c79dcdee5b17a17
Analyze and fix the following issue in the Linux kernel code: ASoC: amd: yc: Fix microphone on ASUS M6500RE
Problem Details: Add DMI match for ASUSTeK COMPUTER INC. M6500RE to enable the internal microphone. Signed-off-by: Radhi Bajahaw <bajahawradhi@gmail.com> Link: https://patch.msgid.link/20260112203814.155-1-bajahawradhi@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
```diff diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c index bf4d9d336561..0294177acc66 100644 --- a/sound/soc/amd/yc/acp6x-mach.c +++ b/sound/soc/amd/yc/acp6x-mach.c @@ -416,6 +416,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "M6500RC"), ...
98cc19a353abc8b48b7d58fd7a455e09e7c3aba3
Analyze and fix the following issue in the Linux kernel code: media: staging/ipu7: Fix the loop bound in l2 table alloc
Problem Details: This patch fixes the incorrect loop bound in alloc_l2_pt(). When initializing L2 page table entries, the loop was incorrectly using ISP_L1PT_PTES instead of ISP_L2PT_PTES though the ISP_L1PT_PTES is equal to ISP_L2PT_PTES. Fixes: 71d81c25683a ("media: staging/ipu7: add IPU7 DMA APIs and MMU mapping") ...
```diff diff --git a/drivers/staging/media/ipu7/ipu7-mmu.c b/drivers/staging/media/ipu7/ipu7-mmu.c index ded1986eb8ba..ea35cce4830a 100644 --- a/drivers/staging/media/ipu7/ipu7-mmu.c +++ b/drivers/staging/media/ipu7/ipu7-mmu.c @@ -231,7 +231,7 @@ static u32 *alloc_l2_pt(struct ipu7_mmu_info *mmu_info) dev_dbg(mmu_i...