id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
2bae7beda19f3b2dc6ab2062c94df19c27923712
Analyze and fix the following issue in the Linux kernel code: ASoC: renesas: rz-ssi: Fix rz_ssi_priv::hw_params_cache::sample_width
Problem Details: The strm->sample_width is not filled during rz_ssi_dai_hw_params(). This wrong value is used for caching sample_width in struct hw_params_cache. Fix this issue by replacing 'strm->sample_width'->'params_width(params)' in rz_ssi_dai_hw_params(). After this drop the variable sample_width from struct rz_s...
```diff diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 62d3222c510f..f4dc2f68dead 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -13,6 +13,7 @@ #include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/reset.h> +#include <sound/pcm_params.h> #in...
52a525011cb8e293799a085436f026f2958403f9
Analyze and fix the following issue in the Linux kernel code: ASoC: renesas: rz-ssi: Fix channel swap issue in full duplex mode
Problem Details: The full duplex audio starts with half duplex mode and then switch to full duplex mode (another FIFO reset) when both playback/capture streams available leading to random audio left/right channel swap issue. Fix this channel swap issue by detecting the full duplex condition by populating struct dup var...
```diff diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 81b883e8ac92..62d3222c510f 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -133,6 +133,12 @@ struct rz_ssi_priv { bool bckp_rise; /* Bit clock polarity (SSICR.BCKP) */ bool dma_rt; + struct { + bool tx_...
d2a6cea44acc920fb18d7f29abfa0728b14d10c0
Analyze and fix the following issue in the Linux kernel code: spi: cs42l43: Use actual ACPI firmware node for chip selects
Problem Details: On some systems the cs42l43 has amplifiers attached to its SPI controller that are not properly defined in ACPI. Currently software nodes are added to support this case, however, the chip selects for these devices are specified using a hack. A software node is added with the same name as the pinctrl dr...
```diff diff --git a/drivers/spi/spi-cs42l43.c b/drivers/spi/spi-cs42l43.c index 14307dd800b7..4b6b65f450a8 100644 --- a/drivers/spi/spi-cs42l43.c +++ b/drivers/spi/spi-cs42l43.c @@ -52,20 +52,6 @@ static struct spi_board_info amp_info_template = { .mode = SPI_MODE_0, }; -static const struct software_node cs42l4...
3b86c87f8dcbb8ba3b00d7adf7ccfff086f0f23e
Analyze and fix the following issue in the Linux kernel code: HID: bpf: fix typo in HID usage table
Problem Details: We could go to the USB consortium, but it's probably easier that way. And update HID usage table json generated file from https://usb.org/sites/default/files/hut1_6.pdf updated: 01/30/2025 Reported-by: Colin Ian King <colin.i.king@gmail.com> Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/...
```diff diff --git a/drivers/hid/bpf/progs/hid_report_helpers.h b/drivers/hid/bpf/progs/hid_report_helpers.h index 9b2a48e4a311..9944ff54d31d 100644 --- a/drivers/hid/bpf/progs/hid_report_helpers.h +++ b/drivers/hid/bpf/progs/hid_report_helpers.h @@ -143,8 +143,11 @@ * report with Report ID 0xac of the given size in ...
8ba327d50263a026a41cc891fc8c09689c4b95e2
Analyze and fix the following issue in the Linux kernel code: HID: bpf: Add support for the XP-Pen Deco 01 V3
Problem Details: This device needs a fix for the tilt range on the pen report descriptor and the usual conversion of the pad keys from the firmware's hardcoded keyboard shortcuts to actual pad buttons. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-...
```diff diff --git a/drivers/hid/bpf/progs/XPPen__Deco01V3.bpf.c b/drivers/hid/bpf/progs/XPPen__Deco01V3.bpf.c new file mode 100644 index 000000000000..2502fcc9ede6 --- /dev/null +++ b/drivers/hid/bpf/progs/XPPen__Deco01V3.bpf.c @@ -0,0 +1,305 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Copyright (c) 2025 Red Hat ...
040adbe80135af3de7d924ea39db4bfabf57b66f
Analyze and fix the following issue in the Linux kernel code: HID: bpf: Add support for the Waltop Batteryless Tablet
Problem Details: Several bugs as outlined in udev-hid-bpf#66 and udev-hid-bpf!198: - pressure curve is far from linear - tilt range is ±60, not ±127 - pressing the second button sets both tip down and barrel switch Fix the second button by adding a Secondary Barrel Switch in the existing padding and check for the ti...
```diff diff --git a/drivers/hid/bpf/progs/WALTOP__Batteryless-Tablet.bpf.c b/drivers/hid/bpf/progs/WALTOP__Batteryless-Tablet.bpf.c new file mode 100644 index 000000000000..156d75af516d --- /dev/null +++ b/drivers/hid/bpf/progs/WALTOP__Batteryless-Tablet.bpf.c @@ -0,0 +1,321 @@ +// SPDX-License-Identifier: GPL-2.0-onl...
f5ef3f722d76eb8fdd11be3f1f1f1cc4fefbf45b
Analyze and fix the following issue in the Linux kernel code: dt-bindings: gnss: fix timepulse description
Problem Details: The timepulse pin is an output that can be used to generate a pulse at a (configurable) frequency (i.e. it is not an input). Fixes: dba529605f55 ("dt-bindings: gnss: Rewrite common bindings in YAML") Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Johan Hovold <johan@kernel.org>
```diff diff --git a/Documentation/devicetree/bindings/gnss/gnss-common.yaml b/Documentation/devicetree/bindings/gnss/gnss-common.yaml index d4430d2d6855..354c0524089c 100644 --- a/Documentation/devicetree/bindings/gnss/gnss-common.yaml +++ b/Documentation/devicetree/bindings/gnss/gnss-common.yaml @@ -31,8 +31,7 @@ pro...
7b5ab04f035f829ed6008e4685501ec00b3e73c9
Analyze and fix the following issue in the Linux kernel code: timekeeping: Fix resource leak in tk_aux_sysfs_init() error paths
Problem Details: tk_aux_sysfs_init() returns immediately on error during the auxiliary clock initialization loop without cleaning up previously allocated kobjects and sysfs groups. If kobject_create_and_add() or sysfs_create_group() fails during loop iteration, the parent kobjects (tko and auxo) and any previously cre...
```diff diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 3a4d3b2e3f74..08e0943b54da 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -3060,29 +3060,32 @@ static const struct attribute_group aux_clock_enable_attr_group = { static int __init tk_aux_sysfs_init(void) { s...
002541ef650b742a198e4be363881439bb9d86b4
Analyze and fix the following issue in the Linux kernel code: vsock: Ignore signal/timeout on connect() if already established
Problem Details: During connect(), acting on a signal/timeout by disconnecting an already established socket leads to several issues: 1. connect() invoking vsock_transport_cancel_pkt() -> virtio_transport_purge_skbs() may race with sendmsg() invoking virtio_transport_get_credit(). This results in a permanently e...
```diff diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 76763247a377..a9ca9c3b87b3 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1661,18 +1661,40 @@ static int vsock_connect(struct socket *sock, struct sockaddr *addr, timeout = schedule_timeout(timeout); lock_sock...
7d277a7a58578dd62fd546ddaef459ec24ccae36
Analyze and fix the following issue in the Linux kernel code: be2net: pass wrb_params in case of OS2BMC
Problem Details: be_insert_vlan_in_pkt() is called with the wrb_params argument being NULL at be_send_pkt_to_bmc() call site.  This may lead to dereferencing a NULL pointer when processing a workaround for specific packet, as commit bc0c3405abbb ("be2net: fix a Tx stall bug caused by a specific ipv6 packet") states. T...
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index cb004fd16252..5bb31c8fab39 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -1296,7 +1296,8 @@ static void be_xmit_flush(struct be_adapter *ad...
fecaa0c74f66643d5bd55422b426aefeaaaa25f2
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Fix wrong check for CQ coalesc support
Problem Details: Driver is not creating the debugfs hooks for CQ coalesc parameters because of a wrong check. Fixed the condition check inside bnxt_re_init_cq_coal_debugfs(). Fixes: cf2749079011 ("RDMA/bnxt_re: Add a debugfs entry for CQE coalescing tuning") Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.co...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/debugfs.c b/drivers/infiniband/hw/bnxt_re/debugfs.c index d03f5bb0d890..88817c86ae24 100644 --- a/drivers/infiniband/hw/bnxt_re/debugfs.c +++ b/drivers/infiniband/hw/bnxt_re/debugfs.c @@ -454,7 +454,7 @@ static void bnxt_re_init_cq_coal_debugfs(struct bnxt_re_dev *rdev...
072cd5f458d76b9e15d89ebdaea8b5cb1312eeef
Analyze and fix the following issue in the Linux kernel code: leds: rgb: leds-qcom-lpg: Don't enable TRILED when configuring PWM
Problem Details: The PWM signal from the LPG channel can be routed to PMIC GPIOs with proper GPIO configuration, and it is not necessary to enable the TRILED channel in that case. This also applies to the LPG channels that mapped to TRILED channels. Additionally, enabling the TRILED channel unnecessarily would cause a ...
```diff diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c index c8afc68e442f..72da0bf469ad 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -2,7 +2,7 @@ /* * Copyright (c) 2017-2022 Linaro Ltd * Copyright (c) 2010-2012, The Linux Foundation. All...
5d390e7a02e850a995ee25248292d4be61314078
Analyze and fix the following issue in the Linux kernel code: dt-bindings: leds: qcom-lpg: Explain standalone PWM usage
Problem Details: LPG channels can be used for only outputting PWM signals by routing to PMIC GPIOs without enabling TRILED. Explain this usage in the description for better clarity. Signed-off-by: Fenglin Wu <fenglin.wu@oss.qualcomm.com> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Link: https://patch.msgid.lin...
```diff diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml index 841a0229c472..c4b7e57b2518 100644 --- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -13,6 +13,...
1759a0392f345689e155196c42f1db28a222618d
Analyze and fix the following issue in the Linux kernel code: dt-bindings: mfd: fsl,mc13xxx: Fix LEDs node schema
Problem Details: The 'leds' node is missing constraints on additional properties. It is mixing 'leds' node and child node properties as well as missing some properties. Add the 'led@' child nodes and the missing properties. Fixes: 1160f9f88be2 ("dt-bindings: mfd: fsl,mc13xxx: Convert txt to DT schema") Signed-off-by: ...
```diff diff --git a/Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml b/Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml index d2886f2686a8..cfa69f1f380a 100644 --- a/Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml +++ b/Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml @@ -93,38 +93,14 @@ prope...
c85da64ce2c36bba469f6feede9ca768f0361741
Analyze and fix the following issue in the Linux kernel code: of/fdt: Fix incorrect use of dt_root_addr_cells in early_init_dt_check_kho()
Problem Details: When reading the fdt_size value, the argument passed to dt_mem_next_cell() is dt_root_addr_cells, but it should be dt_root_size_cells. The same issue occurs when reading the scratch_size value. Use a helper function to simplify the code and fix these issues. Fixes: 274cdcb1c004 ("arm64: add KHO supp...
```diff diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index ea37ba694bcd..fdaee4906836 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -922,26 +922,18 @@ static void __init early_init_dt_check_kho(void) { unsigned long node = chosen_node_offset; u64 fdt_start, fdt_size, scratch_start, scratch_size; - co...
463942de13cd30fad5dba709f708483eab7efc2c
Analyze and fix the following issue in the Linux kernel code: of/fdt: Fix the len check in early_init_dt_check_for_usable_mem_range()
Problem Details: The len value is in bytes, while `dt_root_addr_cells + dt_root_size_cells` is in cells (4 bytes per cell). Modulo calculation between them is incorrect, the units must be converted first. Use helper functions to simplify the code and fix this issue. Fixes: fb319e77a0e7 ("of: fdt: Add memory for devic...
```diff diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index b45f60dccd7c..ea37ba694bcd 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -884,8 +884,9 @@ static unsigned long chosen_node_offset = -FDT_ERR_NOTFOUND; void __init early_init_dt_check_for_usable_mem_range(void) { struct memblock_region rgn[MAX_...
bec5f6092bc1328895992ff02b862ba34b45a0b7
Analyze and fix the following issue in the Linux kernel code: of/fdt: Fix the len check in early_init_dt_check_for_elfcorehdr()
Problem Details: The len value is in bytes, while `dt_root_addr_cells + dt_root_size_cells` is in cells (4 bytes per cell). Comparing them directly is incorrect. Use a helper function to simplify the code and address this issue. Fixes: f7e7ce93aac1 ("of: fdt: Add generic support for handling elf core headers property...
```diff diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 0c18bdefbbee..b45f60dccd7c 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -853,21 +853,15 @@ static void __init early_init_dt_check_for_initrd(unsigned long node) */ static void __init early_init_dt_check_for_elfcorehdr(unsigned long node) { - ...
c639065e142582b886f294be82130f46bbdc707a
Analyze and fix the following issue in the Linux kernel code: ALSA: realtek/alc288 fix headphone for MS Surface 2/3
Problem Details: The Surface Pro 2 and 3 have a strange headphone frequency response and miss most of the bass. I discovered connecting the HP out to the main DAC fixes this. Maybe the other is mono or intentionally filtered signal for the built-in speakers? (At least the Lenovo Ideapad 720S (AMD) (0x17aa, 0x3812) exhi...
```diff diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 1aa4fef8acf6..6748057e6a14 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -3453,6 +3453,21 @@ static void alc283_fixup_dell_hp_resume(struct hda_codec *codec, alc_write_coef_idx...
384bd58bf7095e4c4c8fcdbcede316ef342c630c
Analyze and fix the following issue in the Linux kernel code: mfd: mt6358-irq: Fix missing irq_domain_remove() in error path
Problem Details: If devm_request_threaded_irq() fails after irq_domain_add_linear() succeeds in mt6358_irq_init(), the function returns without removing the created IRQ domain, leading to a resource leak. Call irq_domain_remove() in the error path after a successful irq_domain_add_linear() to properly release the IRQ ...
```diff diff --git a/drivers/mfd/mt6358-irq.c b/drivers/mfd/mt6358-irq.c index f467b00d2366..74cf20843044 100644 --- a/drivers/mfd/mt6358-irq.c +++ b/drivers/mfd/mt6358-irq.c @@ -285,6 +285,7 @@ int mt6358_irq_init(struct mt6397_chip *chip) if (ret) { dev_err(chip->dev, "Failed to register IRQ=%d, ret=%d\n", c...
b4b1bd1f330fdd13706382be6c90ce9f58cee3f5
Analyze and fix the following issue in the Linux kernel code: mfd: mt6397-irq: Fix missing irq_domain_remove() in error path
Problem Details: If devm_request_threaded_irq() fails after irq_domain_create_linear() succeeds in mt6397_irq_init(), the function returns without removing the created IRQ domain, leading to a resource leak. Call irq_domain_remove() in the error path after a successful irq_domain_create_linear() to properly release th...
```diff diff --git a/drivers/mfd/mt6397-irq.c b/drivers/mfd/mt6397-irq.c index 0e463026c5a9..5d2e5459f744 100644 --- a/drivers/mfd/mt6397-irq.c +++ b/drivers/mfd/mt6397-irq.c @@ -229,6 +229,7 @@ int mt6397_irq_init(struct mt6397_chip *chip) if (ret) { dev_err(chip->dev, "failed to register irq=%d; err: %d\n", ...
50db438231dcf7ceac187a6a9c68a1d757b8d883
Analyze and fix the following issue in the Linux kernel code: cpuidle: governors: teo: Fix tick_intercepts handling in teo_update()
Problem Details: The condition deciding whether or not to increase cpu_data->tick_intercepts in teo_update() is reverse, so fix it. Fixes: d619b5cc6780 ("cpuidle: teo: Simplify counting events used for tick management") Cc: 6.14+ <stable@vger.kernel.org> # 6.14+: 0796ddf4a7f0: cpuidle: teo: Use this_cpu_ptr() where po...
```diff diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c index 94ba00b7617d..85b5517067d1 100644 --- a/drivers/cpuidle/governors/teo.c +++ b/drivers/cpuidle/governors/teo.c @@ -251,7 +251,7 @@ static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev) cpu_data->state...
083654ded547238c70e0d4f57115cd1c91245b6e
Analyze and fix the following issue in the Linux kernel code: cpuidle: governors: teo: Rework the handling of tick wakeups
Problem Details: If the wakeup pattern is clearly dominated by tick wakeups, count those wakeups as hits on the deepest available idle state to increase the likelihood of stopping the tick, especially on systems where there are only 2 usable idle states and the tick can only be stopped when the deeper state is selected...
```diff diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c index 8b80d73e518e..94ba00b7617d 100644 --- a/drivers/cpuidle/governors/teo.c +++ b/drivers/cpuidle/governors/teo.c @@ -133,17 +133,19 @@ struct teo_bin { * @sleep_length_ns: Time till the closest timer event (at the selection time...
6f87b41303d3c4280a57b4f7360022a0951b43dd
Analyze and fix the following issue in the Linux kernel code: string: fix kerneldoc formatting in strends()
Problem Details: strends() kernel doc should have used `@str:` format for arguments instead of `@str -`. Fixes: 197b3f3c70d6 ("string: provide strends()") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/all/20251118134748.40f03b9c@canb.auug.org.au/ Link: https://lore.kernel.org/r/2...
```diff diff --git a/include/linux/string.h b/include/linux/string.h index 929d05d1247c..69e9256592f8 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -564,8 +564,8 @@ static inline bool strstarts(const char *str, const char *prefix) /** * strends - Check if a string ends with another string. - ...
b11890683380a36b8488229f818d5e76e8204587
Analyze and fix the following issue in the Linux kernel code: ata: libata-scsi: Fix system suspend for a security locked drive
Problem Details: Commit cf3fc037623c ("ata: libata-scsi: Fix ata_to_sense_error() status handling") fixed ata_to_sense_error() to properly generate sense key ABORTED COMMAND (without any additional sense code), instead of the previous bogus sense key ILLEGAL REQUEST with the additional sense code UNALIGNED WRITE COMMAN...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 3fb84f690644..434774e71fe6 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -992,6 +992,13 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc) return; } + if (ata_id_is_locked(dev->id)) { + /* Secur...
417bd0d502f90a2e785e7299dae4f248b5ac0292
Analyze and fix the following issue in the Linux kernel code: tools/rtla: Fix --on-threshold always triggering
Problem Details: Commit 8d933d5c89e8 ("rtla/timerlat: Add continue action") moved the code performing on-threshold actions (enabled through --on-threshold option) to inside the RTLA main loop. The condition in the loop does not check whether the threshold was actually exceeded or if stop tracing was requested by the u...
```diff diff --git a/tools/tracing/rtla/src/common.c b/tools/tracing/rtla/src/common.c index 2e6e3dac1897..b197037fc58b 100644 --- a/tools/tracing/rtla/src/common.c +++ b/tools/tracing/rtla/src/common.c @@ -268,6 +268,10 @@ int top_main_loop(struct osnoise_tool *tool) tool->ops->print_stats(tool); if (osnoise_...
e4240db9336c25826a2d6634adcca86d5ee01bde
Analyze and fix the following issue in the Linux kernel code: rtla/timerlat_bpf: Stop tracing on user latency
Problem Details: rtla-timerlat allows a *thread* latency threshold to be set via the -T/--thread option. However, the timerlat tracer calls this *total* latency (stop_tracing_total_us), and stops tracing also when the return-to-user latency is over the threshold. Change the behavior of the timerlat BPF program to refl...
```diff diff --git a/tools/tracing/rtla/src/timerlat.bpf.c b/tools/tracing/rtla/src/timerlat.bpf.c index 084cd10c21fc..e2265b5d6491 100644 --- a/tools/tracing/rtla/src/timerlat.bpf.c +++ b/tools/tracing/rtla/src/timerlat.bpf.c @@ -148,6 +148,9 @@ int handle_timerlat_sample(struct trace_event_raw_timerlat_sample *tp_arg...
b4275b23010df719ec6508ddbc84951dcd24adce
Analyze and fix the following issue in the Linux kernel code: tools/rtla: Fix unassigned nr_cpus
Problem Details: In recently introduced timerlat_free(), the variable 'nr_cpus' is not assigned. Assign it with sysconf(_SC_NPROCESSORS_CONF) as done elsewhere. Remove the culprit: -Wno-maybe-uninitialized. The rest of the code is clean. Signed-off-by: Costa Shulyupin <costa.shul@redhat.com> Reviewed-by: Tomas Glozar...
```diff diff --git a/tools/tracing/rtla/Makefile.rtla b/tools/tracing/rtla/Makefile.rtla index 08c1b40883d3..1743d91829d4 100644 --- a/tools/tracing/rtla/Makefile.rtla +++ b/tools/tracing/rtla/Makefile.rtla @@ -18,7 +18,7 @@ export CC AR STRIP PKG_CONFIG LD_SO_CONF_PATH LDCONFIG FOPTS := -flto=auto -ffat-lto-objects ...
b32cc17d607e8ae7af037303fe101368cb4dc44c
Analyze and fix the following issue in the Linux kernel code: ata: libata-scsi: Add missing scsi_device_put() in ata_scsi_dev_rescan()
Problem Details: Call scsi_device_put() in ata_scsi_dev_rescan() if the device or its queue are not running. Fixes: 0c76106cb975 ("scsi: sd: Fix TCG OPAL unlock on system resume") Cc: stable@vger.kernel.org Signed-off-by: Yihang Li <liyihang9@h-partners.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index b43a3196e2be..3fb84f690644 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -4894,8 +4894,10 @@ void ata_scsi_dev_rescan(struct work_struct *work) spin_unlock_irqrestore(ap->lock, flags); if (do_resume) { ...
28aeaed130e8e587fd1b73b6d66ca41ccc5a1a31
Analyze and fix the following issue in the Linux kernel code: drm/xe/oa: Fix potential UAF in xe_oa_add_config_ioctl()
Problem Details: In xe_oa_add_config_ioctl(), we accessed oa_config->id after dropping metrics_lock. Since this lock protects the lifetime of oa_config, an attacker could guess the id and call xe_oa_remove_config_ioctl() with perfect timing, freeing oa_config before we dereference it, leading to a potential use-after-f...
```diff diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c index 87a2bf53d661..890c363282ae 100644 --- a/drivers/gpu/drm/xe/xe_oa.c +++ b/drivers/gpu/drm/xe/xe_oa.c @@ -2403,11 +2403,13 @@ int xe_oa_add_config_ioctl(struct drm_device *dev, u64 data, struct drm_file *fi goto sysfs_err; } - mutex...
353cda30d30e5dc7cacf8de5d2546724708ae3bb
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix CMAC functions not handling errors
Problem Details: The called hash functions could fail thus we should check return values. Fixes: 26717828b75d ("mac80211: aes-cmac: switch to shash CMAC driver") Signed-off-by: Chien Wong <m@xv97.com> Link: https://patch.msgid.link/20251113140511.48658-2-m@xv97.com Signed-off-by: Johannes Berg <johannes.berg@intel.com...
```diff diff --git a/net/mac80211/aes_cmac.c b/net/mac80211/aes_cmac.c index 48c04f89de20..65989c7dfc68 100644 --- a/net/mac80211/aes_cmac.c +++ b/net/mac80211/aes_cmac.c @@ -22,50 +22,77 @@ static const u8 zero[CMAC_TLEN_256]; -void ieee80211_aes_cmac(struct crypto_shash *tfm, const u8 *aad, - const u8 *data, s...
d70b592551ff23747e26e74081205babf8dba9b6
Analyze and fix the following issue in the Linux kernel code: l2tp: reset skb control buffer on xmit
Problem Details: The L2TP stack did not reset the skb control buffer before sending the encapsulated package. In a setup with an ath10k radio and batman-adv over an L2TP tunnel massive fragmentations happen sporadically if the L2TP tunnel is established over IPv4. L2TP might reset some of the fields in the IP control...
```diff diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index 369a2f2e459c..0710281dd95a 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -1246,9 +1246,9 @@ static int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb, uns else l2tp_build_l2tpv3_header(session, __skb_push(skb...
6cbc09b7719ec7fd9f650f18b3828b7f60c17881
Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Restore previous domain::aperture_end calculation
Problem Details: Commit d373449d8e97 ("iommu/vt-d: Use the generic iommu page table") changed the calculation of domain::aperture_end. Previously, it was calculated as: domain->domain.geometry.aperture_end = __DOMAIN_MAX_ADDR(domain->gaw - 1); where domain->gaw was limited to less than MGAW. Currentl...
```diff diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 2d2f64ce2bc6..7b3016491ca5 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -2817,6 +2817,16 @@ intel_iommu_domain_alloc_first_stage(struct device *dev, cfg.common.hw_max_vasz_lg2 = 57; else cfg.com...
6b38a108eeb3936b21643191db535a35dd7c890b
Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Fix unused invalidation hint in qi_desc_iotlb
Problem Details: Invalidation hint (ih) in the function 'qi_desc_iotlb' is initialized to zero and never used. It is embedded in the 0th bit of the 'addr' parameter. Get the correct 'ih' value from there. Fixes: f701c9f36bcb ("iommu/vt-d: Factor out invalidation descriptor composition") Signed-off-by: Aashish Sharma <...
```diff diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h index 3056583d7f56..dcc5466d35f9 100644 --- a/drivers/iommu/intel/iommu.h +++ b/drivers/iommu/intel/iommu.h @@ -1097,7 +1097,7 @@ static inline void qi_desc_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, struct qi_desc *desc) { ...
cb3db5a39e2a6b6396df1780d39a250f649d2e3a
Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Set INTEL_IOMMU_FLOPPY_WA depend on BLK_DEV_FD
Problem Details: INTEL_IOMMU_FLOPPY_WA workaround was introduced to create direct mappings for first 16MB for floppy devices as the floppy drivers were not using dma apis. We need not do this direct map if floppy driver is not enabled. INTEL_IOMMU_FLOPPY_WA is generally not a good idea. Iommu will be mapping pages in ...
```diff diff --git a/drivers/iommu/intel/Kconfig b/drivers/iommu/intel/Kconfig index f2f538c70650..17a91f881b2e 100644 --- a/drivers/iommu/intel/Kconfig +++ b/drivers/iommu/intel/Kconfig @@ -66,7 +66,7 @@ config INTEL_IOMMU_DEFAULT_ON config INTEL_IOMMU_FLOPPY_WA def_bool y - depends on X86 + depends on X86 && BLK...
3ceb6ac2116ecda1c5d779bb73271479e70fccb4
Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: lan937x: Fix RGMII delay tuning
Problem Details: Correct RGMII delay application logic in lan937x_set_tune_adj(). The function was missing `data16 &= ~PORT_TUNE_ADJ` before setting the new delay value. This caused the new value to be bitwise-OR'd with the existing PORT_TUNE_ADJ field instead of replacing it. For example, when setting the RGMII 2 TX...
```diff diff --git a/drivers/net/dsa/microchip/lan937x_main.c b/drivers/net/dsa/microchip/lan937x_main.c index b1ae3b9de3d1..5a1496fff445 100644 --- a/drivers/net/dsa/microchip/lan937x_main.c +++ b/drivers/net/dsa/microchip/lan937x_main.c @@ -540,6 +540,7 @@ static void lan937x_set_tune_adj(struct ksz_device *dev, int ...
57dc2ea0b7bdb828c5d966d9135c28fe854933a4
Analyze and fix the following issue in the Linux kernel code: rust: slice: fix broken intra-doc links
Problem Details: In older versions of Rust, the compiler doesn't know about the newer `as_flattened*` methods, thus `rustdoc` complains about the intra-doc links, e.g. error: unresolved link to `slice::as_flattened` --> rust/kernel/slice.rs:19:23 | 19 | /// [`as_flattened`]: slice::as_flattened ...
```diff diff --git a/rust/kernel/slice.rs b/rust/kernel/slice.rs index 6ca91a4fd1f2..ca2cde135061 100644 --- a/rust/kernel/slice.rs +++ b/rust/kernel/slice.rs @@ -16,22 +16,22 @@ /// /// This trait can be removed once the MSRV passes 1.80. /// -/// [`as_flattened`]: slice::as_flattened -/// [`as_flattened_mut`]: sli...
678e1cc2f482e0985a0613ab4a5bf89c497e5acc
Analyze and fix the following issue in the Linux kernel code: xfs: fix out of bounds memory read error in symlink repair
Problem Details: xfs/286 produced this report on my test fleet: ================================================================== BUG: KFENCE: out-of-bounds read in memcpy_orig+0x54/0x110 Out-of-bounds read at 0xffff88843fe9e038 (184B right of kfence-#184): memcpy_orig+0x54/0x110 xrep_symlink_salvage_inline+0...
```diff diff --git a/fs/xfs/scrub/symlink_repair.c b/fs/xfs/scrub/symlink_repair.c index 5902398185a8..df629892462f 100644 --- a/fs/xfs/scrub/symlink_repair.c +++ b/fs/xfs/scrub/symlink_repair.c @@ -184,7 +184,7 @@ xrep_symlink_salvage_inline( sc->ip->i_disk_size == 1 && old_target[0] == '?') return 0; - nr ...
d5c3f49b75832553ba0dafabc2d394a885106498
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: Setup support for Anlogic tree
Problem Details: Add myself as the maintainer of the Anlogic DR1V90 SoC tree, including the corresponding DTS and DT bindings paths for Anlogic RISC-V-based SoCs. I don't really want to look after this platform, but am due to irritation of the vendor's behaviour towards the contributor of support. Hence, Odd Fixes as t...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 46126ce2f968..8c153489d2fd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22055,6 +22055,14 @@ F: Documentation/devicetree/bindings/riscv/andes.yaml F: Documentation/devicetree/bindings/timer/andestech,plmt0.yaml F: arch/riscv/boot/dts/andes/ +RISC-V ANLOGIC SoC ...
f1f96511b1c4c33e53f05909dd267878e0643a9a
Analyze and fix the following issue in the Linux kernel code: perf: Fix 0 count issue of cpu-clock
Problem Details: Currently cpu-clock event always returns 0 count, e.g., perf stat -e cpu-clock -- sleep 1 Performance counter stats for 'sleep 1': 0 cpu-clock # 0.000 CPUs utilized 1.002308394 seconds time elapsed The root cause is the commit 'bc4394e5e79c ("p...
```diff diff --git a/kernel/events/core.c b/kernel/events/core.c index 1fd347da9026..2c35acc2722b 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -11901,7 +11901,7 @@ static int cpu_clock_event_add(struct perf_event *event, int flags) static void cpu_clock_event_del(struct perf_event *event, int flag...
7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5
Analyze and fix the following issue in the Linux kernel code: cifs: fix memory leak in smb3_fs_context_parse_param error path
Problem Details: Add proper cleanup of ctx->source and fc->source to the cifs_parse_mount_err error handler. This ensures that memory allocated for the source strings is correctly freed on all error paths, matching the cleanup already performed in the success path by smb3_cleanup_fs_context_contents(). Pointers are als...
```diff diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c index 0f894d09157b..2a0d8b87bd8e 100644 --- a/fs/smb/client/fs_context.c +++ b/fs/smb/client/fs_context.c @@ -1834,6 +1834,10 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, ctx->password = NULL; kfree_sensitive(ctx->passw...
a9d1f38df7ecd0e21233447c9cc6fa1799eddaf3
Analyze and fix the following issue in the Linux kernel code: smb: client: introduce close_cached_dir_locked()
Problem Details: Replace close_cached_dir() calls under cfid_list_lock with a new close_cached_dir_locked() variant that uses kref_put() instead of kref_put_lock() to avoid recursive locking when dropping references. While the existing code works if the refcount >= 2 invariant holds, this area has proven error-prone. ...
```diff diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c index 018055fd2cdb..e3ea6fe7edb4 100644 --- a/fs/smb/client/cached_dir.c +++ b/fs/smb/client/cached_dir.c @@ -16,6 +16,7 @@ static struct cached_fid *init_cached_dir(const char *path); static void free_cached_dir(struct cached_fid *cfid); st...
677e6123e3d24adaa252697dc89740f2ac07664e
Analyze and fix the following issue in the Linux kernel code: LoongArch: BPF: Disable trampoline for kernel module function trace
Problem Details: The current LoongArch BPF trampoline implementation is incompatible with tracing functions in kernel modules. This causes several severe and user-visible problems: * The `bpf_selftests/module_attach` test fails consistently. * Kernel lockup when a BPF program is attached to a module function [1]. * Cr...
```diff diff --git a/arch/loongarch/net/bpf_jit.c b/arch/loongarch/net/bpf_jit.c index cbe53d0b7fb0..f97dc9936401 100644 --- a/arch/loongarch/net/bpf_jit.c +++ b/arch/loongarch/net/bpf_jit.c @@ -1624,6 +1624,9 @@ static int __arch_prepare_bpf_trampoline(struct jit_ctx *ctx, struct bpf_tramp_i /* Direct jump skips 5 N...
acf5de1b23b0275eb69f235c8e9f2cef19fa39a1
Analyze and fix the following issue in the Linux kernel code: LoongArch: Fix NUMA node parsing with numa_memblks
Problem Details: On physical machine, NUMA node id comes from high bit 44:48 of physical address. However it is not true on virt machine. With general method, it comes from ACPI SRAT table. Here the common function numa_memblks_init() is used to parse NUMA node information with numa_memblks. Cc: <stable@vger.kernel.o...
```diff diff --git a/arch/loongarch/kernel/numa.c b/arch/loongarch/kernel/numa.c index ab9c660526a3..8b89898e20df 100644 --- a/arch/loongarch/kernel/numa.c +++ b/arch/loongarch/kernel/numa.c @@ -158,35 +158,9 @@ static void __init node_mem_init(unsigned int node) #ifdef CONFIG_ACPI_NUMA -/* - * add_numamem_region ...
20d7338f2d3bcb570068dd6d39b16f1a909fe976
Analyze and fix the following issue in the Linux kernel code: LoongArch: Use UAPI types in ptrace UAPI header
Problem Details: The kernel UAPI headers already contain fixed-width integer types, there is no need to rely on the libc types. There may not be a libc available or the libc may not provides the <stdint.h>, like for example on nolibc. This also aligns the header with the rest of the LoongArch UAPI headers. Fixes: 803...
```diff diff --git a/arch/loongarch/include/uapi/asm/ptrace.h b/arch/loongarch/include/uapi/asm/ptrace.h index aafb3cd9e943..215e0f9e8aa3 100644 --- a/arch/loongarch/include/uapi/asm/ptrace.h +++ b/arch/loongarch/include/uapi/asm/ptrace.h @@ -10,10 +10,6 @@ #include <linux/types.h> -#ifndef __KERNEL__ -#include <s...
8e982441ba601d982dd0739972115d85ae01d99b
Analyze and fix the following issue in the Linux kernel code: net: phy: realtek: create rtl8211f_config_rgmii_delay()
Problem Details: The control flow in rtl8211f_config_init() has some pitfalls which were probably unintended. Specifically it has an early return: switch (phydev->interface) { ... default: /* the rest of the modes imply leaving delay as is. */ return 0; } which exits the entire config_init() function. This mean...
```diff diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c index 417f9a88aab6..896351022682 100644 --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c @@ -587,22 +587,11 @@ static int rtl8211c_config_init(struct phy_device *phydev) ...
0eee0fdf9b7b0baf698f9b426384aa9714d76a51
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: add a check for 'add_addr_accepted'
Problem Details: The previous patch fixed an issue with the 'add_addr_accepted' counter. This was not spot by the test suite. Check this counter and 'add_addr_signal' in MPTCP Join 'delete re-add signal' test. This should help spotting similar regressions later on. These counters are crucial for ensuring the MPTCP pat...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 74632beae2c6..43f31f8d587f 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -4055,38 +4055,45 @@ endpoint_tests() $ns1 10....
92e239e36d600002559074994a545fcfac9afd2d
Analyze and fix the following issue in the Linux kernel code: mptcp: fix address removal logic in mptcp_pm_nl_rm_addr
Problem Details: Fix inverted WARN_ON_ONCE condition that prevented normal address removal counter updates. The current code only executes decrement logic when the counter is already 0 (abnormal state), while normal removals (counter > 0) are ignored. Signed-off-by: Gang Yan <yangang@kylinos.cn> Fixes: 636113918508 ("...
```diff diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c index 2ae95476dba3..0a50fd5edc06 100644 --- a/net/mptcp/pm_kernel.c +++ b/net/mptcp/pm_kernel.c @@ -672,7 +672,7 @@ static void mptcp_pm_nl_add_addr_received(struct mptcp_sock *msk) void mptcp_pm_nl_rm_addr(struct mptcp_sock *msk, u8 rm_id) { - if (...
0e4ec14dc1ee4b1ec347729c225c3ca950f2bcf6
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: join: userspace: longer timeout
Problem Details: In rare cases, when the test environment is very slow, some userspace tests can fail because some expected events have not been seen. Because the tests are expecting a long on-going connection, and they are not waiting for the end of the transfer, it is fine to have a longer timeout, and even go over ...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 93d38ded5e4e..74632beae2c6 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3804,7 +3804,7 @@ userspace_tests() continue...
fb13c6bb810ca871964e062cf91882d1c83db509
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: join: endpoints: longer timeout
Problem Details: In rare cases, when the test environment is very slow, some endpoints tests can fail because some expected events have not been seen. Because the tests are expecting a long on-going connection, and they are not waiting for the end of the transfer, it is fine to have a longer timeout, and even go over ...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 303abbca59fc..93d38ded5e4e 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3941,7 +3941,7 @@ endpoint_tests() pm_nl_set_l...
efff6cd53ac52827948298043270bb81ff17fdff
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: join: fastclose: remove flaky marks
Problem Details: After recent fixes like the parent commit, and "selftests: mptcp: connect: trunc: read all recv data", the two fastclose subtests no longer look flaky any more. It then feels fine to remove these flaky marks, to no longer ignore these subtests in case of errors. Reviewed-by: Geliang Tang <geliang@ker...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 41503c241989..303abbca59fc 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3500,7 +3500,6 @@ fullmesh_tests() fastclose_tes...
ae155060247be8dcae3802a95bd1bdf93ab3215d
Analyze and fix the following issue in the Linux kernel code: mptcp: fix duplicate reset on fastclose
Problem Details: The CI reports sporadic failures of the fastclose self-tests. The root cause is a duplicate reset, not carrying the relevant MPTCP option. In the failing scenario the bad reset is received by the peer before the fastclose one, preventing the reception of the latter. Indeed there is window of opportuni...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index c59246c1fde6..a70267a74e3c 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2409,7 +2409,6 @@ bool __mptcp_retransmit_pending_data(struct sock *sk) /* flags for __mptcp_close_ssk() */ #define MPTCP_CF_PUSH BIT(1) -#define MPTCP_...
fff0c87996672816a84c3386797a5e69751c5888
Analyze and fix the following issue in the Linux kernel code: mptcp: decouple mptcp fastclose from tcp close
Problem Details: With the current fastclose implementation, the mptcp_do_fastclose() helper is in charge of two distinct actions: send the fastclose reset and cleanup the subflows. Formally decouple the two steps, ensuring that mptcp explicitly closes all the subflows after the mentioned helper. This will make the up...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 6f0e8f670d83..c59246c1fde6 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2808,7 +2808,11 @@ static void mptcp_worker(struct work_struct *work) __mptcp_close_subflow(sk); if (mptcp_close_tout_expired(sk)) { + struct mptcp_s...
1bba3f219c5e8c29e63afa3c1fc24f875ebec119
Analyze and fix the following issue in the Linux kernel code: mptcp: do not fallback when OoO is present
Problem Details: In case of DSS corruption, the MPTCP protocol tries to avoid the subflow reset if fallback is possible. Such corruptions happen in the receive path; to ensure fallback is possible the stack additionally needs to check for OoO data, otherwise the fallback will break the data stream. Fixes: e32d262c89e2...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index e30e9043a694..6f0e8f670d83 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -76,6 +76,13 @@ bool __mptcp_try_fallback(struct mptcp_sock *msk, int fb_mib) if (__mptcp_check_fallback(msk)) return true; + /* The caller possibly is...
17393fa7b7086664be519e7230cb6ed7ec7d9462
Analyze and fix the following issue in the Linux kernel code: mptcp: fix premature close in case of fallback
Problem Details: I'm observing very frequent self-tests failures in case of fallback when running on a CONFIG_PREEMPT kernel. The root cause is that subflow_sched_work_if_closed() closes any subflow as soon as it is half-closed and has no incoming data pending. That works well for regular subflows - MPTCP needs bi-di...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index e27e0fe2460f..e30e9043a694 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2563,7 +2563,8 @@ static void __mptcp_close_subflow(struct sock *sk) if (ssk_state != TCP_CLOSE && (ssk_state != TCP_CLOSE_WAIT || - inet_s...
4f102d747cadd8f595f2b25882eed9bec1675fb1
Analyze and fix the following issue in the Linux kernel code: mptcp: avoid unneeded subflow-level drops
Problem Details: The rcv window is shared among all the subflows. Currently, MPTCP sync the TCP-level rcv window with the MPTCP one at tcp_transmit_skb() time. The above means that incoming data may sporadically observe outdated TCP-level rcv window and being wrongly dropped by TCP. Address the issue checking for the...
```diff diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 8a63bd00807d..f24ae7d40e88 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -1044,6 +1044,31 @@ static void __mptcp_snd_una_update(struct mptcp_sock *msk, u64 new_snd_una) WRITE_ONCE(msk->snd_una, new_snd_una); } +static void rwin_up...
5e15395f6d9ec07395866c5511f4b4ac566c0c9b
Analyze and fix the following issue in the Linux kernel code: mptcp: fix ack generation for fallback msk
Problem Details: mptcp_cleanup_rbuf() needs to know the last most recent, mptcp-level rcv_wnd sent, and such information is tracked into the msk->old_wspace field, updated at ack transmission time by mptcp_write_options(). Fallback socket do not add any mptcp options, such helper is never invoked, and msk->old_wspace ...
```diff diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 1103b3341a70..8a63bd00807d 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -838,8 +838,11 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb, opts->suboptions = 0; + /* Force later mptcp_write_options(), but do ...
90449f2d1e1f020835cba5417234636937dd657e
Analyze and fix the following issue in the Linux kernel code: scsi: sg: Do not sleep in atomic context
Problem Details: sg_finish_rem_req() calls blk_rq_unmap_user(). The latter function may sleep. Hence, call sg_finish_rem_req() with interrupts enabled instead of disabled. Reported-by: syzbot+c01f8e6e73f20459912e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-scsi/691560c4.a70a0220.3124cb.001a.GAE@goo...
```diff diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 4c62c597c7be..b3af9b78fa12 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -2208,9 +2208,17 @@ sg_remove_sfp_usercontext(struct work_struct *work) write_lock_irqsave(&sfp->rq_list_lock, iflags); while (!list_empty(&sfp->rq_list)) { srp = ...
13b77ed9c2a9e5a1248222df8aeaecb0c2ead9cb
Analyze and fix the following issue in the Linux kernel code: scsi: scsi_debug: Support injecting unaligned write errors
Problem Details: Allow user space software, e.g. a blktests test, to inject unaligned write errors. Acked-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Ming Lei <ming.lei@redhat.com...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 92b2af803d87..1f2a53ba5dd9 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -230,6 +230,7 @@ struct tape_block { #define SDEBUG_OPT_NO_CDB_NOISE 0x4000 #define SDEBUG_OPT_HOST_BUSY 0x8000 #define SDEBUG_OPT_CM...
78b1a242fe612a755f2158fd206ee6bb577d18ca
Analyze and fix the following issue in the Linux kernel code: scsi: qla2xxx: Fix improper freeing of purex item
Problem Details: In qla2xxx_process_purls_iocb(), an item is allocated via qla27xx_copy_multiple_pkt(), which internally calls qla24xx_alloc_purex_item(). The qla24xx_alloc_purex_item() function may return a pre-allocated item from a per-adapter pool for small allocations, instead of dynamically allocating memory with...
```diff diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 316594aa40cc..42eb65a62f1f 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -1292,7 +1292,7 @@ void qla2xxx_process_purls_iocb(void **pkt, struct rsp_que **rsp) a.reason = FCNVME_RJT_RC_L...
e837b9091b277ae6f309d7e9fc93cb0308cf461f
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: hw_scan: Don't let the operating channel be last
Problem Details: Scanning can be offloaded to the firmware. To that end, the driver prepares a list of channels to scan, including periodic visits back to the operating channel, and sends the list to the firmware. When the channel list is too long to fit in a single H2C message, the driver splits the list, sends the f...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index ab904a7def1b..080c4f8a655a 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -7694,6 +7694,13 @@ int rtw89_hw_scan_add_chan_list_ax(struct rtw89_dev *rtwdev, ...
cda5f23eed84cdca374d60734bf0190138788608
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: rockchip: Fix compile error without CONFIG_GPIOLIB
Problem Details: drivers/ufs/host/ufs-rockchip.c:168:19: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'em_pd_get'? [-Werror=implicit-function-declaration] drivers/ufs/host/ufs-rockchip.c:214:2: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_ca...
```diff diff --git a/drivers/ufs/host/ufs-rockchip.c b/drivers/ufs/host/ufs-rockchip.c index 8cecb28cdce4..7fff34513a60 100644 --- a/drivers/ufs/host/ufs-rockchip.c +++ b/drivers/ufs/host/ufs-rockchip.c @@ -7,6 +7,7 @@ #include <linux/clk.h> #include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux...
b0ee72db9132bd19b1b80152b35e0cf6a6cbd9f2
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: rockchip: Reset controller on PRE_CHANGE of hce enable notify
Problem Details: This fixes the dme-reset failed when doing recovery. Because device reset is not enough, we could occasionally see the error below: ufshcd-rockchip 2a2d0000.ufs: uic cmd 0x14 with arg3 0x0 completion timeout ufshcd-rockchip 2a2d0000.ufs: dme-reset: error code -110 ufshcd-rockchip 2a2d0000.ufs: DME_RES...
```diff diff --git a/drivers/ufs/host/ufs-rockchip.c b/drivers/ufs/host/ufs-rockchip.c index 8754085dd0cc..8cecb28cdce4 100644 --- a/drivers/ufs/host/ufs-rockchip.c +++ b/drivers/ufs/host/ufs-rockchip.c @@ -20,9 +20,17 @@ #include "ufshcd-pltfrm.h" #include "ufs-rockchip.h" +static void ufs_rockchip_controller_rese...
245cfbcd3d3b298c75e01946262b3ff2cf7d0796
Analyze and fix the following issue in the Linux kernel code: perf maps: Avoid RC_CHK use after free
Problem Details: The case of __maps__fixup_overlap_and_insert where the "new" maps covers existing mappings can create a use-after-free with reference count checking enabled. The issue is that "pos" holds a map pointer from maps_by_address that is put from maps_by_address but then used to look for a map in maps_by_name...
```diff diff --git a/tools/perf/util/maps.c b/tools/perf/util/maps.c index 779f6230130a..c321d4f4d846 100644 --- a/tools/perf/util/maps.c +++ b/tools/perf/util/maps.c @@ -931,8 +931,9 @@ static int __maps__fixup_overlap_and_insert(struct maps *maps, struct map *new) return err; } else { struct map *next = NU...
bdf96e9135a0cf53a853a19c30fa11131a744062
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: lpass-rx-macro: fix mute_stream affecting all paths
Problem Details: The current mute_steam() implementation affects all paths instead of only those in use by the DAI. For example, playing to 2 DAIs simultaneously with mixing, stopping one will mute the other. Rework to use the same logic as hw_params() to mute only the relevant paths. (also, use "rx->main_clk_users[j...
```diff diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 0a37664f82ff..0a8de5620e72 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -1905,52 +1905,48 @@ static int rx_macro_digital_mute(struct snd_soc_dai *dai, int mute, int stream) { ...
7ec95f46759ba0843a2695decba3cea028cb84ea
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: lpass-wsa-macro: remove main path event
Problem Details: The event enables the main path clock when the mux is set to DEC0/DEC1. My patch ("ASoC: codecs: lpass-wsa-macro: fix path clock dependencies") makes it depend on the main path clock, so this event is now redundant. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Tested-by: Srinivas Kandagatla <srin...
```diff diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index ad4f62d3d1eb..3e912d0ca54f 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -1726,59 +1726,6 @@ static int wsa_macro_config_softclip(struct snd_soc_component *component, return...
3ea1b0dbc684191b2e0b5697356a74571ab28155
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: lpass-wsa-macro: fix path clock dependencies
Problem Details: "WSA_RX0_CLK",etc. are path clocks, but "WSA RX0",etc. are ports, and there isn't a correspondence between the ports and paths. For example "WSA RX0" port could be used by the "RX1 MIX" path. The problem becomes obvious when RX4,etc. ports are added. Enabling the path clocks should depend on the path ...
```diff diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 2e1876b7d66a..cd36ec59ea2b 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -2494,10 +2494,8 @@ static const struct snd_soc_dapm_route wsa_audio_map[] = { {"WSA RX_MIX0", NULL,...
295fe8406a357bc0abb901a21d1a554fd4dd1d05
Analyze and fix the following issue in the Linux kernel code: spi: cadence-quadspi: Fix cqspi_probe() error handling for runtime pm
Problem Details: Commit f1eb4e792bb1 ("spi: spi-cadence-quadspi: Enable pm runtime earlier to avoid imbalance") relocated code but missed updating the error handling path associated with it. Prior to the relocation, runtime pm was enabled after the code-block associated with 'cqspi_request_mmap_dma()', due to which, t...
```diff diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 8e0df08609c0..af6d050da1c8 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -2002,7 +2002,7 @@ static int cqspi_probe(struct platform_device *pdev) if (cqspi->use_direct_mode) { ...
21f46f54769c45ac8ca0dbaa977bc1b436ffdee2
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/ttm: Fix crash when handling MMIO_REMAP in PDE flags
Problem Details: The MMIO_REMAP BO is a special 4K IO page that does not have a ttm_tt behind it. However, amdgpu_ttm_tt_pde_flags() was treating it like normal TT/doorbell/preempt memory and unconditionally accessed ttm->caching. For the MMIO_REMAP BO, ttm is NULL, so this leads to a NULL pointer dereference when comp...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index aa9ee5dffa45..9d568c16beb1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1372,7 +1372,7 @@ uint64_t amdgpu_ttm_tt_pde_flags(struct ttm_tt *ttm, struct ttm...
a44592339397bc6715917997c6869bdedd1a7256
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vm: Check PRT uAPI flag instead of PTE flag
Problem Details: This fixes sparse mappings (aka. partially resident textures). Check the correct flags. Since a recent refactor, the code works with uAPI flags (for mapping buffer objects), and not PTE (page table entry) flags. Fixes: 6716a823d18d ("drm/amdgpu: rework how PTE flags are generated v3") Signed-off-by: ...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index c1a801203949..b1aaef962ad9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -2078,7 +2078,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, stru...
31ab31433c9bd2f255c48dc6cb9a99845c58b1e4
Analyze and fix the following issue in the Linux kernel code: drm/amd: Skip power ungate during suspend for VPE
Problem Details: During the suspend sequence VPE is already going to be power gated as part of vpe_suspend(). It's unnecessary to call during calls to amdgpu_device_set_pg_state(). It actually can expose a race condition with the firmware if s0i3 sequence starts as well. Drop these calls. Cc: Peyton.Lee@amd.com Rev...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 2819aceaab74..076bbc09f30c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3414,10 +3414,11 @@ int amdgpu_device_set_pg_state(struct amdgpu_devi...
a846505a193d7492ad3531e33cacfca31e4bcdd1
Analyze and fix the following issue in the Linux kernel code: drm/mediatek: Fix device node reference leak in mtk_dp_dt_parse()
Problem Details: The function mtk_dp_dt_parse() calls of_graph_get_endpoint_by_regs() to get the endpoint device node, but fails to call of_node_put() to release the reference when the function returns. This results in a device node reference leak. Fix this by adding the missing of_node_put() call before returning fro...
```diff diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c index bef6eeb30d3e..b0b1e158600f 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -2087,6 +2087,7 @@ static int mtk_dp_dt_parse(struct mtk_dp *mtk_dp, endpoint = of_graph_get_endpoint_by...
a1ca238936aee3898216f6f7b2f91771aa858504
Analyze and fix the following issue in the Linux kernel code: selftests: tracing: Add tprobe enable/disable testcase
Problem Details: Commit 2867495dea86 ("tracing: tprobe-events: Register tracepoint when enable tprobe event") caused regression bug and tprobe did not work. To prevent similar problems, add a testcase which enables/disables a tprobe and check the results. Link: https://lore.kernel.org/r/176252610176.214996.39785153190...
```diff diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/enable_disable_tprobe.tc b/tools/testing/selftests/ftrace/test.d/dynevent/enable_disable_tprobe.tc new file mode 100644 index 000000000000..c1f1cafa30f3 --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/dynevent/enable_disable_tprobe.tc @@ -0,0...
150ec68fa799dedb62ec89fba5887d0c93c28a1b
Analyze and fix the following issue in the Linux kernel code: hfs: introduce KUnit tests for HFS string operations
Problem Details: This patch implements the initial Kunit based set of unit tests for HFS string operations. It checks functionality of hfs_strcmp(), hfs_hash_dentry(), and hfs_compare_dentry() methods. ./tools/testing/kunit/kunit.py run --kunitconfig ./fs/hfs/.kunitconfig [16:04:50] Configuring KUnit Kernel ... Regen...
```diff diff --git a/fs/hfs/.kunitconfig b/fs/hfs/.kunitconfig new file mode 100644 index 000000000000..5caa9af1e3bb --- /dev/null +++ b/fs/hfs/.kunitconfig @@ -0,0 +1,7 @@ +CONFIG_KUNIT=y +CONFIG_HFS_FS=y +CONFIG_HFS_KUNIT_TEST=y +CONFIG_BLOCK=y +CONFIG_BUFFER_HEAD=y +CONFIG_NLS=y +CONFIG_LEGACY_DIRECT_IO=y diff --git...
f0585a714a7531afaa23b3351a316f61ccaa7b00
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Add emulator support for decoding VEX prefixes
Problem Details: After all the changes done in the previous patches, the only thing left to support AVX MOV instructions is to expand the VEX prefix into the appropriate REX, 66/F3/F2 and map prefixes. Three-operand instructions are not supported. The Avx bit in this case is not cleared, in fact it is used as the sig...
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index b636bca92ca4..63b83a2e0e87 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -3963,6 +3963,8 @@ static int check_perm_out(struct x86_emulate_ctxt *ctxt) I2bv(((_f) | DstReg | SrcMem | ModRM) & ~Lock, _e), \ I2bv(((_f) & ~...
825f0aece084ecde02805083d44d08ab189a9249
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Refactor REX prefix handling in instruction emulation
Problem Details: Restructure how to represent and interpret REX fields, preparing for handling of both REX2 and VEX. REX uses the upper four bits of a single byte as a fixed identifier, and the lower four bits containing the data. VEX and REX2 extends this so that the first byte identifies the prefix and the rest enco...
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 531dac5cf3dc..b636bca92ca4 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -239,6 +239,13 @@ enum x86_transfer_type { X86_TRANSFER_TASK_SWITCH, }; +enum rex_bits { + REX_B = 1, + REX_X = 2, + REX_R = 4, + REX_W = 8, +}; ...
0db94da5a0a1cacda080b9ec8425fcbe4babc141
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/ttm: Fix crash when handling MMIO_REMAP in PDE flags
Problem Details: The MMIO_REMAP BO is a special 4K IO page that does not have a ttm_tt behind it. However, amdgpu_ttm_tt_pde_flags() was treating it like normal TT/doorbell/preempt memory and unconditionally accessed ttm->caching. For the MMIO_REMAP BO, ttm is NULL, so this leads to a NULL pointer dereference when comp...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 838a51b6098b..5475f7117f10 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1329,7 +1329,7 @@ uint64_t amdgpu_ttm_tt_pde_flags(struct ttm_tt *ttm, struct ttm...
8feeab26c80635b802f72b3ed986c693ff8f3212
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vm: Check PRT uAPI flag instead of PTE flag
Problem Details: This fixes sparse mappings (aka. partially resident textures). Check the correct flags. Since a recent refactor, the code works with uAPI flags (for mapping buffer objects), and not PTE (page table entry) flags. Fixes: 6716a823d18d ("drm/amdgpu: rework how PTE flags are generated v3") Signed-off-by: ...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 7fc081e88b6a..57604864d189 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -2093,7 +2093,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, stru...
2a6c826cfeedd7714611ac115371a959ead55bda
Analyze and fix the following issue in the Linux kernel code: drm/amd: Skip power ungate during suspend for VPE
Problem Details: During the suspend sequence VPE is already going to be power gated as part of vpe_suspend(). It's unnecessary to call during calls to amdgpu_device_set_pg_state(). It actually can expose a race condition with the firmware if s0i3 sequence starts as well. Drop these calls. Cc: Peyton.Lee@amd.com Rev...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index bfbf874a1000..ca4e47ce2417 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3445,10 +3445,11 @@ int amdgpu_device_set_pg_state(struct amdgpu_devi...
4cb21be4c3b0cb6248da1dcc4f19f05d3443a235
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Add AVX support to the emulator's register fetch and writeback
Problem Details: Prepare struct operand for hosting AVX registers. Remove the existing, incomplete code that placed the Avx flag in the operand alignment field, and repurpose the name for a separate bit that indicates: - after decode, whether an instruction supports the VEX prefix; - before writeback, that the instr...
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 8a755ef30c18..531dac5cf3dc 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -141,6 +141,7 @@ #define No64 (1<<28) /* Instruction generates #UD in 64-bit mode */ #define PageTable (1 << 29) /* instruction used ...
1a84b07acaa45bb2e4a1d09be26b0ba6270929c3
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Move op_prefix to struct x86_emulate_ctxt (from x86_decode_insn())
Problem Details: VEX decode will need to set it based on the "pp" bits, so make it a field in the struct rather than a local variable. No functional change intended. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Chang S. Bae <chang.seok.bae@intel.com> Link: https://patch.msgid.link/20251114003633.60...
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 70d0f8561097..23019928734a 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -4761,7 +4761,6 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len, int int rc = X86EMUL_CONTINUE; int mode = ctxt->mo...
26347f844381a5ae870b51efb8a927bc35ab7d42
Analyze and fix the following issue in the Linux kernel code: selftests/dma: fix invalid array access in printf
Problem Details: The printf statement attempts to print the DMA direction string using the syntax 'dir[directions]', which is an invalid array access. The variable 'dir' is an integer, and 'directions' is a char pointer array. This incorrect syntax should be 'directions[dir]', using 'dir' as the index into the 'directi...
```diff diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c b/tools/testing/selftests/dma/dma_map_benchmark.c index b12f1f9babf8..b925756373ce 100644 --- a/tools/testing/selftests/dma/dma_map_benchmark.c +++ b/tools/testing/selftests/dma/dma_map_benchmark.c @@ -118,7 +118,7 @@ int main(int argc, char **argv) ...
6ba51b7b34caac6a64efdb5ec49d1c0e45e6197b
Analyze and fix the following issue in the Linux kernel code: of/irq: Handle explicit interrupt parent
Problem Details: If an interrupt controller is used as a proxy, it may have an "interrupt-parent" property, but lack "interrupts" and "interrupts-extended" properties. In that case, the "interrupt-parent" property in the interrupt controller node is ignored, causing the interrupt controller to fail to probe, and leadi...
```diff diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 96db232b666a..2271110b5f7c 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -595,6 +595,8 @@ void __init of_irq_init(const struct of_device_id *matches) desc->interrupt_parent = of_parse_phandle(np, "interrupts-extended", 0); if (!desc->interru...
26866b6bb10b8f71e64f2f7a564e52a540c98335
Analyze and fix the following issue in the Linux kernel code: rust: pin-init: fix typo in docs
Problem Details: Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Benno Lossin <lossin@kernel.org> Link: https://patch.msgid.link/20251016211740.653599-2-lossin@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
```diff diff --git a/rust/pin-init/README.md b/rust/pin-init/README.md index 723e275445d4..74bbb4e0a2f7 100644 --- a/rust/pin-init/README.md +++ b/rust/pin-init/README.md @@ -9,7 +9,7 @@ > [!NOTE] > > This crate was originally named [`pinned-init`], but the migration to -> `pin-init` is not yet complete. The `legca...
53870c679e4933d11d9488db61caa3e670621528
Analyze and fix the following issue in the Linux kernel code: rust: pin-init: fix broken rust doc link
Problem Details: Rust 1.92.0 warns when building the documentation that [`PinnedDrop`] is an invalid reference. This is correct and it's weird that it didn't warn before, so fix the link. [ The reason is that it is hidden -- I had asked about that in the upstream PR that changed the behavior because I wasn't sure it...
```diff diff --git a/rust/pin-init/src/macros.rs b/rust/pin-init/src/macros.rs index d6acf2cd291e..682c61a587a0 100644 --- a/rust/pin-init/src/macros.rs +++ b/rust/pin-init/src/macros.rs @@ -506,6 +506,8 @@ pub use ::paste::paste; /// Creates a `unsafe impl<...> PinnedDrop for $type` block. /// /// See [`PinnedDrop`...
85f329df293119d6ba1a26453d109556631081a4
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: SYNC after guest ITS setup in vgic_lpi_stress
Problem Details: vgic_lpi_stress sends MAPTI and MAPC commands during guest GIC setup to map interrupt events to ITT entries and collection IDs to redistributors, respectively. We have no guarantee that the ITS will finish handling these mapping commands before the selftest calls KVM_SIGNAL_MSI to inject LPIs to the g...
```diff diff --git a/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c b/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c index 687d04463983..e857a605f577 100644 --- a/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c +++ b/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c @@ -118,6 +118,10 @@ static void gues...
297877069bc2fa079fb2a60ae91ca9abb481074a
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Drop useless __GFP_HIGHMEM from kvm struct allocation
Problem Details: A recent change on the receiving end of vmalloc() started warning about unsupported GFP flags passed by the caller. Nathan reports that this warning fires in kvm_arch_alloc_vm(), owing to the fact that KVM is passing a meaningless __GFP_HIGHMEM. Do as the warning says and fix the code. Cc: Vishal Moo...
```diff diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index 870953b4a8a7..e791fa52f874 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -440,7 +440,7 @@ struct kvm *kvm_arch_alloc_vm(void) if (!has_vhe()) return kzalloc(sz, GFP_KERNEL_ACCOUNT); - return __vmalloc(sz, GFP_KERNEL_ACCOUNT ...
a1e19289932aeef26085feb97597d624da6302ab
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: move firmware stats request outside of atomic context
Problem Details: In ath12k_mac_op_link_sta_statistics(), the atomic context scope introduced by dp_lock also covers firmware stats request. Since that request could block, below issue is hit: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:575 in_atomic(): 1, irqs_disabled(): 0, non_block:...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index aa80afebb69e..3649f58fef84 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -12792,10 +12792,12 @@ void ath12k_mac_op_link_sta_statistics(struct ieee80211_hw *hw, d...
5a384854d81f83d59d812b54bfa27fd0e56e36f0
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: add the missing RCU lock in ath12k_dp_tx_free_txbuf()
Problem Details: RCU read lock is missing in ath12k_dp_tx_free_txbuf() before calling ath12k_dp_to_pdev_dp(), causing below warning: WARNING: suspicious RCU usage ----------------------------- drivers/net/wireless/ath/ath12k/dp.h:653 ath12k dp to dp pdev called without rcu lock! Call Trace: <IRQ> show_stack dump_st...
```diff diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c index 1d4444f3936f..c10da6195c9c 100644 --- a/drivers/net/wireless/ath/ath12k/dp_tx.c +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c @@ -194,8 +194,6 @@ void ath12k_dp_tx_free_txbuf(struct ath12k_dp *dp, skb_cb = A...
9e5afb7c32830bcd123976a7729ef4e2dff0cd77
Analyze and fix the following issue in the Linux kernel code: arm_mpam: Use long MBWU counters if supported
Problem Details: Now that the larger counter sizes are probed, make use of them. Callers of mpam_msmon_read() may not know (or care!) about the different counter sizes. Allow them to specify mpam_feat_msmon_mbwu and have the driver pick the counter to use. Only 32bit accesses to the MSC are required to be supported b...
```diff diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c index 380386cceb74..0fb08222b91d 100644 --- a/drivers/resctrl/mpam_devices.c +++ b/drivers/resctrl/mpam_devices.c @@ -905,6 +905,50 @@ struct mon_read { int err; }; +static bool mpam_ris_has_mbwu_long_counter(struct mpam_msc_ri...
b35363793291e36c91d4a5b62d7ae7079c70d826
Analyze and fix the following issue in the Linux kernel code: arm_mpam: Consider overflow in bandwidth counter state
Problem Details: Use the overflow status bit to track overflow on each bandwidth counter read and add the counter size to the correction when overflow is detected. This assumes that only a single overflow has occurred since the last read of the counter. Overflow interrupts, on hardware that supports them could be used...
```diff diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c index c8ea37558f69..ecb5ecad50f8 100644 --- a/drivers/resctrl/mpam_devices.c +++ b/drivers/resctrl/mpam_devices.c @@ -985,11 +985,18 @@ static void write_msmon_ctl_flt_vals(struct mon_read *m, u32 ctl_val, } } +static u64 mpam_msm...
41e8a14950e1732af51cfec8fa09f8ded02a5ca9
Analyze and fix the following issue in the Linux kernel code: arm_mpam: Track bandwidth counter state for power management
Problem Details: Bandwidth counters need to run continuously to correctly reflect the bandwidth. Save the counter state when the hardware is reset due to CPU hotplug. Add struct mbwu_state to track the bandwidth counter. Support for tracking overflow with the same structure will be added in a subsequent commit. Cc: Z...
```diff diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c index 4859c8b096c3..c8ea37558f69 100644 --- a/drivers/resctrl/mpam_devices.c +++ b/drivers/resctrl/mpam_devices.c @@ -993,6 +993,7 @@ static void __ris_msmon_read(void *arg) struct mon_read *m = arg; struct mon_cfg *ctx = m->ctx; ...
49aa621c4dcaf8e3cfeb9e73d07a9746b889f9e8
Analyze and fix the following issue in the Linux kernel code: arm_mpam: Register and enable IRQs
Problem Details: Register and enable error IRQs. All the MPAM error interrupts indicate a software bug, e.g. out of range partid. If the error interrupt is ever signalled, attempt to disable MPAM. Only the irq handler accesses the MPAMF_ESR register, so no locking is needed. The work to disable MPAM after an error nee...
```diff diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c index 7943d174b3f4..21fccc3ff002 100644 --- a/drivers/resctrl/mpam_devices.c +++ b/drivers/resctrl/mpam_devices.c @@ -14,6 +14,9 @@ #include <linux/device.h> #include <linux/errno.h> #include <linux/gfp.h> +#include <linux/interrupt...
d02beb06ca2a624e17004659c79d26a23484aa8b
Analyze and fix the following issue in the Linux kernel code: arm_mpam: Add helpers for managing the locking around the mon_sel registers
Problem Details: The MSC MON_SEL register needs to be accessed from hardirq for the overflow interrupt, and when taking an IPI to access these registers on platforms where MSC are not accessible from every CPU. This makes an irqsave spinlock the obvious lock to protect these registers. On systems with SCMI or PCC mailb...
```diff diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c index 3d9b87a9727a..dcbc9cf5581d 100644 --- a/drivers/resctrl/mpam_devices.c +++ b/drivers/resctrl/mpam_devices.c @@ -19,6 +19,7 @@ #include <linux/platform_device.h> #include <linux/printk.h> #include <linux/srcu.h> +#include <linu...
eeec7845e966f9278973c02573e3587e6733a4dd
Analyze and fix the following issue in the Linux kernel code: ACPI / PPTT: Stop acpi_count_levels() expecting callers to clear levels
Problem Details: In acpi_count_levels(), the initial value of *levels passed by the caller is really an implementation detail of acpi_count_levels(), so it is unreasonable to expect the callers of this function to know what to pass in for this parameter. The only sensible initial value is 0, which is what the only ups...
```diff diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c index b8248c0092fe..2856254e29d7 100644 --- a/drivers/acpi/pptt.c +++ b/drivers/acpi/pptt.c @@ -177,14 +177,14 @@ acpi_find_cache_level(struct acpi_table_header *table_hdr, } /** - * acpi_count_levels() - Given a PPTT table, and a CPU node, count the ca...
807e0d187da4c0b22036b5e34000f7a8c52f6e50
Analyze and fix the following issue in the Linux kernel code: tick/sched: Fix bogus condition in report_idle_softirq()
Problem Details: In commit 0345691b24c0 ("tick/rcu: Stop allowing RCU_SOFTIRQ in idle") the new function report_idle_softirq() was created by breaking code out of the existing can_stop_idle_tick() for kernels v5.18 and newer. In doing so, the code essentially went from this form: if (A) { static int ratelimit; i...
```diff diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index c527b421c865..466e083c8272 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -1152,16 +1152,15 @@ static bool report_idle_softirq(void) return false; } - if (ratelimit >= 10) - return false; - /* On RT, softi...
cead55e24cf9e092890cf51c0548eccd7569defa
Analyze and fix the following issue in the Linux kernel code: drm/plane: Fix create_in_format_blob() return value
Problem Details: create_in_format_blob() is either supposed to return a valid pointer or an error, but never NULL. The caller will dereference the blob when it is not an error, and thus will oops if NULL returned. Return proper error values in the failure cases. Cc: stable@vger.kernel.org Cc: Arun R Murthy <arun.r.mur...
```diff diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 38f82391bfda..a30493ed9715 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -210,7 +210,7 @@ static struct drm_property_blob *create_in_format_blob(struct drm_device *dev, formats_size = sizeof(__u32) * p...
0346625cd7f125d056e1424e98d0037a1baa4614
Analyze and fix the following issue in the Linux kernel code: pmdomain: Extend the genpd governor for CPUs to account for IPIs
Problem Details: When the genpd governor for CPUs, tries to select the most optimal idle state for a group of CPUs managed in a PM domain, it fails far too often. On a Dragonboard 410c, which is an arm64 based platform with 4 CPUs in one cluster that is using PSCI OS-initiated mode, we can observe that we often fail w...
```diff diff --git a/drivers/pmdomain/governor.c b/drivers/pmdomain/governor.c index 39359811a930..a46470f2261a 100644 --- a/drivers/pmdomain/governor.c +++ b/drivers/pmdomain/governor.c @@ -404,15 +404,21 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd) if ((idle_duration_ns >= (genpd->states[i].residency...
b0671a5fd3201efc5dd38254f1917cbbd805936c
Analyze and fix the following issue in the Linux kernel code: pmdomain: mediatek: mtk-mfg: select MAILBOX in Kconfig
Problem Details: The mtk-mfg pmdomain driver calls common mailbox framework functions. If the common mailbox framework is not selected in the kernel's configuration, the build runs into a linker error, as the symbols are absent. The hardware mailbox Kconfig system, MAILBOX, has no dependencies of its own. It's therefo...
```diff diff --git a/drivers/pmdomain/mediatek/Kconfig b/drivers/pmdomain/mediatek/Kconfig index b06aaa9690f0..8923e6516441 100644 --- a/drivers/pmdomain/mediatek/Kconfig +++ b/drivers/pmdomain/mediatek/Kconfig @@ -32,6 +32,7 @@ config MTK_MFG_PM_DOMAIN depends on PM depends on OF depends on COMMON_CLK + select M...
19e668e81e273b43b28608e8e05f4fb090a32f5a
Analyze and fix the following issue in the Linux kernel code: pmdomain: mediatek: Fix build-errors
Problem Details: Let's add the missing header to fix the reported build-errors. Fixes: df4e9ec1ed86 ("pmdomain: mediatek: Add support for secure HWCCF infra power on") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/20251...
```diff diff --git a/drivers/pmdomain/mediatek/mtk-pm-domains.c b/drivers/pmdomain/mediatek/mtk-pm-domains.c index ac144ab8fce0..164c6b519af3 100644 --- a/drivers/pmdomain/mediatek/mtk-pm-domains.c +++ b/drivers/pmdomain/mediatek/mtk-pm-domains.c @@ -2,6 +2,7 @@ /* * Copyright (c) 2020 Collabora Ltd. */ +#include ...
02b5822d2fea1e89009ff167fed5aea2f1e1de85
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Fix single doorbell mode support
Problem Details: Commit 22089c218037 ("scsi: ufs: core: Optimize the hot path") accidentally broke support for the legacy single doorbell mode. The tag_set.shared_tags pointer is only != NULL if shared tag support is enabled. The UFS driver only enables shared tag support in MCQ mode. Fix this by handling legacy and ...
```diff diff --git a/drivers/ufs/core/ufshcd-priv.h b/drivers/ufs/core/ufshcd-priv.h index 2f752a45db87..676ebb02db8b 100644 --- a/drivers/ufs/core/ufshcd-priv.h +++ b/drivers/ufs/core/ufshcd-priv.h @@ -368,7 +368,12 @@ static inline bool ufs_is_valid_unit_desc_lun(struct ufs_dev_info *dev_info, u8 */ static inline ...