id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
233323f9b9f828cd7cd5145ad811c1990b692542
Analyze and fix the following issue in the Linux kernel code: ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Problem Details: The acpi_cst_latency_cmp() comparison function currently used for sorting C-state latencies does not satisfy transitivity, causing incorrect sorting results. Specifically, if there are two valid acpi_processor_cx elements A and B and one invalid element C, it may occur that A < B, A = C, and B = C. So...
```diff diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index bd6a7857ce05..831fa4a12159 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -16,7 +16,6 @@ #include <linux/acpi.h> #include <linux/dmi.h> #include <linux/sched.h> /* need_resched() */ -#inc...
ec225f8c255fd0f256c282cc73d211550cb08b34
Analyze and fix the following issue in the Linux kernel code: x86/mm: Fix LAM inconsistency during context switch
Problem Details: LAM can only be enabled when a process is single-threaded. But _kernel_ threads can temporarily use a single-threaded process's mm. That means that a context-switching kernel thread can race and observe the mm's LAM metadata (mm->context.lam_cr3_mask) change. The context switch code does two logical...
```diff diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index 8dac45a2c7fc..19091ebb8633 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h @@ -88,7 +88,13 @@ static inline void switch_ldt(struct mm_struct *prev, struct mm_struct *next) #ifdef ...
3b299b99556c1753923f8d9bbd9304bcd139282f
Analyze and fix the following issue in the Linux kernel code: x86/mm: Use IPIs to synchronize LAM enablement
Problem Details: LAM can only be enabled when a process is single-threaded. But _kernel_ threads can temporarily use a single-threaded process's mm. If LAM is enabled by a userspace process while a kthread is using its mm, the kthread will not observe LAM enablement (i.e. LAM will be disabled in CR3). This could be ...
```diff diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 6d3d20e3e43a..d8d582b750d4 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -798,6 +798,27 @@ static long prctl_map_vdso(const struct vdso_image *image, unsigned long addr) #define LAM_U57_BITS 6 +...
92b5d0b1189ea9e9f00ae493fc99102fe7f2442f
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Allocate a new field in union mon_data_bits
Problem Details: When Sub-NUMA Cluster (SNC) mode is enabled, the legacy monitor reporting files must report the sum of the data from all of the SNC nodes that share the L3 cache that is referenced by the monitor file. Resctrl squeezes all the attributes of these files into 32 bits so they can be stored in the "priv" ...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index 681b5bdcd2f9..13d862221f9c 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -127,19 +127,25 @@ struct mon_evt { }; /** - * union mon_data_bits - Monitoring de...
9da45c88e124f13a3c4d480b89b298e007fbb9e4
Analyze and fix the following issue in the Linux kernel code: btrfs: fix uninitialized return value in the ref-verify tool
Problem Details: In the ref-verify tool, when processing the inline references of an extent item, we may end up returning with uninitialized return value, because: 1) The 'ret' variable is not initialized if there are no inline extent references ('ptr' == 'end' before the while loop starts); 2) If we find an exten...
```diff diff --git a/fs/btrfs/ref-verify.c b/fs/btrfs/ref-verify.c index cf531255ab76..9522a8b79d22 100644 --- a/fs/btrfs/ref-verify.c +++ b/fs/btrfs/ref-verify.c @@ -441,7 +441,8 @@ static int process_extent_item(struct btrfs_fs_info *fs_info, u32 item_size = btrfs_item_size(leaf, slot); unsigned long end, ptr; ...
724d8042cef84496ddb4492dc120291f997ae26b
Analyze and fix the following issue in the Linux kernel code: btrfs: always do the basic checks for btrfs_qgroup_inherit structure
Problem Details: [BUG] Syzbot reports the following regression detected by KASAN: BUG: KASAN: slab-out-of-bounds in btrfs_qgroup_inherit+0x42e/0x2e20 fs/btrfs/qgroup.c:3277 Read of size 8 at addr ffff88814628ca50 by task syz-executor318/5171 CPU: 0 PID: 5171 Comm: syz-executor318 Not tainted 6.10.0-rc2-syzkalle...
```diff diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index bf0f81d59b6b..39a15cca58ca 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -3062,8 +3062,6 @@ int btrfs_qgroup_check_inherit(struct btrfs_fs_info *fs_info, struct btrfs_qgroup_inherit *inherit, size_t size) { - if (!btrfs_...
841658832335a32dd86f4e4d3aab7d14188b268b
Analyze and fix the following issue in the Linux kernel code: workqueue: Update cpumasks after only applying it successfully
Problem Details: Make workqueue_unbound_exclude_cpumask() and workqueue_set_unbound_cpumask() only update wq_isolated_cpumask and wq_requested_unbound_cpumask when workqueue_apply_unbound_cpumask() returns successfully. Fixes: fe28f631fa94("workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unb...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index e271d02f3d8c..6adee950077a 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -6848,9 +6848,6 @@ int workqueue_unbound_exclude_cpumask(cpumask_var_t exclude_cpumask) lockdep_assert_cpus_held(); mutex_lock(&wq_pool_mutex); - /* Save the cu...
64d2c847ba380e07b9072d65a50aa6469d2aa43f
Analyze and fix the following issue in the Linux kernel code: btrfs: zoned: fix calc_available_free_space() for zoned mode
Problem Details: calc_available_free_space() returns the total size of metadata (or system) block groups, which can be allocated from unallocated disk space. The logic is wrong on zoned mode in two places. First, the calculation of data_chunk_size is wrong. We always allocate one zone as one chunk, and no partial allo...
```diff diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index d620323d08ea..ae8c56442549 100644 --- a/fs/btrfs/space-info.c +++ b/fs/btrfs/space-info.c @@ -373,11 +373,18 @@ static u64 calc_available_free_space(struct btrfs_fs_info *fs_info, * "optimal" chunk size based on the fs size. However when we ac...
7a4479680d7fd05c7a3efa87b41f421af48fbbdf
Analyze and fix the following issue in the Linux kernel code: cgroup_misc: add kernel-doc comments for enum misc_res_type
Problem Details: Fully document enum misc_res_type with kernel-doc comments to prevent kernel-doc warnings: misc_cgroup.h:12: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Types of misc cgroup entries supported by the host. misc_cgroup.h:12: wa...
```diff diff --git a/include/linux/misc_cgroup.h b/include/linux/misc_cgroup.h index e799b1f8d05b..d70eab2501ee 100644 --- a/include/linux/misc_cgroup.h +++ b/include/linux/misc_cgroup.h @@ -9,15 +9,16 @@ #define _MISC_CGROUP_H_ /** - * Types of misc cgroup entries supported by the host. + * enum misc_res_type - Ty...
9796cf9b3eb9a0b9502dfe0b3acf63610090ef44
Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu-qcom: record reason for deferring probe
Problem Details: To avoid deferring probe smmu driver silently, record reason for it. It can be checked through ../debugfs/devices_deferred as well: /sys/kernel/debug# cat devices_deferred 15000000.iommu arm-smmu: qcom_scm not ready Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com> Reviewed-by: Dmitry Baryshko...
```diff diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index 25f034677f56..971c6a2e592b 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -469,7 +469,8 @@ static struct arm_smmu_device *qcom_smmu_create(struc...
55089781ff7724dd10040231a6d8b791cf24afcd
Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu-qcom-debug: Do not print for handled faults
Problem Details: Handled faults can be "normal", don't spam dmesg about them. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Pranjal Shrivastava <praan@google.com> Link: https://lore.kernel.org/r/20240701162025.375134-3-robdclark@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
```diff diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c index e4ee78fb6a66..681fbdfc325d 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c @@ -419,10 +419,6 @@ irqreturn_t qcom_smmu_contex...
d0166022be375ce72e7b220d688740b1c4424ad5
Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu: Add CB prefix to register bitfields
Problem Details: For consistency, add the "CB" prefix to the bitfield defines for context registers. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Pranjal Shrivastava <praan@google.com> Link: https://lore.kernel.org/r/20240701162025.375134-2-robdclark@gmail.com Signed-off-by: Will Deacon <will@kernel....
```diff diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c b/drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c index 957d988b6d83..4b2994b6126d 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c @@ -200,7 +200,7 @@ static irqreturn_t nvidia_smmu_context_fault_...
7c0389c615b5c6aef1b0e38e30db759b3cbff885
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Demote GuC IDs usage message to debug
Problem Details: Printing message at INFO level about available GuC IDs is not that important, DEBUG level is enough. It will also match message about available doorbells: [ ] xe ... [drm:xe_guc_id_mgr_init [xe]] GT0: using 65535 GuC IDs [ ] xe ... [drm:xe_guc_db_mgr_init [xe]] GT0: using 256 doorbells While at it,...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_id_mgr.c b/drivers/gpu/drm/xe/xe_guc_id_mgr.c index cd0549d0ef89..e845425d670b 100644 --- a/drivers/gpu/drm/xe/xe_guc_id_mgr.c +++ b/drivers/gpu/drm/xe/xe_guc_id_mgr.c @@ -97,8 +97,8 @@ int xe_guc_id_mgr_init(struct xe_guc_id_mgr *idm, unsigned int limit) if (ret) ret...
555469cc9be4a7f52c0ad07a4a237d63e8c5c5f4
Analyze and fix the following issue in the Linux kernel code: s390/bpf: Support address space cast instruction
Problem Details: The new address cast instruction translates arena offsets to userspace addresses. NULL pointers must not be translated. The common code sets up the mappings in such a way that it's enough to replace the higher 32 bits to achieve the desired result. s390x has just an instruction for this: INSERT IMMEDI...
```diff diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 4b62b5162dfb..39c1d9aa7f1e 100644 --- a/arch/s390/net/bpf_jit_comp.c +++ b/arch/s390/net/bpf_jit_comp.c @@ -54,6 +54,7 @@ struct bpf_jit { int prologue_plt_ret; /* Return address for prologue hotpatch PLT */ int prologue_plt; /* ...
df34ec9db6f521118895f22795da49f2ec01f8cf
Analyze and fix the following issue in the Linux kernel code: bpf: Fix atomic probe zero-extension
Problem Details: Zero-extending results of atomic probe operations fails with: verifier bug. zext_dst is set, but no reg is defined The problem is that insn_def_regno() handles BPF_ATOMICs, but not BPF_PROBE_ATOMICs. Fix by adding the missing condition. Fixes: d503a04f8bc0 ("bpf: Add support for certain atomics ...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index d3927d819465..e25ad5fb9115 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -3217,7 +3217,8 @@ static int insn_def_regno(const struct bpf_insn *insn) case BPF_ST: return -1; case BPF_STX: - if (BPF_MODE(insn->code) == BPF_...
da5f8fd1f0d393d5eaaba9ad8c22d1c26bb2bf9b
Analyze and fix the following issue in the Linux kernel code: bpftool: Mount bpffs when pinmaps path not under the bpffs
Problem Details: As Quentin said [0], BPF map pinning will fail if the pinmaps path is not under the bpffs, like: libbpf: specified path /home/ubuntu/test/sock_ops_map is not on BPF FS Error: failed to pin all maps [0] https://github.com/libbpf/bpftool/issues/146 Fixes: 3767a94b3253 ("bpftool: add pinmaps argu...
```diff diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index 1a501cf09e78..40ea743d139f 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -1813,6 +1813,10 @@ offload_dev: } if (pinmaps) { + err = create_and_mount_bpffs_dir(pinmaps); + if (err) + goto err_unpin; + err...
aaa08078e7251131f045ba248a68671db7f7bdf7
Analyze and fix the following issue in the Linux kernel code: drm/xe/bmg: Apply Wa_22019338487
Problem Details: Extend this WA to BMG GT as well. In this case media GT is not affected. The cap frequencies and max allowed ggtt writes are different as well. On BMG, we need to do a flush after 1100 GGTT writes, and we need to limit the GT frequency request to 2133 Mhz during driver load and leave it at that value a...
```diff diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c index 883cfc7f98a8..0cdbc1296e88 100644 --- a/drivers/gpu/drm/xe/xe_ggtt.c +++ b/drivers/gpu/drm/xe/xe_ggtt.c @@ -74,6 +74,9 @@ static unsigned int probe_gsm_size(struct pci_dev *pdev) static void ggtt_update_access_counter(struct xe_gg...
b0b2b50cdbd132cb78ed25c27081849a405b75e3
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Prevent use of uninitialized mutex
Problem Details: When skip_guc_pc is set and/or this is for a VF. Fixes: 3b1592fb7835 ("drm/xe/lnl: Apply Wa_22019338487") Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240701231529.2582452-1-vinay.b...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index d88f5e960fbd..f7b468930697 100644 --- a/drivers/gpu/drm/xe/xe_guc_pc.c +++ b/drivers/gpu/drm/xe/xe_guc_pc.c @@ -26,6 +26,7 @@ #include "xe_mmio.h" #include "xe_pcode.h" #include "xe_pm.h" +#include "xe_sriov.h" #include "xe_w...
a35f443d837ffcd5e73b64c13a46d12701839213
Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu-v3: add missing MODULE_DESCRIPTION() macro
Problem Details: With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Fixes: da55da5a42d4 ("io...
```diff diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c index e0fce31eba54..cceb737a7001 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c @@ -567,4 +567,5 @@ static struct kunit_suite arm...
67c9971cd6d309ecbcb87b942e22ffc194d7a376
Analyze and fix the following issue in the Linux kernel code: kunit/usercopy: Add missing MODULE_DESCRIPTION()
Problem Details: Fix warning seen with: $ make allmodconfig && make W=1 C=1 lib/usercopy_kunit.ko WARNING: modpost: missing MODULE_DESCRIPTION() in lib/usercopy_kunit.o Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kees Cook <kees@kernel.org> Reviewed-by: Rae Moar <rmoar@google.com> Reviewed-...
```diff diff --git a/lib/usercopy_kunit.c b/lib/usercopy_kunit.c index e819561a540d..77fa00a13df7 100644 --- a/lib/usercopy_kunit.c +++ b/lib/usercopy_kunit.c @@ -331,4 +331,5 @@ static struct kunit_suite usercopy_test_suite = { kunit_test_suites(&usercopy_test_suite); MODULE_AUTHOR("Kees Cook <kees@kernel.org>"); ...
6e92c646f5a4230d939a0882f879fc50dfa116c5
Analyze and fix the following issue in the Linux kernel code: io_uring/net: don't clear msg_inq before io_recv_buf_select() needs it
Problem Details: For bundle receives to function properly, the previous iteration msg_inq value is needed to make a judgement call on how much data there is to receive. A previous fix ended up clearing it earlier as an error case would potentially errantly set IORING_CQE_F_SOCK_NONEMPTY if the request got failed. Move...
```diff diff --git a/io_uring/net.c b/io_uring/net.c index 7c98c4d50946..cf742bdd2a93 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -1127,16 +1127,18 @@ int io_recv(struct io_kiocb *req, unsigned int issue_flags) flags |= MSG_DONTWAIT; retry_multishot: - kmsg->msg.msg_inq = -1; - kmsg->msg.msg_flags = 0; - ...
98d34c087249d39838874b83e17671e7d5eb1ca7
Analyze and fix the following issue in the Linux kernel code: xen-blkfront: fix sector_size propagation to the block layer
Problem Details: Ensure that info->sector_size and info->physical_sector_size are set before the call to blkif_set_queue_limits by doing away with the local variables and arguments that propagate them. Thanks to Marek Marczykowski-Górecki and Jürgen Groß for root causing the issue. Fixes: ba3f67c11638 ("xen-blkfront:...
```diff diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index fa3a2ba52545..59ce113b882a 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1070,8 +1070,7 @@ static char *encode_disk_name(char *ptr, unsigned int n) } static int xlvbd_alloc_gendisk(blkif_sector_...
1c0b3fca381bf879e2168b362692f83808677f95
Analyze and fix the following issue in the Linux kernel code: null_blk: Fix description of the fua parameter
Problem Details: The description of the fua module parameter is defined using MODULE_PARM_DESC() with the first argument passed being "zoned". That is the wrong name, obviously. Fix that by using the correct "fua" parameter name so that "modinfo null_blk" displays correct information. Fixes: f4f84586c8b9 ("null_blk: I...
```diff diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index 83a4ebe4763a..5de9ca4eceb4 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -227,7 +227,7 @@ MODULE_PARM_DESC(mbps, "Cache size in MiB for memory-backed device. Default: 0 ( static bool g_fua = t...
adb68ed26a3e92224e04502c768f1bb03b7c7aeb
Analyze and fix the following issue in the Linux kernel code: livepatch: Add "replace" sysfs attribute
Problem Details: There are situations when it might make sense to combine livepatches with and without the atomic replace on the same system. For example, the livepatch without the atomic replace might provide a hotfix or extra tuning. Managing livepatches on such systems might be challenging. And the information whic...
```diff diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch b/Documentation/ABI/testing/sysfs-kernel-livepatch index a5df9b4910dc..3735d868013d 100644 --- a/Documentation/ABI/testing/sysfs-kernel-livepatch +++ b/Documentation/ABI/testing/sysfs-kernel-livepatch @@ -47,6 +47,14 @@ Description: disabled when ...
3b7c16be30e35ec035b2efcc0f7d7b368789c443
Analyze and fix the following issue in the Linux kernel code: io_uring/msg_ring: fix overflow posting
Problem Details: The caller of io_cqring_event_overflow() should be holding the completion_lock, which is violated by io_msg_tw_complete. There is only one caller of io_add_aux_cqe(), so just add locking there for now. WARNING: CPU: 0 PID: 5145 at io_uring/io_uring.c:703 io_cqring_event_overflow+0x442/0x660 io_uring/i...
```diff diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 7ed1e009aaec..42139bb85fff 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -834,7 +834,11 @@ bool io_post_aux_cqe(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags */ void io_add_aux_cqe(struct io_ring_ctx *ctx, u64 user_dat...
39823b47bbd40502632ffba90ebb34fff7c8b5e8
Analyze and fix the following issue in the Linux kernel code: block/mq-deadline: Fix the tag reservation code
Problem Details: The current tag reservation code is based on a misunderstanding of the meaning of data->shallow_depth. Fix the tag reservation code as follows: * By default, do not reserve any tags for synchronous requests because for certain use cases reserving tags reduces performance. See also Harshit Mogalapal...
```diff diff --git a/block/mq-deadline.c b/block/mq-deadline.c index 94eede4fb9eb..acdc28756d9d 100644 --- a/block/mq-deadline.c +++ b/block/mq-deadline.c @@ -487,6 +487,20 @@ unlock: return rq; } +/* + * 'depth' is a number in the range 1..INT_MAX representing a number of + * requests. Scale it with a factor (1 <...
6259151c04d4e0085e00d2dcb471ebdd1778e72e
Analyze and fix the following issue in the Linux kernel code: block: Call .limit_depth() after .hctx has been set
Problem Details: Call .limit_depth() after data->hctx has been set such that data->hctx can be used in .limit_depth() implementations. Cc: Christoph Hellwig <hch@lst.de> Cc: Damien Le Moal <dlemoal@kernel.org> Cc: Zhiguo Niu <zhiguo.niu@unisoc.com> Fixes: 07757588e507 ("block/mq-deadline: Reserve 25% of scheduler tags...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index fec2dea5c6e8..e3c3c0c21b55 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -448,6 +448,10 @@ static struct request *__blk_mq_alloc_requests(struct blk_mq_alloc_data *data) if (data->cmd_flags & REQ_NOWAIT) data->flags |= BLK_MQ_REQ_NOWAIT; +retry: + ...
f3b273b7c7e42ff7ef5b6063834d768d33c7ba79
Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu-v3: Allow setting a S1 domain to a PASID
Problem Details: The SVA cleanup made the SSID logic entirely general so all we need to do is call it with the correct cd table entry for a S1 domain. This is slightly tricky because of the ASID and how the locking works, the simple fix is to just update the ASID once we get the right locks. Tested-by: Nicolin Chen <...
```diff diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 8e661442b532..8c3031fe542b 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2798,6 +2798,36 @@ static int arm_smmu_attach_dev(struct iommu_do...
85f2fb6ef4137c631c9d2663716d998d7e4f164f
Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu-v3: Start building a generic PASID layer
Problem Details: Add arm_smmu_set_pasid()/arm_smmu_remove_pasid() which are to be used by callers that already constructed the arm_smmu_cd they wish to program. These functions will encapsulate the shared logic to setup a CD entry that will be shared by SVA and S1 domain cases. Prior fixes had already moved most of t...
```diff diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c index 28f8bf4327f6..71ca87c2c5c3 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c @@ -417,29 +417,27 @@ static void arm_smmu_mmu_notifi...
7775352a5f52f034d24fafdf3969c2003a53aa3a
Analyze and fix the following issue in the Linux kernel code: drm/msm/gem: Add missing rcu_dereference()
Problem Details: Fixes a sparse "different address spaces" error. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202406280050.syeEwLTE-lkp@intel.com/ Signed-off-by: Rob Clark <robdclark@chromium.org> Patchwork: https://patchwork.freedesktop.org/patch/601612/
```diff diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index ddc6a131c041..ebc9ba66efb8 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -48,7 +48,7 @@ static void update_ctx_mem(struct drm_file *file, ssize_t size) uint64_t ctx_mem = atomic64_add_return(si...
935124dd5883b5de68dc5a94f582480a10643dc9
Analyze and fix the following issue in the Linux kernel code: net: txgbe: free isb resources at the right time
Problem Details: When using MSI/INTx interrupt, the shared interrupts are still being handled in the device remove routine, before free IRQs. So isb memory is still read after it is freed. Thus move wx_free_isb_resources() from txgbe_close() to txgbe_remove(). And fix the improper isb free action in txgbe_open() error ...
```diff diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c index e1f514b21090..81bedc8ee8d4 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c @@ -2028,6 +2028,9 @@ int wx_setup_isb_resources(struct wx *wx) { ...
1e1fa1723eb3a293d7d0b1c1a9ad8774c1ef0aa0
Analyze and fix the following issue in the Linux kernel code: net: txgbe: add extra handle for MSI/INTx into thread irq handle
Problem Details: Rename original txgbe_misc_irq_handle() to txgbe_misc_irq_thread_fn() since it is the handle thread to wake up. And add the primary handler to deal the case of MSI/INTx, because there is a schedule NAPI poll. Fixes: aefd013624a1 ("net: txgbe: use irq_domain for interrupt controller") Signed-off-by: Ji...
```diff diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c index 1490fd6ddbdf..a4cf682dca65 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c @@ -111,6 +111,36 @@ static const struct irq_domain_ops t...
bd07a98178462e7a02ed2bf7dec90a00944c1da5
Analyze and fix the following issue in the Linux kernel code: net: txgbe: remove separate irq request for MSI and INTx
Problem Details: When using MSI or INTx interrupts, request_irq() for pdev->irq will conflict with request_threaded_irq() for txgbe->misc.irq, to cause system crash. So remove txgbe_request_irq() for MSI/INTx case, and rename txgbe_request_msix_irqs() since it only request for queue irqs. Add wx->misc_irq_domain to de...
```diff diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c index 7c4b6881a93f..d1b682ce9c6d 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c @@ -1959,6 +1959,7 @@ int wx_sw_init(struct wx *wx) } bitmap_zero(w...
7c36711a2cd8059c2d24f5e5c1d76e8ea2d5613c
Analyze and fix the following issue in the Linux kernel code: net: txgbe: initialize num_q_vectors for MSI/INTx interrupts
Problem Details: When using MSI/INTx interrupts, wx->num_q_vectors is uninitialized. Thus there will be kernel panic in wx_alloc_q_vectors() to allocate queue vectors. Fixes: 3f703186113f ("net: libwx: Add irq flow functions") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Paolo Abeni <pabeni@redhat...
```diff diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c index 68bde91b67a0..f53776877f71 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c @@ -1686,6 +1686,7 @@ static int wx_set_interrupt_capability(struct w...
e527a6127223b644e0a27b44f4b16e16eb6c7f0a
Analyze and fix the following issue in the Linux kernel code: platform/x86: toshiba_acpi: Fix quickstart quirk handling
Problem Details: The global hci_hotkey_quickstart quirk flag is tested in toshiba_acpi_enable_hotkeys() before the quirk flag is properly initialized based on SMBIOS data. This causes the quirk to be applied to all models, some of which behave erratically as a result. Fix this by initializing the global quirk flags du...
```diff diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 3a8d8df89186..10d0ce6c8342 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -3271,7 +3271,7 @@ static const char *find_hci_method(acpi_handle handle) */ #define QUIRK_HCI_...
f8dbe58e2f1a3c091531b3f8ef86b393ceee67d1
Analyze and fix the following issue in the Linux kernel code: net: stmmac: dwmac-stm32: update err status in case different of stm32mp13
Problem Details: The mask parameter of syscfg property is mandatory for MP13 but optional for all other cases. The function should not return error code because for non-MP13 the missing syscfg phandle in DT is not considered an error. So reset err to 0 in that case to support existing DTs without syscfg phandle. Fixes...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c index d6a268237ca1..c1732955a697 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c @@ -435,10 +435,12 @@ static int stm32_dwmac_...
3cd1d4651cebe9776a0142ade36ff9f2e3545436
Analyze and fix the following issue in the Linux kernel code: net: stmmac: dwmac-stm32: Add test to verify if ETHCK is used before checking clk rate
Problem Details: When we want to use clock from RCC to clock Ethernet PHY (with ETHCK) we need to check if value of clock rate is authorized. If ETHCK is unused, the ETHCK frequency is 0Hz and validation fails. It makes no sense to validate unused ETHCK, so skip the validation. Fixes: 582ac134963e ("net: stmmac: dwmac...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c index 23cf0a5b047f..d6a268237ca1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c @@ -206,6 +206,9 @@ static int stm32mp1_valid...
b698ab56837bc9e666b7e7e12e9c28fe1d6a763c
Analyze and fix the following issue in the Linux kernel code: net: stmmac: dwmac-qcom-ethqos: fix error array size
Problem Details: Correct member @num_por with size of right array @emac_v4_0_0_por for struct ethqos_emac_driver_data @emac_v4_0_0_data. Cc: stable@vger.kernel.org Fixes: 8c4d92e82d50 ("net: stmmac: dwmac-qcom-ethqos: add support for emac4 on sa8775p platforms") Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com> Re...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 65d7370b47d5..466c4002f00d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -272,7 +272,7 @@ s...
3d83abcae6e8fa6698f6b0a026ca650302bdbfd8
Analyze and fix the following issue in the Linux kernel code: dt-bindings: phy: qcom,qmp-usb: fix spelling error
Problem Details: Correct the spelling error, changing 'com' to 'qcom'. Cc: stable@vger.kernel.org Fixes: f75a4b3a6efc ("dt-bindings: phy: qcom,qmp-usb: Add QDU1000 USB3 PHY") Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kerne...
```diff diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml index 5755245ecfd6..0e0b6cae07bc 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml +++ b/Documentation/devicetre...
4c75fe2a5ec409b773ed5edb0e83e2f0a88d1138
Analyze and fix the following issue in the Linux kernel code: phy: core: Fix documentation of of_phy_get
Problem Details: of_phy_put is used for of_phy_get to release the reference count. Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20240626080911.203630-1-linmq006@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
```diff diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index bf6a07590321..f053b525ccff 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -664,7 +664,7 @@ out_unlock: * * Returns the phy driver, after getting a refcount to it; or * -ENODEV if there is no such phy. The caller is res...
8d2a3539517dbf13e970b3aabdf94b04a65d276c
Analyze and fix the following issue in the Linux kernel code: phy: starfive: Correct the dphy configure process
Problem Details: We actually want to calculate the alignment values first, then use the alignment value to look up the data from reg_configs[]. Fixes: d3ab79553308 ("phy: starfive: Add mipi dphy tx support") Reviewed-by: Shengyang Chen <shengyang.chen@starfivetech.com> Signed-off-by: Changhuang Liang <changhuang.lian...
```diff diff --git a/drivers/phy/starfive/phy-jh7110-dphy-tx.c b/drivers/phy/starfive/phy-jh7110-dphy-tx.c index 61b0da6096e5..c64d1c91b130 100644 --- a/drivers/phy/starfive/phy-jh7110-dphy-tx.c +++ b/drivers/phy/starfive/phy-jh7110-dphy-tx.c @@ -235,12 +235,14 @@ static int stf_dphy_configure(struct phy *phy, union ph...
687d6bccb28238fcfa65f7c1badfdfeac498c428
Analyze and fix the following issue in the Linux kernel code: phy: zynqmp: Enable reference clock correctly
Problem Details: Lanes can use other lanes' reference clocks, as determined by refclk. Use refclk to determine the clock to enable/disable instead of always using the lane's own reference clock. This ensures the clock selected in xpsgtr_configure_pll is the one enabled. For the other half of the equation, always progr...
```diff diff --git a/drivers/phy/xilinx/phy-zynqmp.c b/drivers/phy/xilinx/phy-zynqmp.c index dc8319bda43d..f2bff7f25f05 100644 --- a/drivers/phy/xilinx/phy-zynqmp.c +++ b/drivers/phy/xilinx/phy-zynqmp.c @@ -80,7 +80,8 @@ /* Reference clock selection parameters */ #define L0_Ln_REF_CLK_SEL(n) (0x2860 + (n) * 4) -#d...
967969cf594ed3c1678a9918d6e9bb2d1591cbe9
Analyze and fix the following issue in the Linux kernel code: phy: cadence-torrent: Check return value on register read
Problem Details: cdns_torrent_dp_set_power_state() does not consider that ret might be overwritten. Add return value check of regmap_read_poll_timeout() after register read in cdns_torrent_dp_set_power_state(). Fixes: 5b16a790f18d ("phy: cadence-torrent: Reorder few functions to remove function declarations") Signed-o...
```diff diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index 89e647bff99f..56ce82a47f88 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -1157,6 +1157,9 @@ static int cdns_torrent_dp_set_power_state(struct cdns_...
d80d61ab0609f7f7168d59ec82ee5f055a4b6be7
Analyze and fix the following issue in the Linux kernel code: selftests/xsk: Ensure traffic validation proceeds after ring size adjustment in xskxceiver
Problem Details: Previously, HW_SW_MIN_RING_SIZE and HW_SW_MAX_RING_SIZE test cases were not validating Tx/Rx traffic at all due to early return after changing HW ring size in testapp_validate_traffic(). Fix the flow by checking return value of set_ring_size() and act upon it rather than terminating the test case ther...
```diff diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c index 2eac0895b0a1..088df53869e8 100644 --- a/tools/testing/selftests/bpf/xskxceiver.c +++ b/tools/testing/selftests/bpf/xskxceiver.c @@ -1899,11 +1899,15 @@ static int testapp_validate_traffic(struct test_spec *tes...
db4eb418c71a4223b90cac34017ed1f627371da9
Analyze and fix the following issue in the Linux kernel code: phy: Fix the cacography in phy-exynos5250-usb2.c
Problem Details: The word 'swtich' is wrong, so fix it. Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20240701112517.6597-1-liujing@cmss.chinamobile.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
```diff diff --git a/drivers/phy/samsung/phy-exynos5250-usb2.c b/drivers/phy/samsung/phy-exynos5250-usb2.c index e198010e1bfd..21b06072f866 100644 --- a/drivers/phy/samsung/phy-exynos5250-usb2.c +++ b/drivers/phy/samsung/phy-exynos5250-usb2.c @@ -121,7 +121,7 @@ #define EXYNOS_5420_USB_ISOL_HOST_OFFSET 0x70C #define ...
edf9e04955d2387032beac54ebf20b43aaca2adf
Analyze and fix the following issue in the Linux kernel code: phy: phy-rockchip-samsung-hdptx: Select CONFIG_MFD_SYSCON
Problem Details: Compile testing configurations without REGMAP support enabled results in a bunch of errors being reported: ../drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c:569:21: error: variable ‘rk_hdptx_phy_regmap_config’ has initializer but incomplete type 569 | static const struct regmap_config rk_hdpt...
```diff diff --git a/drivers/phy/rockchip/Kconfig b/drivers/phy/rockchip/Kconfig index 08b0f4345760..490263375057 100644 --- a/drivers/phy/rockchip/Kconfig +++ b/drivers/phy/rockchip/Kconfig @@ -86,7 +86,9 @@ config PHY_ROCKCHIP_PCIE config PHY_ROCKCHIP_SAMSUNG_HDPTX tristate "Rockchip Samsung HDMI/eDP Combo PHY dri...
d2d30a376d9cc94c6fb730c58b3e5b7426ecb6de
Analyze and fix the following issue in the Linux kernel code: net: allow skb_datagram_iter to be called from any context
Problem Details: We only use the mapping in a single context, so kmap_local is sufficient and cheaper. Make sure to use skb_frag_foreach_page as skb frags may contain compound pages and we need to map page by page. Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/2024061615...
```diff diff --git a/net/core/datagram.c b/net/core/datagram.c index e614cfd8e14a..e9ba4c7b449d 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -416,15 +416,22 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset, end = start + skb_frag_size(frag); if ((copy = end - offset) > 0)...
611ff1b1ae989a7bcce3e2a8e132ee30e968c557
Analyze and fix the following issue in the Linux kernel code: xen: privcmd: Fix possible access to a freed kirqfd instance
Problem Details: Nothing prevents simultaneous ioctl calls to privcmd_irqfd_assign() and privcmd_irqfd_deassign(). If that happens, it is possible that a kirqfd created and added to the irqfds_list by privcmd_irqfd_assign() may get removed by another thread executing privcmd_irqfd_deassign(), while the former is still ...
```diff diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index f4ba962de62b..9563650dfbaf 100644 --- a/drivers/xen/privcmd.c +++ b/drivers/xen/privcmd.c @@ -17,6 +17,7 @@ #include <linux/poll.h> #include <linux/sched.h> #include <linux/slab.h> +#include <linux/srcu.h> #include <linux/string.h> #include <...
1c682593096a487fd9aebc079a307ff7a6d054a3
Analyze and fix the following issue in the Linux kernel code: xen: privcmd: Switch from mutex to spinlock for irqfds
Problem Details: irqfd_wakeup() gets EPOLLHUP, when it is called by eventfd_release() by way of wake_up_poll(&ctx->wqh, EPOLLHUP), which gets called under spin_lock_irqsave(). We can't use a mutex here as it will lead to a deadlock. Fix it by switching over to a spin lock. Reported-by: Al Viro <viro@zeniv.linux.org.u...
```diff diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index b9b784633c01..f4ba962de62b 100644 --- a/drivers/xen/privcmd.c +++ b/drivers/xen/privcmd.c @@ -846,7 +846,7 @@ out: #ifdef CONFIG_XEN_PRIVCMD_EVENTFD /* Irqfd support */ static struct workqueue_struct *irqfd_cleanup_wq; -static DEFINE_MUTEX(irqf...
657a292d679ae3a6c733ab0e939e24ae44b20faf
Analyze and fix the following issue in the Linux kernel code: ARM: 9408/1: mm: CFI: Fix some erroneous reset prototypes
Problem Details: I somehow got a few cpu_nn_reset() signatures wrong in my patch. Fix it up. Closes: https://lore.kernel.org/oe-kbuild-all/202406260432.6WGV2jCk-lkp@intel.com/ Fixes: 393999fa9627 ("ARM: 9389/2: mm: Define prototypes for all per-processor calls") Reported-by: kernel test robot <lkp@intel.com> Reported...
```diff diff --git a/arch/arm/mm/proc.c b/arch/arm/mm/proc.c index bdbbf65d1b36..2027845efefb 100644 --- a/arch/arm/mm/proc.c +++ b/arch/arm/mm/proc.c @@ -17,7 +17,7 @@ void cpu_arm7tdmi_proc_init(void); __ADDRESSABLE(cpu_arm7tdmi_proc_init); void cpu_arm7tdmi_proc_fin(void); __ADDRESSABLE(cpu_arm7tdmi_proc_fin); -v...
2335c9cb831faba1a4efcc612886073b6f175fe4
Analyze and fix the following issue in the Linux kernel code: ARM: 9407/1: Add support for STACKLEAK gcc plugin
Problem Details: Add the STACKLEAK gcc plugin to arm32 by adding the helper used by stackleak common code: on_thread_stack(). It initialize the stack with the poison value before returning from system calls which improves the kernel security. Additionally, this disables the plugin in EFI stub code and decompress code, ...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 08572703d94d..26a01ad4087c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -86,6 +86,7 @@ config ARM select HAVE_ARCH_PFN_VALID select HAVE_ARCH_SECCOMP select HAVE_ARCH_SECCOMP_FILTER if AEABI && !OABI_COMPAT + select HAVE_ARCH_STACKLEAK se...
4e7b4ff2dcaed228cb2fb7bfe720262c98ec1bb9
Analyze and fix the following issue in the Linux kernel code: ARM: 9406/1: Fix callchain_trace() return value
Problem Details: perf_callchain_store() return 0 on success, -1 otherwise, fix callchain_trace() to return correct bool value. So walk_stackframe() can have a chance to stop walking the stack ahead. Fixes: 70ccc7c0667b ("ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code") Signed-off-by: Ji...
```diff diff --git a/arch/arm/kernel/perf_callchain.c b/arch/arm/kernel/perf_callchain.c index 7147edbe56c6..1d230ac9d0eb 100644 --- a/arch/arm/kernel/perf_callchain.c +++ b/arch/arm/kernel/perf_callchain.c @@ -85,8 +85,7 @@ static bool callchain_trace(void *data, unsigned long pc) { struct perf_callchain_entry_ctx...
e1c6db864599be341cd3bcc041540383215ce05e
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
Problem Details: Apply quirk to fix combo jack detection on a new Clevo model: V5[46]0TU Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20240701111010.1496569-1-michal.kopec@3mdeb.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 811e82474200..8c4b59557940 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10480,6 +10480,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50N...
349d271416c61f82b853336509b1d0dc04c1fcbb
Analyze and fix the following issue in the Linux kernel code: x86/xen: Convert comma to semicolon
Problem Details: Replace a comma between expression statements by a semicolon. Fixes: 8310b77b48c5 ("Xen/gnttab: handle p2m update errors on a per-slot basis") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/20240702031010.1411875-1-nichen@iscas....
```diff diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 99918beccd80..6bcbdf3b7999 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -730,7 +730,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, * immediate unmapping. */ map_ops[i].status = GNTST_general_error; - un...
ad162488bbd359abda99c9819f5cbe9172f40935
Analyze and fix the following issue in the Linux kernel code: x86/xen/time: Reduce Xen timer tick
Problem Details: Current timer tick is causing some deadline to fail. The current high value constant was probably due to an old bug in the Xen timer implementation causing errors if the deadline was in the future. This was fixed in Xen commit: 19c6cbd90965 xen/vcpu: ignore VCPU_SSHOTTMR_future Usage of VCPU_SSHOTTMR...
```diff diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 52fa5609b7f6..96521b1874ac 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c @@ -30,7 +30,7 @@ #include "xen-ops.h" /* Minimum amount of time until next clock event fires */ -#define TIMER_SLOP 100000 +#define TIMER_SLOP 1 static u64 x...
3645ffaf2b334abaf5f53e5ca0f47465d91e69d2
Analyze and fix the following issue in the Linux kernel code: gpiolib: of: fix lookup quirk for MIPS Lantiq
Problem Details: As it turns out, there is a large number of out-of-tree DTSes (in OpenWrt project) that used to specify incorrect (active high) polarity for the Lantiq reset GPIO, so to keep compatibility while they are being updated a quirk for force the polarity low is needed. Luckily these old DTSes used nonstandar...
```diff diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index d75f6ee37028..38679cf1969f 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -202,6 +202,16 @@ static void of_gpio_try_fixup_polarity(const struct device_node *np, * helper, and be consistent with what other dri...
e49380c155940cb47e291a4b3fcb7fdffee6aa4d
Analyze and fix the following issue in the Linux kernel code: soc: qcom: smp2p: Use devname for interrupt descriptions
Problem Details: When using /proc/interrupts to collect statistics on smp2p interrupt counts, it is hard to distinguish the different instances of smp2p from each other. For example to debug a processor boot issue, the ready and handover interrupts are checked for sanity to ensure the firmware reached a specific initia...
```diff diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c index a21241cbeec7..696c2a8387d0 100644 --- a/drivers/soc/qcom/smp2p.c +++ b/drivers/soc/qcom/smp2p.c @@ -16,6 +16,7 @@ #include <linux/platform_device.h> #include <linux/pm_wakeirq.h> #include <linux/regmap.h> +#include <linux/seq_file.h> #in...
d870196e3383b92179dfc051fe6f038df9a94ea9
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm7225-fairphone-fp4: Name the regulators
Problem Details: Without explicitly specifying names for the regulators they are named based on the DeviceTree node name. This results in multiple regulators with the same name, making debug prints and regulator_summary impossible to reason about. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Dmitr...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts index a74f3ac09a5e..4e67bb80a026 100644 --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts @@ -150,124 +150,145 @@ qcom,pmic-id = "a"...
f27e42c7d3ff8ddfc57273efd1e8642ea89bad90
Analyze and fix the following issue in the Linux kernel code: clk: qcom: gcc-x1e80100: Fix halt_check for all pipe clocks
Problem Details: In case of all pipe clocks, there is a QMP PHY clock that is feeding them. If, for whatever reason, the clock from the PHY is not enabled, halt bit will not get set, and the clock controller driver will assume the clock is stuck in a specific state. The way this is supposed to be properly fixed is to d...
```diff diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c index eb7e36ebd7ae..fc80011342da 100644 --- a/drivers/clk/qcom/gcc-x1e80100.c +++ b/drivers/clk/qcom/gcc-x1e80100.c @@ -2812,7 +2812,7 @@ static struct clk_branch gcc_pcie_0_mstr_axi_clk = { static struct clk_branch gcc_pcie_0_pip...
ac3eb41a283adf861aa49408bd4a6ce1e9563f84
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: pm8916: correct thermal zone name
Problem Details: Correct the name for the thermal zone on PM8916 PMIC. I ended up with c&p mistake, which wasn't noticed until the patch got merged. Reported-by: Konrad Dybcio <konrad.dybcio@linaro.org> Fixes: b7a28d8a7b80 ("arm64: dts: qcom: pm8916: add temp-alarm thermal zone") Signed-off-by: Dmitry Baryshkov <dmitr...
```diff diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi index 2def48f2d101..f8e4829ff7f7 100644 --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi @@ -6,7 +6,7 @@ / { thermal-zones { - pm8150-thermal { + pm8916-thermal { polling-dela...
05a21e8b5d006177bce7332523eea5e3f2ee23ab
Analyze and fix the following issue in the Linux kernel code: soc: qcom: smsm: Add missing mailbox dependency to Kconfig
Problem Details: Since the smsm driver got the ability to interact with the mailbox using the mailbox subsystem and not just syscon, we need to add the dependency to kconfig as well to avoid compile errors. Fixes: 75287992f58a ("soc: qcom: smsm: Support using mailbox interface") Reported-by: kernel test robot <lkp@int...
```diff diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 432c85bd8ad4..7f02f0525933 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -211,6 +211,7 @@ config QCOM_SMP2P config QCOM_SMSM tristate "Qualcomm Shared Memory State Machine" + depends on MAILBOX depends on QCO...
9c99c33a904c86d95ecf4e2690de6a826b88671c
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100: Fix USB HS PHY 0.8V supply
Problem Details: According to the power grid documentation, the 0.8v HS PHY shared regulator is actually LDO3 from PM8550ve id J. Fix both CRD and QCP boards. Fixes: d7e03cce0400 ("arm64: dts: qcom: x1e80100-crd: Enable more support") Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Konrad Dybcio <konrad.d...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts index d0f28d8547b1..96f51850644b 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts +++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts @@ -990,7 +990,7 @@ }; &usb_1_ss0_hsphy { - vdd-supply = <&vreg_l2e_0p8>;...
19e6ad2c75782bd15b3df24df7982da457d702c5
Analyze and fix the following issue in the Linux kernel code: net: phy: fix potential use of NULL pointer in phy_suspend()
Problem Details: phy_suspend() checks the WoL status, and then dereferences phydrv->flags if (and only if) we decided that WoL has been enabled on either the PHY or the netdev. We then check whether phydrv was NULL, but we've potentially already dereferenced the pointer. If phydrv is NULL, then phy_ethtool_get_wol() ...
```diff diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 473cbc1d497b..70b07e621fb2 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1980,7 +1980,7 @@ int phy_suspend(struct phy_device *phydev) const struct phy_driver *phydrv = phydev->drv; int ret; - ...
c93a6f62cb1bd097aef2e4588648a420d175eee2
Analyze and fix the following issue in the Linux kernel code: e1000e: Fix S0ix residency on corporate systems
Problem Details: On vPro systems, the configuration of the I219-LM to achieve power gating and S0ix residency is split between the driver and the CSME FW. It was discovered that in some scenarios, where the network cable is connected and then disconnected, S0ix residency is not always reached. This was root-caused to a...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index da5c59daf8ba..3cd161c6672b 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6363,49 +6363,49 @@ static void e1000e_s0ix_entry_flow(struct e1000_a...
e227c11179dfb6970360c95a8d7b007eb3b223d6
Analyze and fix the following issue in the Linux kernel code: Revert "dt-bindings: cache: qcom,llcc: correct QDU1000 reg entries"
Problem Details: This reverts commit f0f99f371822c48847e02e56d6e7de507e18f186. QDU1000 has 7 register regions. The earlier commit 8e2506d01231 ("dt-bindings: cache: qcom,llcc: Add LLCC compatible for QDU1000/QRU1000") to add llcc compatible was reflecting the same, but dtsi change for QDU1000 was not aligning with its...
```diff diff --git a/Documentation/devicetree/bindings/cache/qcom,llcc.yaml b/Documentation/devicetree/bindings/cache/qcom,llcc.yaml index 07ccbda4a0ab..b9a9f2cf32a1 100644 --- a/Documentation/devicetree/bindings/cache/qcom,llcc.yaml +++ b/Documentation/devicetree/bindings/cache/qcom,llcc.yaml @@ -66,7 +66,6 @@ allOf: ...
b576d375b536568c85d42c15a189f6b6fdd75b74
Analyze and fix the following issue in the Linux kernel code: fgraph: Use str_plural() in test_graph_storage_single()
Problem Details: Use existing str_plural() function rather than duplicating its implementation. ./kernel/trace/trace_selftest.c:880:56-60: opportunity for str_plural(size). Link: https://lore.kernel.org/linux-trace-kernel/20240618072014.20855-1-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot <abaci@linux.al...
```diff diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index adf0f436d84b..97f1e4bc47dc 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c @@ -877,7 +877,7 @@ static int __init test_graph_storage_single(struct fgraph_fixture *fixture) int ret; pr_cont("PASSE...
39b24cced70fdc336dbc0070f8b3bde61d8513a8
Analyze and fix the following issue in the Linux kernel code: hwmon: (adt7475) Fix default duty on fan is disabled
Problem Details: According to the comments on fan is disabled, we change to manual mode and set the duty cycle to 0. For setting the duty cycle part, the register is wrong. Fix it. Fixes: 1c301fc5394f ("hwmon: Add a driver for the ADT7475 hardware monitoring chip") Signed-off-by: Wayne Tung <chineweff@gmail.com> Link:...
```diff diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index 5f78e6633018..bc186c61a2c0 100644 --- a/drivers/hwmon/adt7475.c +++ b/drivers/hwmon/adt7475.c @@ -1896,7 +1896,7 @@ static void adt7475_read_pwm(struct i2c_client *client, int index) data->pwm[CONTROL][index] &= ~0xE0; data->pwm[CONTROL]...
0ad4b4a2f6357c45fbe444ead1a929a0b4017d03
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix array-index-out-of-bounds in dml2/FCLKChangeSupport
Problem Details: [Why] Potential out of bounds access in dml2_calculate_rq_and_dlg_params() because the value of out_lowest_state_idx used as an index for FCLKChangeSupport array can be greater than 1. [How] Currently dml2 core specifies identical values for all FCLKChangeSupport elements. Always use index 0 in the co...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c b/drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c index 0f8b3336e26d..cbd1c1f26b7a 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c @@ -294,7 +294,7 @@ void dml2_calculate_rq_and_dl...
7ae37db29a8bc4d3d116a409308dd98fc3a0b1b3
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Update efficiency bandwidth for dcn351
Problem Details: Fix 4k240 underflow on dcn351 Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c index a41812598ce8..8ecc972dbffd 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper...
9ef1548aeaa8858e7aee2152bf95cc71cdcd6dff
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix refresh rate range for some panel
Problem Details: [Why] Some of the panels does not have the refresh rate range info in base EDID and only have the refresh rate range info in DisplayID block. It will cause the max/min freesync refresh rate set to 0. [How] Try to parse the refresh rate range info from DisplayID if the max/min refresh rate is 0. Revie...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 86373251030c..3cdcadd41be1 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -11182,6 +11182,49 @@ static bool parse_ed...
878e845d8db04df9ff3bbbaac09d335b24153704
Analyze and fix the following issue in the Linux kernel code: clk: mediatek: mt8183: Only enable runtime PM on mt8183-mfgcfg
Problem Details: Commit 2f7b1d8b5505 ("clk: mediatek: Do a runtime PM get on controllers during probe") enabled runtime PM for all mediatek clock controllers, but this introduced an issue on the resume path. If a device resumes earlier than the clock controller and calls clk_prepare() when runtime PM is enabled on the...
```diff diff --git a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c index ba504e19d420..62d876e150e1 100644 --- a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c +++ b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c @@ -29,6 +29,7 @@ static const struct mtk_gate mfg_clks[] = { static const struc...
d3dbccacfd2d47a73e2bb6f9be45a116de94cef3
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix hbm stack id in boot error report
Problem Details: To align with firmware, hbm id field 0x1 refers to hbm stack 0, 0x2 refers to hbm statck 1. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 4edd8e333d36..6d1f974e2987 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -4565,7 +4565,7 @@ static void amdgpu_ras_boot_time_error_reporting(struct amdgpu_...
11317d2963fa79767cd7c6231a00a9d77f2e0f54
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: check for LINEAR_ALIGNED correctly in check_tiling_flags_gfx6
Problem Details: Fix incorrect check. Signed-off-by: Marek Olšák <marek.olsak@amd.com> Acked-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/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index cfec85563bc6..3c5fb907bdd9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -954,8 +954,7 @@ static int check_tiling_flags_gfx6(struct amdgpu_...
230806dddc2601e58073740b74bf85a03d12ba53
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: 3.2.291
Problem Details: * FW Release 0.0.224.0 * Fix bw issue for dcn351 * Fix FAMS2 logic issue for dcn401 * Fix Coverity issues * Fix cursor issues * Refactor dio sources Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Aric Cyr <aric.cyr@amd.com> Tested-by: ...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 55b94a72ddc2..73cdebcd9f37 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -55,7 +55,7 @@ struct aux_payload; struct set_config_cmd_payload; struct dmub_notification; -#...
9ef37ff38d01a616a670019330190ce1817df887
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix array-index-out-of-bounds in dml2/FCLKChangeSupport
Problem Details: [Why] Potential out of bounds access in dml2_calculate_rq_and_dlg_params() because the value of out_lowest_state_idx used as an index for FCLKChangeSupport array can be greater than 1. [How] Currently dml2 core specifies identical values for all FCLKChangeSupport elements. Always use index 0 in the co...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c b/drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c index d91948d6ff97..92238ff333a4 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c @@ -293,7 +293,7 @@ void dml2_calculate_rq_and_dl...
882643a95fe60c23a70917f97ac0781e92c583dc
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Update efficiency bandwidth for dcn351
Problem Details: Fix 4k240 underflow on dcn351 Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c index 935893456849..8b9dcee77266 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper...
a638b837d0e6052678a686d42018271042e38408
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix refresh rate range for some panel
Problem Details: [Why] Some of the panels does not have the refresh rate range info in base EDID and only have the refresh rate range info in DisplayID block. It will cause the max/min freesync refresh rate set to 0. [How] Try to parse the refresh rate range info from DisplayID if the max/min refresh rate is 0. Revie...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index e64592e49568..f83ef3e1554c 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -11864,6 +11864,49 @@ static bool parse_ed...
b6d508533fa1371d870628a88b74c831c5881cde
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix a crash when clock source is reference for non otg master pipe
Problem Details: [why] The function enumerates all pipes without checking pipe type. It is only supposed to call program pixel clock for OTG master pipe only. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Wenjing Liu <wenjing.liu@amd.com> Tested-by: Daniel Whee...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c index 606b2411eee9..45fe17a46890 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk...
d6d884b68ad65c832be5ba22ac61dc7173059d9a
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix dmub timeout after fams2 enabled
Problem Details: Reset fams stream count upon stream removal, otherwise fams2 state machine in dmub will get corrupted. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signe...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c index c310354cd5fc..9edcacdde6b7 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c @@ -197,8 +19...
ea04ef19ebdcd22e8a21054a19c2c8fefae011ce
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add debug option for disabling SLDO optimizations
Problem Details: [Why] DM can hook this up to disable SLDO optimizations in firmware during DMCUB initialization for debug purposes. [How] Add the option and pass it through dmub_srv. Reviewed-by: Hansen Dsouza <hansen.dsouza@amd.com> Signed-off-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Nicholas Kazlauskas <ni...
```diff diff --git a/drivers/gpu/drm/amd/display/dmub/dmub_srv.h b/drivers/gpu/drm/amd/display/dmub/dmub_srv.h index 85dcf6b4fe92..6589bb9aea6b 100644 --- a/drivers/gpu/drm/amd/display/dmub/dmub_srv.h +++ b/drivers/gpu/drm/amd/display/dmub/dmub_srv.h @@ -299,6 +299,7 @@ struct dmub_srv_hw_params { enum dmub_memory_ac...
ea79068d4073bf303f8203f2625af7d9185a1bc6
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Check denominator crb_pipes before used
Problem Details: [WHAT & HOW] A denominator cannot be 0, and is checked before used. This fixes 2 DIVIDE_BY_ZERO issues reported by Coverity. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c index ad40a657e173..3f4b9dba4112 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn...
116a678f3a9abc24f5c9d2525b7393d18d9eb58e
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Check denominator pbn_div before used
Problem Details: [WHAT & HOW] A denominator cannot be 0, and is checked before used. This fixes 1 DIVIDE_BY_ZERO issue reported by Coverity. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel....
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0daf2b787d2f..2c96863d320e 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -7561,7 +7561,7 @@ static int dm_update_ms...
bbd0d1c942cbac87404ed2bca0aa4f7907b8f47f
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix possible overflow in integer multiplication
Problem Details: [WHAT & HOW] Integer multiplies integer may overflow in context that expects an expression of unsigned/siged long long (64 bits). This can be fixed by casting integer to unsigned/siged long long to force 64 bits results. This fixes 26 OVERFLOW_BEFORE_WIDEN issues reported by Coverity. Reviewed-by: Ha...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c index 633ab1c16dc6..f40240aafe98 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c @@ -158,7 +158,7 @@ void amdg...
ac01f6ad710c41c8c2cfab24be8bb71586bf8c44
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix divide by zero in CURSOR_DST_X_OFFSET calculation
Problem Details: [Why] Certain situations cause pipes to have a recout of 0, such as when the dst_rect lies completely outside of a given ODM slice. [How] Skip calculation that transforms cursor coordinates to viewport space. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Jerry Zuo <jerry.zuo@amd.com> Sig...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c index f0c45a74c2e5..eb0da6c6b87c 100644 --- a/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +++ b/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c @@ -677,12 +677,2...
5f82c1e04721e7cd98e604eb4e58f0724d8e5a65
Analyze and fix the following issue in the Linux kernel code: Input: elan_i2c - do not leave interrupt disabled on suspend failure
Problem Details: Make sure interrupts are not left disabled when we fail to suspend the touch controller. Fixes: 6696777c6506 ("Input: add driver for Elan I2C/SMbus touchpad") Link: https://lore.kernel.org/r/ZmKiiL-1wzKrhqBj@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
```diff diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index c2aec5c360b3..ce96513b34f6 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -1356,6 +1356,8 @@ static int elan_suspend(struct device *dev) } err: + if (ret) + enable_ir...
765d3a2aa195882e231835f5d9ac4d99affc8c07
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: lpass-wsa-macro: Fix using NULL pointer in probe() dev_err
Problem Details: The 'wsa->dev' is assigned closer to the end of the probe() function, so the dev_err() must not use it - it is still NULL at this point. Instead there is already a local 'dev' variable. Fixes: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version") Signed-off-by: Krzysz...
```diff diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 8351f0974e6a..b4e7139bac61 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -2800,7 +2800,7 @@ static int wsa_macro_probe(struct platform_device *pdev) break; default: - ...
2e068fe01ecbf677d414d4c1b02eea1636dd614c
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: lpass-rx-macro: Fix using NULL pointer in probe() dev_err
Problem Details: The 'rx->dev' is assigned closer to the end of the probe() function, so the dev_err() must not use it - it is still NULL at this point. Instead there is already a local 'dev' variable. Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions") Signed-off-by: K...
```diff diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 9c4f0763675d..d47c49c90de3 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -3842,7 +3842,7 @@ static int rx_macro_probe(struct platform_device *pdev) rx_2_5_defaults, sizeof(rx...
f1afb360b6f1f49e943ac85b26d4224ec67d22d3
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl: lpc3xxx-i2s: Include bitfield.h for FIELD_PREP
Problem Details: bitfield.h is not explicitly included but it is required for FIELD_PREP to be expanded by the preprocessor. If it is not implicitly included, there will be a compiler error (as seen with ARCH=hexagon allmodconfig): sound/soc/fsl/lpc3xxx-i2s.c:169:10: error: call to undeclared function 'FIELD_PREP'; ...
```diff diff --git a/sound/soc/fsl/lpc3xxx-i2s.h b/sound/soc/fsl/lpc3xxx-i2s.h index eec755448478..b6657853017a 100644 --- a/sound/soc/fsl/lpc3xxx-i2s.h +++ b/sound/soc/fsl/lpc3xxx-i2s.h @@ -9,6 +9,7 @@ #ifndef __SOUND_SOC_LPC3XXX_I2S_H #define __SOUND_SOC_LPC3XXX_I2S_H +#include <linux/bitfield.h> #include <linux...
5344fc76f8944249026884157f846f88489edfc0
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Support TQM stats
Problem Details: Add support to request pdev TQM stats from firmware through HTT stats type 6. This stat type gives information such as TQM error, MPDU related information and TQM pdev stats. Sample output: ------------- echo 6 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index 05bb0ea68e15..ce80e7b5175b 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -846,6 +846,277 @@ ath12k_htt_prin...
cf1187b3a683feb718a50ee19178dc6e90a73a64
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Support pdev error stats
Problem Details: Add support to request pdev error stats from firmware through HTT stats type 5. This stats type gives information such as list of pdev errors, reasons for reset, logging information about recovery, drain and war stats. etc. Sample output: ------------- echo 5 > /sys/kernel/debug/ath12k/pci-0000\:06\:0...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index 586f002df15e..05bb0ea68e15 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -596,6 +596,256 @@ ath12k_htt_prin...
4b6dfc758c2f6ce61336637b22bc0db57fa6d649
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Support Transmit Scheduler stats
Problem Details: Add support to request transmission scheduler stats from firmware through HTT stats type 4. This stat gives information such as pdev stats scheduled per transmission queue, transmission queue command posted and reaped, scheduler order, scheduler ineligibility and supercycle triggers. Sample output: --...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index fd04f057598d..586f002df15e 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -386,6 +386,216 @@ htt_print_pdev_...
a9f2976f0e9ebc4a579cdd507b153a191692a72c
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Dump additional Tx PDEV HTT stats
Problem Details: Support to dump additional Tx PDEV stats through HTT stats debugfs. Following stats dump are supported: 1. PDEV control path stat to dump Tx management frame count 2. Tx PDEV SIFS histogram stats 3. Tx MU MIMO PPDU stats for 802.11ac, 802.11ax and 802.11be Sample Output: ------...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index 0c1d8644c1f6..fd04f057598d 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -253,6 +253,139 @@ htt_print_tx_pd...
adf6df963c0325c6f3848ade1b73d2afc4948351
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Add support to parse requested stats_type
Problem Details: Add extended htt stats parser and print the corresponding TLVs associated with the requested htt_stats_type. Add support for TX PDEV related htt stats. Sample output: -------------- echo 1 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index 9f44285caa58..0c1d8644c1f6 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -9,6 +9,334 @@ #include "debug.h"...
b651d7c39289850b5a0a2c67231dd36117340a2e
Analyze and fix the following issue in the Linux kernel code: sched_ext: Swap argument positions in kcalloc() call to avoid compiler warning
Problem Details: alloc_exit_info() calls kcalloc() but puts in the size of the element as the first argument which triggers the following gcc warning: kernel/sched/ext.c:3815:32: warning: ‘kmalloc_array_noprof’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transpos...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index f6e25545bfc0..ae9ec8f542f2 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -3812,7 +3812,7 @@ static struct scx_exit_info *alloc_exit_info(size_t exit_dump_len) if (!ei) return NULL; - ei->bt = kcalloc(sizeof(ei->bt[0]), SCX_EXIT_BT_L...
2d46ecc958c9cb7b0f116aa52cf9296b6c71d784
Analyze and fix the following issue in the Linux kernel code: drm/xe/oa: Destroy the stream_lock mutex
Problem Details: The mutex allocated in xe_oa_stream_init() was never previously destroyed. Do so now. Fixes: e936f885f1e9 ("drm/xe/oa/uapi: Expose OA stream fd") Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige...
```diff diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c index 6cc3f0217341..4188516a7816 100644 --- a/drivers/gpu/drm/xe/xe_oa.c +++ b/drivers/gpu/drm/xe/xe_oa.c @@ -824,6 +824,8 @@ static void xe_oa_stream_destroy(struct xe_oa_stream *stream) WRITE_ONCE(u->exclusive_stream, NULL); + mutex_de...
7c5d838d70902f017bc9b272b494994654b0c2bd
Analyze and fix the following issue in the Linux kernel code: documentation: Fix riscv cmodx example
Problem Details: ON/OFF in the keys was swapped between the first and second argument of the prctl. The prctl key is always PR_RISCV_SET_ICACHE_FLUSH_CTX, and the second argument can be PR_RISCV_CTX_SW_FENCEI_ON or PR_RISCV_CTX_SW_FENCEI_OFF. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Fixes: 6a08e4709c58 ("...
```diff diff --git a/Documentation/arch/riscv/cmodx.rst b/Documentation/arch/riscv/cmodx.rst index 1c0ca06b6c97..8c48bcff3df9 100644 --- a/Documentation/arch/riscv/cmodx.rst +++ b/Documentation/arch/riscv/cmodx.rst @@ -62,10 +62,10 @@ cmodx.c:: printf("Value before cmodx: %d\n", value); // Call prctl before fir...
7dc10eff223b0e9fed5d48159820556a576be592
Analyze and fix the following issue in the Linux kernel code: drm/xe/rtp: Fix out-of-bounds array access
Problem Details: Increment the counter before checking for number of rules, otherwise when there's no XE_RTP_MATCH_OR an out-of-bounds access is done, as reported by kasan: BUG: KASAN: global-out-of-bounds in rule_matches+0xb6d/0x11c0 [xe] Read of size 1 at addr ffffffffa0a50b70 by task systemd-udevd/243 Fixes: dc7...
```diff diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c index 5b27f7c45ea3..02e28274282f 100644 --- a/drivers/gpu/drm/xe/xe_rtp.c +++ b/drivers/gpu/drm/xe/xe_rtp.c @@ -121,7 +121,7 @@ static bool rule_matches(const struct xe_device *xe, * Advance rules until we find XE_RTP_MATCH_OR to check ...
e9b854382c8df07385c778bd8b25c03442bfa9e2
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom: select AUXILIARY_BUS
Problem Details: The QCOM_PD_MAPPER implementation made Qualcomm remoteproc drivers use auxiliary bus for the pd-mapper subdevice. Add necessary dependency. Reported-by: Mark Brown <broonie@kernel.org> Fixes: 5b9f51b200dc ("remoteproc: qcom: enable in-kernel PD mapper") Signed-off-by: Dmitry Baryshkov <dmitry.baryshko...
```diff diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index 48845dc8fa85..dda2ada215b7 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -166,6 +166,7 @@ config QCOM_PIL_INFO config QCOM_RPROC_COMMON tristate + select AUXILIARY_BUS config QCOM_Q6V5_COMMON trist...
4b20b07ce72f4bc7edd9c42e646314d06f30be59
Analyze and fix the following issue in the Linux kernel code: cpuidle: teo: Don't count non-existent intercepts
Problem Details: When bailing out early, teo will not query the sleep length anymore since commit 6da8f9ba5a87 ("cpuidle: teo: Skip tick_nohz_get_sleep_length() call in some cases") with an expected sleep_length_ns value of KTIME_MAX. This lead to state0 accumulating lots of 'intercepts' because the actually measured s...
```diff diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c index 33610fb6a318..f2992f92d8db 100644 --- a/drivers/cpuidle/governors/teo.c +++ b/drivers/cpuidle/governors/teo.c @@ -287,6 +287,7 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev, unsigned int hit_...
b89c5bc72102469a87f0c6ec0ee7112ef2eba01f
Analyze and fix the following issue in the Linux kernel code: soc: qcom: add missing pd-mapper dependencies
Problem Details: The pd-mapper driver uses auxiliary bus and Qualcomm PDR message format data. Add missing dependencies to the driver's Kconfig entry. Reported-by: Mark Brown <broonie@kernel.org> Fixes: 1ebcde047c54 ("soc: qcom: add pd-mapper implementation") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.or...
```diff diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 0a2f2bfd7863..432c85bd8ad4 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -75,6 +75,8 @@ config QCOM_OCMEM config QCOM_PD_MAPPER tristate "Qualcomm Protection Domain Mapper" select QCOM_QMI_HELPERS + select QCOM...