id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
d9cf9c6884d21e01483c4e17479d27636ea4bb50
Analyze and fix the following issue in the Linux kernel code: perf/x86/intel: Use early_initcall() to hook bts_init()
Problem Details: After the commit 'd971342d38bf ("perf/x86/intel: Decouple BTS initialization from PEBS initialization")' is introduced, x86_pmu.bts would initialized in bts_init() which is hooked by arch_initcall(). Whereas init_hw_perf_events() is hooked by early_initcall(). Once the core PMU is initialized, nmi wa...
```diff diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c index 61da6b8a3d51..cbac54cb3a9e 100644 --- a/arch/x86/events/intel/bts.c +++ b/arch/x86/events/intel/bts.c @@ -643,4 +643,4 @@ static __init int bts_init(void) return perf_pmu_register(&bts_pmu, "intel_bts", -1); } -arch_initcall(bts_i...
52718438af2ac8323aeea41b6f59da0962cb73b6
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix uprobe syscall shadow stack test
Problem Details: Now that we have uprobe syscall working properly with shadow stack, we can remove testing limitations for shadow stack tests and make sure uprobe gets properly optimized. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel....
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c b/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c index c1f945cacebc..5da0b49eeaca 100644 --- a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c +++ b/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c @@ -403,8 +403,6 @@ s...
60ed85b7e46983725954103beaca5ca41816cd58
Analyze and fix the following issue in the Linux kernel code: uprobes/x86: Make asm style consistent
Problem Details: The asm syntax in uretprobe_trampoline and uprobe_trampoline differs in the use of operand size suffixes. Make them consistent and remove all size suffixes. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20250821123657.163417243@infradead.org
```diff diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c index ab6547bf2fa5..643027e35c46 100644 --- a/arch/x86/kernel/uprobes.c +++ b/arch/x86/kernel/uprobes.c @@ -321,21 +321,21 @@ asm ( ".pushsection .rodata\n" ".global uretprobe_trampoline_entry\n" "uretprobe_trampoline_entry:\n" - "pushq %r...
f349ec80865dfeaf8a33feae6b4a500db039c69c
Analyze and fix the following issue in the Linux kernel code: uprobes/x86: Fix uprobe syscall vs shadow stack
Problem Details: The uprobe syscall stores and strips the trampoline stack frame from the user context, to make it appear similar to an exception at the original instruction. It then restores the trampoline stack when it can exit using sysexit. Make sure to match the regular stack manipulation with shadow stack operat...
```diff diff --git a/arch/x86/include/asm/shstk.h b/arch/x86/include/asm/shstk.h index ba6f2fe43848..6723dbf6ab82 100644 --- a/arch/x86/include/asm/shstk.h +++ b/arch/x86/include/asm/shstk.h @@ -23,6 +23,8 @@ int setup_signal_shadow_stack(struct ksignal *ksig); int restore_signal_shadow_stack(void); int shstk_update_...
82afdd05a16a424409682e06a53d6afcda038d30
Analyze and fix the following issue in the Linux kernel code: uprobes: Make copy_from_page global
Problem Details: Making copy_from_page global and adding uprobe prefix. Adding the uprobe prefix to copy_to_page as well for symmetry. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Oleg Nesterov <oleg@red...
```diff diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index 01112f27cd21..7447e15559b8 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h @@ -226,6 +226,7 @@ extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, extern void uprobe_handle_trampoline(struct pt_regs *r...
4cc7dce79725689d8dd229e13c857aeb97b1c7cf
Analyze and fix the following issue in the Linux kernel code: docs: sysctl: add a few more top-level /proc/sys entries
Problem Details: Add a few missing directories under /proc/sys. Fix punctuation and doubled words. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Rik van Riel <riel@surriel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Reviewed-by: Rik van Riel <riel@surriel.com> Signed-off-by: Jonat...
```diff diff --git a/Documentation/admin-guide/sysctl/index.rst b/Documentation/admin-guide/sysctl/index.rst index 03346f98c7b9..4dd2c9b5d752 100644 --- a/Documentation/admin-guide/sysctl/index.rst +++ b/Documentation/admin-guide/sysctl/index.rst @@ -66,25 +66,31 @@ This documentation is about: =============== =====...
e5b71dd3ad0e3be3c3d243c49e5eec37eb795397
Analyze and fix the following issue in the Linux kernel code: selftests: net: fix memory leak in tls.c
Problem Details: To free memory and close fd after use Suggested-by: Jun Zhan <zhanjun@uniontech.com> Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com> Link: https://patch.msgid.link/20250819-memoryleak-v1-1-d4c70a861e62@uniontech.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c index d8cfcf9bb825..23cf6ff5fa49 100644 --- a/tools/testing/selftests/net/tls.c +++ b/tools/testing/selftests/net/tls.c @@ -427,6 +427,8 @@ TEST_F(tls, sendfile) EXPECT_GE(filefd, 0); fstat(filefd, &st); EXPECT_GE(sendfile(...
e56878b4770ba237cf487c881a59a779016f93de
Analyze and fix the following issue in the Linux kernel code: docs: kernel-parameters: typo fix and add missing SPDX-License tag
Problem Details: Fix documentation issues by removing a duplicated word and adding the missing SPDX-License identifier. Signed-off-by: Bartlomiej Kubik <kubik.bartlomiej@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250819...
```diff diff --git a/Documentation/admin-guide/kernel-parameters.rst b/Documentation/admin-guide/kernel-parameters.rst index 39d0e7ff0965..7bf8cc7df6b5 100644 --- a/Documentation/admin-guide/kernel-parameters.rst +++ b/Documentation/admin-guide/kernel-parameters.rst @@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: GPL-2.0 ...
aea70964b5a7ca491a3701f2dde6c9d05d51878d
Analyze and fix the following issue in the Linux kernel code: of: reserved_mem: Add missing IORESOURCE_MEM flag on resources
Problem Details: Commit f4fcfdda2fd8 ('of: reserved_mem: Add functions to parse "memory-region"') failed to set IORESOURCE_MEM flag on the resources. The result is functions such as devm_ioremap_resource_wc() will fail. Add the missing flag. Fixes: f4fcfdda2fd8 ('of: reserved_mem: Add functions to parse "memory-region...
```diff diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 77016c0cc296..d3b7c4ae429c 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -771,6 +771,7 @@ int of_reserved_mem_region_to_resource(const struct device_node *np, return -EINVAL; resource_set_rang...
91a79b792204313153e1bdbbe5acbfc28903b3a5
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_reject: don't leak dst refcount for loopback packets
Problem Details: recent patches to add a WARN() when replacing skb dst entry found an old bug: WARNING: include/linux/skbuff.h:1165 skb_dst_check_unset include/linux/skbuff.h:1164 [inline] WARNING: include/linux/skbuff.h:1165 skb_dst_set include/linux/skbuff.h:1210 [inline] WARNING: include/linux/skbuff.h:1165 nf_reje...
```diff diff --git a/net/ipv4/netfilter/nf_reject_ipv4.c b/net/ipv4/netfilter/nf_reject_ipv4.c index 87fd945a0d27..0d3cb2ba6fc8 100644 --- a/net/ipv4/netfilter/nf_reject_ipv4.c +++ b/net/ipv4/netfilter/nf_reject_ipv4.c @@ -247,8 +247,7 @@ void nf_send_reset(struct net *net, struct sock *sk, struct sk_buff *oldskb, if...
0c3f135e840d4a2ba4253e15d530ec61bc30718e
Analyze and fix the following issue in the Linux kernel code: idpf: stop Tx if there are insufficient buffer resources
Problem Details: The Tx refillq logic will cause packets to be silently dropped if there are not enough buffer resources available to send a packet in flow scheduling mode. Instead, determine how many buffers are needed along with number of descriptors. Make sure there are enough of both resources to send the packet, a...
```diff diff --git a/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c index 57c0f5ab8f9e..b19b462e0bb6 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c +++ b/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c @@ -415,11 +415,11 @@ netdev_tx_t idp...
5f417d551324d2894168b362f2429d120ab06243
Analyze and fix the following issue in the Linux kernel code: idpf: replace flow scheduling buffer ring with buffer pool
Problem Details: Replace the TxQ buffer ring with one large pool/array of buffers (only for flow scheduling). This eliminates the tag generation and makes it impossible for a tag to be associated with more than one packet. The completion tag passed to HW through the descriptor is the index into the array. That same co...
```diff diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c index 527d56bcbbef..5fe329a7c944 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c @@ -13,6 +13,7 @@ struct idpf_tx_stash { struct libeth_sqe buf; };...
b61dfa9bc4430ad82b96d3a7c1c485350f91b467
Analyze and fix the following issue in the Linux kernel code: idpf: simplify and fix splitq Tx packet rollback error path
Problem Details: Move (and rename) the existing rollback logic to singleq.c since that will be the only consumer. Create a simplified splitq specific rollback function to loop through and unmap tx_bufs based on the completion tag. This is critical before replacing the Tx buffer ring with the buffer pool since the previ...
```diff diff --git a/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c index 555879b1248d..57c0f5ab8f9e 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c +++ b/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c @@ -179,6 +179,58 @@ static int idpf_...
3868f910440c47cd5d158776be4ba4e2186beda7
Analyze and fix the following issue in the Linux kernel code: s390/hypfs: Enable limited access during lockdown
Problem Details: When kernel lockdown is active, debugfs_locked_down() blocks access to hypfs files that register ioctl callbacks, even if the ioctl interface is not required for a function. This unnecessarily breaks userspace tools that only rely on read operations. Resolve this by registering a minimal set of file o...
```diff diff --git a/arch/s390/hypfs/hypfs_dbfs.c b/arch/s390/hypfs/hypfs_dbfs.c index e74eb8f9b23a..41a0d2066fa0 100644 --- a/arch/s390/hypfs/hypfs_dbfs.c +++ b/arch/s390/hypfs/hypfs_dbfs.c @@ -6,6 +6,7 @@ * Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com> */ +#include <linux/security.h> #include <linux/...
fec7bdfe7f8694a0c39e6c3ec026ff61ca1058b9
Analyze and fix the following issue in the Linux kernel code: s390/hypfs: Avoid unnecessary ioctl registration in debugfs
Problem Details: Currently, hypfs registers ioctl callbacks for all debugfs files, despite only one file requiring them. This leads to unintended exposure of unused interfaces to user space and can trigger side effects such as restricted access when kernel lockdown is enabled. Restrict ioctl registration to only those...
```diff diff --git a/arch/s390/hypfs/hypfs_dbfs.c b/arch/s390/hypfs/hypfs_dbfs.c index 5d9effb0867c..e74eb8f9b23a 100644 --- a/arch/s390/hypfs/hypfs_dbfs.c +++ b/arch/s390/hypfs/hypfs_dbfs.c @@ -66,23 +66,27 @@ static long dbfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) long rc; mutex_lock(&df-...
00f0b959ffb094ea677ca24a0bd14d300a3013a0
Analyze and fix the following issue in the Linux kernel code: KVM: SEV: Enforce minimum GHCB version requirement for SEV-SNP guests
Problem Details: Require a minimum GHCB version of 2 when starting SEV-SNP guests through KVM_SEV_INIT2. When a VMM attempts to start an SEV-SNP guest with an incompatible GHCB version (less than 2), reject the request early rather than allowing the guest kernel to start with an incorrect protocol version and fail late...
```diff diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 212f790eedd4..e88dce598785 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -405,6 +405,7 @@ static int __sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp, struct kvm_sev_info *sev = to_kvm_sev_info(kvm); struct se...
8410fe81093ff231e964891e215b624dabb734b0
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Use correct sub-type for UAC3 feature unit validation
Problem Details: The entry of the validators table for UAC3 feature unit is defined with a wrong sub-type UAC_FEATURE (= 0x06) while it should have been UAC3_FEATURE (= 0x07). This patch corrects the entry value. Fixes: 57f8770620e9 ("ALSA: usb-audio: More validations of descriptor units") Link: https://patch.msgid.l...
```diff diff --git a/sound/usb/validate.c b/sound/usb/validate.c index 4f4e8e87a14c..a0d55b77c994 100644 --- a/sound/usb/validate.c +++ b/sound/usb/validate.c @@ -285,7 +285,7 @@ static const struct usb_desc_validator audio_validators[] = { /* UAC_VERSION_3, UAC3_EXTENDED_TERMINAL: not implemented yet */ FUNC(UAC_V...
8b0587a885fdb34fd6090a3f8625cb7ac1444826
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Preserve shared buffer capacity during headroom updates
Problem Details: When port buffer headroom changes, port_update_shared_buffer() recalculates the shared buffer size and splits it in a 3:1 ratio (lossy:lossless) - Currently, the calculation is: lossless = shared / 4; lossy = (shared / 4) * 3; Meaning, the calculation dropped the remainder of shared % 4 due to integer...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c index 5ae787656a7c..3efa8bf1d14e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c @@ -272,8 +272,8 ...
451d2849ea66659040b59ae3cb7e50cc97404733
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Query FW for buffer ownership
Problem Details: The SW currently saves local buffer ownership when setting the buffer. This means that the SW assumes it has ownership of the buffer after the command is set. If setting the buffer fails and we remain in FW ownership, the local buffer ownership state incorrectly remains as SW-owned. This leads to inco...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/dcbnl.h b/drivers/net/ethernet/mellanox/mlx5/core/en/dcbnl.h index b59aee75de94..2c98a5299df3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/dcbnl.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/dcbnl.h @@ -26,7 +26,6 @@ struct mlx5e_dcbx { u...
51b17c98e3dbb2093a81b0490050a0eaa919ebee
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Restore missing scheduling node cleanup on vport enable failure
Problem Details: Restore the __esw_qos_free_node() call removed by the offending commit. Fixes: 97733d1e00a0 ("net/mlx5: Add traffic class scheduling support for vport QoS") Signed-off-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com> S...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c index 41aec07bb6c2..8b4977650183 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c @@ -1122,6 +1122,7 @@ static int mlx5_esw_qos...
3c114fb2afe493066df5b9e560ef37216b153c90
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Fix QoS reference leak in vport enable error path
Problem Details: Add missing esw_qos_put() call when __esw_qos_alloc_node() fails in mlx5_esw_qos_vport_enable(). Fixes: be034baba83e ("net/mlx5: Make vport QoS enablement more flexible for future extensions") Signed-off-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c index 452a948a3e6d..41aec07bb6c2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c @@ -1109,8 +1109,10 @@ static int mlx5_esw_qo...
b697ef4d1d136948d282384e6cc3d1af469ea123
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Destroy vport QoS element when no configuration remains
Problem Details: If a VF has been configured and the user later clears all QoS settings, the vport element remains in the firmware QoS tree. This leads to inconsistent behavior compared to VFs that were never configured, since the FW assumes that unconfigured VFs are outside the QoS hierarchy. As a result, the bandwidt...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c index 4ed5968f1638..452a948a3e6d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c @@ -1127,6 +1127,19 @@ static int mlx5_esw_qo...
e8f973576ca5387ffd2917b8ae661d3f9acde526
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Preserve tc-bw during parent changes
Problem Details: When changing parent of a node/leaf with tc-bw configured, the code saves and restores tc-bw values. However, it was reading the converted hardware bw_share values (where 0 becomes 1) instead of the original user values, causing incorrect tc-bw calculations after parent change. Store original tc-bw va...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c index cd58d3934596..4ed5968f1638 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c @@ -102,6 +102,8 @@ struct mlx5_esw_sched_nod...
330f0f6713a39581936decac72331e6ab7f13529
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Remove default QoS group and attach vports directly to root TSAR
Problem Details: Currently, the driver creates a default group (`node0`) and attaches all vports to it unless the user explicitly sets a parent group. As a result, when a user configures tx_share on a group and tx_share on a VF, the expectation is for the group and the VF to share bandwidth relatively. However, since t...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c index 91d863c8c152..cd58d3934596 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c @@ -462,6 +462,7 @@ static int esw_qos_vport...
bc17455bc843b2f4b206e0bb8139013eb3d3c08b
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Base ECVF devlink port attrs from 0
Problem Details: Adjust the vport number by the base ECVF vport number so the port attributes start at 0. Previously the port attributes would start 1 after the maximum number of host VFs. Fixes: dc13180824b7 ("net/mlx5: Enable devlink port for embedded cpu VF vports") Signed-off-by: Daniel Jurgens <danielj@nvidia.com...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c index b7102e14d23d..c33accadae0f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c @@ -47,10...
7ef353879f714602b43f98662069f4fb86536761
Analyze and fix the following issue in the Linux kernel code: net: pse-pd: pd692x0: Skip power budget configuration when undefined
Problem Details: If the power supply's power budget is not defined in the device tree, the current code still requests power and configures the PSE manager with a 0W power limit, which is undesirable behavior. Skip power budget configuration entirely when the budget is zero, avoiding unnecessary power requests and pre...
```diff diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c index 395f6c662175..f4e91ba64a66 100644 --- a/drivers/net/pse-pd/pd692x0.c +++ b/drivers/net/pse-pd/pd692x0.c @@ -1041,6 +1041,10 @@ pd692x0_configure_managers(struct pd692x0_priv *priv, int nmanagers) int pw_budget; pw_budget = re...
1c67f9c54cdc70627e3f6472b89cd3d895df974c
Analyze and fix the following issue in the Linux kernel code: net: pse-pd: pd692x0: Fix power budget leak in manager setup error path
Problem Details: Fix a resource leak where manager power budgets were freed on both success and error paths during manager setup. Power budgets should only be freed on error paths after regulator registration or during driver removal. Refactor cleanup logic by extracting OF node cleanup and power budget freeing into s...
```diff diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c index 399ce9febda4..395f6c662175 100644 --- a/drivers/net/pse-pd/pd692x0.c +++ b/drivers/net/pse-pd/pd692x0.c @@ -1162,12 +1162,44 @@ pd692x0_write_ports_matrix(struct pd692x0_priv *priv, return 0; } +static void pd692x0_of_put_manage...
8c5d95988c34f0aeba1f34cd5e4ba69494c90c5f
Analyze and fix the following issue in the Linux kernel code: Octeontx2-af: Skip overlap check for SPI field
Problem Details: Octeontx2/CN10K silicon supports generating a 256-bit key per packet. The specific fields to be extracted from a packet for key generation are configurable via a Key Extraction (MKEX) Profile. The AF driver scans the configured extraction profile to ensure that fields from upper layers do not overwrit...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c index 1b765045aa63..b56395ac5a74 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c @@ -606,8 +606,8 @@ stati...
62708b9452f8eb77513115b17c4f8d1a22ebf843
Analyze and fix the following issue in the Linux kernel code: tls: fix handling of zero-length records on the rx_list
Problem Details: Each recvmsg() call must process either - only contiguous DATA records (any number of them) - one non-DATA record If the next record has different type than what has already been processed we break out of the main processing loop. If the record has already been decrypted (which may be the case for T...
```diff diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 51c98a007dda..bac65d0d4e3e 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -1808,6 +1808,9 @@ int decrypt_skb(struct sock *sk, struct scatterlist *sgout) return tls_decrypt_sg(sk, NULL, sgout, &darg); } +/* All records returned from a recvmsg()...
73c94172e278197fbed9f6a7b7550edc5bc1fbad
Analyze and fix the following issue in the Linux kernel code: netlink: specs: binder: replace underscores with dashes in names
Problem Details: The usage of underscores is no longer allowed for the 'name' format in the yaml spec. Instead, dashes should be used. This fixes the build issue reported by Thorsten that showed up on linux-next. Note this change has no impact on C code. Cc: Jakub Kicinski <kuba@kernel.org> Reported-by: Thorsten Leem...
```diff diff --git a/Documentation/netlink/specs/binder.yaml b/Documentation/netlink/specs/binder.yaml index 140b77a6afee..0f0575ad1265 100644 --- a/Documentation/netlink/specs/binder.yaml +++ b/Documentation/netlink/specs/binder.yaml @@ -26,27 +26,27 @@ attribute-sets: type: string doc: The binder co...
61ce50fd8196c8782b9620bb60d33649ec429f64
Analyze and fix the following issue in the Linux kernel code: drm/panel: jdi-lpm102a188a: Fix error code in jdi_panel_prepare()
Problem Details: If the mipi_dsi_dual() macro fails, the error code is stored in dsi_ctx.accum_err. Propagate that error back to the caller instead of returning success as the current code does. Fixes: a6adf47d30cc ("drm/panel: jdi-lpm102a188a: Fix bug and clean up driver") Signed-off-by: Dan Carpenter <dan.carpenter...
```diff diff --git a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c index 83656bb4b0b2..23462065d726 100644 --- a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c +++ b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c @@ -233,8 +233,10 @@ static int jdi_panel_prepare(struct drm_...
220abf77e7c2835cc63ea8cd7158cf83952640af
Analyze and fix the following issue in the Linux kernel code: cpufreq/amd-pstate: Fix setting of CPPC.min_perf in active mode for performance governor
Problem Details: In the "active" mode of the amd-pstate driver with performance governor, the CPPC.min_perf is expected to be the nominal_perf. However after commit a9b9b4c2a4cd ("cpufreq/amd-pstate: Drop min and max cached frequencies"), this is not the case when the governor is switched from performance to powersave...
```diff diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index bbc27ef9edf7..5cd91489fcbe 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1554,13 +1554,15 @@ static void amd_pstate_epp_cpu_exit(struct cpufreq_policy *policy) pr_debug("CPU %d exiting\n", policy-...
96481012628c2d9a03fb758763ad7bff786203eb
Analyze and fix the following issue in the Linux kernel code: drm: of: fix documentation reference
Problem Details: Documentation/devicetree/bindings/graph.txt content has move directly to the dt-schema repo in commit 4b52be0ce6ad ("dt-bindings: Remove plain text OF graph binding"). Point to the YAML of the official repo instead of the old file. Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com> Reviewed-b...
```diff diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index d0183dea7703..4f65ce729a47 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -55,7 +55,8 @@ EXPORT_SYMBOL(drm_of_crtc_port_mask); * and generate the DRM mask of CRTCs which may be attached to this * encoder. * - *...
e8faa8a466f61f4ae07069ed6b0872f602f1cba9
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Mark VirtIO ready before registering scmi_virtio_driver
Problem Details: After commit 20bda12a0ea0 (“firmware: arm_scmi: Make VirtIO transport a standalone driver”), the VirtIO transport probes independently. During scmi_virtio_probe, scmi_probe() is called, which intune invokes scmi_protocol_acquire() that sends a message over the virtqueue and waits for a reply. Previous...
```diff diff --git a/drivers/firmware/arm_scmi/transports/virtio.c b/drivers/firmware/arm_scmi/transports/virtio.c index cb934db9b2b4..326c4a93e44b 100644 --- a/drivers/firmware/arm_scmi/transports/virtio.c +++ b/drivers/firmware/arm_scmi/transports/virtio.c @@ -871,6 +871,9 @@ static int scmi_vio_probe(struct virtio_d...
a4d5f63d4384533101e0308fb2e9ac16bacc446c
Analyze and fix the following issue in the Linux kernel code: dt-bindings: firmware: arm,scmi: Allow multiple instances
Problem Details: Enable multiple SCMI instances by appending an instance-number suffix to the 'scmi' node name. The SCMI spec assumes a single SCMI platform, but in practice its responsibilities may be split across several SCMI platform/server instances. However, only one instance can serve as the system-wide (true) SC...
```diff diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml index abbd62f1fed0..be817fd9cc34 100644 --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml @@ -27,7 +27,7 @@...
370ac285f23aecae40600851fb4a1a9e75e50973
Analyze and fix the following issue in the Linux kernel code: block: avoid cpu_hotplug_lock depedency on freeze_lock
Problem Details: A recent lockdep[1] splat observed while running blktest block/005 reveals a potential deadlock caused by the cpu_hotplug_lock dependency on ->freeze_lock. This dependency was introduced by commit 033b667a823e ("block: blk-rq-qos: guard rq-qos helpers by static key"). That change added a static key to...
```diff diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index 7ed3e71f2fc0..32c65efdda46 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c @@ -95,6 +95,7 @@ static const char *const blk_queue_flag_name[] = { QUEUE_FLAG_NAME(SQ_SCHED), QUEUE_FLAG_NAME(DISABLE_WBT_DEF), QUEUE_FLAG_NAME(N...
ade1beea1c27657712aa8f594226d461639382ff
Analyze and fix the following issue in the Linux kernel code: block: decrement block_rq_qos static key in rq_qos_del()
Problem Details: rq_qos_add() increments the block_rq_qos static key when a QoS policy is attached. When a QoS policy is removed via rq_qos_del(), we must symmetrically decrement the static key. If this removal drops the last QoS policy from the queue (q->rq_qos becomes NULL), the static branch can be disabled and the ...
```diff diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c index 848591fb3c57..b1e24bb85ad2 100644 --- a/block/blk-rq-qos.c +++ b/block/blk-rq-qos.c @@ -374,6 +374,7 @@ void rq_qos_del(struct rq_qos *rqos) for (cur = &q->rq_qos; *cur; cur = &(*cur)->next) { if (*cur == rqos) { *cur = rqos->next; + static_b...
d234f3aef5928c2f0d692cf43768ecced0abd672
Analyze and fix the following issue in the Linux kernel code: gpu: nova-core: Update ARef imports from sync::aref
Problem Details: Update call sites in nova-core to import `ARef` from `sync::aref` instead of `types`. This aligns with the ongoing effort to move `ARef` and `AlwaysRefCounted` to sync. [acourbot@nvidia.com: use standard prefix for nova-core.] Suggested-by: Benno Lossin <lossin@kernel.org> Link: https://github.com/R...
```diff diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs index d235a6f9efca..645e65175cb6 100644 --- a/drivers/gpu/nova-core/falcon.rs +++ b/drivers/gpu/nova-core/falcon.rs @@ -7,8 +7,8 @@ use hal::FalconHal; use kernel::bindings; use kernel::device; use kernel::prelude::*; +use kernel:...
7c7cda81159b1abe7d50bcef2ccc6f662e225c8b
Analyze and fix the following issue in the Linux kernel code: spi: st: fix PM macros to use CONFIG_PM instead of CONFIG_PM_SLEEP
Problem Details: pm_sleep_ptr() depends on CONFIG_PM_SLEEP while pm_ptr() depends on CONFIG_PM. Since ST SSC4 implements runtime PM it makes sense using pm_ptr() here. For the same reason replace PM macros that use CONFIG_PM. Doing so prevents from using __maybe_unused attribute of runtime PM functions. Link: https...
```diff diff --git a/drivers/spi/spi-st-ssc4.c b/drivers/spi/spi-st-ssc4.c index 49ab4c515156..c07c61dc4938 100644 --- a/drivers/spi/spi-st-ssc4.c +++ b/drivers/spi/spi-st-ssc4.c @@ -378,7 +378,7 @@ static void spi_st_remove(struct platform_device *pdev) pinctrl_pm_select_sleep_state(&pdev->dev); } -static int __m...
8a3d00dde63a339d31d1fdeead24ddfd4d459c70
Analyze and fix the following issue in the Linux kernel code: fsverity: check IS_VERITY() in fsverity_cleanup_inode()
Problem Details: Since getting the address of the fsverity_info has gotten a bit more expensive, make fsverity_cleanup_inode() check for IS_VERITY() instead. This avoids adding more overhead to non-verity files. This assumes that verity info is never set when !IS_VERITY(), which is currently true, but add a VFS_WARN_O...
```diff diff --git a/include/linux/fsverity.h b/include/linux/fsverity.h index 844f7b8b56bb..5bc7280425a7 100644 --- a/include/linux/fsverity.h +++ b/include/linux/fsverity.h @@ -190,8 +190,15 @@ void __fsverity_cleanup_inode(struct inode *inode); */ static inline void fsverity_cleanup_inode(struct inode *inode) { ...
be1e0283021ec73c2eb92839db9a471a068709d9
Analyze and fix the following issue in the Linux kernel code: coredump: don't pointlessly check and spew warnings
Problem Details: When a write happens it doesn't make sense to check perform checks on the input. Skip them. Whether a fixes tag is licensed is a bit of a gray area here but I'll add one for the socket validation part I added recently. Link: https://lore.kernel.org/20250821-moosbedeckt-denunziant-7908663f3563@brauner...
```diff diff --git a/fs/coredump.c b/fs/coredump.c index 5dce257c67fc..60bc9685e149 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1466,11 +1466,15 @@ static int proc_dostring_coredump(const struct ctl_table *table, int write, ssize_t retval; char old_core_pattern[CORENAME_MAX_SIZE]; + if (write) + return pr...
2d82f3bd8910eb65e30bb2a3c9b945bfb3b6d661
Analyze and fix the following issue in the Linux kernel code: blk-mq: fix lockdep warning in __blk_mq_update_nr_hw_queues
Problem Details: Commit 5989bfe6ac6b ("block: restore two stage elevator switch while running nr_hw_queue update") reintroduced a lockdep warning by calling blk_mq_freeze_queue_nomemsave() before switching the I/O scheduler. The function blk_mq_elv_switch_none() calls elevator_change_done(). Running this while the que...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index b67d6c02eceb..ba3a4b77f578 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -5033,6 +5033,7 @@ static void __blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, unsigned int memflags; int i; struct xarray elv_tbl, et_tbl; + bool queues_frozen = fals...
a90d6f4aa0bb1dabae4be04955938c86ad7d3489
Analyze and fix the following issue in the Linux kernel code: pinctrl: sunxi: use kcalloc() instead of kzalloc()
Problem Details: Use devm_kcalloc() in init_pins_table() and prepare_function_table() to gain built-in overflow protection, making memory allocation safer when calculating allocation size compared to explicit multiplication. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Li...
```diff diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c b/drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c index 4e34b0cd3b73..5f13315ebff3 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c @@ -103,7 +103,7 @@ static struct sunxi_desc_pin *init_pins_table(struct device *...
42311ea58302d340339369a39eb84c6bfb703750
Analyze and fix the following issue in the Linux kernel code: pinctrl: qcom: sc8180x: use kcalloc() instead of kzalloc()
Problem Details: Use devm_kcalloc() in sc8180x_pinctrl_add_tile_resources() to gain built-in overflow protection, making memory allocation safer when calculating allocation size compared to explicit multiplication. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss...
```diff diff --git a/drivers/pinctrl/qcom/pinctrl-sc8180x.c b/drivers/pinctrl/qcom/pinctrl-sc8180x.c index 26dd165d1543..ae5134fdebd9 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc8180x.c +++ b/drivers/pinctrl/qcom/pinctrl-sc8180x.c @@ -1634,7 +1634,7 @@ static int sc8180x_pinctrl_add_tile_resources(struct platform_devic...
ae666486ee3baf97571df837ed8acd9e05d015bf
Analyze and fix the following issue in the Linux kernel code: pinctrl: pinctrl-zynqmp: use kcalloc() instead of kzalloc()
Problem Details: Use devm_kcalloc() in versal_pinctrl_prepare_pin_desc() to gain built-in overflow protection, making memory allocation safer when calculating allocation size compared to explicit multiplication. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Acked-by: Michal Simek <michal.simek@amd.com> Link: ht...
```diff diff --git a/drivers/pinctrl/pinctrl-zynqmp.c b/drivers/pinctrl/pinctrl-zynqmp.c index fddf0fef4b13..585fe1661e17 100644 --- a/drivers/pinctrl/pinctrl-zynqmp.c +++ b/drivers/pinctrl/pinctrl-zynqmp.c @@ -919,7 +919,7 @@ static int versal_pinctrl_prepare_pin_desc(struct device *dev, if (ret) return ret; - ...
2092b3b278be03f73a2438a9d14e2ac472eec033
Analyze and fix the following issue in the Linux kernel code: pinctrl: microchip-sgpio: use kcalloc() instead of kzalloc()
Problem Details: Use devm_kcalloc() in microchip_sgpio_register_bank() to gain built-in overflow protection, making memory allocation safer when calculating allocation size compared to explicit multiplication. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Link: https://lore.kernel.org/20250819143935.372084-2-ro...
```diff diff --git a/drivers/pinctrl/pinctrl-microchip-sgpio.c b/drivers/pinctrl/pinctrl-microchip-sgpio.c index 6191e5c13815..069cc665a402 100644 --- a/drivers/pinctrl/pinctrl-microchip-sgpio.c +++ b/drivers/pinctrl/pinctrl-microchip-sgpio.c @@ -824,7 +824,7 @@ static int microchip_sgpio_register_bank(struct device *d...
4aa8961b1b9c7498550b41168a91cf1558133dd3
Analyze and fix the following issue in the Linux kernel code: drm/dp: drm_edp_backlight_set_level: do not always send 3-byte commands
Problem Details: At least some panels using the LSB register are not happy with the unconditional increase of the command buffer to 3 bytes. With the BOE NE14QDM in my Dell Latitude 7455, the recent patches for luminance based brightness have introduced a regression: the brightness range stopped being contiguous and b...
```diff diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c index 1ecc3df7e316..4aaeae4fa03c 100644 --- a/drivers/gpu/drm/display/drm_dp_helper.c +++ b/drivers/gpu/drm/display/drm_dp_helper.c @@ -3962,6 +3962,7 @@ int drm_edp_backlight_set_level(struct drm_dp_aux *aux, const s...
7c8c76272e1732c63aab760b0b656f00bdc67050
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Check pause counter before continuing to PSR activation
Problem Details: Currently intel_psr_work is re-activating PSR even when pause_counter > 0 which is incorrect. Fix this by checking pause_counter before re-activating PSR. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14822 Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Mika Ka...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 86836aa61413..465f12c39330 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3216,6 +3216,9 @@ static void intel_psr_work(struct work_struct *work) got...
73b60be7f62f1edfef7aac4783878932b2b59ad9
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Do not activate disabled PSR on irq_aux_error
Problem Details: Currently intel_psr_work is continuing to activation of PSR which was just disabled when irq_aux_error == true. Fix this by skipping everything else than intel_psr_handle_irq in intel_psr_work when irq_aux_error == true. Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Mika Kahol...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 4a80f12563f8..86836aa61413 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3211,8 +3211,10 @@ static void intel_psr_work(struct work_struct *work) if ...
6b9f301985a35997338b0a0429859b49aff7f352
Analyze and fix the following issue in the Linux kernel code: docs: networking: Add PPE driver documentation for Qualcomm IPQ9574 SoC
Problem Details: Add description and high-level diagram for PPE, driver overview and module enable/debug information. Signed-off-by: Lei Wei <quic_leiwei@quicinc.com> Signed-off-by: Luo Jie <quic_luoj@quicinc.com> Link: https://patch.msgid.link/20250818-qcom_ipq_ppe-v8-2-1d4ff641fce9@quicinc.com Signed-off-by: Paolo A...
```diff diff --git a/Documentation/networking/device_drivers/ethernet/index.rst b/Documentation/networking/device_drivers/ethernet/index.rst index 40ac552641a3..0b0a3eef6aae 100644 --- a/Documentation/networking/device_drivers/ethernet/index.rst +++ b/Documentation/networking/device_drivers/ethernet/index.rst @@ -50,6 ...
9f6b606b6b37e61427412708411e8e04b1a858e8
Analyze and fix the following issue in the Linux kernel code: net: airoha: ppe: Do not invalid PPE entries in case of SW hash collision
Problem Details: SW hash computed by airoha_ppe_foe_get_entry_hash routine (used for foe_flow hlist) can theoretically produce collisions between two different HW PPE entries. In airoha_ppe_foe_insert_entry() if the collision occurs we will mark the second PPE entry in the list as stale (setting the hw hash to 0xffff)....
```diff diff --git a/drivers/net/ethernet/airoha/airoha_ppe.c b/drivers/net/ethernet/airoha/airoha_ppe.c index 47411d2cbd28..88694b08afa1 100644 --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c @@ -736,10 +736,8 @@ static void airoha_ppe_foe_insert_entry(struct airoha_ppe *p...
d2d7a96b29ea6ab093973a1a37d26126db70c79f
Analyze and fix the following issue in the Linux kernel code: mmc: sdhci_am654: Disable HS400 for AM62P SR1.0 and SR1.1
Problem Details: This adds SDHCI_AM654_QUIRK_DISABLE_HS400 quirk which shall be used to disable HS400 support. AM62P SR1.0 and SR1.1 do not support HS400 due to errata i2458 [0] so disable HS400 for these SoC revisions. [0] https://www.ti.com/lit/er/sprz574a/sprz574a.pdf Fixes: 37f28165518f ("arm64: dts: ti: k3-am62p:...
```diff diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index e4fc345be7e5..17e62c61b6e6 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -156,6 +156,7 @@ struct sdhci_am654_data { #define SDHCI_AM654_QUIRK_FORCE_CDTEST BIT(0) #define SDHCI_AM654_QUIRK...
41a86f62424ac436cb51e3de612ef1e1ddb0c873
Analyze and fix the following issue in the Linux kernel code: fs: fix indentation style
Problem Details: Replace 8 leading spaces with a tab to follow kernel coding style. Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn> Link: https://lore.kernel.org/20250820133424.1667467-1-zhangguopeng@kylinos.cn Signed-off-by: Christian Brauner <brauner@kernel.org>
```diff diff --git a/fs/namespace.c b/fs/namespace.c index ae6d1312b184..51f77c65c0c6 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2455,7 +2455,7 @@ struct vfsmount *clone_private_mount(const struct path *path) return ERR_PTR(-EINVAL); } - if (!ns_capable(old_mnt->mnt_ns->user_ns, CAP_SYS_ADMIN))...
0599640a21e98f0d6a3e9ff85c0a687c90a8103b
Analyze and fix the following issue in the Linux kernel code: bonding: send LACPDUs periodically in passive mode after receiving partner's LACPDU
Problem Details: When `lacp_active` is set to `off`, the bond operates in passive mode, meaning it only "speaks when spoken to." However, the current kernel implementation only sends an LACPDU in response when the partner's state changes. As a result, once LACP negotiation succeeds, the actor stops sending LACPDUs unt...
```diff diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 414fecfd2a0e..4edc8e6b6b64 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -95,13 +95,13 @@ static int ad_marker_send(struct port *port, struct bond_marker *marker); static void ad_mux_machine...
b64d035f77b1f02ab449393342264b44950a75ae
Analyze and fix the following issue in the Linux kernel code: bonding: update LACP activity flag after setting lacp_active
Problem Details: The port's actor_oper_port_state activity flag should be updated immediately after changing the lacp_active option to reflect the current mode correctly. Fixes: 3a755cd8b7c6 ("bonding: add new option lacp_active") Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Link: https://patch.msgid.link/2025081...
```diff diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 2fca8e84ab10..414fecfd2a0e 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -2883,6 +2883,31 @@ void bond_3ad_update_lacp_rate(struct bonding *bond) spin_unlock_bh(&bond->mode_lock); } +/**...
9db115e231a665e82429ea63e2efda4abd4390fe
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6ulz-bsh-smm-m2: fix resume via console
Problem Details: Despite the current configuration being compliant with the technical reference manual (TRM), testing on the system showed that resuming from suspend via UART4 (used as the console) fails unless any other UART is also enabled. In our use case, UART2 is enabled to ensure reliable resume when UART4 is us...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts b/arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts index 6159ed70d966..2d9f495660c9 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +++ b/arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts @@ -33,6 +33,10 @@ status = "okay"; }; +&uar...
5003a65790ed66be882d1987cc2ca86af0de3db1
Analyze and fix the following issue in the Linux kernel code: ALSA: timer: fix ida_free call while not allocated
Problem Details: In the snd_utimer_create() function, if the kasprintf() function return NULL, snd_utimer_put_id() will be called, finally use ida_free() to free the unallocated id 0. the syzkaller reported the following information: ------------[ cut here ]------------ ida_free called for id=0 which is not alloca...
```diff diff --git a/sound/core/timer.c b/sound/core/timer.c index 3ce12264eed8..d9fff5c87613 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -2139,14 +2139,14 @@ static int snd_utimer_create(struct snd_timer_uinfo *utimer_info, goto err_take_id; } + utimer->id = utimer_id; + utimer->name = kasprin...
1f43a3401debb9d06aa434ec6fecae676963d6f3
Analyze and fix the following issue in the Linux kernel code: usb: typec: qcom-pmic-typec: use kcalloc() instead of kzalloc()
Problem Details: Replace devm_kzalloc() with devm_kcalloc() in qcom_pmic_typec_pdphy_probe() and qcom_pmic_typec_port_probe() for safer memory allocation with built-in overflow protection. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by...
```diff diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c index 18303b34594b..c8b1463e6e8b 100644 --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c @@ -567,7 +567,7 @@ int qcom_pmic_typ...
11c09b55b3d36f5cfa15873e2e0f1e04166bcfd4
Analyze and fix the following issue in the Linux kernel code: drm/i915/backlight: Fix divide by 0 error in i9xx_set_backlight
Problem Details: pwm_level_max maybe 0 we do throw a warning but move ahead with execution which may later cause a /0 error. --v2 -return if the warn_on gets hit [Jani] Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://lore.kernel.org/r/2025081916043...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c index e007380e9a63..3b14f929825a 100644 --- a/drivers/gpu/drm/i915/display/intel_backlight.c +++ b/drivers/gpu/drm/i915/display/intel_backlight.c @@ -236,7 +236,8 @@ static void i9xx_set_backlight(const ...
136d029662cdde77d3e4db5c07de655f35f0239f
Analyze and fix the following issue in the Linux kernel code: Documentation/staging: Fix typo and incorrect citation in crc32.rst
Problem Details: In Documentation/staging/crc32.rst, below errors have been corrected: 1. Line 37: from "to being" to "to bring" 2. Line 119: Incorrect citation date: It must be August 1988 instead of August 1998 Signed-off-by: Rakuram Eswaran <rakuram.e96@gmail.com> Link: https://lore.kernel.org/r/2025082016261...
```diff diff --git a/Documentation/staging/crc32.rst b/Documentation/staging/crc32.rst index 7542220967cb..64f3dd430a6c 100644 --- a/Documentation/staging/crc32.rst +++ b/Documentation/staging/crc32.rst @@ -34,7 +34,7 @@ do it in the right order, matching the endianness. Just like with ordinary division, you proceed o...
c42be534547d6e45c155c347dd792b6ad9c24def
Analyze and fix the following issue in the Linux kernel code: Revert "net: cadence: macb: sama7g5_emac: Remove USARIO CLKEN flag"
Problem Details: This reverts commit db400061b5e7cc55f9b4dd15443e9838964119ea. This commit can cause a Devicetree ABI break for older DTS files that rely this flag for RMII configuration. Adding this back in ensures that the older DTBs will not break. Fixes: db400061b5e7 ("net: cadence: macb: sama7g5_emac: Remove USA...
```diff diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index ce95fad8cedd..9693f0289435 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -5113,7 +5113,8 @@ static const struct macb_config sama7g5_gem_config = { s...
a458b2902115b26a25d67393b12ddd57d1216aaa
Analyze and fix the following issue in the Linux kernel code: ipv6: sr: Fix MAC comparison to be constant-time
Problem Details: To prevent timing attacks, MACs need to be compared in constant time. Use the appropriate helper function for this. Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org> Reviewed-by: Andrea Mayer <andrea.mayer@...
```diff diff --git a/net/ipv6/seg6_hmac.c b/net/ipv6/seg6_hmac.c index d77b52523b6a..fd58426f222b 100644 --- a/net/ipv6/seg6_hmac.c +++ b/net/ipv6/seg6_hmac.c @@ -35,6 +35,7 @@ #include <net/xfrm.h> #include <crypto/hash.h> +#include <crypto/utils.h> #include <net/seg6.h> #include <net/genetlink.h> #include <net...
7af76e9d18a9fd6f8611b3313c86c190f9b6a5a7
Analyze and fix the following issue in the Linux kernel code: net, hsr: reject HSR frame if skb can't hold tag
Problem Details: Receiving HSR frame with insufficient space to hold HSR tag in the skb can result in a crash (kernel BUG): [ 45.390915] skbuff: skb_under_panic: text:ffffffff86f32cac len:26 put:14 head:ffff888042418000 data:ffff888042417ff4 tail:0xe end:0x180 dev:bridge_slave_1 [ 45.392559] ------------[ cut here...
```diff diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c index b87b6a6fe070..102eccf5ead7 100644 --- a/net/hsr/hsr_slave.c +++ b/net/hsr/hsr_slave.c @@ -63,8 +63,14 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb) skb_push(skb, ETH_HLEN); skb_reset_mac_header(skb); if ((!hsr->prot_versi...
eacb6e408dc861fb93baf10d6837204a3b39e915
Analyze and fix the following issue in the Linux kernel code: selftests: net: bpf_offload: print loaded programs on mismatch
Problem Details: The test sometimes fails due to an unexpected number of loaded programs. e.g FAIL: 2 BPF programs loaded, expected 1 File "/usr/libexec/kselftests/net/./bpf_offload.py", line 940, in <module> progs = bpftool_prog_list(expected=1) File "/usr/libexec/kselftests/net/./bpf_offload.py", lin...
```diff diff --git a/tools/testing/selftests/net/bpf_offload.py b/tools/testing/selftests/net/bpf_offload.py index b2c271b79240..c856d266c8f3 100755 --- a/tools/testing/selftests/net/bpf_offload.py +++ b/tools/testing/selftests/net/bpf_offload.py @@ -184,8 +184,8 @@ def bpftool_prog_list(expected=None, ns="", exclude_o...
2c2192e5f9c7c2892fe2363244d1387f62710d83
Analyze and fix the following issue in the Linux kernel code: net/sched: Remove unnecessary WARNING condition for empty child qdisc in htb_activate
Problem Details: The WARN_ON trigger based on !cl->leaf.q->q.qlen is unnecessary in htb_activate. htb_dequeue_tree already accounts for that scenario. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: William Liu <will@willsroot.io> Reviewed-by: Savino Dicanosa <savy@syst3mfailure.io> Link: https://patch.msgid.l...
```diff diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index c968ea763774..b5e40c51655a 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -592,7 +592,7 @@ htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, s64 *diff) */ static inline void htb_activate(struct htb_sched *q, struct htb...
15de71d06a400f7fdc15bf377a2552b0ec437cf5
Analyze and fix the following issue in the Linux kernel code: net/sched: Make cake_enqueue return NET_XMIT_CN when past buffer_limit
Problem Details: The following setup can trigger a WARNING in htb_activate due to the condition: !cl->leaf.q->q.qlen tc qdisc del dev lo root tc qdisc add dev lo root handle 1: htb default 1 tc class add dev lo parent 1: classid 1:1 \ htb rate 64bit tc qdisc add dev lo parent 1:1 handle f: \ cake memlimi...
```diff diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c index dbcfb948c867..32bacfc314c2 100644 --- a/net/sched/sch_cake.c +++ b/net/sched/sch_cake.c @@ -1750,7 +1750,7 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch, ktime_t now = ktime_get(); struct cake_tin_data *b; struct cake_flow ...
e318cd6714592fb762fcab59c5684a442243a12f
Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: Fix KSZ9477 HSR port setup issue
Problem Details: ksz9477_hsr_join() is called once to setup the HSR port membership, but the port can be enabled later, or disabled and enabled back and the port membership is not set correctly inside ksz_update_port_member(). The added code always use the correct HSR port membership for HSR port that is enabled. Fix...
```diff diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 4cb14288ff0f..9568cc391fe3 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -2457,6 +2457,12 @@ static void ksz_update_port_member(struct ksz_device *dev, int por...
1468c1f97cf32418e34dbb40b784ed9333b9e123
Analyze and fix the following issue in the Linux kernel code: igc: fix disabling L1.2 PCI-E link substate on I226 on init
Problem Details: Device ID comparison in igc_is_device_id_i226 is performed before the ID is set, resulting in always failing check on init. Before the patch: * L1.2 is not disabled on init * L1.2 is properly disabled after suspend-resume cycle With the patch: * L1.2 is properly disabled both on init and after suspen...
```diff diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 458e5eaa92e5..e79b14d50b24 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -7149,6 +7149,13 @@ static int igc_probe(struct pci_dev *pdev, adapter->...
f3d9f7fa7f5dbfd4fdb1e69c25fc5627700d19dd
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix ndo_xdp_xmit() workloads
Problem Details: Currently ixgbe driver checks periodically in its watchdog subtask if there is anything to be transmitted (considering both Tx and XDP rings) under state of carrier not being 'ok'. Such event is interpreted as Tx hang and therefore results in interface reset. This is currently problematic for ndo_xdp_...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 6122a0abb41f..80e6a2ef1350 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -968,10 +968,6 @@ static void ixgbe_update_xoff_rx_lfc(str...
4d4d9ef9dfee877d494e5418f68a1016ef08cad6
Analyze and fix the following issue in the Linux kernel code: ixgbe: xsk: resolve the negative overflow of budget in ixgbe_xmit_zc
Problem Details: Resolve the budget negative overflow which leads to returning true in ixgbe_xmit_zc even when the budget of descs are thoroughly consumed. Before this patch, when the budget is decreased to zero and finishes sending the last allowed desc in ixgbe_xmit_zc, it will always turn back and enter into the wh...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c index ac58964b2f08..7b941505a9d0 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c @@ -398,7 +398,7 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *...
c81f6ce16785cc07ae81f53deb07b662ed0bb3a5
Analyze and fix the following issue in the Linux kernel code: of: dynamic: Fix memleak when of_pci_add_properties() failed
Problem Details: When of_pci_add_properties() failed, of_changeset_destroy() is called to free the changeset. And of_changeset_destroy() puts device tree node in each entry but does not free property in the entry. This leads to memory leak in the failure case. In of_changeset_add_prop_helper(), add the property to the...
```diff diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index 0aba760f7577..dd30b7d8b5e4 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -938,6 +938,9 @@ static int of_changeset_add_prop_helper(struct of_changeset *ocs, if (ret) __of_prop_free(new_pp); + new_pp->next = np->deadprops; + n...
729dc340a4ed1267774fc8518284e976e2210bdc
Analyze and fix the following issue in the Linux kernel code: bootconfig: Fix negative seeks on 32-bit with LFS enabled
Problem Details: Commit 26dda5769509 "tools/bootconfig: Cleanup bootconfig footer size calculations" replaced some expressions of type int with the BOOTCONFIG_FOOTER_SIZE macro, which expands to an expression of type size_t, which is unsigned. On 32-bit architectures with LFS enabled (i.e. off_t is 64-bit), the seek o...
```diff diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c index 57c669d2aa90..55d59ed507d5 100644 --- a/tools/bootconfig/main.c +++ b/tools/bootconfig/main.c @@ -193,7 +193,7 @@ static int load_xbc_from_initrd(int fd, char **buf) if (stat.st_size < BOOTCONFIG_FOOTER_SIZE) return 0; - if (lseek(fd, -...
6238784e502b6a9fbeb3a6b77284b29baa4135cc
Analyze and fix the following issue in the Linux kernel code: PCI/P2PDMA: Fix incorrect pointer usage in devm_kfree() call
Problem Details: The error handling path in pci_p2pdma_add_resource() contains a bug in its `pgmap_free` label. Memory is allocated for the `p2p_pgmap` struct, and the pointer is stored in `p2p_pgmap`. However, the error path calls devm_kfree() with `pgmap`, which is a pointer to a member field within the `p2p_pgmap` ...
```diff diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c index da5657a02007..1cb5e423eed4 100644 --- a/drivers/pci/p2pdma.c +++ b/drivers/pci/p2pdma.c @@ -360,7 +360,7 @@ int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size, pages_free: devm_memunmap_pages(&pdev->dev, pgmap); pgmap_free: -...
f9a4c582e508c210d1e8e70493a69c6e5708476c
Analyze and fix the following issue in the Linux kernel code: remoteproc: k3: Remove remote processor mailbox ping
Problem Details: As of today, pinging the remote processor during k3_rproc_request_mbox() does not have any functional effect. This behavior was originally based on the OMAP remoteproc driver, where the idea was to send messages such as suspend requests (among others) to the remote processor, but this was never upstrea...
```diff diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c index d4f20900f33b..8266e11914af 100644 --- a/drivers/remoteproc/ti_k3_common.c +++ b/drivers/remoteproc/ti_k3_common.c @@ -160,7 +160,6 @@ int k3_rproc_request_mbox(struct rproc *rproc) struct k3_rproc *kproc = rproc->priv; ...
c4c432dfb00fcb69d56cc9778f527cce71cec9bb
Analyze and fix the following issue in the Linux kernel code: remoteproc: imx_dsp_rproc: Add support of recovery and coredump process
Problem Details: When enabled FW recovery, but is broken because software reset is missed in this recovery flow. So move software reset from imx_dsp_runtime_resume() to .load() and clear memory before loading firmware to make recovery work. Add call rproc_coredump_set_elf_info() to initialize the elf info for coredump...
```diff diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c index 5ee622bf5352..6e78a01755c7 100644 --- a/drivers/remoteproc/imx_dsp_rproc.c +++ b/drivers/remoteproc/imx_dsp_rproc.c @@ -774,7 +774,6 @@ static int imx_dsp_rproc_prepare(struct rproc *rproc) { struct imx_dsp_rproc *priv...
e94536e1d1818b0989aa19b443b7089f50133c35
Analyze and fix the following issue in the Linux kernel code: HID: input: report battery status changes immediately
Problem Details: Previously, the battery status (charging/discharging) was not reported immediately to user-space.  For most input devices, this wasn't problematic because changing their battery status requires connecting them to a different bus. For example, a gamepad would report a discharging status while connected...
```diff diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 262787e6eb20..f45f856a127f 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -609,13 +609,19 @@ static bool hidinput_update_battery_charge_status(struct hid_device *dev, return false; } -static void hidinput_update_bat...
a82231b2a8712d0218fc286a9b0da328d419a3f4
Analyze and fix the following issue in the Linux kernel code: HID: input: rename hidinput_set_battery_charge_status()
Problem Details: In preparation for a patch fixing a bug affecting hidinput_set_battery_charge_status(), rename the function to hidinput_update_battery_charge_status() and move it up so it can be used by hidinput_update_battery(). Refactor, no functional changes. Tested-by: 卢国宏 <luguohong@xiaomi.com> Signed-off-by: J...
```diff diff --git a/drivers/hid/hid-input-test.c b/drivers/hid/hid-input-test.c index 77c2d45ac62a..6f5c71660d82 100644 --- a/drivers/hid/hid-input-test.c +++ b/drivers/hid/hid-input-test.c @@ -7,7 +7,7 @@ #include <kunit/test.h> -static void hid_test_input_set_battery_charge_status(struct kunit *test) +static vo...
ff11d8701b77e303593fd86cf9ef74ef3ac4048e
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to allow removing qf_name
Problem Details: The mount behavior changed after commit d18535132523 ("f2fs: separate the options parsing and options checking"), let's fix it. [Scripts] mkfs.f2fs -f /dev/vdb mount -t f2fs -o usrquota /dev/vdb /mnt/f2fs quotacheck -uc /mnt/f2fs umount /mnt/f2fs mount -t f2fs -o usrjquota=aquota.user,jqfmt=vfsold /de...
```diff diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 465604fdc5dd..07f6c8cac07a 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1219,8 +1219,11 @@ static int f2fs_check_quota_consistency(struct fs_context *fc, goto err_jquota_change; if (old_qname) { - if (new_qname && - strcmp(old_qnam...
930a9a6ee8e7ffa20af4bffbfc2bbd21d83bf81c
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()
Problem Details: syzbot reported a f2fs bug as below: Oops: gen[ 107.736417][ T5848] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 UID: 0 PID: 5848 Comm: syz-executor263 Taint...
```diff diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 5aa9d650512d..465604fdc5dd 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1219,7 +1219,8 @@ static int f2fs_check_quota_consistency(struct fs_context *fc, goto err_jquota_change; if (old_qname) { - if (strcmp(old_qname, new_qname) == 0) ...
8fc6056dcf79937c46c97fa4996cda65956437a9
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to detect potential corrupted nid in free_nid_list
Problem Details: As reported, on-disk footer.ino and footer.nid is the same and out-of-range, let's add sanity check on f2fs_alloc_nid() to detect any potential corruption in free_nid_list. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
```diff diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 27743b93e186..286e8a53f8e7 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -27,12 +27,17 @@ static struct kmem_cache *free_nid_slab; static struct kmem_cache *nat_entry_set_slab; static struct kmem_cache *fsync_node_entry_slab; +static inline bool is_in...
2e8f4c2b2bb12fc3d40762f1bb778e95c6ddbc93
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to clear unusable_cap for checkpoint=enable
Problem Details: mount -t f2fs -o checkpoint=disable:10% /dev/vdb /mnt/f2fs/ mount -t f2fs -o remount,checkpoint=enable /dev/vdb /mnt/f2fs/ kernel log: F2FS-fs (vdb): Adjust unusable cap for checkpoint=disable = 204440 / 10% If we has assigned checkpoint=enable mount option, unusable_cap{,_perc} parameters of checkpo...
```diff diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 0638ae9816ac..195ec6e598d2 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -998,6 +998,10 @@ static int f2fs_parse_param(struct fs_context *fc, struct fs_parameter *param) ctx_set_opt(ctx, F2FS_MOUNT_DISABLE_CHECKPOINT); break; case Opt_check...
39aaa337449e71a41d4813be0226a722827ba606
Analyze and fix the following issue in the Linux kernel code: dmaengine: idxd: Fix double free in idxd_setup_wqs()
Problem Details: The clean up in idxd_setup_wqs() has had a couple bugs because the error handling is a bit subtle. It's simpler to just re-write it in a cleaner way. The issues here are: 1) If "idxd->max_wqs" is <= 0 then we call put_device(conf_dev) when "conf_dev" hasn't been initialized. 2) If kzalloc_node() ...
```diff diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c index efe614a528fa..8c4725ad1f64 100644 --- a/drivers/dma/idxd/init.c +++ b/drivers/dma/idxd/init.c @@ -189,27 +189,30 @@ static int idxd_setup_wqs(struct idxd_device *idxd) idxd->wq_enable_map = bitmap_zalloc_node(idxd->max_wqs, GFP_KERNEL, dev_t...
b7cb9a034305d52222433fad10c3de10204f29e7
Analyze and fix the following issue in the Linux kernel code: dmaengine: idxd: Fix refcount underflow on module unload
Problem Details: A recent refactor introduced a misplaced put_device() call, resulting in a reference count underflow during module unload. There is no need to add additional put_device() calls for idxd groups, engines, or workqueues. Although the commit claims: "Note, this also fixes the missing put_device() for idxd...
```diff diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c index 487268fc527b..efe614a528fa 100644 --- a/drivers/dma/idxd/init.c +++ b/drivers/dma/idxd/init.c @@ -1291,7 +1291,10 @@ static void idxd_remove(struct pci_dev *pdev) device_unregister(idxd_confdev(idxd)); idxd_shutdown(pdev); idxd_device_re...
f41c538881eec4dcf5961a242097d447f848cda6
Analyze and fix the following issue in the Linux kernel code: dmaengine: idxd: Remove improper idxd_free
Problem Details: The call to idxd_free() introduces a duplicate put_device() leading to a reference count underflow: refcount_t: underflow; use-after-free. WARNING: CPU: 15 PID: 4428 at lib/refcount.c:28 refcount_warn_saturate+0xbe/0x110 ... Call Trace: <TASK> idxd_remove+0xe4/0x120 [idxd] pci_device_remove+0x3f/0...
```diff diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c index 35bdefd3728b..487268fc527b 100644 --- a/drivers/dma/idxd/init.c +++ b/drivers/dma/idxd/init.c @@ -1294,7 +1294,6 @@ static void idxd_remove(struct pci_dev *pdev) idxd_cleanup(idxd); pci_iounmap(pdev, idxd->reg_base); put_device(idxd_conf...
72dd8b2914b5db1dccf902971c2ea6b541711b28
Analyze and fix the following issue in the Linux kernel code: dmaengine: zynqmp_dma: Add shutdown operation support
Problem Details: Add shutdown callback to ensure that DMA operations are properly stopped and resources are released during system shutdown or kexec operations. Fix incorrect PM state handling in the remove function that was causing clock disable warnings during the shutdown operations, which was not implemented earlie...
```diff diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index d05fc5fcc77d..f7e584de4335 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -1173,9 +1173,9 @@ static void zynqmp_dma_remove(struct platform_device *pdev) dma_async_device_unregister(&zdev...
5f54134428b48261151c725c64b40be54e373345
Analyze and fix the following issue in the Linux kernel code: phy: renesas: rcar-gen3-usb2: Move debug print after register value is updated
Problem Details: Relocate the debug print in rcar_gen3_enable_vbus_ctrl() to appear after the `val` variable is assigned and updated based on the VBUS state. This ensures that the debug log reflects the actual register value being written, improving debugging accuracy. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-l...
```diff diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 8caef9cb228c..7b4a6e8b7508 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -211,7 +211,6 @@ static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan ...
896277138c1344cf9f5c415298f048ee29da274d
Analyze and fix the following issue in the Linux kernel code: phy: qcom: qmp-combo: register a typec mux to change the QMPPHY_MODE
Problem Details: Register a typec mux in order to change the PHY mode on the Type-C mux events depending on the mode and the svid when in Altmode setup. The DisplayPort phy should be left enabled if is still powered on by the DRM DisplayPort controller, so bail out until the DisplayPort PHY is not powered off. The Ty...
```diff diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index c65837fc9e4c..7b5af30f1d02 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -19,6 +19,7 @@ #include <linux/reset.h> #include <linux/slab.h> #includ...
dd7ddd082206f675e967c205df2a35b9c4e64949
Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-cadence: Fix -Wuninitialized in sdhci_cdns_tune_blkgap()
Problem Details: Clang warns (or errors with CONFIG_WERROR=y): drivers/mmc/host/sdhci-cadence.c:297:9: error: variable 'hrs37_mode' is uninitialized when used here [-Werror,-Wuninitialized] 297 | writel(hrs37_mode, hrs37_reg); | ^~~~~~~~~~ drivers/mmc/host/sdhci-cadence.c:291:16:...
```diff diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index a2a4a5b0ab96..eaa88897a256 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -288,13 +288,12 @@ static int sdhci_cdns_tune_blkgap(struct mmc_host *mmc) void __iomem *hrs38_reg = priv->h...
6627be03d3e1195b22172554191365378c3460e7
Analyze and fix the following issue in the Linux kernel code: drm/xe/tuning: Apply "Disable NULL query for Anyhit Shader" to Xe2
Problem Details: Extend the "Disable NULL query for Anyhit Shader" tuning to Xe2 (graphics version 2000+) platforms, in addition to Xe3. This sets the DIS_NULL_QUERY bit in RT_CTRL to disable null query for Anyhit shaders on both Xe2 and Xe3. This is a change in behavior that can regress a userspace not prepared for ...
```diff diff --git a/drivers/gpu/drm/xe/xe_tuning.c b/drivers/gpu/drm/xe/xe_tuning.c index 828b45b24c23..a524170a04d0 100644 --- a/drivers/gpu/drm/xe/xe_tuning.c +++ b/drivers/gpu/drm/xe/xe_tuning.c @@ -99,7 +99,7 @@ static const struct xe_rtp_entry_sr engine_tunings[] = { XE_RTP_ACTIONS(SET(SAMPLER_MODE, INDIRECT_...
dce1b33ed7430c7189b8cc1567498f9e6bf12731
Analyze and fix the following issue in the Linux kernel code: selftests: harness: Rename is_signed_type() to avoid collision with overflow.h
Problem Details: Rename is_signed_type() to is_signed_var() to avoid colliding with a macro of the same name defined by tools' linux/overflow.h. This fixes warnings (and presumably potential test failures) in tests that utilize the selftests harness and happen to (indirectly) include overflow.h. In file included fr...
```diff diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 2925e47db995..8516e8434bc4 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -751,7 +751,7 @@ for (; _metadata->trigger; _metadata->trigger =...
0dfd9ea7bf80fabe11f5b775d762a5cd168cdf41
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Use kvm_get_vcpu_by_id() instead of kvm_get_vcpu()
Problem Details: Since using kvm_get_vcpu() may fail to retrieve the vCPU context, kvm_get_vcpu_by_id() should be used instead. Fixes: 8e3054261bc3 ("LoongArch: KVM: Add IPI user mode read and write function") Fixes: 3956a52bc05b ("LoongArch: KVM: Add EIOINTC read and write functions") Reviewed-by: Yanteng Si <siyante...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index a3a12af9ecbf..026b139dcff2 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -45,7 +45,12 @@ static void eiointc_update_irq(struct loongarch_eiointc *s, int irq, int level) } cp...
5c68549c81bcca70fc464e305ffeefd9af968287
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Fix stack protector issue in send_ipi_data()
Problem Details: Function kvm_io_bus_read() is called in function send_ipi_data(), buffer size of parameter *val should be at least 8 bytes. Since some emulation functions like loongarch_ipi_readl() and kvm_eiointc_read() will write the buffer *val with 8 bytes signed extension regardless parameter len. Otherwise ther...
```diff diff --git a/arch/loongarch/kvm/intc/ipi.c b/arch/loongarch/kvm/intc/ipi.c index e658d5b37c04..7925651d2ccf 100644 --- a/arch/loongarch/kvm/intc/ipi.c +++ b/arch/loongarch/kvm/intc/ipi.c @@ -99,7 +99,7 @@ static void write_mailbox(struct kvm_vcpu *vcpu, int offset, uint64_t data, int static int send_ipi_data(s...
ec879e1a0be8007aa232ffedcf6a6445dfc1a3d7
Analyze and fix the following issue in the Linux kernel code: tracing: fprobe-event: Sanitize wildcard for fprobe event name
Problem Details: Fprobe event accepts wildcards for the target functions, but unless user specifies its event name, it makes an event with the wildcards. /sys/kernel/tracing # echo 'f mutex*' >> dynamic_events /sys/kernel/tracing # cat dynamic_events f:fprobes/mutex*__entry mutex* /sys/kernel/tracing # ls even...
```diff diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 1dbf1d3cf2f1..5a6688832da8 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -2204,7 +2204,7 @@ static inline bool is_good_system_name(const char *name) static inline void sanitize_event_name(char *name) { while (*name++ != '\0') -...
93f616ff870a1fb7e84d472cad0af651b18f9f87
Analyze and fix the following issue in the Linux kernel code: s390/mm: Do not map lowcore with identity mapping
Problem Details: Since the identity mapping is pinned to address zero the lowcore is always also mapped to address zero, this happens regardless of the relocate_lowcore command line option. If the option is specified the lowcore is mapped twice, instead of only once. This means that NULL pointer accesses will succeed ...
```diff diff --git a/arch/s390/boot/vmem.c b/arch/s390/boot/vmem.c index 1d073acd05a7..cea3de4dce8c 100644 --- a/arch/s390/boot/vmem.c +++ b/arch/s390/boot/vmem.c @@ -530,6 +530,9 @@ void setup_vmem(unsigned long kernel_start, unsigned long kernel_end, unsigned l lowcore_address + sizeof(struct lowcore), POPU...
430fa71027b6ac9bb0ce5532b8d0676777d4219a
Analyze and fix the following issue in the Linux kernel code: s390/sclp: Fix SCCB present check
Problem Details: Tracing code called by the SCLP interrupt handler contains early exits if the SCCB address associated with an interrupt is NULL. This check is performed after physical to virtual address translation. If the kernel identity mapping does not start at address zero, the resulting virtual address is never ...
```diff diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index f2e42c1d51aa..98e334724a62 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -77,6 +77,13 @@ unsigned long sclp_console_full; /* The currently active SCLP command word. */ static sclp_cmdw_t active_cmd; +static inli...
8d13d1bdb59d0a2c526869ee571ec51a3a887463
Analyze and fix the following issue in the Linux kernel code: ASoC: cs35l56: Remove SoundWire Clock Divider workaround for CS35L63
Problem Details: Production silicon for CS36L63 has some small differences compared to pre-production silicon. Remove soundwire clock workaround as no longer necessary. We don't want to do tricks with low-level clocking controls if we don't need to. Fixes: 978858791ced ("ASoC: cs35l56: Add initial support for CS35L63 ...
```diff diff --git a/sound/soc/codecs/cs35l56-sdw.c b/sound/soc/codecs/cs35l56-sdw.c index ee14031695a1..3905c9cb188a 100644 --- a/sound/soc/codecs/cs35l56-sdw.c +++ b/sound/soc/codecs/cs35l56-sdw.c @@ -393,74 +393,6 @@ static int cs35l56_sdw_update_status(struct sdw_slave *peripheral, return 0; } -static int cs35...
8dadc11b67d4b83deff45e4889b3b5540b9c0a7f
Analyze and fix the following issue in the Linux kernel code: ASoC: cs35l56: Handle new algorithms IDs for CS35L63
Problem Details: CS35L63 uses different algorithm IDs from CS35L56. Add a new mechanism to handle different alg IDs between parts in the CS35L56 driver. Fixes: 978858791ced ("ASoC: cs35l56: Add initial support for CS35L63 for I2C and SoundWire") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-...
```diff diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h index f44aabde805e..7c8bbe8ad1e2 100644 --- a/include/sound/cs35l56.h +++ b/include/sound/cs35l56.h @@ -306,6 +306,7 @@ struct cs35l56_base { struct gpio_desc *reset_gpio; struct cs35l56_spi_payload *spi_payload_buf; const struct cs35l56_fw_re...
f135fb24ef29335b94921077588cae445bc7f099
Analyze and fix the following issue in the Linux kernel code: ASoC: cs35l56: Update Firmware Addresses for CS35L63 for production silicon
Problem Details: Production silicon for CS36L63 has some small differences compared to pre-production silicon. Update firmware addresses, which are different. No product was ever released with pre-production silicon so there is no need for the driver to include support for it. Fixes: 978858791ced ("ASoC: cs35l56: Add...
```diff diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h index e17c4cadd04d..f44aabde805e 100644 --- a/include/sound/cs35l56.h +++ b/include/sound/cs35l56.h @@ -107,8 +107,8 @@ #define CS35L56_DSP1_PMEM_5114 0x3804FE8 #define CS35L63_DSP1_FW_VER CS35L56_DSP1_FW_VER -#define CS35L63_DSP1_HALO_STA...
0078e94a4733454d1ffa3888afe88bf19c81b91c
Analyze and fix the following issue in the Linux kernel code: LoongArch: Rename GCC_PLUGIN_STACKLEAK to KSTACK_ERASE
Problem Details: Commit 57fbad15c2eee772 ("stackleak: Rename STACKLEAK to KSTACK_ERASE") misses the stackframe.h part for LoongArch, so fix it. Fixes: 57fbad15c2eee772 ("stackleak: Rename STACKLEAK to KSTACK_ERASE") Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
```diff diff --git a/arch/loongarch/include/asm/stackframe.h b/arch/loongarch/include/asm/stackframe.h index 3eda298702b1..5cb568a60cf8 100644 --- a/arch/loongarch/include/asm/stackframe.h +++ b/arch/loongarch/include/asm/stackframe.h @@ -58,7 +58,7 @@ .endm .macro STACKLEAK_ERASE -#ifdef CONFIG_GCC_PLUGIN_STACKL...
63dbd8fb2af3a89466538599a9acb2d11ef65c06
Analyze and fix the following issue in the Linux kernel code: LoongArch: Optimize module load time by optimizing PLT/GOT counting
Problem Details: When enabling CONFIG_KASAN, CONFIG_PREEMPT_VOLUNTARY_BUILD and CONFIG_PREEMPT_VOLUNTARY at the same time, there will be soft deadlock, the relevant logs are as follows: rcu: INFO: rcu_sched self-detected stall on CPU ... Call Trace: [<900000000024f9e4>] show_stack+0x5c/0x180 [<90000000002482f4>] dump_...
```diff diff --git a/arch/loongarch/kernel/module-sections.c b/arch/loongarch/kernel/module-sections.c index e2f30ff9afde..a43ba7f9f987 100644 --- a/arch/loongarch/kernel/module-sections.c +++ b/arch/loongarch/kernel/module-sections.c @@ -8,6 +8,7 @@ #include <linux/module.h> #include <linux/moduleloader.h> #include...