id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
7d9351435ebba08bbb60f42793175c9dc714d2fb
Analyze and fix the following issue in the Linux kernel code: netdevsim: drop PSP ext ref on forward failure
Problem Details: nsim_do_psp() takes an extra reference to the PSP skb extension so the extension survives __dev_forward_skb(). That forward path scrubs the skb and drops attached skb extensions before nsim_psp_handle_ext() can reattach the PSP metadata. If __dev_forward_skb() fails in nsim_forward_skb(), the function...
```diff diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c index 5ec028a00c62..3645ebde049a 100644 --- a/drivers/net/netdevsim/netdev.c +++ b/drivers/net/netdevsim/netdev.c @@ -109,8 +109,11 @@ static int nsim_forward_skb(struct net_device *tx_dev, int ret; ret = __dev_forward_skb(rx_dev...
888329ba6c8baa7908e08561c6e89d3fc5680131
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Avoid spurious failures perf_link
Problem Details: perf_link creates a system-wide perf event pinned to CPU 0 (pid=-1, cpu=0) and also pins the test thread to CPU 0. Under concurrent selftests this can lead to cross-test interference and CPU 0 contention, making the test flaky. Create a per-task perf event instead (pid=0, cpu=-1) and drop CPU pinning ...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/perf_link.c b/tools/testing/selftests/bpf/prog_tests/perf_link.c index d940ff87fa08..9e3a0d217af8 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_link.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_link.c @@ -1,8 +1,7 @@ // SPDX-License-Identifi...
22214fb2fad04d23c40598ec9be21ea638d75841
Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: micrel: KSZ8041RNLI supports LED mode
Problem Details: Micrel KSZ8041RNLI supports LED mode, just like KSZ8041. This fixes (a.o.) the following "make dtbs_check" warning: arch/arm/boot/dts/renesas/r8a7791-koelsch.dtb: ethernet-phy@1 (ethernet-phy-id0022.1537): False schema does not allow 1 from schema $id: http://devicetree.org/schemas/net/micre...
```diff diff --git a/Documentation/devicetree/bindings/net/micrel.yaml b/Documentation/devicetree/bindings/net/micrel.yaml index 5d25f0d0a508..6fa568057b92 100644 --- a/Documentation/devicetree/bindings/net/micrel.yaml +++ b/Documentation/devicetree/bindings/net/micrel.yaml @@ -54,6 +54,7 @@ properties: KSZ8021:...
68f479de0e013d0c27432240f35bf2a3cc3260f6
Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: use size_t for strlen result in xbc_node_match_prefix()
Problem Details: lib/bootconfig.c:198:19: warning: conversion from 'size_t' to 'int' may change value [-Wconversion] lib/bootconfig.c:200:33: warning: conversion to '__kernel_size_t' from 'int' may change the sign of the result [-Wsign-conversion] strlen() returns size_t but the result was stored in an int. The...
```diff diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 94ae6662531d..9f059bb68e41 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -195,7 +195,7 @@ static bool __init xbc_node_match_prefix(struct xbc_node *node, const char **prefix) { const char *p = xbc_node_get_data(node); - int len = strlen(p); + ...
8f3e79397a980512c2329b3445ebe7258e2d3f01
Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: fix signed comparison in xbc_node_get_data()
Problem Details: lib/bootconfig.c:188:28: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' [-Wsign-compare] The local variable 'offset' is declared as int, but xbc_data_size is size_t. Change the type to size_t to match and eliminate the warning. Link: https://lore.kernel.org/...
```diff diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 8c50e942d747..94ae6662531d 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -183,7 +183,7 @@ struct xbc_node * __init xbc_node_get_next(struct xbc_node *node) */ const char * __init xbc_node_get_data(struct xbc_node *node) { - int offset = node->...
909bb3a6c53faf86e96694ed09e7f32cad11ba2e
Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: validate child node index in xbc_verify_tree()
Problem Details: xbc_verify_tree() validates that each node's next index is within bounds, but does not check the child index. Add the same bounds check for the child field. Without this check, a corrupt bootconfig that passes next-index validation could still trigger an out-of-bounds memory access via an invalid chi...
```diff diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 0663b74ad131..8c50e942d747 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -824,6 +824,10 @@ static int __init xbc_verify_tree(void) return xbc_parse_error("No closing brace", xbc_node_get_data(xbc_nodes + i)); } + if (xbc_nodes[i].chil...
ae9bf4d3835fb1cd3f79ea74e96e6ab6cfe8f415
Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: increment xbc_node_num after node init succeeds
Problem Details: Move the xbc_node_num increment to after xbc_init_node() so a failed init does not leave a partially initialized node counted in the array. If xbc_init_node() fails on a data offset at the boundary of a maximum-size bootconfig, the pre-incremented count causes subsequent tree verification and traversa...
```diff diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 885886212248..c02b11a1b501 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -429,9 +429,10 @@ static struct xbc_node * __init xbc_add_node(char *data, uint16_t flag) if (xbc_node_num == XBC_NODE_MAX) return NULL; - node = &xbc_nodes[xbc_node_n...
1c04fa80118cc20a943b9ec5b861a824fa90db1c
Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: fix off-by-one in xbc_verify_tree() next node check
Problem Details: Valid node indices are 0 to xbc_node_num-1, so a next value equal to xbc_node_num is out of bounds. Use >= instead of > to catch this. A malformed or corrupt bootconfig could pass tree verification with an out-of-bounds next index. On subsequent tree traversal at boot time, xbc_node_get_next() would...
```diff diff --git a/lib/bootconfig.c b/lib/bootconfig.c index ee2f072831aa..885886212248 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -817,7 +817,7 @@ static int __init xbc_verify_tree(void) } for (i = 0; i < xbc_node_num; i++) { - if (xbc_nodes[i].next > xbc_node_num) { + if (xbc_nodes[i].next >= x...
7eaf074e9109860bfc2f7b01958059e9f2d4a76e
Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: clean up comment typos and bracing
Problem Details: Fixes kerneldoc typos ("initiized" and "uder") and adds a missing blank line. Also fixes inconsistent if/else bracing in __xbc_add_key() and elsewhere. Link: https://lore.kernel.org/all/20260318155919.78168-2-objecting@objecting.org/ Signed-off-by: Josh Law <objecting@objecting.org> Signed-off-by: Ma...
```diff diff --git a/lib/bootconfig.c b/lib/bootconfig.c index e88d0221a826..874e04f9a0bd 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -79,6 +79,7 @@ static inline void xbc_free_mem(void *addr, size_t size, bool early) free(addr); } #endif + /** * xbc_get_info() - Get the information of loaded boot co...
3b2c2ab4ceb82af484310c3087541eab00ea288b
Analyze and fix the following issue in the Linux kernel code: tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure
Problem Details: If fstat() fails after open() succeeds, the function returns without closing the file descriptor. Also preserve errno across close(), since close() may overwrite it before the error is returned. Link: https://lore.kernel.org/all/20260318155847.78065-3-objecting@objecting.org/ Fixes: 950313ebf79c ("to...
```diff diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c index 55d59ed507d5..643f707b8f1d 100644 --- a/tools/bootconfig/main.c +++ b/tools/bootconfig/main.c @@ -162,8 +162,11 @@ static int load_xbc_file(const char *path, char **buf) if (fd < 0) return -errno; ret = fstat(fd, &stat); - if (ret < 0) ...
bb288d7d869e86d382f35a0e26242c5ccb05ca82
Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: check xbc_init_node() return in override path
Problem Details: The ':=' override path in xbc_parse_kv() calls xbc_init_node() to re-initialize an existing value node but does not check the return value. If xbc_init_node() fails (data offset out of range), parsing silently continues with stale node data. Add the missing error check to match the xbc_add_node() call...
```diff diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 2da049216fe0..e88d0221a826 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -723,7 +723,8 @@ static int __init xbc_parse_kv(char **k, char *v, int op) if (op == ':') { unsigned short nidx = child->next; - xbc_init_node(child, v, XBC_VALUE)...
201bc182ad6333468013f1af0719ffe125826b6a
Analyze and fix the following issue in the Linux kernel code: x86/mce/amd: Check SMCA feature bit before accessing SMCA MSRs
Problem Details: People do effort to inject MCEs into guests in order to simulate/test handling of hardware errors. The real use case behind it is testing the handling of SIGBUS which the memory failure code sends to the process. If that process is QEMU, instead of killing the whole guest, the MCE can be injected into...
```diff diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c index da13c1e37f87..a030ee4cecc2 100644 --- a/arch/x86/kernel/cpu/mce/amd.c +++ b/arch/x86/kernel/cpu/mce/amd.c @@ -875,13 +875,18 @@ void amd_clear_bank(struct mce *m) { amd_reset_thr_limit(m->bank); - /* Clear MCA_DESTAT for all d...
deffe1edba626d474fef38007c03646ca5876a0e
Analyze and fix the following issue in the Linux kernel code: module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
Problem Details: When setting a charp module parameter, the param_set_charp() function allocates memory to store a copy of the input value. Later, when the module is potentially unloaded, the destroy_params() function is called to free this allocated memory. However, destroy_params() is available only when CONFIG_SYSF...
```diff diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 7d22d4c4ea2e..8667f72503d9 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -426,14 +426,9 @@ extern char *parse_args(const char *name, void *arg, parse_unknown_fn unknown); /* Called by module ...
b47bcab6ee92d5ca6ba55c06b9a503e2663e942f
Analyze and fix the following issue in the Linux kernel code: rtc: add data_race() in rtc_dev_poll()
Problem Details: The unlocked read of rtc->irq_data in rtc_dev_poll() can race with the write in rtc_handle_legacy_irq() and also, theoretically, with the write in rtc_dev_read(). These races should be safe (see inline comment), thus annotate the read with data_race() for KCSAN. Reported-by: syzbot+2d4127acca35ed7b31...
```diff diff --git a/drivers/rtc/dev.c b/drivers/rtc/dev.c index baf1a8ca8b2b..8ba7c25d2565 100644 --- a/drivers/rtc/dev.c +++ b/drivers/rtc/dev.c @@ -195,7 +195,16 @@ static __poll_t rtc_dev_poll(struct file *file, poll_table *wait) poll_wait(file, &rtc->irq_queue, wait); - data = rtc->irq_data; + /* + * This r...
86259558e422b250aa6aa57163a6d759074573f5
Analyze and fix the following issue in the Linux kernel code: hwmon: (pmbus/isl68137) Fix unchecked return value and use sysfs_emit()
Problem Details: isl68137_avs_enable_show_page() uses the return value of pmbus_read_byte_data() without checking for errors. If the I2C transaction fails, a negative error code is passed through bitwise operations, producing incorrect output. Add an error check to propagate the return value if it is negative. Additio...
```diff diff --git a/drivers/hwmon/pmbus/isl68137.c b/drivers/hwmon/pmbus/isl68137.c index 97b61836f53a..e7dac26b5be6 100644 --- a/drivers/hwmon/pmbus/isl68137.c +++ b/drivers/hwmon/pmbus/isl68137.c @@ -98,8 +98,11 @@ static ssize_t isl68137_avs_enable_show_page(struct i2c_client *client, { int val = pmbus_read_byte...
81fca7087466bd81fff7100d824b2c788edf7a97
Analyze and fix the following issue in the Linux kernel code: ktest: Store failure logs also in fatal paths
Problem Details: STORE_FAILURES was only saved from fail(), so paths that reached dodie() could exit without preserving failure logs. That includes fatal hook paths such as: POST_BUILD_DIE = 1 and ordinary failures when: DIE_ON_FAILURE = 1 Call save_logs("fail", ...) from dodie() too so fatal failures keep the...
```diff diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index de99b82d16ad..112f9ca2444b 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -1635,6 +1635,11 @@ sub dodie { print " See $opt{LOG_FILE} for more info.\n"; } + # Fatal paths bypass fail(), so ...
cdbefe9d4029d4834d404f7ba13a960b38a69e88
Analyze and fix the following issue in the Linux kernel code: tools/power turbostat: Fix delimiter bug in print functions
Problem Details: Commands that add counters, such as 'turbostat --show C1,C1+' display merged columns without a delimiter. This is caused by the bad syntax: '(*printed++ ? delim : "")', shared by print_name()/print_hex_value()/print_decimal_value()/print_float_value() Use '((*printed)++ ? delim : "")' to correctly in...
```diff diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 3487548841e1..34e2143cd4b3 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -2837,29 +2837,29 @@ static inline int print_name(int width, int *printed, char *delim, ch...
ebbc5ce26eca294cf5f4e63399de63d086900442
Analyze and fix the following issue in the Linux kernel code: perf tools: Remove duplicate include of debug.h
Problem Details: Remove duplicate inclusion of debug.h in symbol.c to clean up redundant code. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
```diff diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index bd811b2b7890..ce9195717f44 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -26,7 +26,6 @@ #include "demangle-rust-v0.h" #include "dso.h" #include "util.h" // lsdir() -#include "debug.h" #include "event.h" #includ...
35cd0098eeb9601844cb82c4402fa7e6576c8b01
Analyze and fix the following issue in the Linux kernel code: perf: tools: cs-etm: Enhance raw Coresight trace debug display
Problem Details: When compiling perf with CORESIGHT=1, an additional build option may be used: CSTRACE_RAW=1, which will cause the CoreSight formatted trace frames to be printed out during a perf --dump command. This is useful when investigating issues with trace generation, decode or possible data corruption. e.g. fo...
```diff diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c index 8592a778b26a..91d3feb18aaf 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c @@ -22,12 +22,15 @@ /* use raw logging */ #ifdef CS...
6c478e7b3eba3f387a2d6c749e3e3ee0f8ad1c53
Analyze and fix the following issue in the Linux kernel code: perf: tools: cs-etm: Fix print issue for Coresight debug in ETE/TRBE trace
Problem Details: Building perf with CORESIGHT=1 and the optional CSTRACE_RAW=1 enables additional debug printing of raw trace data when using command:- perf report --dump. This raw trace prints the CoreSight formatted trace frames, which may be used to investigate suspected issues with trace quality / corruption / dec...
```diff diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c index 3050fe212666..8592a778b26a 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c @@ -237,46 +237,24 @@ cs_etm_decoder__init_def_logger...
c4192754e836e0ffed95833509b6ada975b74418
Analyze and fix the following issue in the Linux kernel code: fs/tests: exec: Remove bad test vector
Problem Details: Drop an unusable test in the bprm stack limits. Reported-by: Guenter Roeck <linux@roeck-us.net> Closes: https://lore.kernel.org/all/a3e9b1c2-40c1-45df-9fa2-14ee6a7b3fe2@roeck-us.net Fixes: 60371f43e56b ("exec: Add KUnit test for bprm_stack_limits()") Signed-off-by: Kees Cook <kees@kernel.org>
```diff diff --git a/fs/tests/exec_kunit.c b/fs/tests/exec_kunit.c index f412d1a0f6bb..1c32cac098cf 100644 --- a/fs/tests/exec_kunit.c +++ b/fs/tests/exec_kunit.c @@ -94,9 +94,6 @@ static const struct bprm_stack_limits_result bprm_stack_limits_results[] = { { { .p = ULONG_MAX, .rlim_stack.rlim_cur = 4 * (_STK_LIM / 4...
b826d2c0b0ecb844c84431ba6b502e744f5d919a
Analyze and fix the following issue in the Linux kernel code: pmdomain: bcm: bcm2835-power: Increase ASB control timeout
Problem Details: The bcm2835_asb_control() function uses a tight polling loop to wait for the ASB bridge to acknowledge a request. During intensive workloads, this handshake intermittently fails for V3D's master ASB on BCM2711, resulting in "Failed to disable ASB master for v3d" errors during runtime PM suspend. As a c...
```diff diff --git a/drivers/pmdomain/bcm/bcm2835-power.c b/drivers/pmdomain/bcm/bcm2835-power.c index 0450202bbee2..eee87a300532 100644 --- a/drivers/pmdomain/bcm/bcm2835-power.c +++ b/drivers/pmdomain/bcm/bcm2835-power.c @@ -9,6 +9,7 @@ #include <linux/clk.h> #include <linux/delay.h> #include <linux/io.h> +#includ...
b9465b04de4b90228de03db9a1e0d56b00814366
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: pl353: make sure optimal timings are applied
Problem Details: Timings of the nand are adjusted by pl35x_nfc_setup_interface() but actually applied by the pl35x_nand_select_target() function. If there is only one nand chip, the pl35x_nand_select_target() will only apply the timings once since the test at its beginning will always be true after the first call to th...
```diff diff --git a/drivers/mtd/nand/raw/pl35x-nand-controller.c b/drivers/mtd/nand/raw/pl35x-nand-controller.c index 947fd86ac5fa..f2c65eb7a8d9 100644 --- a/drivers/mtd/nand/raw/pl35x-nand-controller.c +++ b/drivers/mtd/nand/raw/pl35x-nand-controller.c @@ -862,6 +862,9 @@ static int pl35x_nfc_setup_interface(struct n...
ac512cd351f7e4ab4569f6a52c116f4ab3a239cc
Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: Fix RDCR controller capability core check
Problem Details: Commit 5008c3ec3f89 ("mtd: spi-nor: core: Check read CR support") adds a controller check to make sure the core will not use CR reads on controllers not supporting them. The approach is valid but the fix is incorrect. Unfortunately, the author could not catch it, because the expected behavior was met. ...
```diff diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 8ffeb41c3e08..13201908a69f 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -2466,7 +2466,7 @@ spi_nor_spimem_adjust_hwcaps(struct spi_nor *nor, u32 *hwcaps) spi_nor_spimem_setup_op(nor, &op, nor->reg_prot...
c23df30915f83e7257c8625b690a1cece94142a0
Analyze and fix the following issue in the Linux kernel code: erofs: add GFP_NOIO in the bio completion if needed
Problem Details: The bio completion path in the process context (e.g. dm-verity) will directly call into decompression rather than trigger another workqueue context for minimal scheduling latencies, which can then call vm_map_ram() with GFP_KERNEL. Due to insufficient memory, vm_map_ram() may generate memory swapping ...
```diff diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 3977e42b9516..fe8121df9ef2 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -1445,6 +1445,7 @@ static void z_erofs_decompress_kickoff(struct z_erofs_decompressqueue *io, int bios) { struct erofs_sb_info *const sbi = EROFS_SB(io->sb); +...
c0e296f257671ba10249630fe58026f29e4804d9
Analyze and fix the following issue in the Linux kernel code: mshv: Fix error handling in mshv_region_pin
Problem Details: The current error handling has two issues: First, pin_user_pages_fast() can return a short pin count (less than requested but greater than zero) when it cannot pin all requested pages. This is treated as success, leading to partially pinned regions being used, which causes memory corruption. Second, ...
```diff diff --git a/drivers/hv/mshv_regions.c b/drivers/hv/mshv_regions.c index c28aac0726de..fdffd4f002f6 100644 --- a/drivers/hv/mshv_regions.c +++ b/drivers/hv/mshv_regions.c @@ -314,15 +314,17 @@ int mshv_region_pin(struct mshv_mem_region *region) ret = pin_user_pages_fast(userspace_addr, nr_pages, FOLL...
df3eec203b940bad98a7c0b7ec0edaaaa8cd0247
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: validate full match when resolving quirk aliases
Problem Details: get_alias_quirk() resolves a quirk for an aliased USB ID by scanning usb_audio_ids[], but it currently checks only the vendor/product pair. This is weak for quirk table entries that also depend on additional USB_DEVICE_ID match fields, such as device or interface class, subclass, protocol, interface n...
```diff diff --git a/sound/usb/card.c b/sound/usb/card.c index fd81f32a66fb..f42d72cd0378 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -866,19 +866,25 @@ static void find_last_interface(struct snd_usb_audio *chip) /* look for the corresponding quirk */ static const struct snd_usb_audio_quirk * -get_alias...
591721223be9e28f83489a59289579493b8e3d83
Analyze and fix the following issue in the Linux kernel code: ALSA: asihpi: avoid write overflow check warning
Problem Details: clang-22 rightfully warns that the memcpy() in adapter_prepare() copies between different structures, crossing the boundary of nested structures inside it: In file included from sound/pci/asihpi/hpimsgx.c:13: In file included from include/linux/string.h:386: include/linux/fortify-string.h:569:4: error...
```diff diff --git a/sound/pci/asihpi/hpimsgx.c b/sound/pci/asihpi/hpimsgx.c index b68e6bfbbfba..ed1c7b774436 100644 --- a/sound/pci/asihpi/hpimsgx.c +++ b/sound/pci/asihpi/hpimsgx.c @@ -581,8 +581,10 @@ static u16 adapter_prepare(u16 adapter) HPI_ADAPTER_OPEN); hm.adapter_index = adapter; hw_entry_point(&hm, &h...
390c784709f266273d1dca24c5f93c42b05cb198
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix line length warning
Problem Details: Break a long function call across two lines in order to make code easier to read and also comply with the Linux coding style. Problem was found using checkpatch.pl tool. Signed-off-by: Andrea Poldi <andrea@riposetti.com> Link: https://patch.msgid.link/20260317165845.12594-1-andrea@riposetti.com Signe...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index 8cd2fdbe417d..c1185c25ed36 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -1769,7 +1769,8 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned ...
c1dd45eed8a4eadca81d615f9d9aef9f7613fe8f
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: remove unnecessary spaces in rtw_security.c
Problem Details: Fix checkpatch.pl warnings about spaces after casts, along with other double spaces. Signed-off-by: Joshua Gu <joshuagu789@gmail.com> Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/abdlQzChJylv8evY@ubuntuarm64 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundat...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index 54e89f192b18..b98bc1aa9cbe 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -658,8 +658,8 @@ static void construct_mic_iv(u8 *mic_iv, ...
9a6a2091324ab6525951651b3700e3bea0fe9a89
Analyze and fix the following issue in the Linux kernel code: cxl/mbox: Use proper endpoint validity check upon sanitize
Problem Details: Fuzzying CXL triggered: BUG: KASAN: null-ptr-deref in cxl_num_decoders_committed+0x3e/0x80 drivers/cxl/core/port.c:49 Read of size 4 at addr 0000000000000642 by task syz.0.97/2282 CPU: 2 UID: 0 PID: 2282 Comm: syz.0.97 Not tainted 7.0.0-rc1-gebd11be59f74-dirty #494 PREEMPT(full) Hardware name: QEMU S...
```diff diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index e7a6452bf544..12386d912705 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -1301,7 +1301,7 @@ int cxl_mem_sanitize(struct cxl_memdev *cxlmd, u16 cmd) * Require an endpoint to be safe otherwise the driver can not * b...
6e57c05a06b58ab72238661e770e1613fbb353c3
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix blank line style in rtw_io.c
Problem Details: Fix checkpatch style check for blank line placement after functions in rtw_io.c. Signed-off-by: Lukas Kraft <rebootrequired42@gmail.com> Reviewed-by: Bera Yüzlü <b9788213@gmail.com> Link: https://patch.msgid.link/20260312173903.19822-1-rebootrequired42@gmail.com Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c b/drivers/staging/rtl8723bs/core/rtw_io.c index d2fece08074b..53ba99e1de00 100644 --- a/drivers/staging/rtl8723bs/core/rtw_io.c +++ b/drivers/staging/rtl8723bs/core/rtw_io.c @@ -75,6 +75,7 @@ int rtw_write8(struct adapter *adapter, u32 addr, u8 val) retur...
e66cd5a8f2b48eb513867dcf0c3d25d8a405ec57
Analyze and fix the following issue in the Linux kernel code: staging: octeon: remove BUG() call
Problem Details: An unreachable default case calls BUG(). Remove the entire default case, as the three possible cases are already addressed. Signed-off-by: Mark Adamenko <marusik.adamenko@gmail.com> Link: https://patch.msgid.link/20260310014514.40293-1-marusik.adamenko@gmail.com Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index f5bbedac6a65..14d10659bce7 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -449,8 +449,6 @@ skip_xmit: case QUEUE_CORE: __skb_queue_tail(&priv->tx_free_list[qos], s...
84db3719d27337b952fe382413d341fb95351130
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: imx: avoid calling imx suspend/resume callbacks twice
Problem Details: If a runtime suspend is executed followed by a system suspend, the driver may invoke dwc3_imx_suspend() twice, which causes enable_irq() to be called twice as well. This leads to an unbalanced IRQ state and may trigger warnings or malfunction. Prevent this by checking the pm_suspended flag before runni...
```diff diff --git a/drivers/usb/dwc3/dwc3-imx.c b/drivers/usb/dwc3/dwc3-imx.c index 303708f7d79a..973a486b544d 100644 --- a/drivers/usb/dwc3/dwc3-imx.c +++ b/drivers/usb/dwc3/dwc3-imx.c @@ -288,6 +288,9 @@ static void dwc3_imx_remove(struct platform_device *pdev) static void dwc3_imx_suspend(struct dwc3_imx *dwc_im...
f50200dd44125e445a6164e88c217472fa79cdbc
Analyze and fix the following issue in the Linux kernel code: usb: gadget: dummy_hcd: fix premature URB completion when ZLP follows partial transfer
Problem Details: When a gadget request is only partially transferred in transfer() because the per-frame bandwidth budget is exhausted, the loop advances to the next queued request. If that next request is a zero-length packet (ZLP), len evaluates to zero and the code takes the unlikely(len == 0) path, which sets is_sh...
```diff diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index e55701575857..f094491b1041 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -1538,6 +1538,12 @@ top: /* rescan to continue with any other queued i/o */ if (rescan) goto...
1a122198ee26d2f328edae802b2ca4fa0518a20a
Analyze and fix the following issue in the Linux kernel code: dwc3: google: Fix PM domain leak in dwc3_google_probe()
Problem Details: When syscon_regmap_lookup_by_phandle_args() fails, the function was returning directly without cleaning up the power domain initialized earlier by dwc3_google_pm_domain_init(). Fix by jumping to err_deinit_pdom to properly clean up resources. Fixes: 8995a37371bf4 ("usb: dwc3: Add Google Tensor SoC DW...
```diff diff --git a/drivers/usb/dwc3/dwc3-google.c b/drivers/usb/dwc3/dwc3-google.c index 2105c72af753..4ca567ec01d0 100644 --- a/drivers/usb/dwc3/dwc3-google.c +++ b/drivers/usb/dwc3/dwc3-google.c @@ -385,8 +385,9 @@ static int dwc3_google_probe(struct platform_device *pdev) "google,usb-cfg-csr", ...
b2f6648c735639d246dc5f98f377b69d5374c2bd
Analyze and fix the following issue in the Linux kernel code: usb: hcd: queue wakeup_work to system_freezable_wq workqueue
Problem Details: After commit 4fb352df14de ("PM: sleep: Do not flag runtime PM workqueue as freezable"), pm_wq workqueue will be unfreezable during system pm. This brings issue as below: [ 344.255749] ------------[ cut here ]------------ [ 344.277740] URB 000000004aae4ad1 submitted while active [ 344.282996] WARNIN...
```diff diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index dee842ea6931..89221f1ce769 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2403,7 +2403,7 @@ void usb_hcd_resume_root_hub (struct usb_hcd *hcd) if (hcd->rh_registered) { pm_wakeup_event(&hcd->self.root_hub->dev, 0); ...
e002e92e88e12457373ed096b18716d97e7bbb20
Analyze and fix the following issue in the Linux kernel code: usb: gadget: u_ether: Fix NULL pointer deref in eth_get_drvinfo
Problem Details: Commit ec35c1969650 ("usb: gadget: f_ncm: Fix net_device lifecycle with device_move") reparents the gadget device to /sys/devices/virtual during unbind, clearing the gadget pointer. If the userspace tool queries on the surviving interface during this detached window, this leads to a NULL pointer derefe...
```diff diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c index 23c7c0cdf202..59d85d6a84a8 100644 --- a/drivers/usb/gadget/function/u_ether.c +++ b/drivers/usb/gadget/function/u_ether.c @@ -113,8 +113,10 @@ static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvin...
2ca9e46f8f1f5a297eb0ac83f79d35d5b3a02541
Analyze and fix the following issue in the Linux kernel code: USB: dummy-hcd: Fix interrupt synchronization error
Problem Details: This fixes an error in synchronization in the dummy-hcd driver. The error has a somewhat involved history. The synchronization mechanism was introduced by commit 7dbd8f4cabd9 ("USB: dummy-hcd: Fix erroneous synchronization change"), which added an emulated "interrupts enabled" flag together with code...
```diff diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index 860ee7d3ef98..e55701575857 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -913,21 +913,6 @@ static int dummy_pullup(struct usb_gadget *_gadget, int value) spin_lock_irqsave(&...
616a63ff495df12863692ab3f9f7b84e3fa7a66d
Analyze and fix the following issue in the Linux kernel code: USB: dummy-hcd: Fix locking/synchronization error
Problem Details: Syzbot testing was able to provoke an addressing exception and crash in the usb_gadget_udc_reset() routine in drivers/usb/gadgets/udc/core.c, resulting from the fact that the routine was called with a second ("driver") argument of NULL. The bad caller was set_link_state() in dummy_hcd.c, and the probl...
```diff diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index c9eca90376e2..860ee7d3ef98 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -462,8 +462,13 @@ static void set_link_state(struct dummy_hcd *dum_hcd) /* Report reset and disco...
d2d8c17ac01a1b1f638ea5d340a884ccc5015186
Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: validate connector number in ucsi_notify_common()
Problem Details: The connector number extracted from CCI via UCSI_CCI_CONNECTOR() is a 7-bit field (0-127) that is used to index into the connector array in ucsi_connector_change(). However, the array is only allocated for the number of connectors reported by the device (typically 2-4 entries). A malicious or malfunct...
```diff diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index f38a4d7ebc42..8333bdaf5566 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -43,8 +43,13 @@ void ucsi_notify_common(struct ucsi *ucsi, u32 cci) if (cci & UCSI_CCI_BUSY) return; - if (UCSI_CCI...
8a768552f7a8276fb9e01d49773d2094ace7c8f1
Analyze and fix the following issue in the Linux kernel code: usb: usbtmc: Flush anchored URBs in usbtmc_release
Problem Details: When calling usbtmc_release, pending anchored URBs must be flushed or killed to prevent use-after-free errors (e.g. in the HCD giveback path). Call usbtmc_draw_down() to allow anchored URBs to be completed. Fixes: 4f3c8d6eddc2 ("usb: usbtmc: Support Read Status Byte with SRQ per file") Reported-by: sy...
```diff diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index d39bbfd7fd18..bd9347804dec 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -254,6 +254,9 @@ static int usbtmc_release(struct inode *inode, struct file *file) list_del(&file_data->file_elem); spin_unlock_...
e1eabb072c75681f78312c484ccfffb7430f206e
Analyze and fix the following issue in the Linux kernel code: usb: gadget: u_ether: Fix race between gether_disconnect and eth_stop
Problem Details: A race condition between gether_disconnect() and eth_stop() leads to a NULL pointer dereference. Specifically, if eth_stop() is triggered concurrently while gether_disconnect() is tearing down the endpoints, eth_stop() attempts to access the cleared endpoint descriptor, causing the following NPE: Un...
```diff diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c index 1a9e7c495e2e..23c7c0cdf202 100644 --- a/drivers/usb/gadget/function/u_ether.c +++ b/drivers/usb/gadget/function/u_ether.c @@ -1223,6 +1223,11 @@ void gether_disconnect(struct gether *link) DBG(dev, "%s\n", __fun...
fca8688a6798f6fee6b86ce0bc39d1cd0b1c8b8a
Analyze and fix the following issue in the Linux kernel code: clk: imx: pll14xx: Use unsigned format specifier
Problem Details: The debug outputs use %d for clock rates resulting in negative clock rate during rate calculation. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://patch.msgid.link/20260317121953....
```diff diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index 7552aaafc339..39600ee22be3 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -151,7 +151,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat /* First try if we can...
381133848a033c2086cf9cafb226f425bd0414ff
Analyze and fix the following issue in the Linux kernel code: usb: typec: ps883x: Fix Oops at unbind
Problem Details: When trying to unbind a device in order to bind to it vfio-platform as: echo bc0000.geniqup > /sys/bus/platform/devices/bc0000.geniqup/driver/unbind I get the following Oops: [ 436.478639] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 [ 436.487762] Mem abo...
```diff diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c index 5f2879749769..1256252eceed 100644 --- a/drivers/usb/typec/mux/ps883x.c +++ b/drivers/usb/typec/mux/ps883x.c @@ -444,6 +444,7 @@ static int ps883x_retimer_probe(struct i2c_client *client) goto err_switch_unregister; } + i2c...
b84cc80610a8ce036deb987f056ce3196ead7f1e
Analyze and fix the following issue in the Linux kernel code: usb: port: add delay after usb_hub_set_port_power()
Problem Details: When a port is disabled, an attached device will be disconnected. This causes a port-status-change event, which will race with hub autosuspend (if the disabled port was the only connected port on its hub), causing an immediate resume and a second autosuspend. Both of these can be avoided by adding a ...
```diff diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index b6cdea7e9521..b1364f0c384c 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -155,6 +155,7 @@ static ssize_t disable_store(struct device *dev, struct device_attribute *attr, usb_disconnect(&port_dev->child); rc = usb...
b0dd9345c3484f6d5963dee1cd4e0f3b5149947e
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add Shenzhen Corechips Microelectronics
Problem Details: Add Shenzhen Corechips Microelectronics Co., Ltd., which is a company producing chips for USB accessories Link: http://www.corechip-sz.com/enproducts.asp Signed-off-by: Alexey Charkov <alchark@flipper.net> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20260311-sl63...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 5e504cebbcda..db654fd97b1d 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -361,6 +361,8 @@ patte...
0c8ee850572b6850a78ef4c83af2acd4909a4519
Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: Add UCSI_USB4_IMPLIES_USB quirk for X1E80100
Problem Details: On X1E80100, when we connect a USB4 capable dock, the PARTNER_FLAGS indicate USB4_GEN3 being set whilst keeping the PARTNER_FLAGS_USB cleared. Due to this, during ucsi_partner_change call, the usb role is marked as ROLE_NONE and passed to DWC3 controller the same way. Fix this by adding UCSI_USB4_IMPL...
```diff diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index 4efbe41d7714..fe1fb8a68a1d 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -1184,8 +1184,10 @@ static void ucsi_partner_change(struct ucsi_connector *con) } } - /* Only notify USB controller...
56dd29088c9d9510c48a8ebad2465248fde36551
Analyze and fix the following issue in the Linux kernel code: usb: iowarrior: remove inherent race with minor number
Problem Details: The driver saves the minor number it gets upon registration in its descriptor for debugging purposes. However, there is inevitably a window between registration and saving the correct minor in a descriptor. During this window the debugging output will be wrong. As wrong debug output is worse than no de...
```diff diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index 18670dfed2e7..5b31e5669d53 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c @@ -74,7 +74,6 @@ struct iowarrior { struct mutex mutex; /* locks this structure */ struct usb_device *udev; /* save off t...
a1678c4e57e0004a94363127309fcc8b388f11ba
Analyze and fix the following issue in the Linux kernel code: USB: usbip: drop redundant device reference
Problem Details: Driver core holds a reference to the USB device while it is bound to a driver and there is no need to take additional references unless the structure is needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spot drivers where an extra reference is need...
```diff diff --git a/drivers/usb/usbip/stub_dev.c b/drivers/usb/usbip/stub_dev.c index 34990b7e2d18..abfa11d6bde7 100644 --- a/drivers/usb/usbip/stub_dev.c +++ b/drivers/usb/usbip/stub_dev.c @@ -267,7 +267,7 @@ static struct stub_device *stub_device_alloc(struct usb_device *udev) if (!sdev) return NULL; - sdev->...
0888c3371ad229ce76675754ce43ae04bb4945e1
Analyze and fix the following issue in the Linux kernel code: USB: apple-mfi-fastcharge: drop redundant device reference
Problem Details: Driver core holds a reference to the USB device while it is bound to a driver and there is no need to take additional references unless the structure is needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spot drivers where an extra reference is need...
```diff diff --git a/drivers/usb/misc/apple-mfi-fastcharge.c b/drivers/usb/misc/apple-mfi-fastcharge.c index 339f6cd2e9b2..af266e19f2fd 100644 --- a/drivers/usb/misc/apple-mfi-fastcharge.c +++ b/drivers/usb/misc/apple-mfi-fastcharge.c @@ -210,7 +210,7 @@ static int mfi_fc_probe(struct usb_device *udev) goto err_free...
b7cce3e2cca9cd78418f3c3784474b778e7996fe
Analyze and fix the following issue in the Linux kernel code: dm: don't report warning when doing deferred remove
Problem Details: If dm_hash_remove_all was called from dm_deferred_remove, it would write a warning "remove_all left %d open device(s)" if there are some other devices active. The warning is bogus, so let's disable it in this case. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reported-by: Zdenek Kabelac <zkab...
```diff diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 3ab8b4beff86..4de734d82444 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -384,7 +384,7 @@ retry: up_write(&_hash_lock); - if (dev_skipped) + if (dev_skipped && !only_deferred) DMWARN("remove_all left %d open device(s)"...
99a2312f69805f4ba92d98a757625e0300a747ab
Analyze and fix the following issue in the Linux kernel code: dm init: ensure device probing has finished in dm-mod.waitfor=
Problem Details: The early_lookup_bdev() function returns successfully when the disk device is present but not necessarily its partitions. In this situation, dm_early_create() fails as the partition block device does not exist yet. In my case, this phenomenon occurs quite often because the device is an SD card with sl...
```diff diff --git a/drivers/md/dm-init.c b/drivers/md/dm-init.c index 7403823384c5..c1bacba92c65 100644 --- a/drivers/md/dm-init.c +++ b/drivers/md/dm-init.c @@ -303,8 +303,10 @@ static int __init dm_init_init(void) } } - if (waitfor[0]) + if (waitfor[0]) { + wait_for_device_probe(); DMINFO("all devices ava...
85d98669fa7f1d3041d962515e45ee6e392db6f8
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: monaco: Reserve full Gunyah metadata region
Problem Details: We observe spurious "Synchronous External Abort" exceptions (ESR=0x96000010) and kernel crashes on Monaco-based platforms. These faults are caused by the kernel inadvertently accessing hypervisor-owned memory that is not properly marked as reserved. >From boot log, The Qualcomm hypervisor reports the ...
```diff diff --git a/arch/arm64/boot/dts/qcom/monaco.dtsi b/arch/arm64/boot/dts/qcom/monaco.dtsi index dbb2273b0ee8..0cb9fd154b68 100644 --- a/arch/arm64/boot/dts/qcom/monaco.dtsi +++ b/arch/arm64/boot/dts/qcom/monaco.dtsi @@ -765,6 +765,11 @@ hwlocks = <&tcsr_mutex 3>; }; + gunyah_md_mem: gunyah-md-region@91...
ca67bd564e94aaa898a2cbb90922ca3cccd0612b
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl: imx-card: initialize playback_only and capture_only
Problem Details: Fix uninitialized variable playback_only and capture_only because graph_util_parse_link_direction() may not write them. Fixes: 1877c3e7937f ("ASoC: imx-card: Add playback_only or capture_only support") Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Kuninori Morimoto <kuni...
```diff diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index 05b4e971a366..a4518fefad69 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -710,6 +710,8 @@ static int imx_card_parse_of(struct imx_card_data *data) link->ops = &imx_aif_ops; } + playback_only = false; + ca...
0e9fc79132ce7ea1e48c388b864382aa38eb0ed4
Analyze and fix the following issue in the Linux kernel code: ASoC: simple-card-utils: Check value of is_playback_only and is_capture_only
Problem Details: The audio-graph-card2 gets the value of 'playback-only' and 'capture_only' property in below sequence, if there is 'playback_only' or 'capture_only' property in port_cpu and port_codec nodes, but no these properties in ep_cpu and ep_codec nodes, the value of playback_only and capture_only will be flush...
```diff diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 9e5be0eaa77f..89d694c2cbdd 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -1183,9 +1183,9 @@ void graph_util_parse_link_direction(struct device_node *np, bool is_...
0a5dbeadf16f32945dce6631c169608f0e131e5a
Analyze and fix the following issue in the Linux kernel code: gpu: nova-core: gsp: fix stale doc comments on command queue methods
Problem Details: Fix some inaccuracies / old doc comments. Reviewed-by: Zhi Wang <zhiw@nvidia.com> Tested-by: Zhi Wang <zhiw@nvidia.com> Signed-off-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260318-cmdq-locking-v5-1-18b37e3f9069@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvid...
```diff diff --git a/drivers/gpu/nova-core/gsp/cmdq.rs b/drivers/gpu/nova-core/gsp/cmdq.rs index efa1aab1568f..f7ca6856ff35 100644 --- a/drivers/gpu/nova-core/gsp/cmdq.rs +++ b/drivers/gpu/nova-core/gsp/cmdq.rs @@ -502,6 +502,7 @@ impl Cmdq { /// /// # Errors /// + /// - `EMSGSIZE` if the command exce...
e8d97c270cb46a2a88739019d0f8547adc7d97da
Analyze and fix the following issue in the Linux kernel code: media: verisilicon: Fix kernel panic due to __initconst misuse
Problem Details: Fix a kernel panic when probing the driver as a module: Unable to handle kernel paging request at virtual address ffffd9c18eb05000 of_find_matching_node_and_match+0x5c/0x1a0 hantro_probe+0x2f4/0x7d0 [hantro_vpu] The imx8mq_vpu_shared_resources array is referenced by variant structures through...
```diff diff --git a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c index 6f8e43b7f157..fa4224de4b99 100644 --- a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c +++ b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c @@ -343,7 +343,7 @@ const struct hantro_varia...
7131f6d909a6546329b71f2bacfdc60cb3e6020e
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: msm8953-xiaomi-daisy: fix backlight
Problem Details: The backlight on this device is connected via 3 strings. Currently, the DT claims only two are present, which results in visible stripes on the display (since every third backlight string remains unconfigured). Fix the number of strings to avoid that. Fixes: 38d779c26395 ("arm64: dts: qcom: msm8953: ...
```diff diff --git a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts index ddd7af616794..59f873a06e4d 100644 --- a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts +++ b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts @@ -157,7 +157,7 @@ &pmi8950_wled { qcom...
9bc4b18a425e8cf1bca190a136a11c3be516f513
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: msm8937-xiaomi-land: correct wled ovp value
Problem Details: PMI8950 doesn't actually support setting an OVP threshold value of 29.6 V. The closest allowed value is 29.5 V. Set that instead. Fixes: 2144f6d57d8e ("arm64: dts: qcom: Add Xiaomi Redmi 3S") Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss....
```diff diff --git a/arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts b/arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts index 91837ff940f1..4f301e7c6517 100644 --- a/arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts +++ b/arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts @@ -178,7 +178,7 @@ qcom,num-strings = <2>; q...
9e87f0eaadccc3fecdf3c3c0334e05694804b5f5
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: msm8953-xiaomi-vince: correct wled ovp value
Problem Details: PMI8950 doesn't actually support setting an OVP threshold value of 29.6 V. The closest allowed value is 29.5 V. Set that instead. Fixes: aa17e707e04a ("arm64: dts: qcom: msm8953: Add device tree for Xiaomi Redmi 5 Plus") Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Barnab...
```diff diff --git a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts index d46325e79917..c2a290bf493c 100644 --- a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts +++ b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts @@ -169,7 +169,7 @@ &pmi8950_wled { qcom...
7937ea733f79b3f25e802a0c8360bf7423856f36
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix missing runtime PM reference in ccs_mode_store
Problem Details: ccs_mode_store() calls xe_gt_reset() which internally invokes xe_pm_runtime_get_noresume(). That function requires the caller to already hold an outer runtime PM reference and warns if none is held: [46.891177] xe 0000:03:00.0: [drm] Missing outer runtime PM protection [46.891178] WARNING: drivers...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c index b35be36b0eaa..baee1f4a6b01 100644 --- a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c +++ b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c @@ -12,6 +12,7 @@ #include "xe_gt_printk.h" #include "xe_gt_sysfs.h" #include "xe_mmio.h" +#includ...
8306a78a1c04cf87bfa9ae6451cc9d8f0f9dc0e0
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: qcom: Fix the license marking
Problem Details: The Copyright for Qualcomm changed its format and replaces the old Qualcomm Innovative Center by Qualcomm Technology Inc. Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> Link: https://patch.msgid.link/20260317180943.3062085-1-daniel.lezcano@oss.qualcomm.com Signed-off-by: Takashi Iwai ...
```diff diff --git a/sound/usb/qcom/qc_audio_offload.c b/sound/usb/qcom/qc_audio_offload.c index 510b68cced33..f161eb29f911 100644 --- a/sound/usb/qcom/qc_audio_offload.c +++ b/sound/usb/qcom/qc_audio_offload.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (c) 2022-2025 Qualcomm Innovation Cent...
b63c6b9b7f5ed02bb3abf7a39c18ea54d1a69f0f
Analyze and fix the following issue in the Linux kernel code: drm/i915/fbdev: fix link failure without FBDEV emulation
Problem Details: If CONFIG_DRM_FBDEV_EMULATION is disabled but CONFIG_FRAMEBUFFER_CONSOLE is turned on, the i915 driver now fails to link: ERROR: modpost: "intel_fbdev_fb_prefer_stolen" [drivers/gpu/drm/i915/i915.ko] undefined! Fix the contition to include a check for the symbol that controls compilation of intel_fbd...
```diff diff --git a/drivers/gpu/drm/i915/i915_initial_plane.c b/drivers/gpu/drm/i915/i915_initial_plane.c index 5594548f51d8..390a9248d631 100644 --- a/drivers/gpu/drm/i915/i915_initial_plane.c +++ b/drivers/gpu/drm/i915/i915_initial_plane.c @@ -115,7 +115,8 @@ initial_plane_vma(struct drm_i915_private *i915, * imp...
6017671da9d0a11056bf37b4b54903e57dbc9cd1
Analyze and fix the following issue in the Linux kernel code: ASoC: wm_adsp: Fix crash in kunit tests on arm64
Problem Details: Several of the wm_adsp kunit tests failed by only on arm64. This turns out to be passing things to release_firmware which were not allocated with request_firmware. This does actually drop some errors on other platforms but somehow doesn't cause the tests to fail, and kunit hides a lot of the output for...
```diff diff --git a/sound/soc/codecs/wm_adsp_fw_find_test.c b/sound/soc/codecs/wm_adsp_fw_find_test.c index 44c26e991b35..fb886dc61c27 100644 --- a/sound/soc/codecs/wm_adsp_fw_find_test.c +++ b/sound/soc/codecs/wm_adsp_fw_find_test.c @@ -262,7 +262,8 @@ static void wm_adsp_fw_find_test_case_exit(struct kunit *test) ...
e7648ffecb7fcb7400e123bb6ea989633a104fc3
Analyze and fix the following issue in the Linux kernel code: ACPI: bus: Fix MFD child automatic modprobe issue
Problem Details: MFD child devices sharing parent's ACPI Companion fails to probe as acpi_companion_match() returns incompatible ACPI Companion handle for binding with the check for pnp.type.backlight added recently. Remove this pnp.type.backlight check in acpi_companion_match() to fix the automatic modprobe issue. Fi...
```diff diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index f6707325f582..2ec095e2009e 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -818,9 +818,6 @@ const struct acpi_device *acpi_companion_match(const struct device *dev) if (list_empty(&adev->pnp.ids)) return NULL; - if (adev->pnp.type.bac...
bf504b229cb8d534eccbaeaa23eba34c05131e25
Analyze and fix the following issue in the Linux kernel code: ACPI: processor: Fix previous acpi_processor_errata_piix4() fix
Problem Details: After commi f132e089fe89 ("ACPI: processor: Fix NULL-pointer dereference in acpi_processor_errata_piix4()"), device pointers may be dereferenced after dropping references to the device objects pointed to by them, which may cause a use-after-free to occur. Moreover, debug messages about enabling the er...
```diff diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index b34a48068a8d..b1652cab631a 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -113,6 +113,10 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev) PCI_ANY_ID, PCI_ANY_ID, NULL); ...
446c6a25a4494e137ec42e886da04e29efc2dc39
Analyze and fix the following issue in the Linux kernel code: media: rkvdec: reduce excessive stack usage in assemble_hw_pps()
Problem Details: The rkvdec_pps had a large set of bitfields, all of which as misaligned. This causes clang-21 and likely other versions to produce absolutely awful object code and a warning about very large stack usage, on targets without unaligned access: drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c:966:12: e...
```diff diff --git a/drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu383-h264.c b/drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu383-h264.c index 97f1efde2e47..fb4f849d7366 100644 --- a/drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu383-h264.c +++ b/drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu383-h264.c @...
daa87ca42652af0d6791ef875e3c4d724b099f22
Analyze and fix the following issue in the Linux kernel code: media: rkvdec: Improve handling missing short/long term RPS
Problem Details: The values of ext_sps_st_rps and ext_sps_lt_rps in struct rkvdec_hevc_run are not initialized when the respective controls are not set by userspace. When this is the case, set them to NULL so the rkvdec_hevc_run_preamble function that parses controls does not access garbage data which leads to a panic...
```diff diff --git a/drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c b/drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c index 28267ee30190..3119f3bc9f98 100644 --- a/drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c +++ b/drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c @@ -5...
bef4f4a88b73e4cc550d25f665b8a9952af22773
Analyze and fix the following issue in the Linux kernel code: media: mc, v4l2: serialize REINIT and REQBUFS with req_queue_mutex
Problem Details: MEDIA_REQUEST_IOC_REINIT can run concurrently with VIDIOC_REQBUFS(0) queue teardown paths. This can race request object cleanup against vb2 queue cancellation and lead to use-after-free reports. We already serialize request queueing against STREAMON/OFF with req_queue_mutex. Extend that serialization ...
```diff diff --git a/drivers/media/mc/mc-request.c b/drivers/media/mc/mc-request.c index c7c7d4a86c6b..13e77648807c 100644 --- a/drivers/media/mc/mc-request.c +++ b/drivers/media/mc/mc-request.c @@ -192,6 +192,8 @@ static long media_request_ioctl_reinit(struct media_request *req) struct media_device *mdev = req->mdev...
ac62a20035ecc18e6d365c6c792f5965ce1da77c
Analyze and fix the following issue in the Linux kernel code: media: synopsys: csi2rx: add missing kconfig dependency
Problem Details: Fix "ERROR: modpost: "phy_mipi_dphy_get_default_config_for_hsclk" [drivers/media/platform/synopsys/dw-mipi-csi2rx.ko] undefined!" by selecting GENERIC_PHY_MIPI_DPHY in the Kconfig entry. Fixes: 355a11004066 ("media: synopsys: add driver for the designware mipi csi-2 receiver") Cc: stable@kernel.org Re...
```diff diff --git a/drivers/media/platform/synopsys/Kconfig b/drivers/media/platform/synopsys/Kconfig index e798ec00b189..bf2ac092fbb3 100644 --- a/drivers/media/platform/synopsys/Kconfig +++ b/drivers/media/platform/synopsys/Kconfig @@ -7,6 +7,7 @@ config VIDEO_DW_MIPI_CSI2RX depends on VIDEO_DEV depends on V4L_P...
9232fa05921bc0ea0bc71947440ec9a50b3ad26e
Analyze and fix the following issue in the Linux kernel code: media: synopsys: csi2rx: fix out-of-bounds check for formats array
Problem Details: The out-of-bounds check for the format array is off by one. Fix the check. Fixes: 355a11004066 ("media: synopsys: add driver for the designware mipi csi-2 receiver") Cc: stable@kernel.org Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Michael Riesch <michael.riesch@collabora.com...
```diff diff --git a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c index 170346ae1a59..4d96171a650b 100644 --- a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c +++ b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c @@ -301,7 +301,7 @@ dw_mipi_csi2rx_enum_mbus_code...
e37afcb56ae070477741fe2d6e61fc0c542cce2d
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Harden depth calculation functions
Problem Details: An issue was exposed where OS can pass in U32_MAX for SQ/RQ/SRQ size. This can cause integer overflow and truncation of SQ/RQ/SRQ depth returning a success when it should have failed. Harden the functions to do all depth calculations and boundary checking in u64 sizes. Fixes: 563e1feb5f6e ("RDMA/irdm...
```diff diff --git a/drivers/infiniband/hw/irdma/uk.c b/drivers/infiniband/hw/irdma/uk.c index ac3721a5747a..4718acf6c6fd 100644 --- a/drivers/infiniband/hw/irdma/uk.c +++ b/drivers/infiniband/hw/irdma/uk.c @@ -1438,7 +1438,7 @@ exit: * irdma_round_up_wq - return round up qp wq depth * @wqdepth: wq depth in quanta ...
7221f581eefa79ead06e171044f393fb7ee22f87
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Return EINVAL for invalid arp index error
Problem Details: When rdma_connect() fails due to an invalid arp index, user space rdma core reports ENOMEM which is confusing. Modify irdma_make_cm_node() to return the correct error code. Fixes: 146b9756f14c ("RDMA/irdma: Add connection manager") Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com> Signed-...
```diff diff --git a/drivers/infiniband/hw/irdma/cm.c b/drivers/infiniband/hw/irdma/cm.c index 13b24ffca265..91c0e7298283 100644 --- a/drivers/infiniband/hw/irdma/cm.c +++ b/drivers/infiniband/hw/irdma/cm.c @@ -2241,11 +2241,12 @@ irdma_make_cm_node(struct irdma_cm_core *cm_core, struct irdma_device *iwdev, int oldar...
6f52370970ac07d352a7af4089e55e0e6425f827
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Fix deadlock during netdev reset with active connections
Problem Details: Resolve deadlock that occurs when user executes netdev reset while RDMA applications (e.g., rping) are active. The netdev reset causes ice driver to remove irdma auxiliary driver, triggering device_delete and subsequent client removal. During client removal, uverbs_client waits for QP reference count t...
```diff diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 9920a3304be3..95f590c10c05 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -558,7 +558,8 @@ static int irdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata) } i...
c45c6ebd693b944f1ffe429fdfb6cc1674c237be
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Remove reset check from irdma_modify_qp_to_err()
Problem Details: During reset, irdma_modify_qp() to error should be called to disconnect the QP. Without this fix, if not preceded by irdma_modify_qp() to error, the API call irdma_destroy_qp() gets stuck waiting for the QP refcount to go to zero, because the cm_node associated with this QP isn't disconnected. Fixes: ...
```diff diff --git a/drivers/infiniband/hw/irdma/utils.c b/drivers/infiniband/hw/irdma/utils.c index ab8c5284d4be..495e5daff4b4 100644 --- a/drivers/infiniband/hw/irdma/utils.c +++ b/drivers/infiniband/hw/irdma/utils.c @@ -2322,8 +2322,6 @@ void irdma_modify_qp_to_err(struct irdma_sc_qp *sc_qp) struct irdma_qp *qp = ...
b415399c9a024d574b65479636f0d4eb625b9abd
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Clean up unnecessary dereference of event->cm_node
Problem Details: The cm_node is available and the usage of cm_node and event->cm_node seems arbitrary. Clean up unnecessary dereference of event->cm_node. Fixes: 146b9756f14c ("RDMA/irdma: Add connection manager") Signed-off-by: Ivan Barrera <ivan.d.barrera@intel.com> Signed-off-by: Tatyana Nikolova <tatyana.e.nikolov...
```diff diff --git a/drivers/infiniband/hw/irdma/cm.c b/drivers/infiniband/hw/irdma/cm.c index 3d084d4ff577..13b24ffca265 100644 --- a/drivers/infiniband/hw/irdma/cm.c +++ b/drivers/infiniband/hw/irdma/cm.c @@ -4239,21 +4239,21 @@ static void irdma_cm_event_handler(struct work_struct *work) irdma_cm_event_reset(even...
5e8f0239731a83753473b7aa91bda67bbdff5053
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Remove a NOP wait_event() in irdma_modify_qp_roce()
Problem Details: Remove a NOP wait_event() in irdma_modify_qp_roce() which is relevant for iWARP and likely a copy and paste artifact for RoCEv2. The wait event is for sending a reset on a TCP connection, after the reset has been requested in irdma_modify_qp(), which occurs only in iWarp mode. Fixes: b48c24c2d710 ("RD...
```diff diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index a13ed000fa19..9920a3304be3 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -1462,8 +1462,6 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr, ctx_...
8c1f19a2225cf37b3f8ab0b5a8a5322291cda620
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Update ibqp state to error if QP is already in error state
Problem Details: In irdma_modify_qp() update ibqp state to error if the irdma QP is already in error state, otherwise the ibqp state which is visible to the consumer app remains stale. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com...
```diff diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index ce1050bdd191..a13ed000fa19 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -1540,6 +1540,7 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr, case I...
11a95521fb93c91e2d4ef9d53dc80ef0a755549b
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Initialize free_qp completion before using it
Problem Details: In irdma_create_qp, if ib_copy_to_udata fails, it will call irdma_destroy_qp to clean up which will attempt to wait on the free_qp completion, which is not initialized yet. Fix this by initializing the completion before the ib_copy_to_udata call. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supp...
```diff diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index a20d25585993..ce1050bdd191 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -1105,6 +1105,7 @@ static int irdma_create_qp(struct ib_qp *ibqp, spin_lock_init(&iwqp->sc_qp.pf...
e5b3fe57dc5893c7ea5f478a1161b8643adf5dd9
Analyze and fix the following issue in the Linux kernel code: drm/i915/gmbus: fix a typo in comment message
Problem Details: Fix a typo inside a comment message from ("generata" -> "generate") in function do_gmbus_xfer() before calling intel_de_write_fw() Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patch.msgid.link/20260316231920.1354...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c index dd79a866b87e..ea5cf8f51b31 100644 --- a/drivers/gpu/drm/i915/display/intel_gmbus.c +++ b/drivers/gpu/drm/i915/display/intel_gmbus.c @@ -694,7 +694,7 @@ retry: goto clear_err; } - /* Generate a STOP...
4ab0f09ee73fc853d00466682635f67c531f909c
Analyze and fix the following issue in the Linux kernel code: drm/i915/gmbus: fix spurious timeout on 512-byte burst reads
Problem Details: When reading exactly 512 bytes with burst read enabled, the extra_byte_added path breaks out of the inner do-while without decrementing len. The outer while(len) then re-enters and gmbus_wait() times out since all data has been delivered. Decrement len before the break so the outer loop terminates corr...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c index df48f27f1cc1..dd79a866b87e 100644 --- a/drivers/gpu/drm/i915/display/intel_gmbus.c +++ b/drivers/gpu/drm/i915/display/intel_gmbus.c @@ -495,8 +495,10 @@ gmbus_xfer_read_chunk(struct intel_display *display,...
0162ab3220bac870e43e229e6e3024d1a21c3f26
Analyze and fix the following issue in the Linux kernel code: drm/i915/gt: Check set_default_submission() before deferencing
Problem Details: When the i915 driver firmware binaries are not present, the set_default_submission pointer is not set. This pointer is dereferenced during suspend anyways. Add a check to make sure it is set before dereferencing. [ 23.289926] PM: suspend entry (deep) [ 23.293558] Filesystems sync: 0.000 seconds [...
```diff diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c index d37966ec7a92..54c9571327e7 100644 --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c @@ -1967,7 +1967,8 @@ void intel_engines_reset_default_submission(struct inte...
bd71fb3fea9945987053968f028a948997cba8cc
Analyze and fix the following issue in the Linux kernel code: iomap: fix invalid folio access when i_blkbits differs from I/O granularity
Problem Details: Commit aa35dd5cbc06 ("iomap: fix invalid folio access after folio_end_read()") partially addressed invalid folio access for folios without an ifs attached, but it did not handle the case where 1 << inode->i_blkbits matches the folio size but is different from the granularity used for the IO, which mean...
```diff diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 00f0efaf12b2..92a831cf4bf1 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -514,6 +514,7 @@ static int iomap_read_folio_iter(struct iomap_iter *iter, loff_t length = iomap_length(iter); struct folio *folio = ctx->cur_foli...
132e47b783a8057a8eb14484f153b417de00c1cb
Analyze and fix the following issue in the Linux kernel code: dt-bindings: dmaengine: Fix spelling mistake "Looongson" -> "Looogson"
Problem Details: There is a spelling mistake in the title field. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/20260317204938.120729-1-colin.i.king@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
```diff diff --git a/Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml b/Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml index c3151d806b55..8095214ccaf7 100644 --- a/Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml +++ b/Documentation/devicetree/bindings/dma/loongson,ls2...
4a2759a3ae10bb2e6465cfb01c16d0620a1bc7ab
Analyze and fix the following issue in the Linux kernel code: dmaengine: loongson: Fix spelling mistake "Looongson" -> "Looogson"
Problem Details: There are a couple of spelling mistakes, one in a comment block and one in a module description. Fix them. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20260317204631.120332-1-colin.i.king@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
```diff diff --git a/drivers/dma/loongson/loongson2-apb-cmc-dma.c b/drivers/dma/loongson/loongson2-apb-cmc-dma.c index 2f2ef51e41b6..1c9a542edc85 100644 --- a/drivers/dma/loongson/loongson2-apb-cmc-dma.c +++ b/drivers/dma/loongson/loongson2-apb-cmc-dma.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later /*...
6a82a691b08070ad03b237d7db89aa0bfef389e2
Analyze and fix the following issue in the Linux kernel code: xfs: fix a comment typo in xfs_select_zone_nowait()
Problem Details: Fix a typo in the comment describing the second call to xfs_select_open_zone_lru() in xfs_select_zone_nowait(). Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.o...
```diff diff --git a/fs/xfs/xfs_zone_alloc.c b/fs/xfs/xfs_zone_alloc.c index 612fcafd3a0c..06e2cb79030e 100644 --- a/fs/xfs/xfs_zone_alloc.c +++ b/fs/xfs/xfs_zone_alloc.c @@ -693,7 +693,7 @@ xfs_select_zone_nowait( goto out_unlock; /* - * Try to find an zone that is an ok match to colocate data with. + * Try t...
268378b6ad20569af0d1957992de1c8b16c6e900
Analyze and fix the following issue in the Linux kernel code: xfs: scrub: unlock dquot before early return in quota scrub
Problem Details: xchk_quota_item can return early after calling xchk_fblock_process_error. When that helper returns false, the function returned immediately without dropping dq->q_qlock, which can leave the dquot lock held and risk lock leaks or deadlocks in later quota operations. Fix this by unlocking dq->q_qlock be...
```diff diff --git a/fs/xfs/scrub/quota.c b/fs/xfs/scrub/quota.c index 1d25bd5b892e..222812fe202c 100644 --- a/fs/xfs/scrub/quota.c +++ b/fs/xfs/scrub/quota.c @@ -171,8 +171,10 @@ xchk_quota_item( error = xchk_quota_item_bmap(sc, dq, offset); xchk_iunlock(sc, XFS_ILOCK_SHARED); - if (!xchk_fblock_process_error(sc...
394d70b86fae9fe865e7e6d9540b7696f73aa9b6
Analyze and fix the following issue in the Linux kernel code: xfs: save ailp before dropping the AIL lock in push callbacks
Problem Details: In xfs_inode_item_push() and xfs_qm_dquot_logitem_push(), the AIL lock is dropped to perform buffer IO. Once the cluster buffer no longer protects the log item from reclaim, the log item may be freed by background reclaim or the dquot shrinker. The subsequent spin_lock() call dereferences lip->li_ailp,...
```diff diff --git a/fs/xfs/xfs_dquot_item.c b/fs/xfs/xfs_dquot_item.c index 491e2a7053a3..65a0e69c3d08 100644 --- a/fs/xfs/xfs_dquot_item.c +++ b/fs/xfs/xfs_dquot_item.c @@ -125,6 +125,7 @@ xfs_qm_dquot_logitem_push( struct xfs_dq_logitem *qlip = DQUOT_ITEM(lip); struct xfs_dquot *dqp = qlip->qli_dquot; struct x...
79ef34ec0554ec04bdbafafbc9836423734e1bd6
Analyze and fix the following issue in the Linux kernel code: xfs: avoid dereferencing log items after push callbacks
Problem Details: After xfsaild_push_item() calls iop_push(), the log item may have been freed if the AIL lock was dropped during the push. Background inode reclaim or the dquot shrinker can free the log item while the AIL lock is not held, and the tracepoints in the switch statement dereference the log item after iop_p...
```diff diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index 813e5a9f57eb..0e994b3f768f 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h @@ -56,6 +56,7 @@ #include <linux/tracepoint.h> struct xfs_agf; +struct xfs_ail; struct xfs_alloc_arg; struct xfs_attr_list_context; struct xfs_buf_log_item; @@ -...
4f24a767e3d64a5f58c595b5c29b6063a201f1e3
Analyze and fix the following issue in the Linux kernel code: xfs: stop reclaim before pushing AIL during unmount
Problem Details: The unmount sequence in xfs_unmount_flush_inodes() pushed the AIL while background reclaim and inodegc are still running. This is broken independently of any use-after-free issues - background reclaim and inodegc should not be running while the AIL is being pushed during unmount, as inodegc can dirty a...
```diff diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 9c295abd0a0a..ef1ea8a1238c 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -608,8 +608,9 @@ xfs_unmount_check( * have been retrying in the background. This will prevent never-ending * retries in AIL pushing from hanging the unmount. *...
96f3b16a9de552538b810f773645d43f3b661b50
Analyze and fix the following issue in the Linux kernel code: objtool: Support Clang RAX DRAP sequence
Problem Details: Recent Clang can use RAX as a temporary register for the DRAP stack alignment sequence. Add support for that. Fixes the following warning: vmlinux.o: error: objtool: vmw_host_printf+0xd: unknown CFA base reg 0 Closes: https://lore.kernel.org/cefefdd1-7b82-406d-8ff4-e4b167e45ee6@app.fastmail.com R...
```diff diff --git a/arch/x86/include/asm/orc_types.h b/arch/x86/include/asm/orc_types.h index e0125afa53fb..b3cc7970fa54 100644 --- a/arch/x86/include/asm/orc_types.h +++ b/arch/x86/include/asm/orc_types.h @@ -37,6 +37,7 @@ #define ORC_REG_R13 7 #define ORC_REG_BP_INDIRECT 8 #define ORC_REG_SP_INDIRECT 9 +#defi...
d5ad6ab61cbd89afdb60881f6274f74328af3ee9
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: always free skb on ieee80211_tx_prepare_skb() failure
Problem Details: ieee80211_tx_prepare_skb() has three error paths, but only two of them free the skb. The first error path (ieee80211_tx_prepare() returning TX_DROP) does not free it, while invoke_tx_handlers() failure and the fragmentation check both do. Add kfree_skb() to the first error path so all three are consis...
```diff diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 121e51ce1bc0..8b27d8cc086a 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -1006,7 +1006,7 @@ static void ath_scan_send_probe(struct ath_softc *sc, skb...
8e8e23dea43e64ddafbd1246644c3219209be113
Analyze and fix the following issue in the Linux kernel code: sched/topology: Compute sd_weight considering cpuset partitions
Problem Details: The "sd_weight" used for calculating the load balancing interval, and its limits, considers the span weight of the entire topology level without accounting for cpuset partitions. For example, consider a large system of 128CPUs divided into 8 * 16CPUs partition which is typical when deploying virtual m...
```diff diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 061f8c85f555..79bab80af8f2 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1645,13 +1645,17 @@ sd_init(struct sched_domain_topology_level *tl, struct cpumask *sd_span; u64 now = sched_clock(); - sd_weight = cpumask...
deb353d9bb009638b7762cae2d0b6e8fdbb41a69
Analyze and fix the following issue in the Linux kernel code: wifi: wlcore: Return -ENOMEM instead of -EAGAIN if there is not enough headroom
Problem Details: Since upstream commit e75665dd0968 ("wifi: wlcore: ensure skb headroom before skb_push"), wl1271_tx_allocate() and with it wl1271_prepare_tx_frame() returns -EAGAIN if pskb_expand_head() fails. However, in wlcore_tx_work_locked(), a return value of -EAGAIN from wl1271_prepare_tx_frame() is interpreted ...
```diff diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 6241866d39df..75cfbcfb7626 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -210,7 +210,7 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif, if ...
c73bb9a2d33bf81f6eecaa0f474b6c6dbe9855bd
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix NULL deref in mesh_matches_local()
Problem Details: mesh_matches_local() unconditionally dereferences ie->mesh_config to compare mesh configuration parameters. When called from mesh_rx_csa_frame(), the parsed action-frame elements may not contain a Mesh Configuration IE, leaving ie->mesh_config NULL and triggering a kernel NULL pointer dereference. The...
```diff diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 28624e57aa49..8fdbdf9ba2a9 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -79,6 +79,9 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata, * - MDA enabled * - Power management control on fc */ + if (!ie->mesh_confi...
8780f561f6717dec52351251881bff79e960eb46
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Exclude Scarlett 2i2 1st Gen from SKIP_IFACE_SETUP
Problem Details: The Focusrite Scarlett 2i2 1st Gen (1235:8006) produces distorted/silent audio when QUIRK_FLAG_SKIP_IFACE_SETUP is active, as that flag causes the feedback format to be detected as 17.15 instead of 16.16. Add a DEVICE_FLG entry for this device before the Focusrite VENDOR_FLG entry so that it gets no q...
```diff diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 049a94079f9e..cd3a9fe8edf2 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -2429,6 +2429,7 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_CTL_MSG_DELAY | QUIRK_FLAG_IFACE_DELAY), VENDOR_FLG(0x07...
d7729643942325933508274f0392b749ca74f7cc
Analyze and fix the following issue in the Linux kernel code: tracing: Restore accidentally removed SPDX tag
Problem Details: Restore the SPDX tag that was accidentally dropped. Fixes: 7e4b6c94300e3 ("tracing: add more symbols to whitelist") Reported-by: Nathan Chancellor <nathan@kernel.org> Cc: Arnd Bergmann <arnd@kernel.org> Cc: Vincent Donnefort <vdonnefort@google.com> Cc: Steven Rostedt <rostedt@goodmis.org> Reviewed-by:...
```diff diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile index 26f3d61e900d..c5e14ffd36ee 100644 --- a/kernel/trace/Makefile +++ b/kernel/trace/Makefile @@ -1,4 +1,4 @@ - +# SPDX-License-Identifier: GPL-2.0 # Do not instrument the tracer itself: ```
466e75d48038af252187855058a7a9312db9d2f8
Analyze and fix the following issue in the Linux kernel code: drm/xe/lrc: Fix uninitialized new_ts when capturing context timestamp
Problem Details: Getting engine specific CTX TIMESTAMP register can fail. In that case, if the context is active, new_ts is uninitialized. Fix that case by initializing new_ts to the last value that was sampled in SW - lrc->ctx_timestamp. Flagged by static analysis. v2: Fix new_ts initialization (Ashutosh) Fixes: bb...
```diff diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c index 7fb59386d1c5..35b365ac55e5 100644 --- a/drivers/gpu/drm/xe/xe_lrc.c +++ b/drivers/gpu/drm/xe/xe_lrc.c @@ -2576,14 +2576,14 @@ static int get_ctx_timestamp(struct xe_lrc *lrc, u32 engine_id, u64 *reg_ctx_ts) * @lrc: Pointer to the lrc...
b6398bc2ef3a78f1be37ba01ae0a5eedaee47803
Analyze and fix the following issue in the Linux kernel code: tools/power turbostat: Fix --show/--hide for individual cpuidle counters
Problem Details: Problem: individual swidle counter names (C1, C1+, C1-, etc.) cannot be selected via --show/--hide due to two bugs in probe_cpuidle_counts(): 1. The function returns immediately when BIC_cpuidle is not enabled, without checking deferred_add_index. 2. The deferred name check runs against name_buf bef...
```diff diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 4d954533c71d..3487548841e1 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -11285,6 +11285,14 @@ void probe_cpuidle_residency(void) } } +static bool cpuidle_cou...