id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
995412e23bb2560a73db444e4c60bf5826b33aaa
Analyze and fix the following issue in the Linux kernel code: blk-mq: Replace tags->lock with SRCU for tag iterators
Problem Details: Replace the spinlock in blk_mq_find_and_get_req() with an SRCU read lock around the tag iterators. This is done by: - Holding the SRCU read lock in blk_mq_queue_tag_busy_iter(), blk_mq_tagset_busy_iter(), and blk_mq_hctx_has_requests(). - Removing the now-redundant tags->lock from blk_mq_find_and_ge...
```diff diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 3c2ec6e86d54..086c67849e06 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -256,13 +256,10 @@ static struct request *blk_mq_find_and_get_req(struct blk_mq_tags *tags, unsigned int bitnr) { struct request *rq; - unsigned long flags; -...
135b8521f21d4d4d4fde74e73b80d8e4d417e20a
Analyze and fix the following issue in the Linux kernel code: blk-mq: Defer freeing flush queue to SRCU callback
Problem Details: The freeing of the flush queue/request in blk_mq_exit_hctx() can race with tag iterators that may still be accessing it. To prevent a potential use-after-free, the deallocation should be deferred until after a grace period. With this way, we can replace the big tags->lock in tags iterator code path wit...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index e1b44173029c..1c3cdf17af79 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -3912,6 +3912,14 @@ static void blk_mq_clear_flush_rq_mapping(struct blk_mq_tags *tags, spin_unlock_irqrestore(&tags->lock, flags); } +static void blk_free_flush_queue_callback(...
ad0d05dbddc1bf86e92220fea873176de6b12f78
Analyze and fix the following issue in the Linux kernel code: blk-mq: Defer freeing of tags page_list to SRCU callback
Problem Details: Tag iterators can race with the freeing of the request pages(tags->page_list), potentially leading to use-after-free issues. Defer the freeing of the page list and the tags structure itself until after an SRCU grace period has passed. This ensures that any concurrent tag iterators have completed befor...
```diff diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index f09a4cbe486f..3c2ec6e86d54 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -8,6 +8,9 @@ */ #include <linux/kernel.h> #include <linux/module.h> +#include <linux/slab.h> +#include <linux/mm.h> +#include <linux/kmemleak.h> #include <linu...
a679e5683d3eef22ca12514ff8784b2b914ebedc
Analyze and fix the following issue in the Linux kernel code: selftests: arm64: Check fread return value in exec_target
Problem Details: Fix -Wunused-result warning generated when compiled with gcc 13.3.0, by checking fread's return value and handling errors, preventing potential failures when reading from stdin. Fixes compiler warning: warning: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Wunused-res...
```diff diff --git a/tools/testing/selftests/arm64/pauth/exec_target.c b/tools/testing/selftests/arm64/pauth/exec_target.c index 4435600ca400..e597861b26d6 100644 --- a/tools/testing/selftests/arm64/pauth/exec_target.c +++ b/tools/testing/selftests/arm64/pauth/exec_target.c @@ -13,7 +13,12 @@ int main(void) unsigned ...
47b13635dabc14f1c2fdcaa5468b47ddadbdd1b5
Analyze and fix the following issue in the Linux kernel code: clk: at91: peripheral: fix return value
Problem Details: determine_rate() is expected to return an error code, or 0 on success. clk_sam9x5_peripheral_determine_rate() has a branch that returns the parent rate on a certain case. This is the behavior of round_rate(), so let's go ahead and fix this by setting req->rate. Fixes: b4c115c76184f ("clk: at91: clk-pe...
```diff diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-peripheral.c index c173a44c800a..629f050a855a 100644 --- a/drivers/clk/at91/clk-peripheral.c +++ b/drivers/clk/at91/clk-peripheral.c @@ -279,8 +279,11 @@ static int clk_sam9x5_peripheral_determine_rate(struct clk_hw *hw, long best_diff = LO...
3ec600210849cf122606e24caab85f0b936cf63c
Analyze and fix the following issue in the Linux kernel code: power: supply: sbs-charger: Support multiple devices
Problem Details: If we have 2 instances of sbs-charger in the DTS, the driver probe for the second instance will fail: [ 8.012874] sbs-battery 18-000b: sbs-battery: battery gas gauge device registered [ 8.039094] sbs-charger 18-0009: ltc4100: smart charger device registered [ 8.112911] sbs-battery 20-000b: sb...
```diff diff --git a/drivers/power/supply/sbs-charger.c b/drivers/power/supply/sbs-charger.c index 27764123b929..7d5e67620580 100644 --- a/drivers/power/supply/sbs-charger.c +++ b/drivers/power/supply/sbs-charger.c @@ -154,8 +154,7 @@ static const struct regmap_config sbs_regmap = { .val_format_endian = REGMAP_ENDIAN...
6f9674aa69ad0178ca8fc6995942ba9848c324f4
Analyze and fix the following issue in the Linux kernel code: pinctrl: airoha: fix wrong PHY LED mux value for LED1 GPIO46
Problem Details: In all the MUX value for LED1 GPIO46 there is a Copy-Paste error where the MUX value is set to LED0_MODE_MASK instead of LED1_MODE_MASK. This wasn't notice as there were no board that made use of the secondary PHY LED but looking at the internal Documentation the actual value should be LED1_MODE_MASK ...
```diff diff --git a/drivers/pinctrl/mediatek/pinctrl-airoha.c b/drivers/pinctrl/mediatek/pinctrl-airoha.c index 1b2f132d76f0..ee5b9bab4552 100644 --- a/drivers/pinctrl/mediatek/pinctrl-airoha.c +++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c @@ -1752,8 +1752,8 @@ static const struct airoha_pinctrl_func_group phy1_led1...
d0856a6dff57f95cc5d2d74e50880f01697d0cc4
Analyze and fix the following issue in the Linux kernel code: bus: mhi: host: Do not use uninitialized 'dev' pointer in mhi_init_irq_setup()
Problem Details: In mhi_init_irq_setup, the device pointer used for dev_err() was not initialized. Use the pointer from mhi_cntrl instead. Fixes: b0fc0167f254 ("bus: mhi: core: Allow shared IRQ for event rings") Fixes: 3000f85b8f47 ("bus: mhi: core: Add support for basic PM operations") Signed-off-by: Adam Xue <zxue@s...
```diff diff --git a/drivers/bus/mhi/host/init.c b/drivers/bus/mhi/host/init.c index 7f72aab38ce9..099be8dd1900 100644 --- a/drivers/bus/mhi/host/init.c +++ b/drivers/bus/mhi/host/init.c @@ -194,7 +194,6 @@ static void mhi_deinit_free_irq(struct mhi_controller *mhi_cntrl) static int mhi_init_irq_setup(struct mhi_contr...
5f3cec21f6d57336a2cbfa9ee428ac66c77a7211
Analyze and fix the following issue in the Linux kernel code: overflow: add range_overflows() and range_end_overflows()
Problem Details: Move the range_overflows() and range_end_overflows() along with the _t variants over from drm/i915 and drm/buddy to overflow.h. Cc: Kees Cook <kees@kernel.org> Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org> Cc: linux-hardening@vger.kernel.org Reviewed-by: Kees Cook <kees@kernel.org> Reviewed-by: Jo...
```diff diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h index 968dae941532..eb4d43c40009 100644 --- a/drivers/gpu/drm/i915/i915_utils.h +++ b/drivers/gpu/drm/i915/i915_utils.h @@ -67,76 +67,6 @@ bool i915_error_injected(void); drm_err(&(i915)->drm, fmt, ##__VA_ARGS__); \ }) -/**...
59bf37add1d2223d699d1855354277b7330765e4
Analyze and fix the following issue in the Linux kernel code: drm/i915: document range_overflows() and range_end_overflows() macros
Problem Details: Document the macros in preparation for making them more generally available. Cc: Kees Cook <kees@kernel.org> Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org> Cc: linux-hardening@vger.kernel.org Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://lore.kernel.org/r/20250829174601.21630...
```diff diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h index fdac9a158b53..968dae941532 100644 --- a/drivers/gpu/drm/i915/i915_utils.h +++ b/drivers/gpu/drm/i915/i915_utils.h @@ -67,6 +67,18 @@ bool i915_error_injected(void); drm_err(&(i915)->drm, fmt, ##__VA_ARGS__); \ }) +/**...
1e4c85167cf672312a178b2af0b058add77e448b
Analyze and fix the following issue in the Linux kernel code: drm/i915: rename range_overflows_end() to range_end_overflows()
Problem Details: Rename range_overflows_end() to range_end_overflows(), along with the _t variant. It's all rather subjective, but I think range_end_overflows() reads better. Cc: Kees Cook <kees@kernel.org> Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org> Cc: linux-hardening@vger.kernel.org Reviewed-by: Jouni Högand...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c index 9e097ed80bd1..06c35c7ab4e2 100644 --- a/drivers/gpu/drm/i915/display/intel_fbc.c +++ b/drivers/gpu/drm/i915/display/intel_fbc.c @@ -383,11 +383,11 @@ static void i8xx_fbc_program_cfb(struct intel_fbc *fbc) s...
6c3442b3b692769c9bced80da58e0130b9fa16cc
Analyze and fix the following issue in the Linux kernel code: pinctrl: keembay: fix double free in keembay_build_functions()
Problem Details: This kfree() was accidentally left over when we converted to devm_ and it would lead to a double free. Delete it. Fixes: 995bc9f4826e ("pinctrl: keembay: release allocated memory in detach path") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Bartosz Golaszewski <bartosz.golasze...
```diff diff --git a/drivers/pinctrl/pinctrl-keembay.c b/drivers/pinctrl/pinctrl-keembay.c index 30122ca90cbe..3241d3ae6219 100644 --- a/drivers/pinctrl/pinctrl-keembay.c +++ b/drivers/pinctrl/pinctrl-keembay.c @@ -1643,10 +1643,8 @@ static int keembay_build_functions(struct keembay_pinctrl *kpc) new_funcs = devm_kre...
83d12f08ddfba09db414b611195af23fdeb70836
Analyze and fix the following issue in the Linux kernel code: pinctrl: spacemit: fix typo in PRI_TDI pin name
Problem Details: The datasheet lists this signal as PRI_TDI, not PRI_DTI. Fix the pin name to match the documentation and JTAG naming convention (TDI = Test Data In). Signed-off-by: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be> Reviewed-by: Yixun Lan <dlan@gentoo.org> Signed-off-by: Linus Walleij <linus.walleij...
```diff diff --git a/drivers/pinctrl/spacemit/pinctrl-k1.c b/drivers/pinctrl/spacemit/pinctrl-k1.c index fb361f2acb54..33af9b5791c1 100644 --- a/drivers/pinctrl/spacemit/pinctrl-k1.c +++ b/drivers/pinctrl/spacemit/pinctrl-k1.c @@ -847,7 +847,7 @@ static const struct pinctrl_pin_desc k1_pin_desc[] = { PINCTRL_PIN(67, ...
a6a2f50ab1721343ee2d5d2be888709aa886e3aa
Analyze and fix the following issue in the Linux kernel code: pinctrl: eswin: Fix regulator error check and Kconfig dependency
Problem Details: Smatch reported the following warning in eic7700_pinctrl_probe(): drivers/pinctrl/pinctrl-eic7700.c:638 eic7700_pinctrl_probe() warn: passing zero to 'PTR_ERR' The root cause is that devm_regulator_get() may return NULL when CONFIG_REGULATOR is disabled. In such case, IS_ERR_OR_NULL() triggers PT...
```diff diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 6714aecce325..a7dd60245db7 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -211,6 +211,8 @@ config PINCTRL_EIC7700 depends on ARCH_ESWIN || COMPILE_TEST select PINMUX select GENERIC_PINCONF + select REGULATOR + sele...
f842d3313ba179d4005096357289c7ad09cec575
Analyze and fix the following issue in the Linux kernel code: PCI: j721e: Fix programming sequence of "strap" settings
Problem Details: The Cadence PCIe Controller integrated in the TI K3 SoCs supports both Root-Complex and Endpoint modes of operation. The Glue Layer allows "strapping" the Mode of operation of the Controller, the Link Speed and the Link Width. This is enabled by programming the "PCIEn_CTRL" register (n corresponds to t...
```diff diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c index cfca13a4c840..5a9ae33e2b93 100644 --- a/drivers/pci/controller/cadence/pci-j721e.c +++ b/drivers/pci/controller/cadence/pci-j721e.c @@ -284,6 +284,25 @@ static int j721e_pcie_ctrl_init(struct j721e_pcie *p...
512bf60226c621893729605121a396240e84a5d4
Analyze and fix the following issue in the Linux kernel code: pinctrl: renesas: r8a779g0: Fix trivial typo in SoC type comment
Problem Details: Fix SoC type comment in the PFC table file, replace R8A779A0 likely copy-paste error with R8A779G0. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250904222806.193260-1-marek.v...
```diff diff --git a/drivers/pinctrl/renesas/pfc-r8a779g0.c b/drivers/pinctrl/renesas/pfc-r8a779g0.c index cae3e6553499..218c5eff9b67 100644 --- a/drivers/pinctrl/renesas/pfc-r8a779g0.c +++ b/drivers/pinctrl/renesas/pfc-r8a779g0.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * R8A779A0 processor support -...
9f062fc5b0ff44550088912ab89f9da40226a826
Analyze and fix the following issue in the Linux kernel code: pinctrl: renesas: Use int type to store negative error codes
Problem Details: Change the 'ret' variable in sh_pfc_pinconf_group_set() from unsigned int to int, as it needs to store either negative error codes or zero returned by sh_pfc_pinconf_set(). No effect on runtime. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Fixes: d0593c363f04ccc4 ("pinctrl: sh-pfc: Propagate ...
```diff diff --git a/drivers/pinctrl/renesas/pinctrl.c b/drivers/pinctrl/renesas/pinctrl.c index 29d16c9c1bd1..3a742f74ecd1 100644 --- a/drivers/pinctrl/renesas/pinctrl.c +++ b/drivers/pinctrl/renesas/pinctrl.c @@ -726,7 +726,8 @@ static int sh_pfc_pinconf_group_set(struct pinctrl_dev *pctldev, unsigned group, struct...
30247fc3254a4502465ab809d49e2167ace5a6f2
Analyze and fix the following issue in the Linux kernel code: pinctrl: renesas: rzg2l: Fix OEN resume
Problem Details: Writing to the PFC_OEN register is controlled by the write protect register (PWPR). Currently the OEN register write in resume() is done without enabling write access in PWPR leading to incorrect operation. Fixes: cd39805be85b ("pinctrl: renesas: rzg2l: Unify OEN handling across RZ/{G2L,V2H,V2N}") Si...
```diff diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index b182b3b8a542..f72814dab38c 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -3165,6 +3165,8 @@ static int rzg2l_pinctrl_resume_noirq(struct device *dev) con...
7ea3baa6efe4bb93d11e1c0e6528b1468d7debf6
Analyze and fix the following issue in the Linux kernel code: drm/i915/power: fix size for for_each_set_bit() in abox iteration
Problem Details: for_each_set_bit() expects size to be in bits, not bytes. The abox mask iteration uses bytes, but it works by coincidence, because the local variable holding the mask is unsigned long, and the mask only ever has bit 2 as the highest bit. Using a smaller type could lead to subtle and very hard to track ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c index 7f9a2d743bac..da4babfd6bcb 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.c +++ b/drivers/gpu/drm/i915/display/intel_display_power.c @@ -1174,7 +1174,7 @@ static void icl_mbu...
cba4262a19afae21665ee242b3404bcede5a94d7
Analyze and fix the following issue in the Linux kernel code: x86/cpu/topology: Always try cpu_parse_topology_ext() on AMD/Hygon
Problem Details: Support for parsing the topology on AMD/Hygon processors using CPUID leaf 0xb was added in 3986a0a805e6 ("x86/CPU/AMD: Derive CPU topology from CPUID function 0xB when available"). In an effort to keep all the topology parsing bits in one place, this commit also introduced a pseudo dependency on th...
```diff diff --git a/arch/x86/kernel/cpu/topology_amd.c b/arch/x86/kernel/cpu/topology_amd.c index 827dd0dbb6e9..c79ebbb639cb 100644 --- a/arch/x86/kernel/cpu/topology_amd.c +++ b/arch/x86/kernel/cpu/topology_amd.c @@ -175,27 +175,30 @@ static void topoext_fixup(struct topo_scan *tscan) static void parse_topology_am...
71d2893a235bf3b95baccead27b3d47f2f2cdc4c
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: Fix the order of TAS2781 calibrated-data
Problem Details: A bug reported by one of my customers that the order of TAS2781 calibrated-data is incorrect, the correct way is to move R0_Low and insert it between R0 and InvR0. Fixes: 4fe238513407 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib") ...
```diff diff --git a/sound/hda/codecs/side-codecs/tas2781_hda.c b/sound/hda/codecs/side-codecs/tas2781_hda.c index f46d2e06c64f..536940c78f00 100644 --- a/sound/hda/codecs/side-codecs/tas2781_hda.c +++ b/sound/hda/codecs/side-codecs/tas2781_hda.c @@ -33,6 +33,23 @@ const efi_guid_t tasdev_fct_efi_guid[] = { }; EXPORT...
f20a53974f79619d0ef6c9f17bb8693499fb6ebb
Analyze and fix the following issue in the Linux kernel code: ALSA: compress_offload: Add SNDRV_COMPRESS_TSTAMP64 ioctl
Problem Details: The previous patch introduced the internal infrastructure for handling 64-bit timestamps. This patch exposes this capability to user-space. Define the new ioctl command SNDRV_COMPRESS_TSTAMP64, which allows applications to fetch the overflow-safe struct snd_compr_tstamp64. The ioctl dispatch table is...
```diff diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/sound/compress_offload.h index abd0ea3f86ee..70b8921601f9 100644 --- a/include/uapi/sound/compress_offload.h +++ b/include/uapi/sound/compress_offload.h @@ -13,8 +13,7 @@ #include <sound/asound.h> #include <sound/compress_params.h> - -#define...
2c92e2fbe9e22cefdae87d8a0d654691ee4c1957
Analyze and fix the following issue in the Linux kernel code: ALSA: compress_offload: Add 64-bit safe timestamp infrastructure
Problem Details: The copied_total field in struct snd_compr_tstamp is a 32-bit value that can overflow on long-running high-bitrate streams, leading to incorrect calculations for buffer availablility. This patch adds a 64-bit safe timestamping mechanism. A new UAPI struct, snd_compr_tstamp64, is added which uses 64-bi...
```diff diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h index b55c9eeb2b54..9e3d801e45ec 100644 --- a/include/sound/compress_driver.h +++ b/include/sound/compress_driver.h @@ -161,7 +161,7 @@ struct snd_compr_ops { struct snd_compr_metadata *metadata); int (*trigger)(struct snd_comp...
90d8aad11f613e13e1eddc35c0225cce9e54ba94
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Panel Replay SU cap dpcd read return value
Problem Details: Currently return value of drm_dpcd_readb is not checked when reading sink Panel Replay Selective Update capabilities. Fix this and switch to drm_dpcd_read_byte. Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Michał Grzelak <micha...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 1aa4a127afaf..01bf304c705f 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -495,12 +495,14 @@ static u8 intel_dp_get_su_capability(struct intel_dp *intel...
ae7990ce1f605d74b41afe0dff8ec8030105c8cc
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: RoCE Driver Dynamic Debug for HWRM's
Problem Details: Add Linux kernel dynamic debug prints to ROCE HWRM's. Dumping request and response buffers for the ROCE HWRM's using print_hex_dump_bytes() to be part of kernel dynmic debug. Signed-off-by: Chenna Arnoori <chenna.arnoori@broadcom.com> Signed-off-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com>...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c index 804bc773b4ef..b97e75404139 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c @@ -366,6 +366,7 @@ static int __send_message(struct bnxt_qplib_rcfw *rcf...
94d885eb8ffe15b3eb4abe92e03d852fce8ba81f
Analyze and fix the following issue in the Linux kernel code: dt-bindings: extcon: linux,extcon-usb-gpio: GPIO must be provided
Problem Details: Without providing either ID or VBUS GPIO the driver is not able to operate. Original text binding says: "Either one of id-gpio or vbus-gpio must be present." Fixes: 79a31ce03f41 ("dt-bindings: extcon: convert extcon-usb-gpio.txt to yaml format") Acked-by: Conor Dooley <conor.dooley@microchip.com> Si...
```diff diff --git a/Documentation/devicetree/bindings/extcon/linux,extcon-usb-gpio.yaml b/Documentation/devicetree/bindings/extcon/linux,extcon-usb-gpio.yaml index 8856107bdd33..8f29d333602b 100644 --- a/Documentation/devicetree/bindings/extcon/linux,extcon-usb-gpio.yaml +++ b/Documentation/devicetree/bindings/extcon/...
531f47fd35f4ead8c76d584ef8c546b4cd9cb3b7
Analyze and fix the following issue in the Linux kernel code: extcon: max14526: depends on I2C to prevent build warning/errors
Problem Details: Make EXTCON_MAX14526 depend on I2C to address a kconfig warning and subsequent build errors: WARNING: unmet direct dependencies detected for REGMAP_I2C Depends on [m]: I2C [=m] Selected by [y]: - EXTCON_MAX14526 [=y] && EXTCON [=y] ld: vmlinux.o: in function `max14526_driver_init': extcon-max14...
```diff diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig index 1096afc0b5bb..aec46bf03302 100644 --- a/drivers/extcon/Kconfig +++ b/drivers/extcon/Kconfig @@ -136,6 +136,7 @@ config EXTCON_MAX8997 config EXTCON_MAX14526 tristate "Maxim MAX14526 EXTCON Support" + depends on I2C select IRQ_DOMAIN sel...
67c74613f29610b59875a4aae513202db3afe300
Analyze and fix the following issue in the Linux kernel code: extcon: max14526: avoid defined but not used warning
Problem Details: SIMPLE_PM_DEV_OPS() is deprecated according to <linux/pm.h>. Use DEFINE_SIMPLE_PM_DEV_OPS() instead. This avoids a build warning when CONFIG_PM is not enabled: drivers/extcon/extcon-max14526.c:265:12: warning: ‘max14526_resume’ defined but not used [-Wunused-function] 265 | static int max14526_resum...
```diff diff --git a/drivers/extcon/extcon-max14526.c b/drivers/extcon/extcon-max14526.c index 93cb1d9a1044..3750a5c20612 100644 --- a/drivers/extcon/extcon-max14526.c +++ b/drivers/extcon/extcon-max14526.c @@ -272,7 +272,7 @@ static int max14526_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(max...
92bac7d4de9c07933f6b76d8f1c7f8240f911f4f
Analyze and fix the following issue in the Linux kernel code: extcon: adc-jack: Cleanup wakeup source only if it was enabled
Problem Details: Driver in the probe enables wakeup source conditionally, so the cleanup path should do the same - do not release the wakeup source memory if it was not allocated. Link: https://lore.kernel.org/lkml/20250509071703.39442-2-krzysztof.kozlowski@linaro.org/ Reported-by: Christophe JAILLET <christophe.jaill...
```diff diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index 557930394abd..7e3c9f38297b 100644 --- a/drivers/extcon/extcon-adc-jack.c +++ b/drivers/extcon/extcon-adc-jack.c @@ -164,7 +164,8 @@ static void adc_jack_remove(struct platform_device *pdev) { struct adc_jack_data *data = p...
8bc70f2ea932976604876756d6d868eca3ac4cbb
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Add poll for checking PSR is idle before starting update
Problem Details: We are currently observing crc failures after we started using dsb for PSR updates as well. This seems to happen because PSR HW is still sending couple of updates using old framebuffers on wake-up. Fix this by adding poll ensuring PSR is idle before starting update. v2: pass new_crtc_state->dsb_commi...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index c1a3a95c65f0..5dca7f96b425 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7271,6 +7271,9 @@ static void intel_atomic_dsb_finish(struct ...
11b0567ee605e95becc02f858f8f42706687a068
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: New interface adding PSR idle poll into dsb commit
Problem Details: We are currently observing crc failures after we started using dsb for PSR updates as well. This seems to happen because PSR HW is still sending couple of updates using old framebuffers on wake-up. This patch is preparing to fix that by adding interface which can be used to add poll ensuring PSR HW is...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index eae1eedbbb26..1aa4a127afaf 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -42,6 +42,7 @@ #include "intel_dmc.h" #include "intel_dp.h" #include "intel...
bb053f816a8bcb0a9135fc4cc611b1cab3d82201
Analyze and fix the following issue in the Linux kernel code: RISC-V: KVM: add support for SBI_FWFT_MISALIGNED_DELEG
Problem Details: SBI_FWFT_MISALIGNED_DELEG needs hedeleg to be modified to delegate misaligned load/store exceptions. Save and restore it during CPU load/put. Signed-off-by: Clément Léger <cleger@rivosinc.com> Reviewed-by: Deepak Gupta <debug@rivosinc.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-b...
```diff diff --git a/arch/riscv/kvm/vcpu_sbi_fwft.c b/arch/riscv/kvm/vcpu_sbi_fwft.c index b0f66c7bf010..6770c043bbcb 100644 --- a/arch/riscv/kvm/vcpu_sbi_fwft.c +++ b/arch/riscv/kvm/vcpu_sbi_fwft.c @@ -14,6 +14,8 @@ #include <asm/kvm_vcpu_sbi.h> #include <asm/kvm_vcpu_sbi_fwft.h> +#define MIS_DELEG (BIT_ULL(EXC_LO...
402dfbe7ef6bd5d13341a970c47282c7d60cf9a0
Analyze and fix the following issue in the Linux kernel code: hwmon: crps: Fix typos in crps.rst documentation
Problem Details: Changed a misspelling in crps.rst documentation: "Critial" → "Critical". Found using codespell tool. Signed-off-by: Debanil Chowdhury <kerneldev@debanilchowdhury.com> Link: https://lore.kernel.org/r/20250831045710.6009-1-kerneldev@debanilchowdhury.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
```diff diff --git a/Documentation/hwmon/crps.rst b/Documentation/hwmon/crps.rst index 87380b496558..d42ea59d2dae 100644 --- a/Documentation/hwmon/crps.rst +++ b/Documentation/hwmon/crps.rst @@ -43,7 +43,7 @@ curr1_label "iin" curr1_input Measured input current curr1_max Maximum input current curr1_max_alarm Inp...
43c056ac85b60232861005765153707f1b0354b6
Analyze and fix the following issue in the Linux kernel code: hwmon: (lenovo-ec-sensors) Update P8 supprt
Problem Details: This fixes differences for the P8 system that was initially set to the same thermal values as the P7, also adds in the PSU sensor for all of the supported systems Signed-off-by: David Ober <dober@lenovo.com> Signed-off-by: David Ober <dober6023@gmail.com> Link: https://lore.kernel.org/r/20250807103228...
```diff diff --git a/drivers/hwmon/lenovo-ec-sensors.c b/drivers/hwmon/lenovo-ec-sensors.c index 143fb79713f7..8681bbf6665b 100644 --- a/drivers/hwmon/lenovo-ec-sensors.c +++ b/drivers/hwmon/lenovo-ec-sensors.c @@ -66,7 +66,7 @@ enum systems { LENOVO_P8, }; -static int px_temp_map[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9...
3aa72cf03924d04c8d20f8b319df8f73550dd26c
Analyze and fix the following issue in the Linux kernel code: hwmon: (asus-ec-sensors) Narrow lock for X870E-CREATOR WIFI
Problem Details: Use mutex from the SIO device rather than the global lock. Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Fixes: 3e538b52157b ("hwmon: (asus-ec-sensors) add ProArt X870E-CREATOR WIFI") Link: https://lore.kernel.org/r/20250805203157.18446-1-eugene.shalygin@gmail.com Signed-off-by: Guenter ...
```diff diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c index e2f7b8705cb1..83047c3263d3 100644 --- a/drivers/hwmon/asus-ec-sensors.c +++ b/drivers/hwmon/asus-ec-sensors.c @@ -409,7 +409,7 @@ static const struct ec_board_info board_info_pro_art_x870E_creator_wifi = { .sensors = SENSOR_T...
c2783c7cfefd55b1a5be781679cbee5191c0fd87
Analyze and fix the following issue in the Linux kernel code: rust: drm: fix `srctree/` links
Problem Details: These `srctree/` links pointed inside `linux/`, but they are directly under `drm/`. Thus fix them. This cleans a future warning that will check our `srctree/` links. Cc: stable@vger.kernel.org Fixes: a98a73be9ee9 ("rust: drm: file: Add File abstraction") Fixes: c284d3e42338 ("rust: drm: gem: Add GEM...
```diff diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs index d29c477e89a8..f8f1db5eeb0f 100644 --- a/rust/kernel/drm/device.rs +++ b/rust/kernel/drm/device.rs @@ -2,7 +2,7 @@ //! DRM device. //! -//! C header: [`include/linux/drm/drm_device.h`](srctree/include/linux/drm/drm_device.h) +//! C head...
208d7f788e84e80992d7b1c82ff17b620eb1371e
Analyze and fix the following issue in the Linux kernel code: rust: block: fix `srctree/` links
Problem Details: This `srctree/` link pointed to a file with an underscore, but the header used a dash instead. Thus fix it. This cleans a future warning that will check our `srctree/` links. Cc: stable@vger.kernel.org Fixes: 3253aba3408a ("rust: block: introduce `kernel::block::mq` module") Reviewed-by: Daniel Alme...
```diff diff --git a/rust/kernel/block/mq/gen_disk.rs b/rust/kernel/block/mq/gen_disk.rs index cd54cd64ea88..e1af0fa302a3 100644 --- a/rust/kernel/block/mq/gen_disk.rs +++ b/rust/kernel/block/mq/gen_disk.rs @@ -3,7 +3,7 @@ //! Generic disk abstraction. //! //! C header: [`include/linux/blkdev.h`](srctree/include/lin...
0f860eef417df93eb0ae70bbfa8d26cb7e29244d
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix the headphone detection on the orangepi 5
Problem Details: The logic of the headphone detect pin seems to be inverted, with this change headphones actually output sound when plugged in. Does not need workaround of using pin-switches to enable output. Verified by checking /sys/kernel/debug/gpio. Fixes: ae46756faff8 ("arm64: dts: rockchip: analog audio on Ora...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi index 4fedc50cce8c..11940c77f2bd 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi @@ -42,9 +42,8 @@ simple-audio...
41194ee115685ec2dbbb80e20d1090cc3a4c64d8
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Add vcc supply for SPI Flash on NanoPC-T6
Problem Details: FriendlyELEC NanoPC-T6 LTS schematics shows VCC_1V8_S3 being used to power SPI NOR chip. This fixes the following kernel message: spi-nor spi5.0: supply vcc not found, using dummy regulator Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl> Link: https://lore.kernel.org/r/20250905-nanopc-...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi index 3d8b6f0c5541..69833a0a94d0 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi @@ -731,6 +731,7 @@ spi-max-frequency ...
ea9da67e2add7bd5f1e4b38dc2404480e711f4d8
Analyze and fix the following issue in the Linux kernel code: ARM: dts: socfpga: sodia: Fix mdio bus probe and PHY address
Problem Details: On SoCFPGA/Sodia board, mdio bus cannot be probed, so the PHY cannot be found and the network device does not work. ``` stmmaceth ff702000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) ``` To probe the mdio bus, add "snps,dwmac-mdio" as compatible string of the mdio bus. Also the PH...
```diff diff --git a/arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_sodia.dts b/arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_sodia.dts index ce0d6514eeb5..e4794ccb8e41 100644 --- a/arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_sodia.dts +++ b/arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_sodia.dts @@ -66,8 ...
04f08db52b3f892c85bd92ebbc3a7ca32e4f60f3
Analyze and fix the following issue in the Linux kernel code: media: i2c: tc358743: add support for more infoframe types
Problem Details: Add support for SPD, AUDIO, DRM and HDMI InfoFrames. Also add support for ISRC1 and ISRC2 Packet Types and a programmable type for both Packet and InfoFrames. The tc358743 HDMI-to-CSI2 bridge is widely available, and it has quite flexible InfoFrame/Packet Type support, so this makes it a very nice de...
```diff diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 1cc7636e446d..aa02a5a6ae3e 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -38,7 +38,21 @@ static int debug; module_param(debug, int, 0644); -MODULE_PARM_DESC(debug, "debug level (0-3)"); +MODULE_P...
ff46e2e7034c78489fa7a6bc35f7c9dd8ab82905
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: Fix dentry reference leak in iwl_mld_add_link_debugfs
Problem Details: The debugfs_lookup() function increases the dentry reference count. Add missing dput() call to release the reference when the "iwlmld" directory already exists. Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld sub-driver") Cc: stable@vger.kernel.org Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c index cc052b0aa53f..372204bf8452 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c @@ -1001,8 +1001,12 @@ void iwl_mld_add_link_debu...
b4b34ba66443696cc5f3e95493f9d7597259b728
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: Remove redundant header files
Problem Details: The header file "fw/img.h" is already included on line 9. Remove the redundant include. Fixes: 2594e4d9e1a2d ("wifi: iwlwifi: prepare for reading SAR tables from UEFI") Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Link: https://patch.msgid.link/20250819121201.608770-2-liaoyuanhong@vivo.com Sig...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h index a07c512b6ed4..735482e7adf5 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h @@ -12,7 +12,6 @@ #include "fw/api/phy.h...
c67a2470922f03bdecc43ec1ae989b85757c62b6
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: Remove duplicated include in trans.c
Problem Details: The header files fw/api/tx.h is included twice in gen1_2/trans.c, so one inclusion of each can be removed. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=22932 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://patch.msgid.link/...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c index 234a02223c20..cda7c51b307c 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c @@ -25,7 +25,6 @@ #inclu...
afc4e4a5f122183b38095daba2264123cc86d8ab
Analyze and fix the following issue in the Linux kernel code: lib/crypto: tests: Migrate Curve25519 self-test to KUnit
Problem Details: Move the Curve25519 test from an ad-hoc self-test to a KUnit test. Generally keep the same test logic for now, just translated to KUnit. There's one exception, which is that I dropped the incomplete test of curve25519_generic(). The approach I'm taking to cover the different implementations with the ...
```diff diff --git a/include/crypto/curve25519.h b/include/crypto/curve25519.h index ece6a9b5fafc..4e6dc840b159 100644 --- a/include/crypto/curve25519.h +++ b/include/crypto/curve25519.h @@ -28,8 +28,6 @@ void curve25519_arch(u8 out[CURVE25519_KEY_SIZE], void curve25519_base_arch(u8 pub[CURVE25519_KEY_SIZE], con...
def5612170a8c6c4c6a3ea5bd6c3cfc8de6ba4b1
Analyze and fix the following issue in the Linux kernel code: power: supply: cw2015: Fix a alignment coding style issue
Problem Details: Fix the checkpatch warning: CHECK: Alignment should match open parenthesis Fixes: 0cb172a4918e ("power: supply: cw2015: Use device managed API to simplify the code") Signed-off-by: Andy Yan <andyshrk@163.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
```diff diff --git a/drivers/power/supply/cw2015_battery.c b/drivers/power/supply/cw2015_battery.c index afc607fee5c9..2263d5d3448f 100644 --- a/drivers/power/supply/cw2015_battery.c +++ b/drivers/power/supply/cw2015_battery.c @@ -699,8 +699,7 @@ static int cw_bat_probe(struct i2c_client *client) if (!cw_bat->battery...
9559d2fffd4f9b892165eed48198a0e5cb8504e6
Analyze and fix the following issue in the Linux kernel code: SUNRPC: call xs_sock_process_cmsg for all cmsg
Problem Details: xs_sock_recv_cmsg was failing to call xs_sock_process_cmsg for any cmsg type other than TLS_RECORD_TYPE_ALERT (TLS_RECORD_TYPE_DATA, and other values not handled.) Based on my reading of the previous commit (cc5d5908: sunrpc: fix client side handling of tls alerts), it looks like only iov_iter_revert s...
```diff diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index c5f7bbf5775f..3aa987e7f072 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -407,9 +407,9 @@ xs_sock_recv_cmsg(struct socket *sock, unsigned int *msg_flags, int flags) iov_iter_kvec(&msg.msg_iter, ITER_DEST, &alert_kvec, 1, ...
c12b6a7b12a13ccd3aece6be09345c1944e18d3e
Analyze and fix the following issue in the Linux kernel code: NFS: Fix the marking of the folio as up to date
Problem Details: Since all callers of nfs_page_group_covers_page() have already ensured that there is only one group member, all that is required is to check that the entire folio contains dirty data. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index e359fbcdc8a0..647c53d1418a 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -237,59 +237,17 @@ static void nfs_mapping_set_error(struct folio *folio, int error) } /* - * nfs_page_group_search_locked - * @head - head request of page group - * @page_offset...
b7b8574225e9d2b5f1fb5483886ab797892f43b5
Analyze and fix the following issue in the Linux kernel code: NFS: nfs_invalidate_folio() must observe the offset and size arguments
Problem Details: If we're truncating part of the folio, then we need to write out the data on the part that is not covered by the cancellation. Fixes: d47992f86b30 ("mm: change invalidatepage prototype to accept length") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index a3105f944a0e..8059ece82468 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -475,10 +475,11 @@ static void nfs_invalidate_folio(struct folio *folio, size_t offset, dfprintk(PAGECACHE, "NFS: invalidate_folio(%lu, %zu, %zu)\n", folio->index, offset, length);...
ca247c89900ae90207f4d321e260cd93b7c7d104
Analyze and fix the following issue in the Linux kernel code: NFSv4.2: Serialise O_DIRECT i/o and copy range
Problem Details: Ensure that all O_DIRECT reads and writes complete before copying a file range, so that the destination is up to date. Fixes: a5864c999de6 ("NFS: Do not serialise O_DIRECT reads and writes") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
```diff diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 1a169372ca16..6a0b5871ba3b 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -445,6 +445,7 @@ static ssize_t _nfs42_proc_copy(struct file *src, return status; } + nfs_file_block_o_direct(NFS_I(dst_inode)); status = nfs_sync_inode(dst_...
c80ebeba1198eac8811ab0dba36ecc13d51e4438
Analyze and fix the following issue in the Linux kernel code: NFSv4.2: Serialise O_DIRECT i/o and clone range
Problem Details: Ensure that all O_DIRECT reads and writes complete before cloning a file range, so that both the source and destination are up to date. Fixes: a5864c999de6 ("NFS: Do not serialise O_DIRECT reads and writes") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
```diff diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index 1d6b5f4230c9..c9a0d1e420c6 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -278,9 +278,11 @@ static loff_t nfs42_remap_file_range(struct file *src_file, loff_t src_off, lock_two_nondirectories(src_inode, dst_inode); /* flush all pending writ...
b93128f29733af5d427a335978a19884c2c230e2
Analyze and fix the following issue in the Linux kernel code: NFSv4.2: Serialise O_DIRECT i/o and fallocate()
Problem Details: Ensure that all O_DIRECT reads and writes complete before calling fallocate so that we don't race w.r.t. attribute updates. Fixes: 99f237832243 ("NFSv4.2: Always flush out writes in nfs42_proc_fallocate()") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
```diff diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index e2fea37c5348..1a169372ca16 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -114,6 +114,7 @@ static int nfs42_proc_fallocate(struct rpc_message *msg, struct file *filep, exception.inode = inode; exception.state = lock->open_context->state...
9eb90f435415c7da4800974ed943e39b5578ee7f
Analyze and fix the following issue in the Linux kernel code: NFS: Serialise O_DIRECT i/o and truncate()
Problem Details: Ensure that all O_DIRECT reads and writes are complete, and prevent the initiation of new i/o until the setattr operation that will truncate the file is complete. Fixes: a5864c999de6 ("NFS: Do not serialise O_DIRECT reads and writes") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
```diff diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 0b141feacc52..49df9debb1a6 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -768,8 +768,10 @@ nfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, trace_nfs_setattr_enter(inode); /* Write all dirty data */ - if (S_ISREG(inode->i_mode)) + if (S_I...
b1817b18ff20e69f5accdccefaf78bf5454bede2
Analyze and fix the following issue in the Linux kernel code: NFS: Protect against 'eof page pollution'
Problem Details: This commit fixes the failing xfstest 'generic/363'. When the user mmaps() an area that extends beyond the end of file, and proceeds to write data into the folio that straddles that eof, we're required to discard that folio data if the user calls some function that extends the file length. Signed-off...
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 86e36c630f09..a3105f944a0e 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -28,6 +28,7 @@ #include <linux/mm.h> #include <linux/pagemap.h> #include <linux/gfp.h> +#include <linux/rmap.h> #include <linux/swap.h> #include <linux/compaction.h> @@ -280,6 +28...
5a46d2339a5ae268ede53a221f20433d8ea4f2f9
Analyze and fix the following issue in the Linux kernel code: flexfiles/pNFS: fix NULL checks on result of ff_layout_choose_ds_for_read
Problem Details: Recent commit f06bedfa62d5 ("pNFS/flexfiles: don't attempt pnfs on fatal DS errors") has changed the error return type of ff_layout_choose_ds_for_read() from NULL to an error pointer. However, not all code paths have been updated to match the change. Thus, some non-NULL checks will accept error pointer...
```diff diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 8dc921d83538..f8ab7b4e09e7 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -773,8 +773,11 @@ ff_layout_choose_ds_for_read(struct pnfs_layout_segment *lseg, c...
3c9ba2777d6c86025e1ba4186dc5cd930e40ec5f
Analyze and fix the following issue in the Linux kernel code: kernfs: Fix UAF in polling when open file is released
Problem Details: A use-after-free (UAF) vulnerability was identified in the PSI (Pressure Stall Information) monitoring mechanism: BUG: KASAN: slab-use-after-free in psi_trigger_poll+0x3c/0x140 Read of size 8 at addr ffff3de3d50bd308 by task systemd/1 psi_trigger_poll+0x3c/0x140 cgroup_pressure_poll+0x70/0xa0 cgroup_...
```diff diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index a6c692cac616..9adf36e6364b 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -70,6 +70,24 @@ static struct kernfs_open_node *of_on(struct kernfs_open_file *of) !list_empty(&of->list)); } +/* Get active reference to kernfs node for an open fi...
400f60b27415f927f8964dd32d1f5baa53782e5f
Analyze and fix the following issue in the Linux kernel code: ALSA: cs4281: Send the PCM period elapsed notification properly
Problem Details: As part of spin lock code cleanup using guard(), a new variable (period_elapsed) was introduced. However this variable is never set, causing period elapsed notification to be not sent. Set the value of period_elapsed appropiately. This issue was reported by static coverity analyzer. Fixes: 7a5127c2c...
```diff diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index c519fb9cdd1e..d00b2c9fb1e3 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c @@ -1752,6 +1752,7 @@ static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id) chip->spurious_dtc_irq++; continue; } + period_elapsed = true; ...
716cec5fc92f6d4090a54ddb01042bce02b3c771
Analyze and fix the following issue in the Linux kernel code: driver core: Fix order of the kernel-doc parameters
Problem Details: Fix the order of the kernel-doc parameters in device_find_child() and device_for_each_child*() functions to match the actual functions signature. No functional changes. Signed-off-by: Gil Fine <gil.fine@linux.intel.com> Link: https://lore.kernel.org/r/20250831194930.2063390-1-gil.fine@linux.intel.com...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index cd806be435cd..fa8093119602 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3994,8 +3994,8 @@ const char *device_get_devnode(const struct device *dev, /** * device_for_each_child - device child iterator. * @parent: parent struct dev...
a86537ad21c7ba587241b0dcdd186f894a69fac7
Analyze and fix the following issue in the Linux kernel code: driver core: get_dev_from_fwnode(): document potential race
Problem Details: Commit 9a4681a485ee ("driver core: Export get_dev_from_fwnode()") made get_dev_from_fwnode() publicly available, but didn't document the guarantees a caller must uphold: get_dev_from_fwnode() obtains a reference count from the device pointer stored in a struct fwnode_handle. While having its own refer...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index d22d6b23e758..cd806be435cd 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -5278,6 +5278,25 @@ void device_set_node(struct device *dev, struct fwnode_handle *fwnode) } EXPORT_SYMBOL_GPL(device_set_node); +/** + * get_dev_from_fwnode ...
2b2d4c744e1ab8b8d41c5c2ccf889f5441e50105
Analyze and fix the following issue in the Linux kernel code: drivers: base: fix "publically"->"publicly"
Problem Details: Trivial fix to spelling mistake in comment text. Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Link: https://lore.kernel.org/r/20250827114021.476668-1-zhao.xichao@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index efc575a00edd..ccaebb8ac656 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -325,7 +325,7 @@ static void cpu_device_release(struct device *dev) * This is an empty function to prevent the driver core from spitting a * warning at us. Yes...
76254bc489d39dae9a3427f0984fe64213d20548
Analyze and fix the following issue in the Linux kernel code: cdx: Fix device node reference leak in cdx_msi_domain_init
Problem Details: Add missing of_node_put() call to release the device node reference obtained via of_parse_phandle(). Fixes: 0e439ba38e61 ("cdx: add MSI support for CDX bus") Cc: stable@vger.kernel.org Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Acked-by: Nipun Gupta <nipun.gupta@amd.com> Link: https://lore.kerne...
```diff diff --git a/drivers/cdx/cdx_msi.c b/drivers/cdx/cdx_msi.c index 3388a5d1462c..91b95422b263 100644 --- a/drivers/cdx/cdx_msi.c +++ b/drivers/cdx/cdx_msi.c @@ -174,6 +174,7 @@ struct irq_domain *cdx_msi_domain_init(struct device *dev) } parent = irq_find_matching_fwnode(of_fwnode_handle(parent_node), DOMAI...
e28022873c0d051e980c4145f1965cab5504b498
Analyze and fix the following issue in the Linux kernel code: char: Use list_del_init() in misc_deregister() to reinitialize list pointer
Problem Details: Currently, misc_deregister() uses list_del() to remove the device from the list. After list_del(), the list pointers are set to LIST_POISON1 and LIST_POISON2, which may help catch use-after-free bugs, but does not reset the list head. If misc_deregister() is called more than once on the same device, li...
```diff diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 69e8ce02e099..726516fb0a3b 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -284,7 +284,7 @@ EXPORT_SYMBOL(misc_register); void misc_deregister(struct miscdevice *misc) { mutex_lock(&misc_mtx); - list_del(&misc->list); + list_del_init...
5f9efb6b7667043527d377421af2070cc0aa2ecd
Analyze and fix the following issue in the Linux kernel code: Input: mtk-pmic-keys - MT6359 has a specific release irq
Problem Details: Support for MT6359 PMIC keys has been added recently. However, the key release event is not properly handled: only key press events are generated, leaving key states stuck in "pressed". This patch ensures that both key press and key release events are properly emitted by handling the release logic cor...
```diff diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index 50e2e792c91d..c78d9f6d97c4 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -55,6 +55,7 @@ struct mtk_pmic_regs { const struct mtk_pmic_keys_regs keys_regs[MTK_...
fc33bf0e097c6834646b98a7b3da0ae5b617f0f9
Analyze and fix the following issue in the Linux kernel code: PM / devfreq: mtk-cci: Fix potential error pointer dereference in probe()
Problem Details: The drv->sram_reg pointer could be set to ERR_PTR(-EPROBE_DEFER) which would lead to a error pointer dereference. Use IS_ERR_OR_NULL() to check that the pointer is valid. Fixes: e09bd5757b52 ("PM / devfreq: mtk-cci: Handle sram regulator probe deferral") Signed-off-by: Dan Carpenter <dan.carpenter@li...
```diff diff --git a/drivers/devfreq/mtk-cci-devfreq.c b/drivers/devfreq/mtk-cci-devfreq.c index 22fe9e631f8a..5730076846e1 100644 --- a/drivers/devfreq/mtk-cci-devfreq.c +++ b/drivers/devfreq/mtk-cci-devfreq.c @@ -386,7 +386,8 @@ out_disable_cci_clk: out_free_resources: if (regulator_is_enabled(drv->proc_reg)) r...
c1628c00c4351dd0727ef7f670694f68d9e663d8
Analyze and fix the following issue in the Linux kernel code: tracing/osnoise: Fix null-ptr-deref in bitmap_parselist()
Problem Details: A crash was observed with the following output: BUG: kernel NULL pointer dereference, address: 0000000000000010 Oops: Oops: 0000 [#1] SMP NOPTI CPU: 2 UID: 0 PID: 92 Comm: osnoise_cpus Not tainted 6.17.0-rc4-00201-gd69eb204c255 #138 PREEMPT(voluntary) RIP: 0010:bitmap_parselist+0x53/0x3e0 Call Trace: ...
```diff diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c index fd259da0aa64..337bc0eb5d71 100644 --- a/kernel/trace/trace_osnoise.c +++ b/kernel/trace/trace_osnoise.c @@ -2322,6 +2322,9 @@ osnoise_cpus_write(struct file *filp, const char __user *ubuf, size_t count, int running, err; char *bu...
ab1396af7595e7d49a3850481b24d7fe7cbdfd31
Analyze and fix the following issue in the Linux kernel code: trace/fgraph: Fix error handling
Problem Details: Commit edede7a6dcd7 ("trace/fgraph: Fix the warning caused by missing unregister notifier") added a call to unregister the PM notifier if register_ftrace_graph() failed. It does so unconditionally. However, the PM notifier is only registered with the first call to register_ftrace_graph(). If the first ...
```diff diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 2a42c1036ea8..1e3b32b1e82c 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -1397,7 +1397,8 @@ error: ftrace_graph_active--; gops->saved_func = NULL; fgraph_lru_release_index(i); - unregister_pm_notifier(&ftrace_suspend_...
6d6a29a19b232e29b61a14d58b71fefc2e003fa4
Analyze and fix the following issue in the Linux kernel code: drm/msm: Fix 32b size truncation
Problem Details: Somehow we never noticed this when arm64 became a thing, many years ago. v2: also fix npages Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Tested-by: Connor Abbott <cwabbott0@gmail.com> Patchwork: https://patchwork.freedesktop.org/patch/669785/
```diff diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 9f0f5b77f1bd..e6cb51f21d97 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -192,7 +192,7 @@ static struct page **get_pages(struct drm_gem_object *obj) if (!msm_obj->pages) { struct drm_device ...
3a3bef68a6c15d079646a964ebc4dc8bb0aedb06
Analyze and fix the following issue in the Linux kernel code: drm/msm: Fix missing VM_BIND offset/range validation
Problem Details: We need to reject the MAP op if offset+range is larger than the BO size. Reported-by: Connor Abbott <cwabbott0@gmail.com> Fixes: 2e6a8a1fe2b2 ("drm/msm: Add VM_BIND ioctl") Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Tested-by: Connor Abbott <cwabbott0@gmail.com> Patchwork: https://patchwo...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c index 209154be5efc..381a0853c05b 100644 --- a/drivers/gpu/drm/msm/msm_gem_vma.c +++ b/drivers/gpu/drm/msm/msm_gem_vma.c @@ -1080,6 +1080,12 @@ vm_bind_job_lookup_ops(struct msm_vm_bind_job *job, struct drm_msm_vm_bind *args ...
278f8904434aa96055e793936b5977c010549e28
Analyze and fix the following issue in the Linux kernel code: drm/msm: Fix obj leak in VM_BIND error path
Problem Details: If we fail a handle-lookup part way thru, we need to drop the already obtained obj references. Fixes: 2e6a8a1fe2b2 ("drm/msm: Add VM_BIND ioctl") Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Tested-by: Connor Abbott <cwabbott0@gmail.com> Patchwork: https://patchwork.freedesktop.org/patch/66...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c index 00d0f3b7ba32..209154be5efc 100644 --- a/drivers/gpu/drm/msm/msm_gem_vma.c +++ b/drivers/gpu/drm/msm/msm_gem_vma.c @@ -1023,6 +1023,7 @@ vm_bind_job_lookup_ops(struct msm_vm_bind_job *job, struct drm_msm_vm_bind *args stru...
618f571af67a876ce23a1dc4eb08e152fcf0d709
Analyze and fix the following issue in the Linux kernel code: dt-bindings: input: exc3000: move eeti,egalax_ts from egalax-ts.txt to eeti,exc3000.yaml
Problem Details: Remove legacy binding egalax-ts.txt file. And add compatible string eeti,egalax_ts and wakeup-gpios to eeti,exc3000.yaml. "eeti,egalax_ts" is general compatible string, which is not preferred. But it is compatible with old devices (older than 10 years) and existing driver in drivers/input/touchscreen/e...
```diff diff --git a/Documentation/devicetree/bindings/input/touchscreen/eeti,exc3000.yaml b/Documentation/devicetree/bindings/input/touchscreen/eeti,exc3000.yaml index 1c7ae05a8c15..d19b07d4cfd4 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/eeti,exc3000.yaml +++ b/Documentation/devicetree/bindings/i...
5f8f84e286f11af4c954c14a57daffc80a1c3510
Analyze and fix the following issue in the Linux kernel code: drivers/misc/amd-sbi/Kconfig: select REGMAP_I2C
Problem Details: Without CONFIG_REGMAP, rmi-i2c.c fails to build because struct regmap_config is not defined: drivers/misc/amd-sbi/rmi-i2c.c: In function ‘sbrmi_i2c_probe’: drivers/misc/amd-sbi/rmi-i2c.c:57:16: error: variable ‘sbrmi_i2c_regmap_config’ has initializer but incomplete type 57 | struct regm...
```diff diff --git a/drivers/misc/amd-sbi/Kconfig b/drivers/misc/amd-sbi/Kconfig index 4840831c84ca..4aae0733d0fc 100644 --- a/drivers/misc/amd-sbi/Kconfig +++ b/drivers/misc/amd-sbi/Kconfig @@ -2,6 +2,7 @@ config AMD_SBRMI_I2C tristate "AMD side band RMI support" depends on I2C + select REGMAP_I2C help Side...
b0531cdba5029f897da5156815e3bdafe1e9b88d
Analyze and fix the following issue in the Linux kernel code: pps: fix warning in pps_register_cdev when register device fail
Problem Details: Similar to previous commit 2a934fdb01db ("media: v4l2-dev: fix error handling in __video_register_device()"), the release hook should be set before device_register(). Otherwise, when device_register() return error and put_device() try to callback the release function, the below warning may happen. -...
```diff diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c index 92d1b62ea239..e9389876229e 100644 --- a/drivers/pps/kapi.c +++ b/drivers/pps/kapi.c @@ -109,16 +109,13 @@ struct pps_device *pps_register_source(struct pps_source_info *info, if (err < 0) { pr_err("%s: unable to create char device\n", info->n...
6b26053819dccc664120e07c56f107fb6f72f3fa
Analyze and fix the following issue in the Linux kernel code: misc: genwqe: Fix incorrect cmd field being reported in error
Problem Details: There is a dev_err message that is reporting the value of cmd->asiv_length when it should be reporting cmd->asv_length instead. Fix this. Fixes: eaf4722d4645 ("GenWQE Character device and DDCB queue") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20250902113712...
```diff diff --git a/drivers/misc/genwqe/card_ddcb.c b/drivers/misc/genwqe/card_ddcb.c index 500b1feaf1f6..fd7d5cd50d39 100644 --- a/drivers/misc/genwqe/card_ddcb.c +++ b/drivers/misc/genwqe/card_ddcb.c @@ -923,7 +923,7 @@ int __genwqe_execute_raw_ddcb(struct genwqe_dev *cd, } if (cmd->asv_length > DDCB_ASV_LENGTH)...
b15b7d2a1b09ef5428a8db260251897405a19496
Analyze and fix the following issue in the Linux kernel code: uio_hv_generic: Let userspace take care of interrupt mask
Problem Details: Remove the logic to set interrupt mask by default in uio_hv_generic driver as the interrupt mask value is supposed to be controlled completely by the user space. If the mask bit gets changed by the driver, concurrently with user mode operating on the ring, the mask bit may be set when it is supposed to...
```diff diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index f19efad4d6f8..3f8e2e27697f 100644 --- a/drivers/uio/uio_hv_generic.c +++ b/drivers/uio/uio_hv_generic.c @@ -111,7 +111,6 @@ static void hv_uio_channel_cb(void *context) struct hv_device *hv_dev; struct hv_uio_private_data *pdata;...
47625846727b82e4a05f14d988fc5efa2c1d882f
Analyze and fix the following issue in the Linux kernel code: uio: uio_pdrv_genirq: Remove MODULE_DEVICE_TABLE
Problem Details: The struct of_device_id list here is filled in at load time since commit 05c3e0bb5629 ("UIO: allow binding uio_pdrv_genirq.c to devices using command line option"). However, this does not work with MODULE_DEVICE_TABLE, which generates an alias at build time. In this case, it generates the aliases "of...
```diff diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c index 2ec7d25e8264..633ab6b91671 100644 --- a/drivers/uio/uio_pdrv_genirq.c +++ b/drivers/uio/uio_pdrv_genirq.c @@ -276,7 +276,6 @@ static struct of_device_id uio_of_genirq_match[] = { { /* This is filled with module_parm */ }, { /* ...
5cea88cab622f444a581ebd35664198bbbb1f4e6
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: remove REG_EFUSE_ACCESS_8723 and EFUSE_ACCESS_ON_8723
Problem Details: The macros REG_EFUSE_ACCESS_8723 and EFUSE_ACCESS_ON_8723 are redundant, both are already defined in header files without the _8723 suffix. Remove them and use the marcos from the header files. rtl8723b_hal.h:138: #define EFUSE_ACCESS_ON 0x69 /* For RTL8723 only. */ hal_com_reg.h:35: #define REG_E...
```diff diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index 36680ecb5897..45cd2291f83d 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -568,13 +568,6 @@ void Hal_GetEfuseDefinit...
0bbf8fb9e3e624d44b536de71a93f995b7edc7a5
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix fortify warnings by using struct_group
Problem Details: Fix fortify_memcpy_chk warnings in rtw_BIP_verify() and rtw_mgmt_xmitframe_coalesce() functions by using struct_group to access consecutive address fields. Changed memcpy calls to use &hdr->addrs instead of hdr->addr1 when copying 18 bytes (addr1 + addr2 + addr3). This resolves 'detected read beyond ...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index 8367fd15c6b1..3d99d045f4b6 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -1363,7 +1363,7 @@ u32 rtw_BIP_verify(struct adapter *pada...
b5e3277c0f1c3439dd02b58997c06201d0ee8dbf
Analyze and fix the following issue in the Linux kernel code: serial: xilinx_uartps: read reg size from DTS
Problem Details: Current implementation uses `CDNS_UART_REGISTER_SPACE(0x1000)` for request_mem_region() and ioremap() in cdns_uart_request_port() API. The cadence/xilinx IP has register space defined from offset 0x0 to 0x48. It also mentions that the register map is defined as [6:0]. So, the upper region may/maynot b...
```diff diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index fe457bf1e15b..a66b44d21fba 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -33,7 +33,6 @@ #define CDNS_UART_MINOR 0 /* works best with devtmpfs */ #define CDNS_UART_NR_PORTS ...
3cf0b3c243e56bc43be560617416c1d9f301f44c
Analyze and fix the following issue in the Linux kernel code: tty: n_gsm: Don't block input queue by waiting MSC
Problem Details: Currently gsm_queue() processes incoming frames and when opening a DLC channel it calls gsm_dlci_open() which calls gsm_modem_update(). If basic mode is used it calls gsm_modem_upd_via_msc() and it cannot block the input queue by waiting the response to come into the same input queue. Instead allow se...
```diff diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 7fc535452c0b..553d8c70352b 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -461,6 +461,7 @@ static int gsm_send_packet(struct gsm_mux *gsm, struct gsm_msg *msg); static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr); st...
94fcae6cb1c1dec20a5bd0e324b23057fa4eae09
Analyze and fix the following issue in the Linux kernel code: serial: qcom-geni: Fix off-by-one error in ida_alloc_range()
Problem Details: The ida_alloc_range() function expects an inclusive range, meaning both the start and end values are valid allocation targets. Passing nr_ports as the upper bound allows allocation of an ID equal to nr_ports, which is out of bounds when used as an index into the port array. Fix this by subtracting 1 f...
```diff diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 9c7b1cea7cfe..0b474d349531 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -271,9 +271,11 @@ static struct qcom_geni_serial_port *get_port_from_line(int line, bool c...
cc4d900d0d6d8dd5c41832a93ff3cfa629a78f9a
Analyze and fix the following issue in the Linux kernel code: serial: stm32: allow selecting console when the driver is module
Problem Details: Console can be enabled on the UART compile as module. Change dependency to allow console mode when the driver is built as module. Fixes: 48a6092fb41fa ("serial: stm32-usart: Add STM32 USART Driver") Cc: stable@vger.kernel.org Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> Link: h...
```diff diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index e661f5951f55..1e27a822c1cb 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -1420,7 +1420,7 @@ config SERIAL_STM32 config SERIAL_STM32_CONSOLE bool "Support for console on STM32" - depends on SERIAL_STM32=...
18656ee86fe898932fdfbe5db4a92330ac95fa23
Analyze and fix the following issue in the Linux kernel code: serial: 8250_core: fix coding style issue
Problem Details: Fix a coding style issue in 8250_core.c: - Remove redundant NULL initialization of a global pointer Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250822095614.18108-1-osama.abdelkader@gmail.com Signed-off-...
```diff diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 7d931693b311..bfa421ab3253 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -302,7 +302,7 @@ static void univ8250_release_irq(struct uart_8250_port *up) serial_unlink_irq_...
116e79c679a1530cf833d0ff3007061d7a716bd9
Analyze and fix the following issue in the Linux kernel code: usb: gadget: midi2: Fix MIDI2 IN EP max packet size
Problem Details: The EP-IN of MIDI2 (altset 1) wasn't initialized in f_midi2_create_usb_configs() as it's an INT EP unlike others BULK EPs. But this leaves rather the max packet size unchanged no matter which speed is used, resulting in the very slow access. And the wMaxPacketSize values set there look legit for INT E...
```diff diff --git a/drivers/usb/gadget/function/f_midi2.c b/drivers/usb/gadget/function/f_midi2.c index b351f9ae0fc5..de16b02d857e 100644 --- a/drivers/usb/gadget/function/f_midi2.c +++ b/drivers/usb/gadget/function/f_midi2.c @@ -1737,9 +1737,12 @@ static int f_midi2_create_usb_configs(struct f_midi2 *midi2, case US...
21d8525d2e061cde034277d518411b02eac764e2
Analyze and fix the following issue in the Linux kernel code: usb: gadget: midi2: Fix missing UMP group attributes initialization
Problem Details: The gadget card driver forgot to call snd_ump_update_group_attrs() after adding FBs, and this leaves the UMP group attributes uninitialized. As a result, -ENODEV error is returned at opening a legacy rawmidi device as an inactive group. This patch adds the missing call to address the behavior above. ...
```diff diff --git a/drivers/usb/gadget/function/f_midi2.c b/drivers/usb/gadget/function/f_midi2.c index 0a800ba53816..b351f9ae0fc5 100644 --- a/drivers/usb/gadget/function/f_midi2.c +++ b/drivers/usb/gadget/function/f_midi2.c @@ -1599,6 +1599,7 @@ static int f_midi2_create_card(struct f_midi2 *midi2) strscpy(fb->i...
f34bfcc77b18375a87091c289c2eb53c249787b4
Analyze and fix the following issue in the Linux kernel code: usb: typec: tcpm: properly deliver cable vdms to altmode drivers
Problem Details: tcpm_handle_vdm_request delivers messages to the partner altmode or the cable altmode depending on the SVDM response type, which is incorrect. The partner or cable should be chosen based on the received message type instead. Also add this filter to ADEV_NOTIFY_USB_AND_QUEUE_VDM, which is used when the...
```diff diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 1f6fdfaa34bf..b2a568a5bc9b 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -2426,17 +2426,21 @@ static void tcpm_handle_vdm_request(struct tcpm_port *port, case ADEV_NONE: break; case ADE...
8d63c83d8eb922f6c316320f50c82fa88d099bea
Analyze and fix the following issue in the Linux kernel code: USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels
Problem Details: Yunseong Kim and the syzbot fuzzer both reported a problem in RT-enabled kernels caused by the way dummy-hcd mixes interrupt management and spin-locking. The pattern was: local_irq_save(flags); spin_lock(&dum->lock); ... spin_unlock(&dum->lock); ... // calls usb_gadget_giveback_request() local...
```diff diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index 21dbfb0b3bac..1cefca660773 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -765,8 +765,7 @@ static int dummy_dequeue(struct usb_ep *_ep, struct usb_request *_req) if (!dum->dr...
edcbe06453ddfde21f6aa763f7cab655f26133cc
Analyze and fix the following issue in the Linux kernel code: xhci: fix memory leak regression when freeing xhci vdev devices depth first
Problem Details: Suspend-resume cycle test revealed a memory leak in 6.17-rc3 Turns out the slot_id race fix changes accidentally ends up calling xhci_free_virt_device() with an incorrect vdev parameter. The vdev variable was reused for temporary purposes right before calling xhci_free_virt_device(). Fix this by pass...
```diff diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 81eaad87a3d9..c4a6544aa107 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -962,7 +962,7 @@ static void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_i out: /* we are now at a leaf ...
a5c98e8b1398534ae1feb6e95e2d3ee5215538ed
Analyze and fix the following issue in the Linux kernel code: xhci: dbc: Fix full DbC transfer ring after several reconnects
Problem Details: Pending requests will be flushed on disconnect, and the corresponding TRBs will be turned into No-op TRBs, which are ignored by the xHC controller once it starts processing the ring. If the USB debug cable repeatedly disconnects before ring is started then the ring will eventually be filled with No-op...
```diff diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c index d0faff233e3e..63edf2d8f245 100644 --- a/drivers/usb/host/xhci-dbgcap.c +++ b/drivers/usb/host/xhci-dbgcap.c @@ -462,6 +462,25 @@ static void xhci_dbc_ring_init(struct xhci_ring *ring) xhci_initialize_ring_info(ring); } +stat...
220a0ffde02f962c13bc752b01aa570b8c65a37b
Analyze and fix the following issue in the Linux kernel code: xhci: dbc: decouple endpoint allocation from initialization
Problem Details: Decouple allocation of endpoint ring buffer from initialization of the buffer, and initialization of endpoint context parts from from the rest of the contexts. It allows driver to clear up and reinitialize endpoint rings after disconnect without reallocating everything. This is a prerequisite for the...
```diff diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c index 06a2edb9e86e..d0faff233e3e 100644 --- a/drivers/usb/host/xhci-dbgcap.c +++ b/drivers/usb/host/xhci-dbgcap.c @@ -101,13 +101,34 @@ static u32 xhci_dbc_populate_strings(struct dbc_str_descs *strings) return string_length; } +s...
1bc28f015a19a10b7a305fc561c1143c34a1e04a
Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: Add check for UCSI version
Problem Details: "Power Reading" bit is introduced in UCSI v2.1 and so limit the check for that bit only if version supported is 2.1 or above. Fixes: c851b71fd6cd ("usb: typec: ucsi: Add support for READ_POWER_LEVEL command") Signed-off-by: Venkat Jayaraman <venkat.jayaraman@intel.com> Reviewed-by: Heikki Krogerus <he...
```diff diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index 0d6b0cf5a7cd..3f568f790f39 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -1293,7 +1293,8 @@ static void ucsi_handle_connector_change(struct work_struct *work) if (change & UCSI_CONSTAT_BC_CHANG...
87c5ff5615dc0a37167e8faf3adeeddc6f1344a3
Analyze and fix the following issue in the Linux kernel code: usb: cdns3: gadget: Use-after-free during failed initialization and exit of cdnsp gadget
Problem Details: In the __cdnsp_gadget_init() and cdnsp_gadget_exit() functions, the gadget structure (pdev->gadget) was freed before its endpoints. The endpoints are linked via the ep_list in the gadget structure. Freeing the gadget first leaves dangling pointers in the endpoint list. When the endpoints are subsequent...
```diff diff --git a/drivers/usb/cdns3/cdnsp-gadget.c b/drivers/usb/cdns3/cdnsp-gadget.c index 55f95f41b3b4..0252560cbc80 100644 --- a/drivers/usb/cdns3/cdnsp-gadget.c +++ b/drivers/usb/cdns3/cdnsp-gadget.c @@ -1976,7 +1976,10 @@ static int __cdnsp_gadget_init(struct cdns *cdns) return 0; del_gadget: - usb_del_gad...
e9c206324eeb213957a567a9d066bdeb355c7491
Analyze and fix the following issue in the Linux kernel code: usb: cdns3: cdnsp-pci: remove redundant pci_disable_device() call
Problem Details: The cdnsp-pci driver uses pcim_enable_device() to enable a PCI device, which means the device will be automatically disabled on driver detach through the managed device framework. The manual pci_disable_device() call in the error path is therefore redundant. Found via static anlaysis and this is simil...
```diff diff --git a/drivers/usb/cdns3/cdnsp-pci.c b/drivers/usb/cdns3/cdnsp-pci.c index 8c361b8394e9..5e7b88ca8b96 100644 --- a/drivers/usb/cdns3/cdnsp-pci.c +++ b/drivers/usb/cdns3/cdnsp-pci.c @@ -85,7 +85,7 @@ static int cdnsp_pci_probe(struct pci_dev *pdev, cdnsp = kzalloc(sizeof(*cdnsp), GFP_KERNEL); if (!cd...
ed6f727c575b1eb8136e744acfd5e7306c9548f6
Analyze and fix the following issue in the Linux kernel code: usb: gadget: f_hid: Fix zero length packet transfer
Problem Details: Set the hid req->zero flag of ep0/in_ep to true by default, then the UDC drivers can transfer a zero length packet at the end if the hid transfer with size divisible to EPs max packet size according to the USB 2.0 spec. Signed-off-by: William Wu <william.wu@rock-chips.com> Link: https://lore.kernel.or...
```diff diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 8e1d1e884050..307ea563af95 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c @@ -511,7 +511,7 @@ try_again: } req->status = 0; - req->zero = 0; + req->zero = 1; ...
e271cc0d25015f4be6c88bd7731444644eb352c2
Analyze and fix the following issue in the Linux kernel code: usb: gadget: configfs: Correctly set use_os_string at bind
Problem Details: Once the use_os_string flag is set to true for some functions (e.g. adb/mtp) which need to response the OS string, and then if we re-bind the ConfigFS gadget to use the other functions (e.g. hid) which should not to response the OS string, however, because the use_os_string flag is still true, so the u...
```diff diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index f94ea196ce54..6bcac85c5550 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -1750,6 +1750,8 @@ static int configfs_composite_bind(struct usb_gadget *gadget, cdev->use_os_string = true; cdev->b...
0d7395046bb3e412975bf20bb08b41f34c1cd5da
Analyze and fix the following issue in the Linux kernel code: tools/usb/usbip: fix spelling mistakes in usbipd.c
Problem Details: Correct two occurences of 'seperate' typos on comments in lines 399 and 520. Signed-off-by: Eric Gonçalves <ghatto404@gmail.com> Link: https://lore.kernel.org/r/20250825041739.8117-1-ghatto404@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/tools/usb/usbip/src/usbipd.c b/tools/usb/usbip/src/usbipd.c index 48398a78e88a..3e22b651c754 100644 --- a/tools/usb/usbip/src/usbipd.c +++ b/tools/usb/usbip/src/usbipd.c @@ -396,7 +396,7 @@ static int listen_all_addrinfo(struct addrinfo *ai_head, int sockfdlist[], usbip_net_set_reuseaddr(sock)...
b570b346ddd727c4b41743a6a2f49e7217c5317f
Analyze and fix the following issue in the Linux kernel code: usb: phy: twl6030: Fix incorrect type for ret
Problem Details: In the twl6030_usb_probe(), the variable ret is declared as a u32 type. However, since ret may receive -ENODEV when accepting the return value of omap_usb2_set_comparator().Therefore, its type should be changed to int. Fixes: 0e98de67bacba ("usb: otg: make twl6030_usb as a comparator driver to omap_us...
```diff diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c index 49d79c1257f3..8c09db750bfd 100644 --- a/drivers/usb/phy/phy-twl6030-usb.c +++ b/drivers/usb/phy/phy-twl6030-usb.c @@ -328,9 +328,8 @@ static int twl6030_set_vbus(struct phy_companion *comparator, bool enabled) static int...
d2ad26e7b67e5a3d73221daf8207e848dd819bd4
Analyze and fix the following issue in the Linux kernel code: powerpc/44x: Drop legacy-of-mm-gpiochip.h header
Problem Details: Remove legacy-of-mm-gpiochip.h header file. The above mentioned file provides an OF API that's deprecated. There is no agnostic alternatives to it and we have to open code the logic which was hidden behind of_mm_gpiochip_add_data(). Note, most of the GPIO drivers are using their own labeling schemas an...
```diff diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 35a1f4b9f827..fc79f8466933 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig @@ -231,7 +231,6 @@ config PPC4xx_GPIO bool "PPC4xx GPIO support" depends on 44x select GPIOLIB - s...
7f9bcf13069731fac48d8b44086fab179fbc04c9
Analyze and fix the following issue in the Linux kernel code: powerpc/cpm2: Drop legacy-of-mm-gpiochip.h header
Problem Details: Remove legacy-of-mm-gpiochip.h header file. The above mentioned file provides an OF API that's deprecated. There is no agnostic alternatives to it and we have to open code the logic which was hidden behind of_mm_gpiochip_add_data(). Note, most of the GPIO drivers are using their own labeling schemas an...
```diff diff --git a/arch/powerpc/platforms/8xx/Kconfig b/arch/powerpc/platforms/8xx/Kconfig index 8623aebfac48..abb2b45b2789 100644 --- a/arch/powerpc/platforms/8xx/Kconfig +++ b/arch/powerpc/platforms/8xx/Kconfig @@ -101,7 +101,6 @@ comment "Generic MPC8xx Options" config 8xx_GPIO bool "GPIO API Support" select ...
55a1ed25fa8b6fefbbc61704fd8fb2e4fe8ffc6f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: apple: t8015: Fix PCIE power domains dependencies
Problem Details: Fix the dependency topology of PCIE power domain nodes, as required by ANS2 NVME controller. Signed-off-by: Nick Chan <towinchenmi@gmail.com> Link: https://lore.kernel.org/r/20250826-t8015-nvme-v5-3-caee6ab00144@gmail.com Signed-off-by: Sven Peter <sven@kernel.org>
```diff diff --git a/arch/arm64/boot/dts/apple/t8015-pmgr.dtsi b/arch/arm64/boot/dts/apple/t8015-pmgr.dtsi index e238c2d2732f..1d8da9c7863e 100644 --- a/arch/arm64/boot/dts/apple/t8015-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t8015-pmgr.dtsi @@ -658,6 +658,7 @@ #power-domain-cells = <0>; #reset-cells = <0>; l...
56e6f77ebd31250757ffbdcbd9baa78ab27895a8
Analyze and fix the following issue in the Linux kernel code: crypto: hisilicon/sec2 - Fix false-positive warning of uninitialised qp_ctx
Problem Details: Fix the false-positive warning of qp_ctx being unitialised in sec_request_init. The value of ctx_q_num defaults to 2 and is guaranteed to be non-zero. Thus qp_ctx is always initialised. However, the compiler is not aware of this constraint on ctx_q_num. Restructure the loop so that it is obvious to...
```diff diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c b/drivers/crypto/hisilicon/sec2/sec_crypto.c index d044ded0f290..31590d01139a 100644 --- a/drivers/crypto/hisilicon/sec2/sec_crypto.c +++ b/drivers/crypto/hisilicon/sec2/sec_crypto.c @@ -1944,14 +1944,12 @@ static void sec_request_uninit(struct sec_req *re...