id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
eb5911f990554f7ce947dd53df00c114362e4465
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Block DC states on vblank enable when Panel Replay supported
Problem Details: Currently we are blocking DC states only when Panel Replay is enabled on vblank enable. It may happen that Panel Replay is getting enabled when vblank is already enabled. Fix this by blocking DC states always if Panel Replay is supported. While at it take care of possible dual eDP case by looping all ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index b0414bd1dc6b..70108e0a4c0c 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -4180,32 +4180,33 @@ void intel_psr_notify_vblank_enable_disable(struct intel_...
c1492da3939c89372929e062d731f328f7693f1e
Analyze and fix the following issue in the Linux kernel code: pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP
Problem Details: The pinctrl and GPIO core code make exceptions for the -ENOTSUPP error code. One such example is gpio_set_config_with_argument_optional(), which returns success when gpio_set_config_with_argument() returns -ENOTSUPP, but reports failure for all other error codes. Returning -EOPNOTSUPP from the pinctr...
```diff diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index a106e087c224..05a33655e6cc 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -1281,7 +1281,7 @@ static int rzg2l_read_oen(struct rzg2l_pinctrl *pctrl, unsigned...
1f10c4509649e7c5f6d5d3acccf3ef6fbb5cdd46
Analyze and fix the following issue in the Linux kernel code: clk: renesas: rzg2l: Rename iterator in for_each_mod_clock() to avoid shadowing
Problem Details: Rename the internal loop iterator variable in the for_each_mod_clock() macro from 'i' to '__i'. The current naming conflicts with local loop variables named 'i' inside code blocks that utilize the macro, triggering compiler warnings due to variable shadowing: drivers/clk/renesas/rzg2l-cpg.c:1494:36...
```diff diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c index 0abe00e2960b..51c9e19e1575 100644 --- a/drivers/clk/renesas/rzg2l-cpg.c +++ b/drivers/clk/renesas/rzg2l-cpg.c @@ -1402,10 +1402,10 @@ struct mod_clock { #define to_mod_clock(_hw) container_of(_hw, struct mod_clock, hw) #def...
09c816e5c4d3a8d6d6e4b7537433e5e98505d934
Analyze and fix the following issue in the Linux kernel code: pinctrl: spacemit: fix NULL check in spacemit_pin_set_config
Problem Details: spacemit_pin_set_config() looks up the per-pin descriptor with spacemit_get_pin() then checks the wrong variable for failure: const struct spacemit_pin *spin = spacemit_get_pin(pctrl, pin); ... if (!pin) return -EINVAL; reg = spacemit_pin_to_reg(pctrl, spin->pin); pin is an unsigned int pin id...
```diff diff --git a/drivers/pinctrl/spacemit/pinctrl-k1.c b/drivers/pinctrl/spacemit/pinctrl-k1.c index b0be62b1c816..95024e2bb5a5 100644 --- a/drivers/pinctrl/spacemit/pinctrl-k1.c +++ b/drivers/pinctrl/spacemit/pinctrl-k1.c @@ -795,7 +795,7 @@ static int spacemit_pin_set_config(struct spacemit_pinctrl *pctrl, void...
b34bafc38cd9573694f5049bb308387ba8d8c042
Analyze and fix the following issue in the Linux kernel code: drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket
Problem Details: Drivers were accessing this drm_exec member directly. While that may seem harmless, it will require action if the drm_exec utility is made a subclass of a dma-resv transaction utility as outlined in the cover-letter. Provide an accessor, drm_exec_ticket() to avoid that. v2: - Fix amdgpu compile error...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index 72a5a29e63f6..d54794e5b18b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -2999,7 +2999,7 @@ int amdgpu_amdkfd_gpuvm_res...
88f643ec105ea0d2872b2c34b23503ad6076518c
Analyze and fix the following issue in the Linux kernel code: pinctrl: avoid duplicate function definitions
Problem Details: The pinctrl_generic_to_map() and pinctrl_generic_pins_function_dt_node_to_map() functions are built whenever CONFIG_GENERIC_PINCTRL is enabled, including configurations without CONFIG_OF. When CONFIG_OF is disabled, the dummy definitions are also present in the header, which causes the build to fail: ...
```diff diff --git a/drivers/pinctrl/pinconf.h b/drivers/pinctrl/pinconf.h index 9711d16c38b6..c6c9dc07b08d 100644 --- a/drivers/pinctrl/pinconf.h +++ b/drivers/pinctrl/pinconf.h @@ -167,7 +167,7 @@ pinconf_generic_parse_dt_pinmux(struct device_node *np, struct device *dev, } #endif -#if defined(CONFIG_GENERIC_PINC...
50bb01954a457b573c0c574eb89249c776555568
Analyze and fix the following issue in the Linux kernel code: pinctrl: starfive: jh7110: Use __counted_by() flexarray
Problem Details: Flexible arrays should use __counted_by() to be able to do runtime checks that the array does not go out of range. Cc: Rosen Penev <rosenp@gmail.com> Fixes: 87182ef0bf93 ("pinctrl: starfive: jh7110: use struct_size") Signed-off-by: Linus Walleij <linusw@kernel.org>
```diff diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c index 3572e8edd9f3..3fb9aa8ddf07 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c @@ -865,6 +865,7 @@ int jh7110_pinctrl_pr...
3109f9f38800841e46769e95e1ba11f1f8c7b230
Analyze and fix the following issue in the Linux kernel code: ACPI: button: Add missing device class clearing on probe failures
Problem Details: Commit e18947038bf4 ("ACPI: driver: Do not set acpi_device_class() unnecessarily") modified acpi_button_remove() to clear the device class field in struct acpi_device on driver removal, but it should also have updated the rollback path in acpi_button_probe(), which it didn't do, so do it now. Fixes: e...
```diff diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index e8dd306e17ed..d80276368b81 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -687,6 +687,7 @@ err_remove_fs: acpi_button_remove_fs(button); err_free_button: kfree(button); + memset(acpi_device_class(device), 0, sizeof(acpi_dev...
a004b8f0d3bc5d82d3f2c91ff93f4b4b7ccb8f76
Analyze and fix the following issue in the Linux kernel code: ACPI: button: Enable wakeup GPEs for ACPI buttons at probe time
Problem Details: Prior to commit 57c31e6d620f ("ACPI: scan: Use acpi_setup_gpe_for_wake() for buttons"), ACPI button wakeup GPEs having handler methods remained enabled after acpi_wakeup_gpe_init(), but currently they are not enabled because acpi_setup_gpe_for_wake() disables them. That causes function keys to stop wo...
```diff diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index 60dacec1b121..4074b5908db3 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c @@ -78,18 +78,22 @@ ACPI_EXPORT_SYMBOL(acpi_update_all_gpes) /************************************************************...
fe80251152fed5b185f795ef2cd9f7fe9c3162e0
Analyze and fix the following issue in the Linux kernel code: ACPI: button: Fix ACPI GPE handler leak during removal
Problem Details: Commit a7e23ec17fee ("ACPI: button: Install notifier for system events as well") changed the ACPI notify handler type for ACPI buttons to ACPI_ALL_NOTIFY, but it forgot to update acpi_button_remove() to reflect that change. This leads to leaking the notify handler past driver removal, which may cause ...
```diff diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index b47301ee4c8a..7c2e1a422ba0 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -689,7 +689,7 @@ static void acpi_button_remove(struct platform_device *pdev) acpi_button_event); break; default: - acpi_remove_notify_handle...
b0c13ec17438577f90b379d448dfed1233e2c0a4
Analyze and fix the following issue in the Linux kernel code: pinctrl: mcp23s08: Read spi-present-mask as u8 not u32
Problem Details: The binding (microchip,mcp23s08) specifies microchip,spi-present-mask as uint8, but driver would read u32, causing type mismatch. Use device_property_read_u8 to match binding spec, hardware (8 chips max), & prevent probe failure. Cc: stable@vger.kernel.org Fixes: 3ad8d3ec6d87 ("dt-bindings: pinctrl: c...
```diff diff --git a/drivers/pinctrl/pinctrl-mcp23s08_spi.c b/drivers/pinctrl/pinctrl-mcp23s08_spi.c index 5ed368772adb..30775d31bd69 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08_spi.c +++ b/drivers/pinctrl/pinctrl-mcp23s08_spi.c @@ -144,13 +144,13 @@ static int mcp23s08_probe(struct spi_device *spi) unsigned int ad...
8473c3a197b57ff01396f7a2ec6ddf65383820d4
Analyze and fix the following issue in the Linux kernel code: pinctrl: mcp23s08: Initialize mcp->dev and mcp->addr before regmap init
Problem Details: Regmap initialization triggers regcache_maple_populate() which attempts SPI read to populate cache. SPI read requires mcp->dev and mcp->addr to be set, without them, NULL pointer dereference occurs during probe. Move initialization before mcp23s08_spi_regmap_init() call. Cc: stable@vger.kernel.org Fi...
```diff diff --git a/drivers/pinctrl/pinctrl-mcp23s08_spi.c b/drivers/pinctrl/pinctrl-mcp23s08_spi.c index 54f61c8cb1c0..5ed368772adb 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08_spi.c +++ b/drivers/pinctrl/pinctrl-mcp23s08_spi.c @@ -10,6 +10,7 @@ #include "pinctrl-mcp23s08.h" #define MCP_MAX_DEV_PER_CS 8 +#define...
7740c6cedb2599d8e4534574a0a72042ba63c1c7
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Limit mic boost on Positivo DN140
Problem Details: The internal mic boost on the Positivo DN140 is too high. Fix this by applying the ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine to limit the gain. Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com> Link: https://patch.msgid.link/20260524185324.28959-1-edson.drosdeck@gmail.com Si...
```diff diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 9cc4463af05e..b4c9a5584a04 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -7846,6 +7846,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1d72, 0x1947, "R...
db37cf47b67e38ade40de5cd74a4d4d772ff1416
Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Fix 2i2 Gen 4 direct monitor gain on firmware 2417
Problem Details: Firmware 2417 for the Scarlett 4th Gen 2i2 moved the direct monitor gain parameter by 4 bytes, from offset 0x2a0 to 0x2a4, breaking the "Direct Monitor X Mix Y" controls. Special-case the offset in the get/set config helpers when the running firmware is 2417 or later. Fixes: 4e809a299677 ("ALSA: scar...
```diff diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 8e80a7165faf..a4fac4652201 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -2504,6 +2504,27 @@ static int scarlett2_has_config_item( return !!private->config_set->items[config_item_num].offset; } +/* ...
4cc54bdd54b337e77115be5b55577d1c58608eae
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm: oss: Fix setup list UAF on proc write error
Problem Details: snd_pcm_oss_proc_write() links a newly allocated setup entry into the OSS setup list before duplicating the task name. If the task-name allocation fails, the error path frees the already linked entry and leaves setup_list pointing at freed memory. A later OSS device open can then walk the stale list e...
```diff diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 33fd34f0d615..746eaf93e1a5 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -2974,8 +2974,10 @@ static void snd_pcm_oss_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_pcm...
a0d9e8df2ebca290c2efff70abc05426e5a476b0
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cs35l56: Fix system name string leaks
Problem Details: cs35l56_hda_read_acpi() gets an allocated ACPI _SUB string from acpi_get_subsystem_id(). On success, that string is used to create the firmware system name. Several error paths after the _SUB lookup can return without releasing the allocated string. This includes speaker ID lookup errors other than -E...
```diff diff --git a/sound/hda/codecs/side-codecs/cs35l56_hda.c b/sound/hda/codecs/side-codecs/cs35l56_hda.c index cdbc576569ef..a0ea08eb96a9 100644 --- a/sound/hda/codecs/side-codecs/cs35l56_hda.c +++ b/sound/hda/codecs/side-codecs/cs35l56_hda.c @@ -1025,7 +1025,7 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda...
f7b1f71566ff9d5344a516fa745118cee924c8d0
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Add HDA_CODEC_QUIRK for Lenovo Yoga Slim 7 14AGP11
Problem Details: The BIOS on the Lenovo Yoga Slim 7 14AGP11 (AMD Ryzen AI / Kraken Point chassis; board LNVNB161216, product 83QS) programs the PCI subsystem ID of the HDA function as 17aa:0000. As a result no entry in alc269_fixup_tbl[] matches via SND_PCI_QUIRK, the fixup falls back to the generic auto-routing path, ...
```diff diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 53585e20c494..9cc4463af05e 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -7778,6 +7778,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x3920, "Y...
4e273bca232ec71bbf072f10f7d395a28e85e4e1
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Fix incorrect comment for ALC299_FIXUP_PREDATOR_SPK
Problem Details: The comment for the pin configuration 0x21 in the fixup ALC299_FIXUP_PREDATOR_SPK states "use as headset mic, without its own jack detect", but the fixup name and the actual usage indicate that the pin is meant to be used as internal speaker. Correct the comment to avoid confusion. Signed-off-by: Zhan...
```diff diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index f180d6a72021..53585e20c494 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -5458,7 +5458,7 @@ static const struct hda_fixup alc269_fixups[] = { [ALC299_FIXUP_PREDATOR_SPK] = { ...
98fb1c1bb11e29eb609b7200a25e136e05aa4498
Analyze and fix the following issue in the Linux kernel code: ALSA: firewire-motu: Protect register DSP event queue positions
Problem Details: The register DSP event queue is updated under parser->lock, but snd_motu_register_dsp_message_parser_count_event() reads pull_pos and push_pos without the lock. snd_motu_register_dsp_message_parser_copy_event() also reads both queue positions before taking the lock. Protect these accesses with parser-...
```diff diff --git a/sound/firewire/motu/motu-register-dsp-message-parser.c b/sound/firewire/motu/motu-register-dsp-message-parser.c index a8053e3ef065..4ec23e6880d9 100644 --- a/sound/firewire/motu/motu-register-dsp-message-parser.c +++ b/sound/firewire/motu/motu-register-dsp-message-parser.c @@ -386,6 +386,8 @@ unsig...
6b964941bbfe6e0f18b1a5e008486dbb62df440a
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: usb: fix memory leaks on USB write failures
Problem Details: When rtw_usb_write_port() fails to submit a USB Request Block (URB) (e.g., due to device disconnect or ENOMEM), the completion callback is never executed. Currently, the driver ignores the return value of rtw_usb_write_port() in rtw_usb_write_data() and rtw_usb_tx_agg_skb(). Because these functions re...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index 718940ebba31..1a0bdbf52cb0 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -399,6 +399,7 @@ static bool rtw_usb_tx_agg_skb(struct rtw_usb *rtwusb, struct...
c80788f7c5aed8d420366b821f867a8a353d83a5
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: increase TX report timeout to fix race condition
Problem Details: The driver expects the firmware to report TX status within 500ms. However, a timeout can be triggered when the hardware performs background scans while under TX load. During these scans, the firmware stays off-channel for periods exceeding 500ms, delaying the delivery of TX reports back to the driver. ...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c index bea78971141e..9d747a060b98 100644 --- a/drivers/net/wireless/realtek/rtw88/tx.c +++ b/drivers/net/wireless/realtek/rtw88/tx.c @@ -196,6 +196,7 @@ void rtw_tx_report_purge_timer(struct timer_list *t) void rtw_tx...
63ccdfac8677387dfdbd9d4336089e9823280704
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: correct drop logic for malformed AMPDU frames
Problem Details: The previous commit aims to fix issue caused by malformed AMPDU frames. But the drop logic fails to deal with the first AMPDU packet paired with certain range of sequence number, and leads to unexpected packet drop. It is more likely to encounter this failure when there are busy traffic during rekey pr...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 7b26aedc0883..0f3168d85369 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -3948,7 +3948,8 @@ static bool rtw89_core_skb_pn_valid(struct rtw89_dev *r...
125fd4514fa8ca355a6b8e45bf4ff319c483a77b
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: fw: dump status of H2C command and C2H event for SER
Problem Details: When SER (system error recovery) happens, there may be some handshake between FW and SW, e.g. SER Level 1. These handshake are based on H2C commands and C2H events. Dump the status of them to enhance SER debug. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@r...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index c5a598a507f4..29d8d13d11fe 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -8293,6 +8293,12 @@ void rtw89_fw_st_dbg_dump(struct rtw89_dev *rtwdev) rtw89_in...
becd1c37efc369694dbbaf0ea2a4c06b83c72546
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: debug: Wi-Fi 7 update simulation of SER L0/L1 by halt H2C command
Problem Details: Wi-Fi 7 FW fixes support of triggering SER L0/L1 simulation via halt H2C command on v0.35.108.0. After that, the halt H2C command trigger for Wi-Fi 6 and Wi-Fi 7 can be the same. Update FW feature table and share the halt H2C command trigger function between Wi-Fi 6 and Wi-Fi 7. Signed-off-by: Zong-Zh...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c index e5976b8e7056..c0fbb016cea4 100644 --- a/drivers/net/wireless/realtek/rtw89/debug.c +++ b/drivers/net/wireless/realtek/rtw89/debug.c @@ -3543,20 +3543,38 @@ out: return count; } -static int rtw89_dbg_t...
e384397796eaf1ecba9e3d91a3f10ec63c7dbc76
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: debug: Wi-Fi 7 show count of SER L0 simulation
Problem Details: Wi-Fi 7 has dedicated HW register to count SER L0 simulation, i.e. manually triggered by users. Show count of it in dbgfs ser_counters. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260515014433.16168-2-pkshih@re...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c index 8ee800c76cfe..e5976b8e7056 100644 --- a/drivers/net/wireless/realtek/rtw89/debug.c +++ b/drivers/net/wireless/realtek/rtw89/debug.c @@ -3760,6 +3760,7 @@ rtw89_debug_priv_fw_crash_set(struct rtw89_dev *rtw...
61192938a5870ac36edae81e4775b680dcf02c61
Analyze and fix the following issue in the Linux kernel code: bus: sunxi-rsb: Always check register address validity
Problem Details: The register address was already validated for read operations in regmap_sunxi_rsb_reg_read before being truncated to a u8. Write operations have the same set of possible addresses, and the address is being truncated from u32 to u8 here as well, so the same check is needed. Signed-off-by: Samuel Holla...
```diff diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c index b4f2c64ac181..daf0ea563e47 100644 --- a/drivers/bus/sunxi-rsb.c +++ b/drivers/bus/sunxi-rsb.c @@ -445,6 +445,9 @@ static int regmap_sunxi_rsb_reg_write(void *context, unsigned int reg, struct sunxi_rsb_ctx *ctx = context; struct sunxi_rsb_...
b882d807fa443b529ae8bf917d7b640a8d555437
Analyze and fix the following issue in the Linux kernel code: tools/nolibc: stackprotector: Avoid stalling program startup if crng is not init yet
Problem Details: We are using the getrandom syscall to get a random seed for the stack protector canary but we are calling it with no flags which means it'll block until there is some real randomness to return. This means that if the crng is not ready yet program startup will block and if you are unlucky that could be...
```diff diff --git a/tools/include/nolibc/stackprotector.h b/tools/include/nolibc/stackprotector.h index e11c20c75465..916a92062ba0 100644 --- a/tools/include/nolibc/stackprotector.h +++ b/tools/include/nolibc/stackprotector.h @@ -42,7 +42,8 @@ uintptr_t __stack_chk_guard; static __nolibc_no_stack_protector void __s...
e928ab085d8ab775fe0cb8bad15340081b201f52
Analyze and fix the following issue in the Linux kernel code: netfilter: nft_set_pipapo_avx2: restore performance optimization
Problem Details: The avx2 lookup routines get the next map index to process passes as a function argument, but this isn't obvious because it's hidden in the lookup macro. Additionally, a recent LLM review pointed out following "bug": ------------------------------------------------------------- > b = n...
```diff diff --git a/net/netfilter/nft_set_pipapo_avx2.c b/net/netfilter/nft_set_pipapo_avx2.c index dad265807b8b..b3f105520a85 100644 --- a/net/netfilter/nft_set_pipapo_avx2.c +++ b/net/netfilter/nft_set_pipapo_avx2.c @@ -144,6 +144,7 @@ static void nft_pipapo_avx2_fill(unsigned long *data, int start, int len) * Thi...
22fad3d5b135e53f8648991bf3724a14abc579c3
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_conntrack_proto_tcp: fix typos in comments
Problem Details: Fix three typos in comments: - "migth"/"Migth" -> "might" (two adjacent occurrences in the tcp_conntracks[] state-transition table comment block). - "agaist" -> "against" (tcp_error() header comment). - "intrepretated" -> "interpreted" (RFC 5961 challenge-ACK marker comment in nf_conntrack_tcp_pac...
```diff diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index b67426c2189b..47dc6edb4431 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c @@ -169,14 +169,14 @@ static const u8 tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = { /*fin*...
ef6400ca25a13fd6dedbe8ef4a1d0979bbbfe88a
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_conntrack_irc: fix parse_dcc() off-by-one OOB read
Problem Details: parse_dcc() treats data_end as an inclusive end pointer, but its only caller passes data_limit = ib_ptr + datalen, which points one past the last valid byte. The newline search loop iterates while tmp <= data_end, so when no newline is present, *tmp is read at tmp == data_end, one byte beyond the regi...
```diff diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_irc.c index 522183b9a604..9a7b8f6221eb 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c @@ -59,7 +59,7 @@ static const char *const dccprotos[] = { /* tries to get the ip_addr and port out of a dcc com...
d738feccb98cb224ebabecb703e98f5008276bff
Analyze and fix the following issue in the Linux kernel code: netfilter: nfnl_cthelper: apply per-class values when updating policies
Problem Details: When a userspace conntrack helper with multiple expectation classes is updated via nfnetlink, every class ends up with the first class's max_expected and timeout values. nfnl_cthelper_update_policy_all() validates each new policy into the corresponding slot of the temporary new_policy array, but the s...
```diff diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c index 0d16ad82d70c..34af6840803e 100644 --- a/net/netfilter/nfnetlink_cthelper.c +++ b/net/netfilter/nfnetlink_cthelper.c @@ -346,8 +346,8 @@ static int nfnl_cthelper_update_policy_all(struct nlattr *tb[], for (i = 0; i < hel...
73ce4a2949d97288ebee96102224f75506f6b14f
Analyze and fix the following issue in the Linux kernel code: netfilter: nft_set_rbtree: remove dead conditional
Problem Details: net/netfilter/nft_set_rbtree.c:399 __nft_rbtree_insert() warn: 'removed_end' is not an error pointer Since commit : 087388278e0f ("netfilter: nf_tables: nft_set_rbtree: fix spurious insertion failure") __nft_rbtree_insert() can no longer fail and this condition is always false. Remove it. Re...
```diff diff --git a/net/netfilter/nft_set_rbtree.c b/net/netfilter/nft_set_rbtree.c index 560fbe6e3f75..b4f0b5fdf1f2 100644 --- a/net/netfilter/nft_set_rbtree.c +++ b/net/netfilter/nft_set_rbtree.c @@ -396,9 +396,6 @@ static int __nft_rbtree_insert(const struct net *net, const struct nft_set *set, const struct nft...
a7f57320bbbc67e347bf5fff4b4a9bab980d5956
Analyze and fix the following issue in the Linux kernel code: netfilter: ctnetlink: use nf_ct_exp_net() in expectation dump
Problem Details: Commit 02a3231b6d82 ("netfilter: nf_conntrack_expect: store netns and zone in expectation") introduced exp->net so RCU-only expectation paths no longer need to dereference exp->master for netns lookups. Commit 3db5647984de ("netfilter: nf_conntrack_expect: skip expectations in other netns via proc") u...
```diff diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index befa7e83ee49..d429f9c9546c 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -3173,7 +3173,7 @@ restart: if (l3proto && exp->tuple.src.l3num != l3proto) continue;...
d28654518c8db5d06d27bd3211c0e9a70c18f7c2
Analyze and fix the following issue in the Linux kernel code: RDMA/mana_ib: Use ib_get_eth_speed for reporting port speed
Problem Details: Replace hardcoded IB_WIDTH_4X/IB_SPEED_EDR with ib_get_eth_speed() to report the actual link speed in mana_ib_query_port(). Fixes: 4bda1d5332ec ("RDMA/mana_ib: Implement port parameters") Link: https://patch.msgid.link/r/20260512094056.264827-1-kotaranov@linux.microsoft.com Signed-off-by: Shiraz Salee...
```diff diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c index ac5e75dd3494..c2f0b96f473d 100644 --- a/drivers/infiniband/hw/mana/main.c +++ b/drivers/infiniband/hw/mana/main.c @@ -600,8 +600,7 @@ int mana_ib_query_port(struct ib_device *ibdev, u32 port, props->phys_state = IB_PORT_...
3fcf9f334d272989b57acc7b94d4eac717206118
Analyze and fix the following issue in the Linux kernel code: memory: renesas-rpc-if: Fix duplicate device name on multi-instance platforms
Problem Details: On platforms with multiple xSPI instances, the driver fails to probe additional instances due to duplicate sysfs entries: [ 86.878242] sysfs: cannot create duplicate filename '/bus/platform/devices/rpc-if-spi' This occurs because platform_device_alloc() uses pdev->id for the device ID, which may ...
```diff diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 0fb568456164..3755956ae906 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -1034,7 +1034,7 @@ static int rpcif_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(rpc->...
83c1d176fbac3c3ffbeaddbc37e11e083f19cebc
Analyze and fix the following issue in the Linux kernel code: memory: omap-gpmc: Silence W=1 kerneldoc warnings
Problem Details: Recent W=1 builds print kerneldoc warnings, even though a correct kerneldoc is there: Warning: drivers/memory/omap-gpmc.c:441 Excess function parameter 'cs' description in 'get_gpmc_timing_reg' Drop additional inline comments for arguments to fix that. They are anyway not that useful. Signed-off-...
```diff diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index d9e13c1f9b13..958d2b0ea54a 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -432,13 +432,9 @@ static unsigned int gpmc_clk_ticks_to_ns(unsigned int ticks, int cs, * */ static int get_gpmc_timing_reg( - /* ...
a88c02915d9c6160cfc7ab1b26ed64b2993e2b94
Analyze and fix the following issue in the Linux kernel code: io_uring/tctx: set ->io_uring before publishing the tctx node
Problem Details: io_register_iowq_max_workers() walks ctx->tctx_list under ctx->tctx_lock and dereferences each node's task->io_uring without a NULL check: list_for_each_entry(node, &ctx->tctx_list, ctx_node) { tctx = node->task->io_uring; if (WARN_ON_ONCE(!tctx->io_wq)) continue; ... } __io_uring_add_tctx_node(...
```diff diff --git a/io_uring/tctx.c b/io_uring/tctx.c index 6af62ca9baba..42b219b34aa8 100644 --- a/io_uring/tctx.c +++ b/io_uring/tctx.c @@ -139,12 +139,14 @@ static int io_tctx_install_node(struct io_ring_ctx *ctx, int __io_uring_add_tctx_node(struct io_ring_ctx *ctx) { struct io_uring_task *tctx = current->io_u...
53676e4d44d6b38c8a0d9bff331f170ae2e41bbe
Analyze and fix the following issue in the Linux kernel code: drm/msm: Restore second parameter name in purge() and evict()
Problem Details: After commit 3392291fc509 ("drm/msm: Fix shrinker deadlock"), all supported versions of clang warn (or error with CONFIG_WERROR=y): drivers/gpu/drm/msm/msm_gem_shrinker.c:105:58: error: omitting the parameter name in a function definition is a C23 extension [-Werror,-Wc23-extensions] 105 | purge...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c index c8dda2b68cff..9d2788f79ace 100644 --- a/drivers/gpu/drm/msm/msm_gem_shrinker.c +++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c @@ -102,7 +102,7 @@ out_unlock: } static bool -purge(struct drm_gem_object *obj, stru...
42c5468f9cdc0c892fec3c0916b3ac5b670775af
Analyze and fix the following issue in the Linux kernel code: rcu-tasks: Fix possible boot-time tests failed for the call_rcu_tasks()
Problem Details: The following scenarios will cause the call_rcu_tasks() boot-time tests failed: CPU0 CPU1 rcu_init_tasks_generic() ->rcu_tasks_initiate_self_tests() ->call_rcu_tasks_trace(&tests[1].rh, test_rcu_tasks_callback) ->call_rcu_tasks_generic() ->havekthread = smp_loa...
```diff diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index 48f0d803c8e2..f4da5fad70f5 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -373,7 +373,8 @@ static void call_rcu_tasks_generic(struct rcu_head *rhp, rcu_callback_t func, // Queuing callbacks before initialization not yet supported. if (W...
e2f08cefcf483f56366e4daa292bb9ba113ec138
Analyze and fix the following issue in the Linux kernel code: srcu: Fix kerneldoc header comment typo in srcu_down_read_fast()
Problem Details: s/srcu_read_lock_safe()/srcu_read_lock_fast_updown(), there being no such thing as srcu_read_lock_safe(). Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
```diff diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 81b1938512d5..a54ce9e808b9 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -397,7 +397,7 @@ static inline struct srcu_ctr __percpu *srcu_read_lock_fast_notrace(struct srcu_ * * The same srcu_struct may be used concurrently by src...
59cf5dbcc95f11a6b03fad9fe9723ff31149459b
Analyze and fix the following issue in the Linux kernel code: torture: Add torture_sched_set_normal() for user-specified nice values
Problem Details: This new torture_sched_set_normal() function clamps the nice value at the MIN_NICE..MAX_NICE limits, splatting it these limits are exceeded. It then invokes sched_set_normal() to set the new value. This prevents more difficult-to-debug failures within the scheduler. Signed-off-by: Paul E. McKenney <p...
```diff diff --git a/include/linux/torture.h b/include/linux/torture.h index 1b59056c3b18..c9b47d138302 100644 --- a/include/linux/torture.h +++ b/include/linux/torture.h @@ -129,6 +129,7 @@ void _torture_stop_kthread(char *m, struct task_struct **tp); #else #define torture_preempt_schedule() do { } while (0) #endif...
33583baeb1ba7d328e6a9775d889036900b74cdb
Analyze and fix the following issue in the Linux kernel code: dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU
Problem Details: Extend the binding to cover details specific to the Tenstorrent RISC-V IOMMU. In particular, a second register range is added which contains M-privileged registers, e.g., PMAs and PMPs. The RISC-V spec S-privileged registers remain in the first register range and are compatible with "riscv,iommu" so t...
```diff diff --git a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml index d4838c3b3741..f83efb3ee000 100644 --- a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml +++ b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml @@ -32,22 +32,35 ...
7378b6656aa46fda56f2743d5a7c1f619c2f6f9b
Analyze and fix the following issue in the Linux kernel code: perf riscv: Fix discarded const qualifier in _get_field()
Problem Details: The assignment of strrchr() return values to non-const char * variables triggers a -Werror=discarded-qualifiers warning when building with GCC 14. This happens because in newer glibc versions, strrchr() returns a 'const char *' if the input string is const. Properly declare 'line2' and 'nl' as const ...
```diff diff --git a/tools/perf/arch/riscv/util/header.c b/tools/perf/arch/riscv/util/header.c index 4b839203d4a5..891984e909bd 100644 --- a/tools/perf/arch/riscv/util/header.c +++ b/tools/perf/arch/riscv/util/header.c @@ -19,7 +19,7 @@ static char *_get_field(const char *line) { - char *line2, *nl; + const char *l...
dc9e08fdbcc3eb08a1d2b868b535081c44425e27
Analyze and fix the following issue in the Linux kernel code: pwm: imx27: Fix variable truncation in .apply()
Problem Details: Fix a variable truncation when calculating period in microseconds as part of the solution for the ERR051198 in .apply() callback. Example scenario: - Period of 3us (PWMPR = 196 and prescaler = 1) - Expected value in tmp: 198000000000 (NSEC_PER_SEC * (196 + 2) * 1) - Actual value is 431504384 (trunc...
```diff diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c index 3d34cdc4a3a5..c8b801fcb525 100644 --- a/drivers/pwm/pwm-imx27.c +++ b/drivers/pwm/pwm-imx27.c @@ -200,7 +200,7 @@ static void pwm_imx27_wait_fifo_slot(struct pwm_chip *chip, static int pwm_imx27_apply(struct pwm_chip *chip, struct pwm_device ...
7dd62566e0d108d29034bcff8503b827f8763320
Analyze and fix the following issue in the Linux kernel code: libbpf: fix off-by-one in emit_signature_match jump offset
Problem Details: The offset for the cleanup-label jump is computed before the MOV R7 instruction is emitted, but the JMP lands after it. Account for the extra insn in the offset calculation (-2 instead of -1). Drop the redundant self-loop in the else branch; gen->error = -ERANGE already marks the generation as failed. ...
```diff diff --git a/tools/lib/bpf/gen_loader.c b/tools/lib/bpf/gen_loader.c index cd5c2543f54d..9478b8f78f26 100644 --- a/tools/lib/bpf/gen_loader.c +++ b/tools/lib/bpf/gen_loader.c @@ -592,13 +592,12 @@ static void emit_signature_match(struct bpf_gen *gen) gen->hash_insn_offset[i] = gen->insn_cur - gen->insn_start...
bee399ea20c8fea361c0ada06afdec9fcbf6dfde
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix arch timer interrupts for GICv3-on-GICv5 guests
Problem Details: When running on a GICv5 host, we push an arch-timer-specific interrupt domain for the timer interrupts. This interrupt domain is used to mask the host interrupt when a GICv5 guest is running. However, this interrupt domain is still in place when running with a GICv3 guest on GICv5 hardware. The result ...
```diff diff --git a/arch/arm64/kvm/arch_timer.c b/arch/arm64/kvm/arch_timer.c index f003df76fdda..53b67b4d0bf2 100644 --- a/arch/arm64/kvm/arch_timer.c +++ b/arch/arm64/kvm/arch_timer.c @@ -1294,7 +1294,12 @@ static int timer_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu) static int timer_irq_set_irqchip_state...
3f5aeaf8d9d3a6693979a92e6ac94b1e2884b911
Analyze and fix the following issue in the Linux kernel code: Documentation: KVM: Clarify that PMU_V3_IRQ IntID requirements for GICv5
Problem Details: When running a GICv5-based guest, the PMU must use PPI 23. This, however, must be communicated via the KVM_ARM_VCPU_PMU_V3_CTRL->KVM_ARM_VCPU_PMU_V3_IRQ ioctl as a full GICv5-style Interrupt ID. That is, 0x20000017. Optionally, the whole ioctl can be skipped for GICv5. This was previously not clearly ...
```diff diff --git a/Documentation/virt/kvm/devices/vcpu.rst b/Documentation/virt/kvm/devices/vcpu.rst index 5e3805820010..66e714f2fcfa 100644 --- a/Documentation/virt/kvm/devices/vcpu.rst +++ b/Documentation/virt/kvm/devices/vcpu.rst @@ -37,8 +37,11 @@ Returns: A value describing the PMUv3 (Performance Monitor Unit v...
6930980bf2f1625c5eb25a27b8673faa89c5792a
Analyze and fix the following issue in the Linux kernel code: Documentation: KVM: Fix typos in VGICv5 documentation
Problem Details: Fix two typos in the VGICv5 documentation. Fixes: d51c978b7d3e ("KVM: arm64: gic-v5: Communicate userspace-driveable PPIs via a UAPI") Fixes: eb3c4d2c9a4d ("Documentation: KVM: Introduce documentation for VGICv5") Link: https://sashiko.dev/#/patchset/20260319154937.3619520-1-sascha.bischoff%40arm.com ...
```diff diff --git a/Documentation/virt/kvm/devices/arm-vgic-v5.rst b/Documentation/virt/kvm/devices/arm-vgic-v5.rst index 29335ea823fc..70b9162755c7 100644 --- a/Documentation/virt/kvm/devices/arm-vgic-v5.rst +++ b/Documentation/virt/kvm/devices/arm-vgic-v5.rst @@ -12,8 +12,8 @@ Only one VGIC instance may be instantia...
441623bcb8ccb957fbb4b536b194352a186c0155
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: selftests: Improve error handling for GICv5 PPI selftest
Problem Details: Cases where the KVM_RUN ioctl returned an error were wrongly reported as incorrect ucalls. Furthermore, potential failures when calling KVM_IRQ_LINE were being hidden. Improve the error handling to correctly propagate the error in both cases. Fixes: 0a9f38bf612b ("KVM: arm64: selftests: Introduce a m...
```diff diff --git a/tools/testing/selftests/kvm/arm64/vgic_v5.c b/tools/testing/selftests/kvm/arm64/vgic_v5.c index a8707120de0d..96cfd6bb32f6 100644 --- a/tools/testing/selftests/kvm/arm64/vgic_v5.c +++ b/tools/testing/selftests/kvm/arm64/vgic_v5.c @@ -129,6 +129,8 @@ static void test_vgic_v5_ppis(u32 gic_dev_type) ...
8192f783b5e15c2966f67918b1e8073171c928c9
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: selftests: Cleanup unused vars in GICv5 PPI selftest
Problem Details: Clean up a set of unused variables around the size of the guest's PA space as they are completely irrelevant for GICv5 when only considering PPIs. Fixes: 0a9f38bf612b ("KVM: arm64: selftests: Introduce a minimal GICv5 PPI selftest") Link: https://sashiko.dev/#/patchset/20260319154937.3619520-1-sascha....
```diff diff --git a/tools/testing/selftests/kvm/arm64/vgic_v5.c b/tools/testing/selftests/kvm/arm64/vgic_v5.c index d785b660d847..a8707120de0d 100644 --- a/tools/testing/selftests/kvm/arm64/vgic_v5.c +++ b/tools/testing/selftests/kvm/arm64/vgic_v5.c @@ -20,8 +20,6 @@ struct vm_gic { u32 gic_dev_type; }; -static u...
f034ae93bcb68b06bb52344788f4cb82ae691719
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: selftests: Add missing GIC CDEN to no-vgic-v5 selftest
Problem Details: The selftest mistakenly omitted the GIC CDEN instruction from the testing. Add it in. Fixes: ce29261ec648 ("KVM: arm64: selftests: Add no-vgic-v5 selftest") Reviewed-by: Joey Gouly <joey.gouly@arm.com> Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com> Link: https://lore.kernel.org/r/20260520091...
```diff diff --git a/tools/testing/selftests/kvm/arm64/no-vgic.c b/tools/testing/selftests/kvm/arm64/no-vgic.c index 25b2e3222f68..ab57902ce429 100644 --- a/tools/testing/selftests/kvm/arm64/no-vgic.c +++ b/tools/testing/selftests/kvm/arm64/no-vgic.c @@ -159,6 +159,7 @@ static void guest_code_gicv5(void) check_gicv5_...
2427e8c1cd4f467770cb52e5e723adf88cc61ae0
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: vgic-v5: Atomically assign bits to PPI DVI bitmap
Problem Details: For GICv5 guests we make use of the DVI mechanism for PPIs where possible. When mapping a virtual irq to a physical one for a GICv5 guest, the corresponding bit in the DVI bitmap is set. When unmapping, said bit is cleared again. The key user of this mechanism is the arch timer. The existing code use...
```diff diff --git a/arch/arm64/kvm/vgic/vgic-v5.c b/arch/arm64/kvm/vgic/vgic-v5.c index 7916bd8d564e..d4789ff3e740 100644 --- a/arch/arm64/kvm/vgic/vgic-v5.c +++ b/arch/arm64/kvm/vgic/vgic-v5.c @@ -272,7 +272,7 @@ void vgic_v5_set_ppi_dvi(struct kvm_vcpu *vcpu, struct vgic_irq *irq, bool dvi) lockdep_assert_held(&ir...
eec44c56e67ca78c377f4c3d85ef94fd105bea81
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: vgic-v5: Add missing trap handing for NV triage
Problem Details: As things stand, there is no support for Nested Virt with GICv5 guests yet. However, this is coming and therefore we need to be able to correctly triage the traps when running with NV. Add the missing fgtreg lookups required for that to triage_sysreg_trap(). These are specific to the FGT regs added as...
```diff diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c index dba7ced74ca5..a4eb36b4c442 100644 --- a/arch/arm64/kvm/emulate-nested.c +++ b/arch/arm64/kvm/emulate-nested.c @@ -2631,6 +2631,14 @@ bool triage_sysreg_trap(struct kvm_vcpu *vcpu, int *sr_index) fgtreg = HFGITR2_EL2; brea...
05836235e5412310057ea14e41e24dbc45a429bd
Analyze and fix the following issue in the Linux kernel code: ARM: zte: clean up zx297520v3 doc. warnings
Problem Details: Fix multiple documentation build warnings. Improve punctuation and formatting of the rendered output. Documentation/arch/arm/zte/zx297520v3.rst:66: WARNING: Title underline too short. 3. Building for built-in U-Boot --------------------------- [docutils] Documentation/arch/arm/zte/zx297520v3.rst:90:...
```diff diff --git a/Documentation/arch/arm/zte/zx297520v3.rst b/Documentation/arch/arm/zte/zx297520v3.rst index 2122887e391a..d33f454bc895 100644 --- a/Documentation/arch/arm/zte/zx297520v3.rst +++ b/Documentation/arch/arm/zte/zx297520v3.rst @@ -4,15 +4,13 @@ Booting Linux on ZTE zx297520v3 SoCs ====================...
748a927e081bffc9a9be17b4d96088515e1c5f01
Analyze and fix the following issue in the Linux kernel code: nvme-pci: Use pci_suspend_retains_context() during suspend
Problem Details: pci_suspend_retains_context() lets PCI client drivers know if the platform can retain the device context during suspend. This is decided based on several factors like: - Firmware involvement at the end of suspend - Any platform limitation in waking from low power state (e.g., L1SS) This API may ...
```diff diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index db5fc9bf6627..a6664983ce5d 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3915,6 +3915,7 @@ static int nvme_suspend(struct device *dev) * use host managed nvme power settings for lowest idle power if * possible. T...
ced835ae1f62c5a316a4229dde5762c63d0ac27b
Analyze and fix the following issue in the Linux kernel code: PCI: qcom: Indicate broken L1SS exit during resume from system suspend
Problem Details: Qcom PCIe RCs can successfully exit from L1SS during OS runtime. However, during system suspend, the Qcom PCIe RC driver may remove all resource votes and turn off the PHY to maximize power savings. Consequently, when the host is in system suspend with the link in L1SS and the endpoint asserts CLKREQ#...
```diff diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index af6bf5cce65b..a0b59b4ef1d2 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1368,6 +1368,19 @@ static void qcom_pcie_host_post_init(struct dw_pcie_rp *pp) stru...
b583b8fda6ddcf81fe1b02bec0d3c7fb43efc6de
Analyze and fix the following issue in the Linux kernel code: PCI: Indicate context lost if L1SS exit is broken during resume from system suspend
Problem Details: Per PCIe v7.0, sec 5.5.3.3.1, when exiting L1.2 due to an endpoint asserting CLKREQ# signal, the REFCLK must be turned on within the latency advertised in the LTR message. This requirement applies to L1.1 as well. On some platforms like Qcom, these requirements are satisfied during OS runtime, but no...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 86961551ec51..2f7e7e186b47 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2910,6 +2910,8 @@ void pci_config_pm_runtime_put(struct pci_dev *pdev) */ bool pci_suspend_retains_context(struct pci_dev *pdev) { + struct pci_host_bridge *bridge =...
5ad28496055858166eb2268344c8fda2c26d3561
Analyze and fix the following issue in the Linux kernel code: gpib: cb7210: Fix region leak when request_irq fails
Problem Details: When request_irq() fails, the region allocated by request_region() is not released. Fix this by calling release_region() before returning. Smatch warning: drivers/gpib/cb7210/cb7210.c:1068 cb_isa_attach() warn: 'config->ibbase' from __request_region() not released on lines: 1064. Fixes: 82e35...
```diff diff --git a/drivers/gpib/cb7210/cb7210.c b/drivers/gpib/cb7210/cb7210.c index 6dd8637c5964..05058bf2cd50 100644 --- a/drivers/gpib/cb7210/cb7210.c +++ b/drivers/gpib/cb7210/cb7210.c @@ -1062,6 +1062,7 @@ static int cb_isa_attach(struct gpib_board *board, const struct gpib_board_confi // install interrupt han...
c4faab452b3c1ada003d49c477609dd80523b9bf
Analyze and fix the following issue in the Linux kernel code: gpib: fix double decrement of descriptor_busy in command_ioctl()
Problem Details: commit d1857f8296dc ("gpib: fix use-after-free in IO ioctl handlers") introduced a descriptor_busy reference counter to pin struct gpib_descriptor across IO ioctl operations. In command_ioctl(), the error path inside the loop decrements descriptor_busy and breaks, but execution then falls through to t...
```diff diff --git a/drivers/gpib/common/gpib_os.c b/drivers/gpib/common/gpib_os.c index 4c6c43f012c8..69f6aa73ab9a 100644 --- a/drivers/gpib/common/gpib_os.c +++ b/drivers/gpib/common/gpib_os.c @@ -1010,7 +1010,6 @@ static int command_ioctl(struct gpib_file_private *file_priv, userbuf += bytes_written; if (retva...
6be50f680a3b2e3c87ac5faf5eddf44bb3ad6558
Analyze and fix the following issue in the Linux kernel code: gpib: agilent_82357a: don't check a NULL serial string
Problem Details: The agilent_82357a driver uses the USB device serial string for device matching but does not verify that the string exists before passing it to strcmp(). Verify that the device has a serial number before accessing it to avoid triggering a NULL-pointer dereference with devices that don't provide a seri...
```diff diff --git a/drivers/gpib/agilent_82357a/agilent_82357a.c b/drivers/gpib/agilent_82357a/agilent_82357a.c index 770ba6eb40d1..2468a471d175 100644 --- a/drivers/gpib/agilent_82357a/agilent_82357a.c +++ b/drivers/gpib/agilent_82357a/agilent_82357a.c @@ -1298,7 +1298,7 @@ static inline int agilent_82357a_device_mat...
160625174ab4058855452d0340ce25f2c76c335b
Analyze and fix the following issue in the Linux kernel code: char: dtlk: remove driver for ISA speech synthesizer card
Problem Details: The dtlk driver supports the RC Systems DoubleTalk PC ISA speech synthesizer card. It has severe coding style issues and has only received tree-wide fixes and drive-by cleanups in the entire Git history (since Linux 2.6.12-rc2). The same hardware is supported by drivers/accessibility/speakup for screen...
```diff diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst index 331223761fff..23ca772fbdf0 100644 --- a/Documentation/userspace-api/ioctl/ioctl-number.rst +++ b/Documentation/userspace-api/ioctl/ioctl-number.rst @@ -342,7 +342,6 @@ Code Seq# Include...
666c7f9e07925aa0863348f960e09bb89f8f05a3
Analyze and fix the following issue in the Linux kernel code: virt: acrn: Fix irqfd use-after-free during eventfd shutdown
Problem Details: acrn_irqfd_deassign() and the eventfd EPOLLHUP wakeup can race and free the same struct hsm_irqfd: CPU0 CPU1 ---- ---- eventfd_release() wake_up_poll(EPOLLHUP) hsm_irqfd_wakeup() queue_work(&irqfd->shutdown) ...
```diff diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c index acf8cd5f8f8c..feeba7eda494 100644 --- a/drivers/virt/acrn/irqfd.c +++ b/drivers/virt/acrn/irqfd.c @@ -16,6 +16,9 @@ #include "acrn_drv.h" +/* Cleanup work has been queued; set via test_and_set_bit(). */ +#define HSM_IRQFD_FLAG_SHUTDOW...
950f35211b85db26fc1aae67bf1e14ccef393a0a
Analyze and fix the following issue in the Linux kernel code: sonypi: Check ACPI_COMPANION() against NULL at probe time
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index ccda997a9098..24c1b26f34d6 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -1117,7 +1117,11 @@ static int sonypi_disable(void) #ifdef CONFIG_ACPI static int sonypi_acpi_probe(struct platform_device *pdev) { - struct acpi_devic...
fa5e2952341b792b72d5410dbfcd0b2ac8046d2a
Analyze and fix the following issue in the Linux kernel code: hpet: Check ACPI_COMPANION() against NULL at probe time
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 46c84e5df00f..285c6037417a 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -976,10 +976,14 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) static int hpet_acpi_probe(struct platform_device *pdev) { - struc...
4c4c83e9ee74ce172bd33ed7d98191803ef453cb
Analyze and fix the following issue in the Linux kernel code: drivers: misc: vmw_vmci: fix typo in comment
Problem Details: Correct spelling of "Intializes" to "Initializes" in comment. Signed-off-by: Abhishikth J <abhishikthj7@gmail.com> Link: https://patch.msgid.link/20260504184144.33665-1-abhishikthj7@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/misc/vmw_vmci/vmci_queue_pair.c b/drivers/misc/vmw_vmci/vmci_queue_pair.c index b777bc3fdde2..46bba9bef553 100644 --- a/drivers/misc/vmw_vmci/vmci_queue_pair.c +++ b/drivers/misc/vmw_vmci/vmci_queue_pair.c @@ -420,7 +420,7 @@ static int qp_memcpy_from_queue_iter(struct iov_iter *to, /* ...
bbf003b7794d6ad6f939fdd29f1f1bde8ac554c1
Analyze and fix the following issue in the Linux kernel code: char: tlclk: fix use-after-free in tlclk_cleanup()
Problem Details: This patch improves the module cleanup process in the tlclk driver to prevent potential use-after-free and race conditions. Currently, the file_operations structure does not specify the .owner field, which could allow the module to be unloaded while user-space processes are still interacting with the ...
```diff diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index 677d230a226c..dd45fe5eb6f2 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c @@ -264,6 +264,7 @@ static ssize_t tlclk_read(struct file *filp, char __user *buf, size_t count, } static const struct file_operations tlclk_fops = { + .owne...
70ea440324e8c1a10837f721352f5bd469c85007
Analyze and fix the following issue in the Linux kernel code: gpib: Fix inappropriate ioctl error return
Problem Details: The driver was returning -ENOTTY in the case the ioctl command was not recognised. Change it to -EBADRQC. Fixes: 9dde4559e939 ("staging: gpib: Add GPIB common core driver") Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://patch.msgid.link/20260411102025.2000-3-dpenkler@gmail.com Signed-o...
```diff diff --git a/drivers/gpib/common/gpib_os.c b/drivers/gpib/common/gpib_os.c index ccb69d0b28bc..4c6c43f012c8 100644 --- a/drivers/gpib/common/gpib_os.c +++ b/drivers/gpib/common/gpib_os.c @@ -606,7 +606,7 @@ long ibioctl(struct file *filep, unsigned int cmd, unsigned long arg) unsigned int minor = iminor(file_...
ada02d0894fd0ae65bda4d5fbf88dad0a6cb0788
Analyze and fix the following issue in the Linux kernel code: PCI: Add pci_suspend_retains_context() to check if device state is preserved during suspend
Problem Details: Currently, PCI endpoint drivers (e.g. nvme) use pm_suspend_via_firmware() to check whether device state is preserved during system suspend. If firmware will be invoked at the end of suspend, we don't know whether devices will retain their internal state. But device context might be lost due to platfo...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 8f7cfcc00090..86961551ec51 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -33,6 +33,7 @@ #include <asm/dma.h> #include <linux/aer.h> #include <linux/bitfield.h> +#include <linux/suspend.h> #include "pci.h" DEFINE_MUTEX(pci_slot_mutex); @...
2e4fe82344727b558ce870b7a023785b3f8edf33
Analyze and fix the following issue in the Linux kernel code: pinctrl: qcom: eliza: Merge QUP1_SE4 lanes in groups
Problem Details: QUP1_SE4 uses GPIO36 and GPIO37 for two selectable lane pairs. The current driver exposes lanes 0, 1, 2 and 3 as independent functions. However, since these are usually configured in pairs in devicetree, it makes more sense to merge them into groups. So merge the per-lane functions into qup1_se4_01 an...
```diff diff --git a/drivers/pinctrl/qcom/pinctrl-eliza.c b/drivers/pinctrl/qcom/pinctrl-eliza.c index bcd69c79a628..4a2ef7b2a28c 100644 --- a/drivers/pinctrl/qcom/pinctrl-eliza.c +++ b/drivers/pinctrl/qcom/pinctrl-eliza.c @@ -544,10 +544,8 @@ enum eliza_functions { msm_mux_qup1_se2_l3_mira, msm_mux_qup1_se2_l3_mir...
f2c49ae0ce2ea518c140cbd8fca352c5a6f43bd0
Analyze and fix the following issue in the Linux kernel code: dt-bindings: pinctrl: qcom,eliza-tlmm: Merge QUP1_SE4 lane functions
Problem Details: QUP1_SE4 uses GPIO36 and GPIO37 for two selectable lane pairs. The previous split added one function name per lane. Since these are usually configured in pairs in devicetree, it makes more sense to have them grouped. So replace the per-lane qup1_se4_l[0-3] names with names for the two selectable pairs...
```diff diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,eliza-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,eliza-tlmm.yaml index fa0177529277..aaaeca8e7bb7 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,eliza-tlmm.yaml +++ b/Documentation/devicetree/bindings/pinctrl/qcom,eliza-tlm...
ea024873fe4316e4dc1d18657b8059b73f72b5d0
Analyze and fix the following issue in the Linux kernel code: pinctrl: Add OF dependency for PINCTRL_GENERIC_MUX
Problem Details: Add an explicit OF dependency for PINCTRL_GENERIC_MUX to ensure the generic mux support is only enabled when device tree is available. Also fix the stub implementation of pinctrl_generic_to_map() by correcting its last argument to match the non-stub prototype. Reported-by: kernel test robot <lkp@inte...
```diff diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 31d698fbaa01..f4ffe1f3b720 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -275,6 +275,7 @@ config PINCTRL_GEMINI config PINCTRL_GENERIC_MUX tristate "Generic Pinctrl driver by using multiplexer" depends on MULTIPLEX...
258df8fce42fecc23cd04242de3d39f1fe836433
Analyze and fix the following issue in the Linux kernel code: mm: Add ptep_try_set() for lockless empty-slot installs
Problem Details: Add ptep_try_set(ptep, new_pte): atomically set *ptep to new_pte iff it is currently pte_none(). Returns true on success, false if the slot was already populated or the arch has no implementation. The intended caller is the upcoming bpf_arena kernel-side fault recovery path. The install runs from a pa...
```diff diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 4dfa42b7d053..984f0502c9d0 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -1830,6 +1830,18 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, return __ptep_get_and_clear...
9a12fa5213cfc391e0eed63902d3be98f0913765
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Disable AVIC IPI virtualization on Hygon Family 18h (erratum #1235)
Problem Details: Hygon Family 18h CPUs are derived from AMD Family 17h (Zen1) silicon and share the same erratum #1235: hardware may read a stale IsRunning=1 bit during ICR write emulation and silently fail to generate an AVIC_IPI_FAILURE_TARGET_NOT_RUNNING VM-Exit on the sending vCPU. The absence of the VM-Exit cause...
```diff diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c index adf211860949..993b551180fe 100644 --- a/arch/x86/kvm/svm/avic.c +++ b/arch/x86/kvm/svm/avic.c @@ -1300,12 +1300,14 @@ bool __init avic_hardware_setup(void) } /* - * Disable IPI virtualization for AMD Family 17h CPUs (Zen1 and Zen2) - *...
86e2de10eb14446a49019791bd0674faa5fae088
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Return the VM's configured APIC bus frequency when queried
Problem Details: When KVM_CAP_X86_APIC_BUS_CYCLES_NS is queried on a specific VM, return the VM's configured APIC bus frequency, not KVM's default. Aside from the fact that returning the default frequency is blatantly wrong if userspace has changed the frequency, returning the configured frequency means userspace can ...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0a1b63c63d1a..c1a72d749084 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4876,7 +4876,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) r = tdp_enabled; break; case KVM_CAP_X86_APIC_BUS_CYCLES_NS: - r = APIC_BUS_CY...
2d42c7cf1a2dad694db0c518b0e004502859f11c
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: elf: Include <endian.h> instead of <bits/endian.h>
Problem Details: <bits/endian.h> is a glibc-internal header that explicitly states it should never be included directly: #error "Never use <bits/endian.h> directly; include <endian.h> instead." Replace it with the correct public header <endian.h> which works on all C libraries including musl. Building KVM selftests...
```diff diff --git a/tools/testing/selftests/kvm/lib/elf.c b/tools/testing/selftests/kvm/lib/elf.c index b689c4df4a01..1924a9895834 100644 --- a/tools/testing/selftests/kvm/lib/elf.c +++ b/tools/testing/selftests/kvm/lib/elf.c @@ -7,7 +7,7 @@ #include "test_util.h" -#include <bits/endian.h> +#include <endian.h> #...
9f9bfc80c67f35a275820da7e83a35dface08281
Analyze and fix the following issue in the Linux kernel code: USB: serial: cypress_m8: validate interrupt packet headers
Problem Details: cypress_read_int_callback() parses the interrupt-in buffer according to the selected Cypress packet format. Format 1 has a two-byte status/count header and format 2 has a one-byte combined status/count header. The usb-serial core sizes the interrupt-in buffer from the endpoint descriptor's wMaxPacketSi...
```diff diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 0b8a4e9d7bc5..bcf302e88ca4 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -1025,8 +1025,8 @@ static void cypress_read_int_callback(struct urb *urb) char tty_flag = TTY_NORMAL; int byte...
438061ed1ad85e6743e2dce826671772d81089ec
Analyze and fix the following issue in the Linux kernel code: USB: serial: safe_serial: fix memory corruption with small endpoint
Problem Details: Make sure that the bulk-out buffer size is at least eight bytes to avoid user-controlled slab corruption in "safe" mode should a malicious device report a smaller size. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Sign...
```diff diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 238b54993446..d267a31dcccf 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c @@ -259,6 +259,7 @@ static int safe_prepare_write_buffer(struct usb_serial_port *port, static int safe_startup(s...
60df93d30f9bdd27db17c4d80ed80ef718d7226b
Analyze and fix the following issue in the Linux kernel code: USB: serial: omninet: fix memory corruption with small endpoint
Problem Details: Make sure that the bulk-out buffers are at least as large as the hardcoded transfer size to avoid user-controlled slab corruption should a malicious device report a smaller endpoint max packet size than expected. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: Greg Kro...
```diff diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index aa1e9745f967..b59982ed8b25 100644 --- a/drivers/usb/serial/omninet.c +++ b/drivers/usb/serial/omninet.c @@ -30,6 +30,10 @@ /* This one seems to be a re-branded ZyXEL device */ #define BT_IGNITIONPRO_ID 0x2000 +#define OMNINET_HEA...
4085f0dbb1ce2251c9a5938d693de6593f0ab2bd
Analyze and fix the following issue in the Linux kernel code: USB: serial: mxuport: fix memory corruption with small endpoint
Problem Details: Make sure that the bulk-out endpoint max packet size is at least eight bytes to avoid user-controlled slab corruption should a malicious device report a smaller size. Fixes: ee467a1f2066 ("USB: serial: add Moxa UPORT 12XX/14XX/16XX driver") Cc: stable@vger.kernel.org # 3.14 Cc: Andrew Lunn <andrew@lun...
```diff diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c index ad5fdf55a02e..c9b9928c473a 100644 --- a/drivers/usb/serial/mxuport.c +++ b/drivers/usb/serial/mxuport.c @@ -962,6 +962,14 @@ static int mxuport_calc_num_ports(struct usb_serial *serial, */ BUILD_BUG_ON(ARRAY_SIZE(epds->bulk_out)...
aca063c9024522e4e5b9a9d1927433f6a01785a3
Analyze and fix the following issue in the Linux kernel code: openrisc: Fix jump_label smp syncing
Problem Details: The original commit 8c30b0018f9d ("openrisc: Add jump label support") copies from arm64 and does not properly consider how icache invalidation on remote cores works in OpenRISC. On OpenRISC remote icaches need to be invalidated otherwise static key's may remain state after updating. Fix SMP cache syn...
```diff diff --git a/arch/openrisc/kernel/jump_label.c b/arch/openrisc/kernel/jump_label.c index ab7137c23b46..9cb63f2d2e2b 100644 --- a/arch/openrisc/kernel/jump_label.c +++ b/arch/openrisc/kernel/jump_label.c @@ -47,5 +47,5 @@ bool arch_jump_label_transform_queue(struct jump_entry *entry, void arch_jump_label_tran...
85db7391310b1304d2dc8ae3b0b12105a9567147
Analyze and fix the following issue in the Linux kernel code: scsi: target: iscsi: Validate CHAP_R length before base64 decode
Problem Details: chap_server_compute_hash() allocates client_digest as kzalloc(chap->digest_size) and then, for BASE64-encoded responses, passes chap_r directly to chap_base64_decode() without checking whether the input length could produce more than digest_size bytes of output. chap_base64_decode() writes to the dest...
```diff diff --git a/drivers/target/iscsi/iscsi_target_auth.c b/drivers/target/iscsi/iscsi_target_auth.c index c46c69a28e97..a3ad2d244dbe 100644 --- a/drivers/target/iscsi/iscsi_target_auth.c +++ b/drivers/target/iscsi/iscsi_target_auth.c @@ -340,13 +340,22 @@ static int chap_server_compute_hash( goto out; } ...
bf33e01f88388c43e285492a63e539df6ffed64c
Analyze and fix the following issue in the Linux kernel code: scsi: target: iscsi: Bound iscsi_encode_text_output() appends to rsp_buf
Problem Details: iscsi_encode_text_output() concatenates "key=value\0" records into login->rsp_buf, an 8192-byte kzalloc(MAX_KEY_VALUE_PAIRS) buffer allocated in iscsit_alloc_login_setup_buffer(). The three sprintf() call sites in this function (lines 1398, 1411, 1424 in v7.1-rc2) never check the remaining buffer capac...
```diff diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 832588f21f91..b03ed154ca34 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c @@ -899,10 +899,14 @@ static int iscsi_target_handle_csg_zero( SENDER_TARGET,...
778c2ab142c625a8a8afa570e0f9b7873f445d99
Analyze and fix the following issue in the Linux kernel code: scsi: target: iscsi: Fix CRC overread and double-free in iscsit_handle_text_cmd()
Problem Details: Two latent bugs in the Text-phase handler, both present since the original LIO integration in commit e48354ce078c ("iscsi-target: Add iSCSI fabric support for target v4.1"): 1) DataDigest CRC buffer overread (4 bytes past text_in). text_in is kzalloc()'d at ALIGN(payload_length, 4). rx_size is th...
```diff diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index cb832fd523af..62ada3a52210 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -2295,7 +2295,9 @@ iscsit_handle_text_cmd(struct iscsit_conn *conn, struct iscsit_cmd *cmd, go...
87a1e0fe7776da7ab411be332b4be58ac8840d10
Analyze and fix the following issue in the Linux kernel code: ipv4: free net->ipv4.sysctl_local_reserved_ports after unregister_net_sysctl_table()
Problem Details: ipv4_sysctl_exit_net() is currently freeing net->ipv4.sysctl_local_reserved_ports too soon. Only after unregister_net_sysctl_table() we can be sure no threads can possibly use the sysctls, including /proc/sys/net/ipv4/ip_local_reserved_ports. Fixes: 122ff243f5f1 ("ipv4: make ip_local_reserved_ports p...
```diff diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index d8bdb1bdbff1..c0e85cc171ae 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -1705,10 +1705,10 @@ static __net_exit void ipv4_sysctl_exit_net(struct net *net) { const struct ctl_table *table; - kfree(net->i...
4157501b9a8ff1bbe32ff5a7d8aece7ab18eff40
Analyze and fix the following issue in the Linux kernel code: vsock/virtio: fix skb overhead overflow on 32-bit builds
Problem Details: On 32-bit architectures, both skb_queue_len() and SKB_TRUESIZE(0) evaluate to 32-bit values. The multiplication can overflow before being assigned to the u64 skb_overhead variable, making the skb overhead check ineffective. Cast skb_queue_len() to u64 so the multiplication is always performed in 64-bi...
```diff diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index d4d26fba9e37..b143290a311d 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -417,7 +417,7 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk,...
9eed1bd59937e6828b00d2f2dfef631d964f3636
Analyze and fix the following issue in the Linux kernel code: scsi: fcoe: Reject FIP descriptors with zero fip_dlen in CVL walker
Problem Details: drivers/scsi/fcoe/fcoe_ctlr.c::fcoe_ctlr_recv_clr_vlink() advanced the descriptor cursor by an attacker-supplied fip_dlen without ever requiring dlen >= sizeof(struct fip_desc) in the default branch. The named descriptor cases (FIP_DT_MAC, FIP_DT_NAME, FIP_DT_VN_ID) checked their per-type minimum leng...
```diff diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index 02cd4410efca..496ddd45f74d 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c @@ -1385,7 +1385,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, while (rlen >= sizeof(*desc)) { dlen...
a9a39233ec1fc9f97ea1340a4d09bb7ec2be5153
Analyze and fix the following issue in the Linux kernel code: scsi: scsi_transport_fc: Widen FPIN pname walker counter to u32
Problem Details: An adjacent Fibre Channel fabric actor that can deliver an FPIN ELS frame to an lpfc or qla2xxx Linux initiator can trigger a non-return in the generic FC transport. This is not a local userspace or IP network path; the attacker must be able to inject fabric traffic, for example as a compromised switch...
```diff diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index dce95e361daf..173ed6373f04 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -737,6 +737,37 @@ fc_cn_stats_update(u16 event_type, struct fc_fpin_stats *stats) } } +static void +fc_fp...
20fd1648f35399f114351b67c14ff8d3233a30e2
Analyze and fix the following issue in the Linux kernel code: scsi: core: Convert INQUIRY information
Problem Details: Currently the vendor, model, and revision members of struct scsi_device are pointers to fixed-length strings that are not NUL-terminated. Fixed-precision format specifiers (e.g., "%.8s") are required whenever they are printed and strncmp() must be used to compare these fields. This is error-prone. Con...
```diff diff --git a/drivers/hwmon/drivetemp.c b/drivers/hwmon/drivetemp.c index 002e0660a0b8..efe8b229bdbe 100644 --- a/drivers/hwmon/drivetemp.c +++ b/drivers/hwmon/drivetemp.c @@ -306,13 +306,10 @@ static bool drivetemp_sct_avoid(struct drivetemp_data *st) struct scsi_device *sdev = st->sdev; unsigned int ctr; ...
f199cee401f7dc7280c8ed070d2433478253b665
Analyze and fix the following issue in the Linux kernel code: scsi: scsi_debug: Remove unused variable sdebug_any_injecting_opt
Problem Details: The static variable sdebug_any_injecting_opt is no longer read. Commit 3a90a63d02b8 ("scsi: scsi_debug: every_nth triggered error injection") removed all code that reads this variable. Hence, also remove this variable itself. Remove SDEBUG_OPT_ALL_INJECTING because there is no code left that uses this ...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 1515495fd9ea..a2f85ee1ae57 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -233,13 +233,6 @@ struct tape_block { #define SDEBUG_OPT_UNALIGNED_WRITE 0x20000 #define SDEBUG_OPT_ALL_NOISE (SDEBUG_OPT_NOISE | SDEBUG...
e4bb73bf3ac11b4a93634660345b9d764a4a80df
Analyze and fix the following issue in the Linux kernel code: scsi: scsi_debug: Add missing newline in scsi_debug_device_reset()
Problem Details: A "\n" at the end of the sdev_printk() string appears to have been inadvertently removed. Add it back for correct log message formatting. Fixes: a743b120227a ("scsi: scsi_debug: Stop printing extra function name in debug logs") Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Ewan D. Milne <emilne@...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 1515495fd9ea..040c5e1e713a 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -6953,7 +6953,7 @@ static int scsi_debug_device_reset(struct scsi_cmnd *SCpnt) ++num_dev_resets; if (SDEBUG_OPT_ALL_NOISE & sdebug_o...
a4719ae23fb5b1b6229120c7ea4b6143a501a62e
Analyze and fix the following issue in the Linux kernel code: scsi: megaraid_sas: Fix NULL pointer dereference on firmware duplicate completion
Problem Details: Add NULL check for scmd_local in the MPI2_FUNCTION_SCSI_IO_REQUEST case to handle firmware duplicate/stale completions. When firmware sends a duplicate completion for a command that was already processed and returned to the pool, the driver accesses NULL scmd pointer causing a crash. Timeline of the ...
```diff diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 2699e4e09b5b..056cbe50e19e 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -3612,6 +3612,15 @@ complete_cmd_fusion(struct megasas_instance *i...
adda8a44e1e43aceba058839f56fa1c599f6f99b
Analyze and fix the following issue in the Linux kernel code: scsi: devinfo: Add BLIST_NO_RSOC for Promise VTrak E310f
Problem Details: The extremely slow boots reported July 2014 in bug 79901: https://bugzilla.kernel.org/show_bug.cgi?id=79901 for Promise VTrak E610f 3U 16-bay FC RAID enclosure occur also with the Promise VTrak E310f 2U 12-bay FC RAID enclosure. The 2014 patch: https://bugzilla.kernel.org/attachment.cgi?id=14410...
```diff diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 68a992494b12..c6defe1c3152 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -218,6 +218,7 @@ static struct { {"PIONEER", "CD-ROM DRM-602X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"PIONEER", "CD-ROM D...
7205b58702273baf21d6ba7992e6ba15852325f7
Analyze and fix the following issue in the Linux kernel code: scsi: core: Run queues for all non-SDEV_DEL devices from scsi_run_host_queues
Problem Details: While a SCSI host is in a recovery state, scsi_mq_requeue_cmd() will not set the requeue list for a requeued command to be kicked in the future. The expectation is a call to scsi_run_host_queues() will kick all SCSI devices once the recovery state is cleared. However, scsi_run_host_queues() uses shost...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 6e8c7a42603e..85eef401925a 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -575,10 +575,33 @@ void scsi_requeue_run_queue(struct work_struct *work) void scsi_run_host_queues(struct Scsi_Host *shost) { - struct scsi_de...
3589d20a666caf30ad100c960a2de7de390fce88
Analyze and fix the following issue in the Linux kernel code: net/iucv: fix locking in .getsockopt
Problem Details: Mirror iucv_sock_setsockopt() and wrap the whole switch in lock_sock()/release_sock(). The pre-existing SO_MSGLIMIT-only lock becomes redundant and is removed. Any AF_IUCV HIPER user can potentially crash the kernel by racing recvmsg() with getsockopt(SO_MSGSIZE): the SO_MSGSIZE arm dereferences iucv-...
```diff diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 72dfccd4e3d5..c2dc3338670e 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -1540,7 +1540,7 @@ static int iucv_sock_getsockopt(struct socket *sock, int level, int optname, struct sock *sk = sock->sk; struct iucv_sock *iucv = iucv_sk(sk); ...
9e4389b0038781f19f97895186ed941ff8ac1678
Analyze and fix the following issue in the Linux kernel code: net/smc: Do not re-initialize smc hashtables
Problem Details: INIT_HLIST_HEAD(&smc_v*_hashinfo.ht) are called after smc_nl_init(), proto_register() and sock_register(). This can lead to smc_v*_hashinfo.ht being reset even though hash entries already exist and are being used, possibly resulting in a corrupted list. Remove unnecessary and dangerous re-initialisati...
```diff diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index dffbd529762d..b5db69073e20 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -188,10 +188,12 @@ static bool smc_hs_congested(const struct sock *sk) struct smc_hashinfo smc_v4_hashinfo = { .lock = __RW_LOCK_UNLOCKED(smc_v4_hashinfo.lock), + .ht = ...
0b18bced5444f4fc54ba4500c377f2e88d31ea09
Analyze and fix the following issue in the Linux kernel code: perf tool_pmu: Make tool PMU events respect enable/disable
Problem Details: Tool PMU events (duration_time, user_time, system_time) currently count from when the event is opened to when it is read. This causes issues with features like the delay option (-D) or control fd, where events are opened but should not start counting immediately. Make these events behave more like reg...
```diff diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index ee971d15b3c6..1a238b245b3a 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -529,7 +529,7 @@ static int evlist__is_enabled(struct evlist *evlist) static void __evlist__disable(struct evlist *evlist, char *evsel_name...
0b97e92393a178765ee1ea01fe5087efece2c425
Analyze and fix the following issue in the Linux kernel code: perf test amd ibs: Fix incorrect kernel version check
Problem Details: "AMD IBS sample period" unit test is getting skipped on kernel v7.x. Fix the kernel version >= v6.15 check. Fixes: 21fb366b2f457611 ("perf test amd: Skip amd-ibs-period test on kernel < v6.15") Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ananth...
```diff diff --git a/tools/perf/arch/x86/tests/amd-ibs-period.c b/tools/perf/arch/x86/tests/amd-ibs-period.c index cee9e11c05e0..6a92b3a23ed7 100644 --- a/tools/perf/arch/x86/tests/amd-ibs-period.c +++ b/tools/perf/arch/x86/tests/amd-ibs-period.c @@ -932,7 +932,7 @@ static bool kernel_v6_15_or_newer(void) endptr++; ...
5bc0c090bcad2424f13692ba1d1b4a7e80c08c7a
Analyze and fix the following issue in the Linux kernel code: net: arcnet: fix typos in comments
Problem Details: The ARCnet code contains quite a few typos in comments. Fix them. Initially noticed by inspection, then augmented using codespell. Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Link: https://patch.msgid.link/20260521001631.45434-3-enelsonmoore@gmail.com Signed-off-by: Jakub Kicinski <kuba...
```diff diff --git a/drivers/net/arcnet/arc-rimi.c b/drivers/net/arcnet/arc-rimi.c index 53d10a04d1bd..fb3d3565aa9a 100644 --- a/drivers/net/arcnet/arc-rimi.c +++ b/drivers/net/arcnet/arc-rimi.c @@ -185,7 +185,7 @@ static int __init arcrimi_found(struct net_device *dev) lp->hw.copy_to_card = arcrimi_copy_to_card; l...
88b126b39f9757e9debc322d4679239e9af089c7
Analyze and fix the following issue in the Linux kernel code: net: netlink: don't set nsid on local notifications
Problem Details: In most cases, notifications on sockets with NETLINK_LISTEN_ALL_NSID do not contain NSID in their ancillary data in case the event is local to the listener. However, when a self-referential NSID is allocated for a namespace, every local notification starts sending this ID to the user space. This is p...
```diff diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 0742e97f256e..7269e23b578d 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1482,10 +1482,14 @@ static void do_one_broadcast(struct sock *sk, p->skb2 = NULL; goto out; } + NETLINK_CB(p->skb2).nsid_is_set = f...
70f8592ee90585272018a725054b6eb2ab7e99ca
Analyze and fix the following issue in the Linux kernel code: net: netlink: fix sending unassigned nsid after assigned one
Problem Details: If the current skb is not shared, it is re-used directly for all the sockets subscribed to the notification. If we have remote all-nsid socket receiving a message first, then the 'nsid_is_set' will be set to 'true'. If the nsid is NOT_ASSIGNED for the next socket in the list, the 'nsid_is_set' will r...
```diff diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 2aeb0680807d..0742e97f256e 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1482,6 +1482,7 @@ static void do_one_broadcast(struct sock *sk, p->skb2 = NULL; goto out; } + NETLINK_CB(p->skb2).nsid_is_set = false...