id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
cfa7d9b1e3a8604afc84e9e51d789c29574fb216
Analyze and fix the following issue in the Linux kernel code: cnic: Fix use-after-free bugs in cnic_delete_task
Problem Details: The original code uses cancel_delayed_work() in cnic_cm_stop_bnx2x_hw(), which does not guarantee that the delayed work item 'delete_task' has fully completed if it was already running. Additionally, the delayed work item is cyclic, the flush_workqueue() in cnic_cm_stop_bnx2x_hw() only blocks and waits...
```diff diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index a9040c42d2ff..6e97a5a7daaf 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c @@ -4230,8 +4230,7 @@ static void cnic_cm_stop_bnx2x_hw(struct cnic_dev *dev) cnic_bnx2x_dele...
3191df0a4882c827cac29925e80ecb1775b904bd
Analyze and fix the following issue in the Linux kernel code: devlink rate: Remove unnecessary 'static' from a couple places
Problem Details: devlink_rate_node_get_by_name() and devlink_rate_nodes_destroy() have a couple of unnecessary static variables for iterating over devlink rates. This could lead to races/corruption/unhappiness if two concurrent operations execute the same function. Remove 'static' from both. It's amazing this was mis...
```diff diff --git a/net/devlink/rate.c b/net/devlink/rate.c index 110b3fa8a0b1..264fb82cba19 100644 --- a/net/devlink/rate.c +++ b/net/devlink/rate.c @@ -34,7 +34,7 @@ devlink_rate_leaf_get_from_info(struct devlink *devlink, struct genl_info *info) static struct devlink_rate * devlink_rate_node_get_by_name(struct de...
cca7b1cfd7b8a0eff2a3510c5e0f10efe8fa3758
Analyze and fix the following issue in the Linux kernel code: net: liquidio: fix overflow in octeon_init_instr_queue()
Problem Details: The expression `(conf->instr_type == 64) << iq_no` can overflow because `iq_no` may be as high as 64 (`CN23XX_MAX_RINGS_PER_PF`). Casting the operand to `u64` ensures correct 64-bit arithmetic. Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters") Signed-off-by: Alexey Nepomnyashih ...
```diff diff --git a/drivers/net/ethernet/cavium/liquidio/request_manager.c b/drivers/net/ethernet/cavium/liquidio/request_manager.c index de8a6ce86ad7..12105ffb5dac 100644 --- a/drivers/net/ethernet/cavium/liquidio/request_manager.c +++ b/drivers/net/ethernet/cavium/liquidio/request_manager.c @@ -126,7 +126,7 @@ int o...
87ebb628a5acb892eba41ef1d8989beb8f036034
Analyze and fix the following issue in the Linux kernel code: net: clear sk->sk_ino in sk_set_socket(sk, NULL)
Problem Details: Andrei Vagin reported that blamed commit broke CRIU. Indeed, while we want to keep sk_uid unchanged when a socket is cloned, we want to clear sk->sk_ino. Otherwise, sock_diag might report multiple sockets sharing the same inode number. Move the clearing part from sock_orphan() to sk_set_socket(sk, N...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index fb13322a11fc..2e14283c5be1 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2061,6 +2061,9 @@ static inline void sk_set_socket(struct sock *sk, struct socket *sock) if (sock) { WRITE_ONCE(sk->sk_uid, SOCK_INODE(sock)->i_uid); WRITE_O...
3fbfe251cc9f6d391944282cdb9bcf0bd02e01f8
Analyze and fix the following issue in the Linux kernel code: Revert "net/mlx5e: Update and set Xon/Xoff upon port speed set"
Problem Details: This reverts commit d24341740fe48add8a227a753e68b6eedf4b385a. It causes errors when trying to configure QoS, as well as loss of L2 connectivity (on multi-host devices). Reported-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/20250910170011.70528106@kernel.org Fixes: d24341740fe4 ("...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index e680673ffb72..15eded36b872 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -139,8 +139,6 @@ void mlx5e_update_carrier...
a29fea30dd93da16652930162b177941abd8c75e
Analyze and fix the following issue in the Linux kernel code: perf: arm_spe: Prevent overflow in PERF_IDX2OFF()
Problem Details: Cast nr_pages to unsigned long to avoid overflow when handling large AUX buffer sizes (>= 2 GiB). Fixes: d5d9696b0380 ("drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension") Signed-off-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
```diff diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index 591f72fa0327..fa50645fedda 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -99,7 +99,8 @@ struct arm_spe_pmu { #define to_spe_pmu(p) (container_of(p, struct arm_spe_pmu, pmu)) /* Convert a free-running ind...
105f56877f2d5f82d71e20b45eb7be7c24c3d908
Analyze and fix the following issue in the Linux kernel code: coresight: trbe: Prevent overflow in PERF_IDX2OFF()
Problem Details: Cast nr_pages to unsigned long to avoid overflow when handling large AUX buffer sizes (>= 2 GiB). Fixes: 3fbf7f011f24 ("coresight: sink: Add TRBE driver") Signed-off-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
```diff diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c index 8267dd1a2130..8f426f94e32a 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -23,7 +23,8 @@ #include "coresight-self-hosted-trace.h" #inc...
300b072df72694ea330c4c673c035253e07827b8
Analyze and fix the following issue in the Linux kernel code: jfs: fix uninitialized waitqueue in transaction manager
Problem Details: The transaction manager initialization in txInit() was not properly initializing TxBlock[0].waitor waitqueue, causing a crash when txEnd(0) is called on read-only filesystems. When a filesystem is mounted read-only, txBegin() returns tid=0 to indicate no transaction. However, txEnd(0) still gets calle...
```diff diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index be17e3c43582..7840a03e5bcb 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c @@ -272,14 +272,15 @@ int txInit(void) if (TxBlock == NULL) return -ENOMEM; - for (k = 1; k < nTxBlock - 1; k++) { - TxBlock[k].next = k + 1; + for (k = 0; k...
7a5aa54fba2bd591b22b9b624e6baa9037276986
Analyze and fix the following issue in the Linux kernel code: jfs: Verify inode mode when loading from disk
Problem Details: The inode mode loaded from corrupted disk can be invalid. Do like what commit 0a9e74051313 ("isofs: Verify inode mode when loading from disk") does. Reported-by: syzbot <syzbot+895c23f6917da440ed0d@syzkaller.appspotmail.com> Closes: https://syzkaller.appspot.com/bug?extid=895c23f6917da440ed0d Signed-o...
```diff diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index fcedeb514e14..21f3d029da7d 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c @@ -59,9 +59,15 @@ struct inode *jfs_iget(struct super_block *sb, unsigned long ino) */ inode->i_link[inode->i_size] = '\0'; } - } else { + } else if (S_ISCHR(inode->i_mode)...
672beab06656f2f1bda4708cda2b9af61c58a7ea
Analyze and fix the following issue in the Linux kernel code: psp: rename our psp_dev_destroy()
Problem Details: psp_dev_destroy() was already used in drivers/crypto/ccp/psp-dev.c Use psp_dev_free() instead, to avoid a link error when CRYPTO_DEV_SP_CCP=y Fixes: 00c94ca2b99e ("psp: base PSP device support") Closes: https://lore.kernel.org/netdev/CANn89i+ZdBDEV6TE=Nw5gn9ycTzWw4mZOpPuCswgwEsrgOyNnw@mail.gmail.com/...
```diff diff --git a/net/psp/psp.h b/net/psp/psp.h index 0f34e1a23fdd..9f19137593a0 100644 --- a/net/psp/psp.h +++ b/net/psp/psp.h @@ -13,7 +13,7 @@ extern struct xarray psp_devs; extern struct mutex psp_devs_lock; -void psp_dev_destroy(struct psp_dev *psd); +void psp_dev_free(struct psp_dev *psd); int psp_dev_che...
e31c0eb10388e2af0502b77e61453efbc8a4f974
Analyze and fix the following issue in the Linux kernel code: drivers/perf: hisi: Add support for HiSilicon NoC PMU
Problem Details: Adds the support for HiSilicon NoC (Network on Chip) PMU which will be used to monitor the events on the system bus. The PMU device will be named after the SCL ID (either Super CPU cluster or Super IO cluster) and the index ID, just similar to other HiSilicon Uncore PMUs. Below PMU formats are provided...
```diff diff --git a/Documentation/admin-guide/perf/hisi-pmu.rst b/Documentation/admin-guide/perf/hisi-pmu.rst index 48992a0b8e94..6f0ea4f641cc 100644 --- a/Documentation/admin-guide/perf/hisi-pmu.rst +++ b/Documentation/admin-guide/perf/hisi-pmu.rst @@ -112,6 +112,17 @@ uring channel. It is 2 bits. Some important code...
f05c03ffc786968ec728422728f5226522886d9c
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix PRT flag for gfx12
Problem Details: AMDGPU_PTE_PRT_GFX12 flag is missed during pageTable rework, add it back. Fixes: 6716a823d18d ("drm/amdgpu: rework how PTE flags are generated v3") Signed-off-by: Joe Wang <joe.wang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index 7cc16af1868b..404cc8c2ff2c 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c @@ -521,6 +521,7 @@ static void gmc_v12_0_get_vm_pte(struct amdgpu_device *adev, *flag...
c2fcb2e79d6f4113e93aabc50158bc97a359d1f5
Analyze and fix the following issue in the Linux kernel code: EDAC/versalnet: Return the correct error in mc_probe()
Problem Details: Return -ENOMEM if memory allocation in mc_probe() fails. [ bp: Massage commit message. ] Fixes: d5fe2fec6c40 ("EDAC: Add a driver for the AMD Versal NET DDR controller") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
```diff diff --git a/drivers/edac/versalnet_edac.c b/drivers/edac/versalnet_edac.c index 66714fffa591..7c5db8bf0595 100644 --- a/drivers/edac/versalnet_edac.c +++ b/drivers/edac/versalnet_edac.c @@ -888,8 +888,10 @@ static int mc_probe(struct platform_device *pdev) } priv = devm_kzalloc(&pdev->dev, sizeof(*priv),...
a9f859b516ac98c06b0d24e691fceab32a9665d5
Analyze and fix the following issue in the Linux kernel code: s390/bitops: Limit return value range of __flogr()
Problem Details: With the recent ffs() and ffs64() optimization a logical AND operation was removed, which allowed the compiler to tell the return value range of both functions. This may lead to compile warnings as reported by the kernel test robot: drivers/infiniband/hw/mlx5/mr.c: In function 'mlx5r_cache_create_e...
```diff diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index 9dfb687ba620..9bc70acbac9e 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h @@ -169,7 +169,7 @@ static __always_inline unsigned char __flogr(unsigned long word) asm volatile( " flogr ...
8dc5245673cf7f33743e5c0d2a4207c0b8df3067
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Avoid copy_*_user() with lock hold in kvm_pch_pic_regs_access()
Problem Details: Function copy_from_user() and copy_to_user() may sleep because of page fault, and they cannot be called in spin_lock hold context. Here move function calling of copy_from_user() and copy_to_user() out of spinlock context in function kvm_pch_pic_regs_access(). Otherwise there will be possible warning s...
```diff diff --git a/arch/loongarch/kvm/intc/pch_pic.c b/arch/loongarch/kvm/intc/pch_pic.c index 119290bcea79..baf3b4faf7ea 100644 --- a/arch/loongarch/kvm/intc/pch_pic.c +++ b/arch/loongarch/kvm/intc/pch_pic.c @@ -348,6 +348,7 @@ static int kvm_pch_pic_regs_access(struct kvm_device *dev, struct kvm_device_attr *a...
01a8e68396a6d51f5ba92021ad1a4b8eaabdd0e7
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Avoid copy_*_user() with lock hold in kvm_eiointc_sw_status_access()
Problem Details: Function copy_from_user() and copy_to_user() may sleep because of page fault, and they cannot be called in spin_lock hold context. Here move funtcion calling of copy_from_user() and copy_to_user() out of function kvm_eiointc_sw_status_access(). Otherwise there will be possible warning such as: BUG: s...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index 6455420c7737..c32333695381 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -527,19 +527,17 @@ static int kvm_eiointc_regs_access(struct kvm_device *dev, static int kvm_eiointc_sw...
62f11796a0dfa1a2ef5f50a2d1bc81c81628fb8e
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Avoid copy_*_user() with lock hold in kvm_eiointc_regs_access()
Problem Details: Function copy_from_user() and copy_to_user() may sleep because of page fault, and they cannot be called in spin_lock hold context. Here move function calling of copy_from_user() and copy_to_user() before spinlock context in function kvm_eiointc_ctrl_access(). Otherwise there will be possible warning s...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index 2b3c5203738a..6455420c7737 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -467,19 +467,17 @@ static int kvm_eiointc_ctrl_access(struct kvm_device *dev, static int kvm_eiointc_re...
47256c4c8b1bfbc63223a0da2d4fa90b6ede5cbb
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Avoid copy_*_user() with lock hold in kvm_eiointc_ctrl_access()
Problem Details: Function copy_from_user() and copy_to_user() may sleep because of page fault, and they cannot be called in spin_lock hold context. Here move function calling of copy_from_user() and copy_to_user() before spinlock context in function kvm_eiointc_ctrl_access(). Otherwise there will be possible warning s...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index 026b139dcff2..2b3c5203738a 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -426,21 +426,26 @@ static int kvm_eiointc_ctrl_access(struct kvm_device *dev, struct loongarch_eiointc *...
f58c9aa1065f73d243904b267c71f6a9d1e9f90e
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Fix VM migration failure with PTW enabled
Problem Details: With PTW disabled system, bit _PAGE_DIRTY is a HW bit for page writing. However with PTW enabled system, bit _PAGE_WRITE is also a "HW bit" for page writing, because hardware synchronizes _PAGE_WRITE to _PAGE_DIRTY automatically. Previously, _PAGE_WRITE is treated as a SW bit to record the page writeab...
```diff diff --git a/arch/loongarch/include/asm/kvm_mmu.h b/arch/loongarch/include/asm/kvm_mmu.h index 099bafc6f797..e36cc7e8ed20 100644 --- a/arch/loongarch/include/asm/kvm_mmu.h +++ b/arch/loongarch/include/asm/kvm_mmu.h @@ -16,6 +16,13 @@ */ #define KVM_MMU_CACHE_MIN_PAGES (CONFIG_PGTABLE_LEVELS - 1) +/* + * _P...
ac398f570724c41e5e039d54e4075519f6af7408
Analyze and fix the following issue in the Linux kernel code: LoongArch: vDSO: Check kcalloc() result in init_vdso()
Problem Details: Add a NULL-pointer check after the kcalloc() call in init_vdso(). If allocation fails, return -ENOMEM to prevent a possible dereference of vdso_info.code_mapping.pages when it is NULL. Cc: stable@vger.kernel.org Fixes: 2ed119aef60d ("LoongArch: Set correct size for vDSO code mapping") Signed-off-by: G...
```diff diff --git a/arch/loongarch/kernel/vdso.c b/arch/loongarch/kernel/vdso.c index 7b888d9085a0..dee1a15d7f4c 100644 --- a/arch/loongarch/kernel/vdso.c +++ b/arch/loongarch/kernel/vdso.c @@ -54,6 +54,9 @@ static int __init init_vdso(void) vdso_info.code_mapping.pages = kcalloc(vdso_info.size / PAGE_SIZE, sizeo...
677d4a52d4dc4a147d5e84af9ff207832578be70
Analyze and fix the following issue in the Linux kernel code: LoongArch: Fix unreliable stack for live patching
Problem Details: When testing the kernel live patching with "modprobe livepatch-sample", there is a timeout over 15 seconds from "starting patching transition" to "patching complete". The dmesg command shows "unreliable stack" for user tasks in debug mode, here is one of the messages: livepatch: klp_try_switch_task:...
```diff diff --git a/arch/loongarch/kernel/stacktrace.c b/arch/loongarch/kernel/stacktrace.c index 9a038d1070d7..387dc4d3c486 100644 --- a/arch/loongarch/kernel/stacktrace.c +++ b/arch/loongarch/kernel/stacktrace.c @@ -51,12 +51,13 @@ int arch_stack_walk_reliable(stack_trace_consume_fn consume_entry, if (task == curr...
539d7344d4feaea37e05863e9aa86bd31f28e46f
Analyze and fix the following issue in the Linux kernel code: objtool/LoongArch: Mark special atomic instruction as INSN_BUG type
Problem Details: When compiling with LLVM and CONFIG_RUST is set, there exists the following objtool warning: rust/compiler_builtins.o: warning: objtool: __rust__unordsf2(): unexpected end of section .text.unlikely. objdump shows that the end of section .text.unlikely is an atomic instruction: amswap.w $z...
```diff diff --git a/tools/arch/loongarch/include/asm/inst.h b/tools/arch/loongarch/include/asm/inst.h index c25b5853181d..d68fad63c8b7 100644 --- a/tools/arch/loongarch/include/asm/inst.h +++ b/tools/arch/loongarch/include/asm/inst.h @@ -51,6 +51,10 @@ enum reg2i16_op { bgeu_op = 0x1b, }; +enum reg3_op { + amswa...
baad7830ee9a56756b3857348452fe756cb0a702
Analyze and fix the following issue in the Linux kernel code: objtool/LoongArch: Mark types based on break immediate code
Problem Details: If the break immediate code is 0, it should mark the type as INSN_TRAP. If the break immediate code is 1, it should mark the type as INSN_BUG. While at it, format the code style and add the code comment for nop. Cc: stable@vger.kernel.org Suggested-by: WANG Rui <wangrui@loongson.cn> Signed-off-by: Ti...
```diff diff --git a/tools/objtool/arch/loongarch/decode.c b/tools/objtool/arch/loongarch/decode.c index b6fdc68053cc..428ba6de3821 100644 --- a/tools/objtool/arch/loongarch/decode.c +++ b/tools/objtool/arch/loongarch/decode.c @@ -310,10 +310,16 @@ int arch_decode_instruction(struct objtool_file *file, const struct sec...
b98b208300573f4ab29507f81194a6030b208444
Analyze and fix the following issue in the Linux kernel code: btrfs: reject invalid compression level
Problem Details: Inspired by recent changes to compression level parsing in 6db1df415d73fc ("btrfs: accept and ignore compression level for lzo") it turns out that we do not do any extra validation for compression level input string, thus allowing things like "compress=lzo:invalid" to be accepted without warnings. Alt...
```diff diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index d09d622016ef..35e3071cec06 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -1616,25 +1616,29 @@ out: } /* - * Convert the compression suffix (eg. after "zlib" starting with ":") to - * level, unrecognized string will set ...
96e556ef5ced51eec140db4bd89204c9322959cc
Analyze and fix the following issue in the Linux kernel code: drm/i915/gvt: Fix intel_vgpu_gpa_to_mmio_offset kernel docs
Problem Details: intel_vgpu_gpa_to_mmio_offset states that it returns 'Zero on success, negative error code if failed' in the kernel docs. This is false. The function actually returns 'The MMIO offset of the given GPA'. Correct the docs. Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Andi Sh...
```diff diff --git a/drivers/gpu/drm/i915/gvt/mmio.c b/drivers/gpu/drm/i915/gvt/mmio.c index c60d1e548800..db5cd65100fe 100644 --- a/drivers/gpu/drm/i915/gvt/mmio.c +++ b/drivers/gpu/drm/i915/gvt/mmio.c @@ -49,7 +49,7 @@ * @gpa: guest physical address * * Returns: - * Zero on success, negative error code if faile...
6fa6c7a50e465c32a075d3e0341bcd4f0fe0bb47
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix incorrect error handling in shmem_pwrite()
Problem Details: shmem_pwrite() currently checks for short writes before negative error codes, which can overwrite real errors (e.g., -EFBIG) with -EIO. Reorder the checks to return negative errors first, then handle short writes. Signed-off-by: Taotao Chen <chentaotao@didiglobal.com> Reviewed-by: Andi Shyti <andi.shy...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c index b9dae15c1d16..26dda55a07ff 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c @@ -441,11 +441,20 @@ shmem_pwrite(struct drm_i915_gem_object *obj, written...
e296a2266c572a7537e638b0dbbfc66d11df46f9
Analyze and fix the following issue in the Linux kernel code: drm/i915: set O_LARGEFILE in __create_shmem()
Problem Details: Without O_LARGEFILE, file->f_op->write_iter calls generic_write_check_limits(), which enforces a 2GB (MAX_NON_LFS) limit, causing -EFBIG on large writes. In shmem_pwrite(), this error is later masked as -EIO due to the error handling order, leading to igt failures like gen9_exec_parse(bb-large). Set ...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c index e3d188455f67..b9dae15c1d16 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c @@ -514,6 +514,13 @@ static int __create_shmem(struct drm_i915_private *i915,...
0aeb54ac4cd5cf8f60131b4d9ec0b6dc9c27b20d
Analyze and fix the following issue in the Linux kernel code: tls: make sure to abort the stream if headers are bogus
Problem Details: Normally we wait for the socket to buffer up the whole record before we service it. If the socket has a tiny buffer, however, we read out the data sooner, to prevent connection stalls. Make sure that we abort the connection when we find out late that the record is actually invalid. Retrying the parsing...
```diff diff --git a/net/tls/tls.h b/net/tls/tls.h index 4e077068e6d9..e4c42731ce39 100644 --- a/net/tls/tls.h +++ b/net/tls/tls.h @@ -141,6 +141,7 @@ void update_sk_prot(struct sock *sk, struct tls_context *ctx); int wait_on_pending_writer(struct sock *sk, long *timeo); void tls_err_abort(struct sock *sk, int err)...
659a2899a57da59f433182eba571881884d6323e
Analyze and fix the following issue in the Linux kernel code: tcp: add datapath logic for PSP with inline key exchange
Problem Details: Add validation points and state propagation to support PSP key exchange inline, on TCP connections. The expectation is that application will use some well established mechanism like TLS handshake to establish a secure channel over the connection and if both endpoints are PSP-capable - exchange and inst...
```diff diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h index d8ff24a33459..58d91ccc56e0 100644 --- a/include/net/dropreason-core.h +++ b/include/net/dropreason-core.h @@ -127,6 +127,8 @@ FN(CANXL_RX_INVALID_FRAME) \ FN(PFMEMALLOC) \ FN(DUALPI2_STEP_DROP) \ + FN(PSP_INPUT) \ + FN(PSP...
1428cd764cd708d53a072a2f208d87014bfe05bc
Analyze and fix the following issue in the Linux kernel code: IB/sa: Fix sa_local_svc_timeout_ms read race
Problem Details: When computing the delta, the sa_local_svc_timeout_ms is read without ib_nl_request_lock held. Though unlikely in practice, this can cause a race condition if multiple local service threads are managing the timeout. Fixes: 2ca546b92a02 ("IB/sa: Route SA pathrecord query through netlink") Signed-off-by...
```diff diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index c0a7af1b4fe4..c23e9c847314 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c @@ -1074,6 +1074,8 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb, if (timeout > IB_SA_LOCAL_SVC_T...
1b34cbbf4f011a121ef7b2d7d6e6920a036d5285
Analyze and fix the following issue in the Linux kernel code: crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg
Problem Details: Issuing two writes to the same af_alg socket is bogus as the data will be interleaved in an unpredictable fashion. Furthermore, concurrent writes may create inconsistencies in the internal socket state. Disallow this by adding a new ctx->write field that indiciates exclusive ownership for writing. F...
```diff diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 407f2c238f2c..ca6fdcc6c54a 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -970,6 +970,12 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, } lock_sock(sk); + if (ctx->write) { + release_sock(sk); + return -EBUSY; + } +...
9574b2330dbd2b5459b74d3b5e9619d39299fc6f
Analyze and fix the following issue in the Linux kernel code: crypto: af_alg - Set merge to zero early in af_alg_sendmsg
Problem Details: If an error causes af_alg_sendmsg to abort, ctx->merge may contain a garbage value from the previous loop. This may then trigger a crash on the next entry into af_alg_sendmsg when it attempts to do a merge that can't be done. Fix this by setting ctx->merge to zero near the start of the loop. Fixes: ...
```diff diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 0da7c1ac778a..407f2c238f2c 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -1019,6 +1019,8 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, continue; } + ctx->merge = 0; + if (!af_alg_writable(sk)) { err = af_...
200651b9b8aadfbbec852f0e5d042d9abe75e2ab
Analyze and fix the following issue in the Linux kernel code: RDMA/core: Resolve MAC of next-hop device without ARP support
Problem Details: Currently, if the next-hop netdevice does not support ARP resolution, the destination MAC address is silently set to zero without reporting an error. This leads to incorrect behavior and may result in packet transmission failures. Fix this by deferring MAC resolution to the IP stack via neighbour look...
```diff diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 594e7ee335f7..ca86c482662f 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -454,14 +454,10 @@ static int addr_resolve_neigh(const struct dst_entry *dst, { int ret = 0; - if (ndev_flags & I...
6313115c55f44f7bee3f469c91d3de60d724eabd
Analyze and fix the following issue in the Linux kernel code: arm64: dts: apple: Add ethernet0 alias for J375 template
Problem Details: The alias is used by the boot loader to fill the MAC address. Fixes: aaa1d42a4ce3 ("arm64: dts: apple: Add J375 devicetrees") Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Sven Peter <sven@kernel.org> Signed-off-by: Sven Peter <sven@kernel.org>
```diff diff --git a/arch/arm64/boot/dts/apple/t600x-j375.dtsi b/arch/arm64/boot/dts/apple/t600x-j375.dtsi index ed38acc0dfc3..c0fb93ae72f4 100644 --- a/arch/arm64/boot/dts/apple/t600x-j375.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j375.dtsi @@ -12,6 +12,7 @@ / { aliases { bluetooth0 = &bluetooth0; + ethernet0 ...
01adc8207cf3c42c5cf389be7578fd726ef26fe1
Analyze and fix the following issue in the Linux kernel code: mtd: nand: ecc-mxic: Lower log level during init
Problem Details: A working init shall be silent rather than exposing the configuration with kernel messages at the error level. Thwart myself from the past and use the debug level for these. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
```diff diff --git a/drivers/mtd/nand/ecc-mxic.c b/drivers/mtd/nand/ecc-mxic.c index 1bf9a5a64b87..60cdcb4175ef 100644 --- a/drivers/mtd/nand/ecc-mxic.c +++ b/drivers/mtd/nand/ecc-mxic.c @@ -322,14 +322,14 @@ static int mxic_ecc_init_ctx(struct nand_device *nand, struct device *dev) sg_init_table(ctx->sg, 2); /* ...
9aaec660b5be29f23aaa7d1b0ae426b895dc0ca5
Analyze and fix the following issue in the Linux kernel code: udp: refine __udp_enqueue_schedule_skb() test
Problem Details: Commit 5a465a0da13e ("udp: Fix multiple wraparounds of sk->sk_rmem_alloc.") allowed to slightly overshoot sk->sk_rmem_alloc, when many cpus are trying to feed packets to a common UDP socket. This patch, combined with the following one reduces false sharing on the victim socket under DDOS. Signed-off-...
```diff diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cca41c569f37..edd846fee90f 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1739,8 +1739,8 @@ int __udp_enqueue_schedule_skb(struct sock *sk, struct sk_buff *skb) if (rcvbuf > INT_MAX >> 1) goto drop; - /* Always allow at least one packet for smal...
719de070f764e079cdcb4ddeeb5b19b3ddddf9c1
Analyze and fix the following issue in the Linux kernel code: usb: xhci-pci: add support for hosts with zero USB3 ports
Problem Details: Add xhci support for PCI hosts that have zero USB3 ports. Avoid creating a shared Host Controller Driver (HCD) when there is only one root hub. Additionally, all references to 'xhci->shared_hcd' are now checked before use. Only xhci-pci.c requires modification to accommodate this change, as the xhci c...
```diff diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 00fac8b233d2..5c8ab519f497 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -610,7 +610,7 @@ int xhci_pci_common_probe(struct pci_dev *dev, const struct pci_device_id *id) { int retval; struct xhci_hcd...
08fa726e66039dfa80226dfa112931f60ad4c898
Analyze and fix the following issue in the Linux kernel code: Revert "usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running"
Problem Details: This reverts commit 28a76fcc4c85dd39633fb96edb643c91820133e3. No actual HW bugs are known where Endpoint Context shows Running state but Stop Endpoint fails repeatedly with Context State Error and leaves the endpoint state unchanged. Stop Endpoint retries on Running EPs have been performed since early...
```diff diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 3c08682020f0..d7bef1dd519f 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -1262,19 +1262,16 @@ reset_done: * Stopped state, but it will soon change to Running. * * Assume this bug on un...
fe2cddc648f0d7cdf7377e1cb5a8c7dc5547e290
Analyze and fix the following issue in the Linux kernel code: tcp: accecn: AccECN option ceb/cep and ACE field multi-wrap heuristics
Problem Details: The AccECN option ceb/cep heuristic algorithm is from AccECN spec Appendix A.2.2 to mitigate against false ACE field overflows. Armed with ceb delta from option, delivered bytes, and delivered packets it is possible to estimate how many times ACE field wrapped. This calculation is necessary only if mo...
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index 78dd7b8a4145..7c51a0a5ace8 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -256,6 +256,7 @@ static_assert((1 << ATO_BITS) > TCP_DELACK_MAX); #define TCP_ACCECN_MAXSIZE (TCPOLEN_ACCECN_BASE + \ TCPOLEN_ACCECN_PERFIELD * \ TCP_ACCE...
542a495cbaa6dc57a310da62b501fdf318657cad
Analyze and fix the following issue in the Linux kernel code: tcp: AccECN core
Problem Details: This change implements Accurate ECN without negotiation and AccECN Option (that will be added by later changes). Based on AccECN specifications: https://tools.ietf.org/id/draft-ietf-tcpm-accurate-ecn-28.txt Accurate ECN allows feeding back the number of CE (congestion experienced) marks accurately t...
```diff diff --git a/Documentation/networking/net_cachelines/tcp_sock.rst b/Documentation/networking/net_cachelines/tcp_sock.rst index 7bbda5944ee2..31313a9adccc 100644 --- a/Documentation/networking/net_cachelines/tcp_sock.rst +++ b/Documentation/networking/net_cachelines/tcp_sock.rst @@ -101,6 +101,8 @@ u32 ...
9f6c63285737b141ca25a619add80a96111b8b96
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail
Problem Details: Previously, aborting work could return early after engine reset or resume failure, skipping the necessary runtime_put cleanup leaving the device with incorrect reference count breaking runtime power management state. Replace early returns with goto statements to ensure runtime_put is always executed. ...
```diff diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c index fa1720fa06a4..b9902dd0cad5 100644 --- a/drivers/accel/ivpu/ivpu_job.c +++ b/drivers/accel/ivpu/ivpu_job.c @@ -1014,7 +1014,7 @@ void ivpu_context_abort_work_fn(struct work_struct *work) if (vdev->fw->sched_mode == VPU_SCHEDULIN...
187e16f69de2ba30779b97ba8852b583fd7f5fad
Analyze and fix the following issue in the Linux kernel code: drm/xe: Work around clang multiple goto-label error
Problem Details: When using drm_exec_retry_on_contention(), clang may consider all labels for which we take addresses in a function as potential retry goto targets, although strictly only one is possible. It will then in some situations generate false positive errors. In this case, the compiler, for some architectures...
```diff diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c index 6fad5d469629..1d667fa36cf3 100644 --- a/drivers/gpu/drm/xe/xe_migrate.c +++ b/drivers/gpu/drm/xe/xe_migrate.c @@ -394,6 +394,24 @@ struct xe_migrate *xe_migrate_alloc(struct xe_tile *tile) return m; } +static int xe_migrat...
f7e79530efdd2a550ffec087f9d07a8b7f48977d
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Refactor priority_bands_show for readability
Problem Details: Reduce code duplication and improve the overall readability of the debugfs output for job scheduling priority bands. Additionally fix clang-tidy warning about missing default case in the switch statement. Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Reviewed-by: Lizhi Hou <liz...
```diff diff --git a/drivers/accel/ivpu/ivpu_debugfs.c b/drivers/accel/ivpu/ivpu_debugfs.c index cd24ccd20ba6..3bd85ee6c26b 100644 --- a/drivers/accel/ivpu/ivpu_debugfs.c +++ b/drivers/accel/ivpu/ivpu_debugfs.c @@ -398,35 +398,25 @@ static int dct_active_set(void *data, u64 active_percent) DEFINE_DEBUGFS_ATTRIBUTE(i...
6e4a5154934f8c7283452651c4d398d34a46e952
Analyze and fix the following issue in the Linux kernel code: dt-bindings: touchscreen: resistive-adc-touch: change to unevaluatedProperties
Problem Details: Change additionalProperties to unevaluatedProperties because it refs to touchscreen.yaml. Fix below CHECK_DTBS warnings: arch/arm/boot/dts/nxp/imx/imx6dl-skov-revc-lt6.dtb: touchscreen (resistive-adc-touch): 'touchscreen-y-plate-ohms' does not match any of the regexes: '^pinctrl-[0-9]+$' from schema ...
```diff diff --git a/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml b/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml index 7fc22a403d48..059d419f6c1c 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml +++ b/Documentation/...
6c521885da34e61908d84a4f3eda85545f060848
Analyze and fix the following issue in the Linux kernel code: Input: imx6ul_tsc - fix typo in register name
Problem Details: Replace 'SETING' with 'SETTING'. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250917080534.1772202-2-dario.binacchi@amarulasolutions.com Sig...
```diff diff --git a/drivers/input/touchscreen/imx6ul_tsc.c b/drivers/input/touchscreen/imx6ul_tsc.c index 6ac8fa84ed9f..c2c6e50efc54 100644 --- a/drivers/input/touchscreen/imx6ul_tsc.c +++ b/drivers/input/touchscreen/imx6ul_tsc.c @@ -55,7 +55,7 @@ #define ADC_TIMEOUT msecs_to_jiffies(100) /* TSC registers */ -#de...
ed4e6b5d644c4dd2bc2872ffec036b7da0ec2e27
Analyze and fix the following issue in the Linux kernel code: btrfs: ref-verify: handle damaged extent root tree
Problem Details: Syzbot hits a problem with enabled ref-verify, ignorebadroots and a fuzzed/damaged extent tree. There's no fallback option like in other places that can deal with it so disable the whole ref-verify as it is just a debugging feature. Reported-by: syzbot+9c3e0cdfbfe351b0bc0e@syzkaller.appspotmail.com Li...
```diff diff --git a/fs/btrfs/ref-verify.c b/fs/btrfs/ref-verify.c index 3871c3a6c743..9f1858b42c0e 100644 --- a/fs/btrfs/ref-verify.c +++ b/fs/btrfs/ref-verify.c @@ -980,11 +980,18 @@ int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info) if (!btrfs_test_opt(fs_info, REF_VERIFY)) return 0; + extent_root = btrf...
96fa515e70f3e4b98685ef8cac9d737fc62f10e1
Analyze and fix the following issue in the Linux kernel code: btrfs: tree-checker: fix the incorrect inode ref size check
Problem Details: [BUG] Inside check_inode_ref(), we need to make sure every structure, including the btrfs_inode_extref header, is covered by the item. But our code is incorrectly using "sizeof(iref)", where @iref is just a pointer. This means "sizeof(iref)" will always be "sizeof(void *)", which is much smaller than...
```diff diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index 0f556f4de3f9..a997c7cc35a2 100644 --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c @@ -1756,10 +1756,10 @@ static int check_inode_ref(struct extent_buffer *leaf, while (ptr < end) { u16 namelen; - if (unlikely(ptr + sizeof(i...
d9dcbbcf9145b68aa85c40947311a6907277e097
Analyze and fix the following issue in the Linux kernel code: smb: client: let smbd_destroy() call disable_work_sync(&info->post_send_credits_work)
Problem Details: In smbd_destroy() we may destroy the memory so we better wait until post_send_credits_work is no longer pending and will never be started again. I actually just hit the case using rxe: WARNING: CPU: 0 PID: 138 at drivers/infiniband/sw/rxe/rxe_verbs.c:1032 rxe_post_recv+0x1ee/0x480 [rdma_rxe] ... [ 53...
```diff diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 1f8de8866c06..1f3d64145863 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -1347,6 +1347,9 @@ void smbd_destroy(struct TCP_Server_Info *server) sc->status == SMBDIRECT_SOCKET_DISCONNECTED); } + log_rdma_ev...
bac28f604c7699727b2fecf14c3a54668bbe458e
Analyze and fix the following issue in the Linux kernel code: smb: client: use disable[_delayed]_work_sync in smbdirect.c
Problem Details: This makes it safer during the disconnect and avoids requeueing. It's ok to call disable[delayed_]work[_sync]() more than once. Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: Namjae Jeon <linkinjeon@kernel.org> Cc: linux-cifs@vger.kernel.o...
```diff diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index dafa3ed4a630..1f8de8866c06 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -1353,7 +1353,7 @@ void smbd_destroy(struct TCP_Server_Info *server) sc->ib.qp = NULL; log_rdma_event(INFO, "cancelling idle timer\n...
93ed9a2951308db374cba4562533dde97bac70d3
Analyze and fix the following issue in the Linux kernel code: smb: client: fix filename matching of deferred files
Problem Details: Fix the following case where the client would end up closing both deferred files (foo.tmp & foo) after unlink(foo) due to strstr() call in cifs_close_deferred_file_under_dentry(): fd1 = openat(AT_FDCWD, "foo", O_WRONLY|O_CREAT|O_TRUNC, 0666); fd2 = openat(AT_FDCWD, "foo.tmp", O_WRONLY|O_CREAT|O_TR...
```diff diff --git a/fs/smb/client/cifsproto.h b/fs/smb/client/cifsproto.h index c34c533b2efa..e8fba98690ce 100644 --- a/fs/smb/client/cifsproto.h +++ b/fs/smb/client/cifsproto.h @@ -312,8 +312,8 @@ extern void cifs_close_deferred_file(struct cifsInodeInfo *cifs_inode); extern void cifs_close_all_deferred_files(stru...
f57e53ea252363234f86674db475839e5b87102e
Analyze and fix the following issue in the Linux kernel code: smb: client: let recv_done verify data_offset, data_length and remaining_data_length
Problem Details: This is inspired by the related server fixes. Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Reviewed-by: Namjae Jeon <linkinjeon@kernel.org> Fixes: f198186aa9bb ("CIFS: SMBD: Establish SMB Direct connection") Signe...
```diff diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 02d6db431fd4..dafa3ed4a630 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -453,9 +453,12 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc) struct smbdirect_recv_io *response = container_of(wc->wr_...
917449e7c3cdc7a0dfe429de997e39098d9cdd20
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Fix typo of MLX5_EQ_DOORBEL_OFFSET
Problem Details: Also convert it to a simple define. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index 1ab77159409d..f3c714ebd9cb 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c @@ -32,9 +32,7 @@ enum { MLX5_EQ_STATE_ALWAYS_ARMED = 0xb, }; ...
e6badd999a87fd48d17929fdd594d016989202e8
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: debug: support SER L0 simulation
Problem Details: SER (system error recovery) can deal with different crash types by different levels of processes. Now, add a debug function to trigger MAC error in purpose for SER L0 simulation/verification. And, extend dbgfs fw_crash to accept different parameters. # simulate MAC error (one kind of SER L0) e...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c index a37cdd73ddc3..3dc7981c510f 100644 --- a/drivers/net/wireless/realtek/rtw89/debug.c +++ b/drivers/net/wireless/realtek/rtw89/debug.c @@ -3563,6 +3563,58 @@ static int rtw89_dbg_trigger_ctrl_error(struct rtw...
893c49a78d9f85e4b8081b908fb7c407d018106a
Analyze and fix the following issue in the Linux kernel code: mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().
Problem Details: mptcp_active_enable() is called from subflow_finish_connect(), which is icsk->icsk_af_ops->sk_rx_dst_set() and it's not always under RCU. Using sk_dst_get(sk)->dev could trigger UAF. Let's use __sk_dst_get() and dst_dev_rcu(). Fixes: 27069e7cb3d1 ("mptcp: disable active MPTCP in case of blackhole") ...
```diff diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c index c0e516872b4b..e8ffa62ec183 100644 --- a/net/mptcp/ctrl.c +++ b/net/mptcp/ctrl.c @@ -501,12 +501,15 @@ void mptcp_active_enable(struct sock *sk) struct mptcp_pernet *pernet = mptcp_get_pernet(sock_net(sk)); if (atomic_read(&pernet->active_disable_times...
108a86c71c93ff28087994e6107bc99ebe336629
Analyze and fix the following issue in the Linux kernel code: mptcp: Call dst_release() in mptcp_active_enable().
Problem Details: mptcp_active_enable() calls sk_dst_get(), which returns dst with its refcount bumped, but forgot dst_release(). Let's add missing dst_release(). Cc: stable@vger.kernel.org Fixes: 27069e7cb3d1 ("mptcp: disable active MPTCP in case of blackhole") Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Rev...
```diff diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c index fed40dae5583..c0e516872b4b 100644 --- a/net/mptcp/ctrl.c +++ b/net/mptcp/ctrl.c @@ -505,6 +505,8 @@ void mptcp_active_enable(struct sock *sk) if (dst && dst->dev && (dst->dev->flags & IFF_LOOPBACK)) atomic_set(&pernet->active_disable_times, 0); + +...
c65f27b9c3be2269918e1cbad6d8884741f835c5
Analyze and fix the following issue in the Linux kernel code: tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
Problem Details: get_netdev_for_sock() is called during setsockopt(), so not under RCU. Using sk_dst_get(sk)->dev could trigger UAF. Let's use __sk_dst_get() and dst_dev_rcu(). Note that the only ->ndo_sk_get_lower_dev() user is bond_sk_get_lower_dev(), which uses RCU. Fixes: e8f69799810c ("net/tls: Add generic NIC...
```diff diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index f672a62a9a52..a82fdcf19969 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -123,17 +123,19 @@ static void tls_device_queue_ctx_destruction(struct tls_context *ctx) /* We assume that the socket is already connected */ static struct ...
0b0e4d51c6554e5ecc3f8cc73c2eaf12da21249a
Analyze and fix the following issue in the Linux kernel code: smc: Use __sk_dst_get() and dst_dev_rcu() in smc_vlan_by_tcpsk().
Problem Details: smc_vlan_by_tcpsk() fetches sk_dst_get(sk)->dev before RTNL and passes it to netdev_walk_all_lower_dev(), which is illegal. Also, smc_vlan_by_tcpsk_walk() does not require RTNL at all. Let's use __sk_dst_get(), dst_dev_rcu(), and netdev_walk_all_lower_dev_rcu(). Note that the returned value of smc_v...
```diff diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 262746e304dd..2a559a98541c 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -1883,35 +1883,32 @@ static int smc_vlan_by_tcpsk_walk(struct net_device *lower_dev, /* Determine vlan of internal TCP socket. */ int smc_vlan_by_tcpsk(struct socke...
235f81045c008169cc4e1955b4a64e118eebe61b
Analyze and fix the following issue in the Linux kernel code: smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().
Problem Details: smc_clc_prfx_match() is called from smc_listen_work() and not under RCU nor RTNL. Using sk_dst_get(sk)->dev could trigger UAF. Let's use __sk_dst_get() and dst_dev_rcu(). Note that the returned value of smc_clc_prfx_match() is not used in the caller. Fixes: a046d57da19f ("smc: CLC handshake (incl. ...
```diff diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index 976b2102bdfc..09745baa1017 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c @@ -657,26 +657,26 @@ static int smc_clc_prfx_match6_rcu(struct net_device *dev, int smc_clc_prfx_match(struct socket *clcsock, struct smc_clc_msg_proposal_prefix...
935d783e5de9b64587f3adb25641dd8385e64ddb
Analyze and fix the following issue in the Linux kernel code: smc: Use __sk_dst_get() and dst_dev_rcu() in in smc_clc_prfx_set().
Problem Details: smc_clc_prfx_set() is called during connect() and not under RCU nor RTNL. Using sk_dst_get(sk)->dev could trigger UAF. Let's use __sk_dst_get() and dev_dst_rcu() under rcu_read_lock() after kernel_getsockname(). Note that the returned value of smc_clc_prfx_set() is not used in the caller. While at ...
```diff diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index 08be56dfb3f2..976b2102bdfc 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c @@ -509,10 +509,10 @@ static bool smc_clc_msg_hdr_valid(struct smc_clc_msg_hdr *clcm, bool check_trl) } /* find ipv4 addr on device and get the prefix len, fill CLC prop...
3d3466878afd8d43ec0ca2facfbc7f03e40d0f79
Analyze and fix the following issue in the Linux kernel code: smc: Fix use-after-free in __pnet_find_base_ndev().
Problem Details: syzbot reported use-after-free of net_device in __pnet_find_base_ndev(), which was called during connect(). [0] smc_pnet_find_ism_resource() fetches sk_dst_get(sk)->dev and passes down to pnet_find_base_ndev(), where RTNL is held. Then, UAF happened at __pnet_find_base_ndev() when the dev is first us...
```diff diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c index b90337f86e83..7225b5fa17a6 100644 --- a/net/smc/smc_pnet.c +++ b/net/smc/smc_pnet.c @@ -1126,37 +1126,38 @@ static void smc_pnet_find_ism_by_pnetid(struct net_device *ndev, */ void smc_pnet_find_roce_resource(struct sock *sk, struct smc_init_info *in...
26caeae9fb482ec443753b4e3307e5122b60b850
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Set RCS/CCS yield policy
Problem Details: All recent platforms (including all the ones officially supported by the Xe driver) do not allow concurrent execution of RCS and CCS workloads from different address spaces, with the HW blocking the context switch when it detects such a scenario. The DUAL_QUEUE flag helps with this, by causing the GuC ...
```diff diff --git a/drivers/gpu/drm/xe/abi/guc_actions_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_abi.h index 81eb046aeebf..b9f67d7a00d8 100644 --- a/drivers/gpu/drm/xe/abi/guc_actions_abi.h +++ b/drivers/gpu/drm/xe/abi/guc_actions_abi.h @@ -117,6 +117,7 @@ enum xe_guc_action { XE_GUC_ACTION_ENTER_S_STATE = 0x501, ...
45c8a6cc2bcd780e634a6ba8e46bffbdf1fc5c01
Analyze and fix the following issue in the Linux kernel code: tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().
Problem Details: syzbot reported the splat below where a socket had tcp_sk(sk)->fastopen_rsk in the TCP_ESTABLISHED state. [0] syzbot reused the server-side TCP Fast Open socket as a new client before the TFO socket completes 3WHS: 1. accept() 2. connect(AF_UNSPEC) 3. connect() to another destination As of acc...
```diff diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 71a956fbfc55..ad76556800f2 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3327,6 +3327,7 @@ int tcp_disconnect(struct sock *sk, int flags) struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); int old_state = sk->sk_sta...
a72175c985132885573593222a7b088cf49b07ae
Analyze and fix the following issue in the Linux kernel code: octeon_ep: fix VF MAC address lifecycle handling
Problem Details: Currently, VF MAC address info is not updated when the MAC address is configured from VF, and it is not cleared when the VF is removed. This leads to stale or missing MAC information in the PF, which may cause incorrect state tracking or inconsistencies when VFs are hot-plugged or reassigned. Fix this...
```diff diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c index ebecdd29f3bd..0867fab61b19 100644 --- a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c @@ -196,6 +196,7 ...
dc3382fffdec2c1d6df5836c88fa37b39cd8651e
Analyze and fix the following issue in the Linux kernel code: tracing: kprobe-event: Fix null-ptr-deref in trace_kprobe_create_internal()
Problem Details: A crash was observed with the following output: 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: 2899 Comm: syz.2.399 Not tainted 6.17.0-rc5+ #5 PREEM...
```diff diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index ccae62d4fb91..fa60362a3f31 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c @@ -908,6 +908,8 @@ static int trace_kprobe_create_internal(int argc, const char *argv[], return -EINVAL; } buf = kmemdup(&...
2479cba209463e8387400218e754b92ce8e7b5d1
Analyze and fix the following issue in the Linux kernel code: ptp: netc: only enable periodic pulse event interrupts for PPS
Problem Details: The periodic pulse event interrupts are used to register the PPS events into the system, so it is only applicable to PTP_CLK_REQ_PPS request. However, these interrupts are mistakenly enabled in PTP_CLK_REQ_PEROUT request, so fix this error. Fixes: 671e266835b8 ("ptp: netc: add periodic pulse output su...
```diff diff --git a/drivers/ptp/ptp_netc.c b/drivers/ptp/ptp_netc.c index 75594f47807d..94e952ee6990 100644 --- a/drivers/ptp/ptp_netc.c +++ b/drivers/ptp/ptp_netc.c @@ -305,13 +305,14 @@ static void netc_timer_enable_periodic_pulse(struct netc_timer *priv, fiper_ctrl |= FIPER_CTRL_SET_PW(channel, fiper_pw); fiper...
a09655dde754bc9c39fc603c310fc8c02b7e8a19
Analyze and fix the following issue in the Linux kernel code: Revert "net: ethernet: stmmac: dwmac-rk: Make the clk_phy could be used for external phy"
Problem Details: This reverts commit da114122b83149d1f1db0586b1d67947b651aa20. As discussed, the PHY clock should be managed by PHY driver instead of other driver like dwmac-rk. Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/a30a8c97-6b96-45ba-bad7-8a40401babc2@samsung.com Fixe...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 266c53379236..49f92cd79aa8 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -1410,15 +1410,12 @@ static int rk_gmac_clk_init(struc...
a8ba87f04ca9cdec06776ce92dce1395026dc3bb
Analyze and fix the following issue in the Linux kernel code: bonding: don't set oif to bond dev when getting NS target destination
Problem Details: Unlike IPv4, IPv6 routing strictly requires the source address to be valid on the outgoing interface. If the NS target is set to a remote VLAN interface, and the source address is also configured on a VLAN over a bond interface, setting the oif to the bond device will fail to retrieve the correct desti...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 8832bc9f107b..57be04f6cb11 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3356,7 +3356,6 @@ static void bond_ns_send_all(struct bonding *bond, struct slave *slave) /* Find out through ...
a60fc3294a377204664b5484e4a487fa124155da
Analyze and fix the following issue in the Linux kernel code: ptp: rework ptp_clock_unregister() to disable events
Problem Details: The ordering of ptp_clock_unregister() is not ideal, as the chardev remains published while state is being torn down, which means userspace can race with the kernel teardown. There is also no cleanup of enabled pin settings nor of the internal PPS event, which means enabled events can still forward int...
```diff diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c index eb4f6d1b1460..8106eb617c8c 100644 --- a/drivers/ptp/ptp_chardev.c +++ b/drivers/ptp/ptp_chardev.c @@ -47,6 +47,26 @@ static int ptp_disable_pinfunc(struct ptp_clock_info *ops, return err; } +void ptp_disable_all_events(struct ptp_cloc...
dfc85640796b414385e50c932eb2b8ce4d38ce72
Analyze and fix the following issue in the Linux kernel code: net: pcs: Kconfig: Fix unmet dependency warning
Problem Details: Fix the Kconfig dependencies for PCS_RZN1_MIIC to avoid the unmet direct dependency warning when enabling DWMAC_RENESAS_GBETH. The PCS driver is used on multiple Renesas SoCs including RZ/N1, RZ/N2H and RZ/T2H, but the existing condition only allowed ARCH_RZN1, ARCH_R9A09G077, or ARCH_R9A09G087. This c...
```diff diff --git a/drivers/net/pcs/Kconfig b/drivers/net/pcs/Kconfig index 76dbc11d9575..ecbc3530e780 100644 --- a/drivers/net/pcs/Kconfig +++ b/drivers/net/pcs/Kconfig @@ -28,7 +28,7 @@ config PCS_MTK_LYNXI config PCS_RZN1_MIIC tristate "Renesas RZ/N1, RZ/N2H, RZ/T2H MII converter" depends on OF - depends on AR...
4436b2b324cec38caa876b11e521d270240a9986
Analyze and fix the following issue in the Linux kernel code: tools: ynl-gen: support uint in multi-attr
Problem Details: The ethtool FEC histogram series run into a build issue with type: uint + multi-attr: True. Auto scalars use 64b types, we need to convert them explicitly when rendering the types. No current spec needs this, and the ethtool FEC histogram doesn't need this either any more, so not posting as a fix. Li...
```diff diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py index 56c63022d702..58086b101057 100755 --- a/tools/net/ynl/pyynl/ynl_gen_c.py +++ b/tools/net/ynl/pyynl/ynl_gen_c.py @@ -720,7 +720,11 @@ class TypeMultiAttr(Type): return 'struct ynl_string *' elif self.attr...
f9d803784f8dfea60f394d7fc94084c5f1eb4027
Analyze and fix the following issue in the Linux kernel code: dt-bindings: input: touchscreen: document Himax HX852x(ES)
Problem Details: Himax HX852x(ES) is a touch panel controller with optional support for capacitive touch keys. Unfortunately, the model naming is quite unclear and confusing. There seems to be a distinction between models (e.g. HX8526) and the "series" suffix (e.g. -A, -B, -C, -D, -E, -ES). But this doesn't seem to be...
```diff diff --git a/Documentation/devicetree/bindings/input/touchscreen/himax,hx852es.yaml b/Documentation/devicetree/bindings/input/touchscreen/himax,hx852es.yaml new file mode 100644 index 000000000000..40a60880111d --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/himax,hx852es.yaml @@ -0,0 +1...
a2d6223d224f333f705ed8495bf8bebfbc585c35
Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Don't expose sysfs attributes not applicable for VFs
Problem Details: VFs can't read BMG_PCIE_CAP(0x138340) register nor access PCODE (already guarded by the info.skip_pcode flag) so we shouldn't expose attributes that require any of them to avoid errors like: [] xe 0000:03:00.1: [drm] Tile0: GT0: VF is trying to read an \ inaccessible register 0x1...
```diff diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c b/drivers/gpu/drm/xe/xe_device_sysfs.c index b7f8fcfed8d8..896484c8fbcc 100644 --- a/drivers/gpu/drm/xe/xe_device_sysfs.c +++ b/drivers/gpu/drm/xe/xe_device_sysfs.c @@ -308,7 +308,7 @@ int xe_device_sysfs_init(struct xe_device *xe) return ret; } - if (xe...
48e7e8996cf78101da5aa8292647ed960506da03
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: msm8953-xiaomi-daisy: fix cd-gpios
Problem Details: SD detection was not working because cd-gpios flag was wrongly configured, according to downstream sources device is using GPIO_ACTIVE_HIGH. Fix SD detection with change cd-gpios from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH. Fixes: 38d779c26395 ("arm64: dts: qcom: msm8953: Add device tree for Xiaomi Mi A2...
```diff diff --git a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts index 336b916729e4..ddd7af616794 100644 --- a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts +++ b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts @@ -296,7 +296,7 @@ vmmc-supply = <&pm8953_...
6ff4a0fa3e1b2b9756254b477fb2f0fbe04ff378
Analyze and fix the following issue in the Linux kernel code: bpf, arm64: Call bpf_jit_binary_pack_finalize() in bpf_jit_free()
Problem Details: The current implementation seems incorrect and does NOT match the comment above, use bpf_jit_binary_pack_finalize() instead. Fixes: 1dad391daef1 ("bpf, arm64: use bpf_prog_pack for memory management") Acked-by: Puranjay Mohan <puranjay@kernel.org> Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com> Ack...
```diff diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index 008273a53e04..e36261c63952 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -3115,8 +3115,7 @@ void bpf_jit_free(struct bpf_prog *prog) * before freeing it. */ if (jit_data) { - bpf_arc...
a24a2dda70fb40629d44b899452d8e4c0be075e2
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: trigger verifier.c:maybe_exit_scc() for a speculative state
Problem Details: This is a test case minimized from a syzbot reproducer from [1]. The test case triggers verifier.c:maybe_exit_scc() w/o preceding call to verifier.c:maybe_enter_scc() on a speculative symbolic execution path. Here is verifier log for the test case: Live regs before insn: 0: .......... (b7) ...
```diff diff --git a/tools/testing/selftests/bpf/progs/verifier_loops1.c b/tools/testing/selftests/bpf/progs/verifier_loops1.c index e07b43b78fd2..fbdde80e7b90 100644 --- a/tools/testing/selftests/bpf/progs/verifier_loops1.c +++ b/tools/testing/selftests/bpf/progs/verifier_loops1.c @@ -283,4 +283,25 @@ exit_%=: \ ...
a3c73d629ea1373af3c0c954d41fd1af555492e3
Analyze and fix the following issue in the Linux kernel code: bpf: dont report verifier bug for missing bpf_scc_visit on speculative path
Problem Details: Syzbot generated a program that triggers a verifier_bug() call in maybe_exit_scc(). maybe_exit_scc() assumes that, when called for a state with insn_idx in some SCC, there should be an instance of struct bpf_scc_visit allocated for that SCC. Turns out the assumption does not hold for speculative execut...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 1029380f84db..beaa391e02fb 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -1950,9 +1950,24 @@ static int maybe_exit_scc(struct bpf_verifier_env *env, struct bpf_verifier_stat return 0; visit = scc_visit_lookup(env, callchai...
457f4393d02fdb612a93912fb09cef70e6e545c9
Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Call dma_buf_vmap_unlocked() for imported object
Problem Details: In amdxdna_gem_obj_vmap(), calling dma_buf_vmap() triggers a kernel warning if LOCKDEP is enabled. So for imported object, use dma_buf_vmap_unlocked(). Then, use drm_gem_vmap() for other objects. The similar change applies to vunmap code. Fixes: bd72d4acda10 ("accel/amdxdna: Support user space allocat...
```diff diff --git a/drivers/accel/amdxdna/amdxdna_gem.c b/drivers/accel/amdxdna/amdxdna_gem.c index d407a36eb412..7f91863c3f24 100644 --- a/drivers/accel/amdxdna/amdxdna_gem.c +++ b/drivers/accel/amdxdna/amdxdna_gem.c @@ -392,35 +392,33 @@ static const struct dma_buf_ops amdxdna_dmabuf_ops = { .vunmap = drm_gem_dmab...
ed323aeda5e09fa1ab95946673939c8c425c329c
Analyze and fix the following issue in the Linux kernel code: selftest/futex: Compile also with libnuma < 2.0.16
Problem Details: After using numa_set_mempolicy_home_node() the test fails to compile on systems with libnuma library versioned lower than 2.0.16. In order to allow lower library version add a pkg-config related check and exclude that part of the code. Without the proper MPOL setup it can't be tested. Make a total nu...
```diff diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile index ddfa61d857b9..bd50aecfca8a 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile @@ -1,6 +1,9 @@ # SPDX-License-Identifier: G...
2951dddef0a87c20e83c77070bd5077290d9121f
Analyze and fix the following issue in the Linux kernel code: selftest/futex: Reintroduce "Memory out of range" numa_mpol's subtest
Problem Details: Commit d8e2f919997 ("selftests/futex: Fix some futex_numa_mpol subtests") removed the "Memory out of range" subtest due to it being dependent on the memory layout of the test process having an invalid memory address just after the `*futex_ptr` allocated memory. Reintroduce this test and make it determ...
```diff diff --git a/tools/testing/selftests/futex/functional/futex_numa_mpol.c b/tools/testing/selftests/futex/functional/futex_numa_mpol.c index dd7b05e8cda4..5f4e3111269c 100644 --- a/tools/testing/selftests/futex/functional/futex_numa_mpol.c +++ b/tools/testing/selftests/futex/functional/futex_numa_mpol.c @@ -174,1...
abe962346ef420998d47ba1c2fe591582f69e92e
Analyze and fix the following issue in the Linux kernel code: regulator: Fix MAX77838 selection
Problem Details: The current entry for the MAX77838 regulator is unselectable (as it depended on a non-user-selectable config - REGMAP_I2C). Fix this by making it select the config, and not depending on it. Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org> Link: https://patch.msgid.link/20250917-maxr...
```diff diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 5e451be51392..e252bb11ae66 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -779,7 +779,8 @@ config REGULATOR_MAX77826 config REGULATOR_MAX77838 tristate "Maxim 77838 regulator" - depends on REGMAP_I2C + depen...
652b08afba69d5d26fe91098eb832b1bcc0f91c2
Analyze and fix the following issue in the Linux kernel code: ARM: at91: remove default values for PMC_PLL_ACR
Problem Details: Remove default values for PMC PLL Analog Control Register(ACR) as the values are specific for each SoC and PLL and load them from PLL characteristics structure Co-developed-by: Andrei Simion <andrei.simion@microchip.com> Signed-off-by: Andrei Simion <andrei.simion@microchip.com> Signed-off-by: Cristia...
```diff diff --git a/drivers/clk/at91/clk-sam9x60-pll.c b/drivers/clk/at91/clk-sam9x60-pll.c index a035dc15454b..3dc75a394ce1 100644 --- a/drivers/clk/at91/clk-sam9x60-pll.c +++ b/drivers/clk/at91/clk-sam9x60-pll.c @@ -103,11 +103,8 @@ static int sam9x60_frac_pll_set(struct sam9x60_pll_core *core) (cmul == frac->...
af98caeaa7b6ad11eb7b7c8bfaddc769df2889f3
Analyze and fix the following issue in the Linux kernel code: clk: at91: clk-sam9x60-pll: force write to PLL_UPDT register
Problem Details: This register is important for sequencing the commands to PLLs, so actually write the update bits with regmap_write_bits() instead of relying on a read/modify/write regmap command that could skip the actual hardware write if the value is identical to the one read. It's changed when modification is nee...
```diff diff --git a/drivers/clk/at91/clk-sam9x60-pll.c b/drivers/clk/at91/clk-sam9x60-pll.c index cefd9948e103..a035dc15454b 100644 --- a/drivers/clk/at91/clk-sam9x60-pll.c +++ b/drivers/clk/at91/clk-sam9x60-pll.c @@ -93,8 +93,8 @@ static int sam9x60_frac_pll_set(struct sam9x60_pll_core *core) spin_lock_irqsave(co...
33fe111a35a40c62761cc4ee75509b50c598fa4f
Analyze and fix the following issue in the Linux kernel code: drm/xe/madvise: Fix ioctl argument check
Problem Details: It is "preferred_mem_loc" instead of "atomic" for the ATTR_PREFERRED_LOC path. Also include 2 minor changes with no functional impact. 1. Remove the redundant "attr.atomic_access" assignment. 2. Replace down_read_interruptible() with xe_svm_notifier_lock_interruptible() to pair with xe_svm_notif...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm_madvise.c b/drivers/gpu/drm/xe/xe_vm_madvise.c index 153700743545..cad3cf627c3f 100644 --- a/drivers/gpu/drm/xe/xe_vm_madvise.c +++ b/drivers/gpu/drm/xe/xe_vm_madvise.c @@ -124,8 +124,6 @@ static void madvise_atomic(struct xe_device *xe, struct xe_vm *vm, vmas[i]->attr....
5959c4da17e01782ad09b226802ac1f1ef157a70
Analyze and fix the following issue in the Linux kernel code: drm/xe: Misc refine for svm
Problem Details: These changes should have no functional impact. 1. Correct typo of "operation"in macro range_debug(). 2. Combine 2 spin_lock() call in xe_svm_garbage_collector() into 1. 3. Drop redundant preferred_region_is_vram check in xe_svm_range_needs_migrate_to_vram(). 4. Combine the devmem_possible check in ...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 86e7c72c89f1..7f2f1f041f1d 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -50,11 +50,11 @@ static struct xe_vm *range_to_vm(struct drm_gpusvm_range *r) return gpusvm_to_vm(r->gpusvm); } -#define rang...
5f9466b50c1b4253d91abf81780b90a722133162
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix page leak in user_mem_abort()
Problem Details: The user_mem_abort() function acquires a page reference via __kvm_faultin_pfn() early in its execution. However, the subsequent checks for mismatched attributes between stage 1 and stage 2 mappings would return an error code directly, bypassing the corresponding page release. Fix this by storing the e...
```diff diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index 006fdb017c54..61ef7d748e7a 100644 --- a/arch/arm64/kvm/mmu.c +++ b/arch/arm64/kvm/mmu.c @@ -1670,7 +1670,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, * cache maintenance. */ if (!kvm_supports_cacheable_p...
ae5fbbda341f92e605a9508a0fb18456155517f0
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix error handling if PXP fails to start
Problem Details: Since the PXP start comes after __xe_exec_queue_init() has completed, we need to cleanup what was done in that function in case of a PXP start error. __xe_exec_queue_init calls the submission backend init() function, so we need to introduce an opposite for that. Unfortunately, while we already have a f...
```diff diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index 8991b4aed440..c07edcda99c5 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -151,6 +151,16 @@ err_lrc: return err; } +static void __xe_exec_queue_fini(struct xe_exec_queue *...
ff89a4d285c82813faa0e2e386d07120ae1f9c85
Analyze and fix the following issue in the Linux kernel code: drm/xe/sysfs: Add cleanup action in xe_device_sysfs_init
Problem Details: On partial failure, some sysfs files created before the failure might not be removed. Add common cleanup step to remove them all immediately, as is should be harmless to attempt to remove non-existing files. Fixes: 0e414bf7ad01 ("drm/xe: Expose PCIe link downgrade attributes") Cc: Lucas De Marchi <luc...
```diff diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c b/drivers/gpu/drm/xe/xe_device_sysfs.c index bd9015761aa0..3e3b2d9033a7 100644 --- a/drivers/gpu/drm/xe/xe_device_sysfs.c +++ b/drivers/gpu/drm/xe/xe_device_sysfs.c @@ -311,12 +311,16 @@ int xe_device_sysfs_init(struct xe_device *xe) if (xe->info.platform == X...
6515c612e79949b17ef4b8c4180c07bbeaf01e4d
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix kvm_vcpu_{set,is}_be() to deal with EL2 state
Problem Details: Nobody really cares about BE, but KVM currently only deals with SCTLR_EL1 when evaluating or setting the endianness in PSCI, meaning that we evaluate whatever the L2 state has been at some point. Teach these primitives about SCTLR_EL2, and forget about BE... Reviewed-by: Oliver Upton <oliver.upton@li...
```diff diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h index fa8a08a1ccd5..85f998dffea5 100644 --- a/arch/arm64/include/asm/kvm_emulate.h +++ b/arch/arm64/include/asm/kvm_emulate.h @@ -511,21 +511,29 @@ static inline void kvm_vcpu_set_be(struct kvm_vcpu *vcpu) if (vcpu_mode_i...
7dd670db9afdca6aed4a9f99776cb72e6ed5a1f5
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: intel-dsp-config: Prevent SEGFAULT if ACPI_HANDLE() is NULL
Problem Details: Check in snd_intel_dsp_check_soundwire() that the pointer returned by ACPI_HANDLE() is not NULL, before passing it on to other functions. The original code assumed a non-NULL return, but if it was unexpectedly NULL it would end up passed to acpi_walk_namespace() as the start point, and would result in...
```diff diff --git a/sound/hda/core/intel-dsp-config.c b/sound/hda/core/intel-dsp-config.c index c15284742899..2a9e35cddcf7 100644 --- a/sound/hda/core/intel-dsp-config.c +++ b/sound/hda/core/intel-dsp-config.c @@ -650,6 +650,8 @@ static int snd_intel_dsp_check_soundwire(struct pci_dev *pci) int ret; handle = ACP...
23361bd54966b437e1ed3eb1a704572f4b279e58
Analyze and fix the following issue in the Linux kernel code: f2fs: fix infinite loop in __insert_extent_tree()
Problem Details: When we get wrong extent info data, and look up extent_node in rb tree, it will cause infinite loop (CONFIG_F2FS_CHECK_FS=n). Avoiding this by return NULL and print some kernel messages in that case. Signed-off-by: wangzijie <wangzijie1@honor.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: ...
```diff diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 199c1e7a83ef..ba0a07bfd346 100644 --- a/fs/f2fs/extent_cache.c +++ b/fs/f2fs/extent_cache.c @@ -604,7 +604,13 @@ static struct extent_node *__insert_extent_tree(struct f2fs_sb_info *sbi, p = &(*p)->rb_right; leftmost = false; } else {...
8175c864391753b210f3dcfae1aeed686a226ebb
Analyze and fix the following issue in the Linux kernel code: f2fs: fix zero-sized extent for precache extents
Problem Details: Script to reproduce: f2fs_io write 1 0 1881 rand dsync testfile f2fs_io fallocate 0 7708672 4096 testfile f2fs_io write 1 1881 1 rand buffered testfile fsync testfile umount mount f2fs_io precache_extents testfile When the data layout is something like this: dnode1: dnode2: [0] ...
```diff diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 2bec936174e2..3a974e2637aa 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1771,9 +1771,10 @@ sync_out: if (map->m_flags & F2FS_MAP_MAPPED) { unsigned int ofs = start_pgofs - map->m_lblk; - f2fs_update_read_extent_cache_range(&dn, - start_pgo...
5b7bdc4402b12bdad747cce305ecbc9737aed7ba
Analyze and fix the following issue in the Linux kernel code: kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS
Problem Details: basic-gcs has it's own make rule to handle the special compiler invocation to build against nolibc. This rule does not respect the $(CFLAGS) passed by the Makefile from the parent directory. However these $(CFLAGS) set up the include path to include the UAPI headers from the current kernel. Due to this...
```diff diff --git a/tools/testing/selftests/arm64/gcs/Makefile b/tools/testing/selftests/arm64/gcs/Makefile index d2f3497a9103..1fbbf0ca1f02 100644 --- a/tools/testing/selftests/arm64/gcs/Makefile +++ b/tools/testing/selftests/arm64/gcs/Makefile @@ -14,11 +14,11 @@ LDLIBS+=-lpthread include ../../lib.mk $(OUTPUT)/...
67da3f16e5f97a864a0beb4f9758d09e1890a76e
Analyze and fix the following issue in the Linux kernel code: mmc: select REGMAP_MMIO with MMC_LOONGSON2
Problem Details: COMPILE_TEST with MMC_LOONGSON2 failed to link due to undeclared dependency: ERROR: modpost: "__devm_regmap_init_mmio_clk" [drivers/mmc/host/loongson2-mmc.ko] undefined! Fixes: 2115772014bd ("mmc: loongson2: Add Loongson-2K SD/SDIO controller driver") Suggested-by: Arnd Bergmann <arnd@arndb.de> Sugg...
```diff diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 0939bba1ac20..2c963cb6724b 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -1116,6 +1116,7 @@ config MMC_LOONGSON2 tristate "Loongson-2K SD/SDIO/eMMC Host Interface support" depends on LOONGARCH || COMPILE_TEST ...
027a7a9c07d0d759ab496a7509990aa33a4b689c
Analyze and fix the following issue in the Linux kernel code: drbd: init queue_limits->max_hw_wzeroes_unmap_sectors parameter
Problem Details: The parameter max_hw_wzeroes_unmap_sectors in queue_limits should be equal to max_write_zeroes_sectors if it is set to a non-zero value. However, when the backend bdev is specified, this parameter is initialized to UINT_MAX during the call to blk_set_stacking_limits(), while only max_write_zeroes_secto...
```diff diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index e09930c2b226..91f3b8afb63c 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -1330,6 +1330,7 @@ void drbd_reconsider_queue_parameters(struct drbd_device *device, lim.max_write_zeroes_sectors = DRBD_MA...
6fabca2fc94d33cdf7ec102058983b086293395f
Analyze and fix the following issue in the Linux kernel code: bpf: Explicitly check accesses to bpf_sock_addr
Problem Details: Syzkaller found a kernel warning on the following sock_addr program: 0: r0 = 0 1: r2 = *(u32 *)(r1 +60) 2: exit which triggers: verifier bug: error during ctx access conversion (0) This is happening because offset 60 in bpf_sock_addr corresponds to an implicit padding of 4 bytes, ri...
```diff diff --git a/net/core/filter.c b/net/core/filter.c index 63f3baee2daf..8342f810ad85 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -9284,13 +9284,17 @@ static bool sock_addr_is_valid_access(int off, int size, return false; info->reg_type = PTR_TO_SOCKET; break; - default: - if (type == BPF...
336aec7b06be860477be80a4299263a2e9355789
Analyze and fix the following issue in the Linux kernel code: blk-throttle: fix throtl_data leak during disk release
Problem Details: Tightening the throttle activation check in blk_throtl_activated() to require both q->td presence and policy bit set introduced a memory leak during disk release: blkg_destroy_all() clears the policy bit first during queue deactivation, causing subsequent blk_throtl_exit() to skip throtl_data cleanup ...
```diff diff --git a/block/blk-throttle.c b/block/blk-throttle.c index f510ae072868..2c5b64b1a724 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -1842,12 +1842,15 @@ void blk_throtl_exit(struct gendisk *disk) { struct request_queue *q = disk->queue; - if (!blk_throtl_activated(q)) + /* + * blkg_d...
0b507305a08c134722f363de6fe6f1ba84e313b7
Analyze and fix the following issue in the Linux kernel code: blk-mq: Fix the blk_mq_tagset_busy_iter() documentation
Problem Details: Commit 2dd6532e9591 ("blk-mq: Drop 'reserved' arg of busy_tag_iter_fn") removed the 'reserved' argument from tag iteration callback functions. Bring the blk_mq_tagset_busy_iter() documentation in sync with that change. Cc: Jens Axboe <axboe@kernel.dk> Cc: Christoph Hellwig <hch@infradead.org> Cc: Ming...
```diff diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index a63d21a4aab4..0602ca7f1e37 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -424,10 +424,9 @@ void blk_mq_all_tag_iter(struct blk_mq_tags *tags, busy_tag_iter_fn *fn, * blk_mq_tagset_busy_iter - iterate over all started requests in a tag se...
44499ecb4f2817743c37d861bdb3e95f37d3d9cd
Analyze and fix the following issue in the Linux kernel code: ALSA: usb: qcom: Fix false-positive address space check
Problem Details: The sanity check previously added to uaudio_transfer_buffer_setup() assumed the allocated buffer being linear-mapped. But the buffer allocated via usb_alloc_coherent() isn't always so, rather to be used with (SG-)DMA API. This leaded to a false-positive warning and the driver failed to work. Actuall...
```diff diff --git a/sound/usb/qcom/qc_audio_offload.c b/sound/usb/qcom/qc_audio_offload.c index a25c5a531690..9ad76fff741b 100644 --- a/sound/usb/qcom/qc_audio_offload.c +++ b/sound/usb/qcom/qc_audio_offload.c @@ -538,38 +538,33 @@ static void uaudio_iommu_unmap(enum mem_type mtype, unsigned long iova, umap_size, ...
091767ee7510765886b8475c44fd81b2e6e9da87
Analyze and fix the following issue in the Linux kernel code: drm/sched: backend_ops doc fix
Problem Details: Function drm_sched_entity_do_release() has been renamed in commit 180fc134d712 ("drm/scheduler: Rename cleanup functions v2."). Refer to the correct function in the documentation. Signed-off-by: Luc Ma <onion0709@gmail.com> [phasta: commit message] Signed-off-by: Philipp Stanner <phasta@kernel.org> L...
```diff diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h index 323a505e6e6a..fb88301b3c45 100644 --- a/include/drm/gpu_scheduler.h +++ b/include/drm/gpu_scheduler.h @@ -546,7 +546,7 @@ struct drm_sched_backend_ops { * @num_rqs: Number of run-queues. This is at most DRM_SCHED_PRIORITY_COUNT, * ...
ef3d979b3e270b6a41b6f306bfc442253c41a4cd
Analyze and fix the following issue in the Linux kernel code: kmsan: fix missed kmsan_handle_dma() signature conversion
Problem Details: kmsan_handle_dma_sg() has call to kmsan_handle_dma() function which was missed during conversion to physical addresses. Update that caller too and fix the following compilation error: mm/kmsan/hooks.c:372:6: error: too many arguments to function call, expected 3, have 4 371 | kmsan_h...
```diff diff --git a/mm/kmsan/hooks.c b/mm/kmsan/hooks.c index fa9475e5ec4e..90bee565b9bc 100644 --- a/mm/kmsan/hooks.c +++ b/mm/kmsan/hooks.c @@ -368,8 +368,7 @@ void kmsan_handle_dma_sg(struct scatterlist *sg, int nents, int i; for_each_sg(sg, item, nents, i) - kmsan_handle_dma(sg_page(item), item->offset, ite...