id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a9b14af999b058ee9371d3d8fa02245339da7302
Analyze and fix the following issue in the Linux kernel code: drm/i915/dsc: Check if vblank is sufficient for dsc prefill
Problem Details: High refresh rate panels which may have small line times and vblank sizes, Check if vblank size is sufficient for dsc prefill latency. --v2: - Consider chroma downscaling factor in latency calculation. [Ankit] - Replace with appropriate function name. --v3: - Remove FIXME tag.[Ankit] - Replace Ycbcr4...
```diff diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c index a2580112b50b..45fe4aaeb450 100644 --- a/drivers/gpu/drm/i915/display/skl_watermark.c +++ b/drivers/gpu/drm/i915/display/skl_watermark.c @@ -2310,6 +2310,37 @@ cdclk_prefill_adjustment(const struct inte...
9217f9aaef62236da37f6e915047352d114eff77
Analyze and fix the following issue in the Linux kernel code: drm/i915/scaler: Compute scaling factors for pipe scaler
Problem Details: Compute scaling factors and scaler user for pipe scaler if particular scaler user is pipe scaler. --v2: - Fix typos. [Ankit] - Remove FIXME tag. [Ankit] - Should be common hscale, vscale instead of local one to avoid garbage overwritten. --v3: - Separate out max_scaling information. [Ankit] - Use max...
```diff diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c index 3465f7878ed5..54f9adba4ac0 100644 --- a/drivers/gpu/drm/i915/display/skl_scaler.c +++ b/drivers/gpu/drm/i915/display/skl_scaler.c @@ -368,6 +368,8 @@ static int intel_atomic_setup_scaler(struct intel_crtc_st...
f42da9aa863eaea4e37865959ed81a60c3df72b5
Analyze and fix the following issue in the Linux kernel code: drm/i915/scaler: Use crtc_state to setup plane or pipe scaler
Problem Details: Pass crtc_state to intel_atomic_setup_scaler, this will help to check if pch_pfit enabled or not and also will be useful to pass scaler_state with the same which will be used later to store hscale and vscale values. -- v2: - Fix typos. (Ankit) Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@...
```diff diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c index b960cba31043..24514cb3c605 100644 --- a/drivers/gpu/drm/i915/display/skl_scaler.c +++ b/drivers/gpu/drm/i915/display/skl_scaler.c @@ -319,13 +319,15 @@ static int intel_allocate_scaler(struct intel_crtc_scal...
d3fedff828bb7e4a422c42caeafd5d974e24ee43
Analyze and fix the following issue in the Linux kernel code: drm/xe/oa: Set stream->pollin in xe_oa_buffer_check_unlocked
Problem Details: We rely on stream->pollin to decide whether or not to block during poll/read calls. However, currently there are blocking read code paths which don't even set stream->pollin. The best place to consistently set stream->pollin for all code paths is therefore to set it in xe_oa_buffer_check_unlocked. Fix...
```diff diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c index 6a08e6c92835..fa873f3d0a9d 100644 --- a/drivers/gpu/drm/xe/xe_oa.c +++ b/drivers/gpu/drm/xe/xe_oa.c @@ -237,7 +237,6 @@ static bool xe_oa_buffer_check_unlocked(struct xe_oa_stream *stream) u32 tail, hw_tail, partial_report_size, availa...
013eb043f37bd87c4d60d51034401a5a6d105bcf
Analyze and fix the following issue in the Linux kernel code: perf trace: Fix BPF loading failure (-E2BIG)
Problem Details: As reported by Namhyung Kim and acknowledged by Qiao Zhao (link: https://lore.kernel.org/linux-perf-users/20241206001436.1947528-1-namhyung@kernel.org/), on certain machines, perf trace failed to load the BPF program into the kernel. The verifier runs perf trace's BPF program for up to 1 million instru...
```diff diff --git a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c b/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c index 4a62ed593e84..e4352881e3fa 100644 --- a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c +++ b/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c @@ -431,9 +431,9 @@ static bo...
e2f0943cf37305dbdeaf9846e3c941451bcdef63
Analyze and fix the following issue in the Linux kernel code: btrfs: fix use-after-free when attempting to join an aborted transaction
Problem Details: When we are trying to join the current transaction and if it's aborted, we read its 'aborted' field after unlocking fs_info->trans_lock and without holding any extra reference count on it. This means that a concurrent task that is aborting the transaction may free the transaction before we read its 'ab...
```diff diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 15312013f2a3..aca83a98b75a 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -274,8 +274,10 @@ loop: cur_trans = fs_info->running_transaction; if (cur_trans) { if (TRANS_ABORTED(cur_trans)) { + const int abort_error = ...
c9c863793395cf0a66c2778a29d72c48c02fbb66
Analyze and fix the following issue in the Linux kernel code: btrfs: do not output error message if a qgroup has been already cleaned up
Problem Details: [BUG] There is a bug report that btrfs outputs the following error message: BTRFS info (device nvme0n1p2): qgroup scan completed (inconsistency flag cleared) BTRFS warning (device nvme0n1p2): failed to cleanup qgroup 0/1179: -2 [CAUSE] The error itself is pretty harmless, and the end user should ...
```diff diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index b90fabe302e6..aaf16019d829 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -1897,8 +1897,11 @@ int btrfs_qgroup_cleanup_dropped_subvolume(struct btrfs_fs_info *fs_info, u64 su /* * It's squota and the subvolume still has numbers needed for ...
0d85f5c2dd91df6b5da454406756f463ba923b69
Analyze and fix the following issue in the Linux kernel code: btrfs: fix assertion failure when splitting ordered extent after transaction abort
Problem Details: If while we are doing a direct IO write a transaction abort happens, we mark all existing ordered extents with the BTRFS_ORDERED_IOERR flag (done at btrfs_destroy_ordered_extents()), and then after that if we enter btrfs_split_ordered_extent() and the ordered extent has bytes left (meaning we have a bi...
```diff diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 30eceaf829a7..4aca7475fd82 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -1229,6 +1229,18 @@ struct btrfs_ordered_extent *btrfs_split_ordered_extent( */ if (WARN_ON_ONCE(len >= ordered->num_bytes)) return ERR_PT...
a216542027b892e6651c1b4e076012140d04afaf
Analyze and fix the following issue in the Linux kernel code: btrfs: fix lockdep splat while merging a relocation root
Problem Details: When COWing a relocation tree path, at relocation.c:replace_path(), we can trigger a lockdep splat while we are in the btrfs_search_slot() call against the relocation root. This happens in that callchain at ctree.c:read_block_for_search() when we happen to find a child extent buffer already loaded thro...
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 92071ca0655f..3dc5a35dd19b 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1496,6 +1496,7 @@ read_block_for_search(struct btrfs_root *root, struct btrfs_path *p, if (!p->skip_locking) { btrfs_unlock_up_safe(p, parent_level + 1); + btrfs_...
93c66fbc280747ea700bd6199633d661e3c819b3
Analyze and fix the following issue in the Linux kernel code: powercap: call put_device() on an error path in powercap_register_control_type()
Problem Details: powercap_register_control_type() calls device_register(), but does not release the refcount of the device when it fails. Call put_device() before returning an error to balance the refcount. Since the kfree(control_type) will be done by powercap_release(), remove the lines in powercap_register_control...
```diff diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c index 52c32dcbf7d8..4112a0097338 100644 --- a/drivers/powercap/powercap_sys.c +++ b/drivers/powercap/powercap_sys.c @@ -627,8 +627,7 @@ struct powercap_control_type *powercap_register_control_type( dev_set_name(&control_type->dev, ...
e20a70c572539a486dbd91b225fa6a194a5e2122
Analyze and fix the following issue in the Linux kernel code: PM: hibernate: Add error handling for syscore_suspend()
Problem Details: In hibernation_platform_enter(), the code did not check the return value of syscore_suspend(), potentially leading to a situation where syscore_resume() would be called even if syscore_suspend() failed. This could cause unpredictable behavior or system instability. Modify the code sequence in question...
```diff diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 1f87aa01ba44..10a01af63a80 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -608,7 +608,11 @@ int hibernation_platform_enter(void) local_irq_disable(); system_state = SYSTEM_SUSPEND; - syscore_suspend(); + + erro...
ce9ff21ea89d191e477a02ad7eabf4f996b80a69
Analyze and fix the following issue in the Linux kernel code: vfio/platform: check the bounds of read/write syscalls
Problem Details: count and offset are passed from user space and not checked, only offset is capped to 40 bits, which can be used to read/write out of bounds of the device. Fixes: 6e3f26456009 (“vfio/platform: read and write support for the device fd”) Cc: stable@vger.kernel.org Reported-by: Mostafa Saleh <smostafa@go...
```diff diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c index e53757d1d095..3bf1043cd795 100644 --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c @@ -388,6 +388,11 @@ static ssize_t vfio_platform_read_mmio(struc...
03d8b4e76266e11662c5e544854b737843173e2d
Analyze and fix the following issue in the Linux kernel code: cpufreq: CPPC: Fix wrong max_freq in policy initialization
Problem Details: In policy initialization, policy->max and policy->cpuinfo.max_freq are always set to the value calculated from caps->nominal_perf. This will cause the frequency stay on base frequency even if the policy is already boosted when a CPU is going online. Fix this by using policy->boost_enabled to determin...
```diff diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index 2486a6c5256a..8f512448382f 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c @@ -611,7 +611,8 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) * Section 8.4.7.1.1.5 of ACPI 6.1 ...
1608f0230510489d74a2e24e47054233b7e4678a
Analyze and fix the following issue in the Linux kernel code: cpufreq: Fix re-boost issue after hotplugging a CPU
Problem Details: It turns out that CPUX will stay on the base frequency after performing these operations: 1. boost all CPUs: echo 1 > /sys/devices/system/cpu/cpufreq/boost 2. offline one CPU: echo 0 > /sys/devices/system/cpu/cpuX/online 3. deboost all CPUs: echo 0 > /sys/devices/system/cpu/cpufreq/boost 4. onl...
```diff diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 1076e37a18ad..4d54e30f94ee 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1476,6 +1476,10 @@ static int cpufreq_online(unsigned int cpu) blocking_notifier_call_chain(&cpufreq_policy_notifier_list, CPUF...
43855ac61483cb914f060851535ea753c094b3e0
Analyze and fix the following issue in the Linux kernel code: cpufreq: s3c64xx: Fix compilation warning
Problem Details: The driver generates following warning when regulator support isn't enabled in the kernel. Fix it. drivers/cpufreq/s3c64xx-cpufreq.c: In function 's3c64xx_cpufreq_set_target': >> drivers/cpufreq/s3c64xx-cpufreq.c:55:22: warning: variable 'old_freq' set but not used [-Wunused-but-set-variable] ...
```diff diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c index c6bdfc308e99..9cef71528076 100644 --- a/drivers/cpufreq/s3c64xx-cpufreq.c +++ b/drivers/cpufreq/s3c64xx-cpufreq.c @@ -24,6 +24,7 @@ struct s3c64xx_dvfs { unsigned int vddarm_max; }; +#ifdef CONFIG_REGULATOR static str...
da6b353786997c0ffa67127355ad1d54ed3324c2
Analyze and fix the following issue in the Linux kernel code: pwm: Ensure callbacks exist before calling them
Problem Details: If one of the waveform functions is called for a chip that only supports .apply(), we want that an error code is returned and not a NULL pointer exception. Fixes: 6c5126c6406d ("pwm: Provide new consumer API functions for waveforms") Cc: stable@vger.kernel.org Signed-off-by: Uwe Kleine-König <u.kleine...
```diff diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 9c733877e98e..1a36ee3cab91 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -242,6 +242,9 @@ int pwm_round_waveform_might_sleep(struct pwm_device *pwm, struct pwm_waveform * BUG_ON(WFHWSIZE < ops->sizeof_wfhw); + if (!pwmchip_supports_w...
6e64d6b3a3c39655de56682ec83e894978d23412
Analyze and fix the following issue in the Linux kernel code: drm/v3d: Assign job pointer to NULL before signaling the fence
Problem Details: In commit e4b5ccd392b9 ("drm/v3d: Ensure job pointer is set to NULL after job completion"), we introduced a change to assign the job pointer to NULL after completing a job, indicating job completion. However, this approach created a race condition between the DRM scheduler workqueue and the IRQ execut...
```diff diff --git a/drivers/gpu/drm/v3d/v3d_irq.c b/drivers/gpu/drm/v3d/v3d_irq.c index da203045df9b..72b6a119412f 100644 --- a/drivers/gpu/drm/v3d/v3d_irq.c +++ b/drivers/gpu/drm/v3d/v3d_irq.c @@ -107,8 +107,10 @@ v3d_irq(int irq, void *arg) v3d_job_update_stats(&v3d->bin_job->base, V3D_BIN); trace_v3d_bcl_ir...
53dac345395c0d2493cbc2f4c85fe38aef5b63f5
Analyze and fix the following issue in the Linux kernel code: hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING
Problem Details: hrtimers are migrated away from the dying CPU to any online target at the CPUHP_AP_HRTIMERS_DYING stage in order not to delay bandwidth timers handling tasks involved in the CPU hotplug forward progress. However wakeups can still be performed by the outgoing CPU after CPUHP_AP_HRTIMERS_DYING. Those ca...
```diff diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h index c3b4b7ed7c16..84a5045f80f3 100644 --- a/include/linux/hrtimer_defs.h +++ b/include/linux/hrtimer_defs.h @@ -125,6 +125,7 @@ struct hrtimer_cpu_base { ktime_t softirq_expires_next; struct hrtimer *softirq_next_timer; struct...
27af31e44949fa85550176520ef7086a0d00fd7b
Analyze and fix the following issue in the Linux kernel code: hrtimers: Mark is_migration_base() with __always_inline
Problem Details: When is_migration_base() is unused, it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: kernel/time/hrtimer.c:156:20: error: unused function 'is_migration_base' [-Werror,-Wunused-function] 156 | static inline bool is_migration_base(struct hrtimer_clock_base *base) | ...
```diff diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index f6d8df94045c..4fb81f8c6f1c 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -145,11 +145,6 @@ static struct hrtimer_cpu_base migration_cpu_base = { #define migration_base migration_cpu_base.clock_base[0] -static inline bool i...
d58d82bd0efd6c8edd452fc2f6c6dd052ec57cb2
Analyze and fix the following issue in the Linux kernel code: io_uring/uring_cmd: use cached cmd_op in io_uring_cmd_sock()
Problem Details: io_uring_cmd_sock() does a normal read of cmd->sqe->cmd_op, where it really should be using a READ_ONCE() as ->sqe may still be pointing to the original SQE. Since the prep side already does this READ_ONCE() and stores it locally, use that value rather than re-read it. Fixes: 8e9fad0e70b7b ("io_uring:...
```diff diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index fc94c465a985..3993c9339ac7 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -350,7 +350,7 @@ int io_uring_cmd_sock(struct io_uring_cmd *cmd, unsigned int issue_flags) if (!prot || !prot->ioctl) return -EOPNOTSUPP; - switch (cmd...
294b2b7516fd06a8dd82e4a6118f318ec521e706
Analyze and fix the following issue in the Linux kernel code: nvme: handle connectivity loss in nvme_set_queue_count
Problem Details: When the set feature attempts fails with any NVME status code set in nvme_set_queue_count, the function still report success. Though the numbers of queues set to 0. This is done to support controllers in degraded state (the admin queue is still up and running but no IO queues). Though there is an exce...
```diff diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 0d21258e2283..2bcd9f710cb6 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1695,7 +1695,13 @@ int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count) status = nvme_set_features(ctrl, NVME_FEAT_NUM_QUEUES, q_...
8259cb14a70680553d5e82d65d1302fe589e9b39
Analyze and fix the following issue in the Linux kernel code: rv: Reset per-task monitors also for idle tasks
Problem Details: RV per-task monitors are implemented through a monitor structure available for each task_struct. This structure is reset every time the monitor is (re-)started, to avoid inconsistencies if the monitor was activated previously. To do so, we reset the monitor on all threads using the macro for_each_proce...
```diff diff --git a/include/rv/da_monitor.h b/include/rv/da_monitor.h index 9705b2a98e49..510c88bfabd4 100644 --- a/include/rv/da_monitor.h +++ b/include/rv/da_monitor.h @@ -14,6 +14,7 @@ #include <rv/automata.h> #include <linux/rv.h> #include <linux/bug.h> +#include <linux/sched.h> #ifdef CONFIG_RV_REACTORS @...
28a9972e0f0693cd4d08f431c992fa6be39c788c
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix skb_ext_desc leak in ath12k_dp_tx() error path
Problem Details: When vlan support was added, we missed that when ath12k_dp_prepare_htt_metadata() returns an error we also need to free the skb holding the metadata before going on with the cleanup process. Compile tested only. Fixes: 26dd8ccdba4d ("wifi: ath12k: dynamic VLAN support") Signed-off-by: Nicolas Escande...
```diff diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c index a8d341a6df01..e0b85f959cd4 100644 --- a/drivers/net/wireless/ath/ath12k/dp_tx.c +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c @@ -398,6 +398,7 @@ map: if (ret < 0) { ath12k_dbg(ab, ATH12K_DBG_DP_TX, ...
6917192378c1ce17ba31df51c4e0d8b1c97a453b
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet 5V
Problem Details: The Vexia EDU ATLA 10 tablet comes in 2 different versions with significantly different mainboards. The only outward difference is that the charging barrel on one is marked 5V and the other is marked 9V. The 5V version mostly works with the BYTCR defaults, except that it is missing a CHAN package in i...
```diff diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 9caa4407c1ca..6446cda0f857 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -1132,7 +1132,22 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { B...
752b6e3af374460a2de18f0c10bfa06bf844dbe8
Analyze and fix the following issue in the Linux kernel code: pwm: microchip-core: fix incorrect comparison with max period
Problem Details: In mchp_core_pwm_apply_locked(), if hw_period_steps is equal to its max, an error is reported and .apply fails. The max value is actually a permitted value however, and so this check can fail where multiple channels are enabled. For example, the first channel to be configured requests a period that se...
```diff diff --git a/drivers/pwm/pwm-microchip-core.c b/drivers/pwm/pwm-microchip-core.c index c1f2287b8e97..12821b4bbf97 100644 --- a/drivers/pwm/pwm-microchip-core.c +++ b/drivers/pwm/pwm-microchip-core.c @@ -327,7 +327,7 @@ static int mchp_core_pwm_apply_locked(struct pwm_chip *chip, struct pwm_device * * mchp_c...
15a901361ec3fb1c393f91880e1cbf24ec0a88bd
Analyze and fix the following issue in the Linux kernel code: ipmr: do not call mr_mfc_uses_dev() for unres entries
Problem Details: syzbot found that calling mr_mfc_uses_dev() for unres entries would crash [1], because c->mfc_un.res.minvif / c->mfc_un.res.maxvif alias to "struct sk_buff_head unresolved", which contain two pointers. This code never worked, lets remove it. [1] Unable to handle kernel paging request at virtual addre...
```diff diff --git a/net/ipv4/ipmr_base.c b/net/ipv4/ipmr_base.c index 03b6eee407a2..28d77d454d44 100644 --- a/net/ipv4/ipmr_base.c +++ b/net/ipv4/ipmr_base.c @@ -330,9 +330,6 @@ next_entry: list_for_each_entry(mfc, &mrt->mfc_unres_queue, list) { if (e < s_e) goto next_entry2; - if (filter->dev && - !mr_...
965adae5a33a998e2b62ec1b37c5eb21f1875b15
Analyze and fix the following issue in the Linux kernel code: selftests/net: packetdrill: more xfail changes (and a correction)
Problem Details: Recent change to add more cases to XFAIL has a broken regex, the matching needs a real regex not a glob pattern. While at it add the cases Willem pointed out during review. Fixes: 3030e3d57ba8 ("selftests/net: packetdrill: make tcp buf limited timing tests benign") Reviewed-by: Willem de Bruijn <will...
```diff diff --git a/tools/testing/selftests/net/packetdrill/ksft_runner.sh b/tools/testing/selftests/net/packetdrill/ksft_runner.sh index e15c43b7359b..ef8b25a606d8 100755 --- a/tools/testing/selftests/net/packetdrill/ksft_runner.sh +++ b/tools/testing/selftests/net/packetdrill/ksft_runner.sh @@ -39,11 +39,13 @@ if [[...
59e00e8ca24220acea2d2d9f540fccf64e0f41ea
Analyze and fix the following issue in the Linux kernel code: net: mvneta: fix locking in mvneta_cpu_online()
Problem Details: When port is stopped, unlock before returning Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250121005002.3938236-1-harshit.m.mog...
```diff diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 82f4333fb426..4fe121b9f94b 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -4432,6 +4432,7 @@ static int mvneta_cpu_online(unsigned int cpu, struct hlist_node *node)...
f8524ac33cd452aef5384504b3264db6039a455e
Analyze and fix the following issue in the Linux kernel code: selftests: gpio: gpio-sim: Fix missing chip disablements
Problem Details: Since upstream commit 8bd76b3d3f3a ("gpio: sim: lock up configfs that an instantiated device depends on"), rmdir for an active virtual devices been prohibited. Update gpio-sim selftest to align with the change. Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-...
```diff diff --git a/tools/testing/selftests/gpio/gpio-sim.sh b/tools/testing/selftests/gpio/gpio-sim.sh index 6fb66a687f17..bbc29ed9c60a 100755 --- a/tools/testing/selftests/gpio/gpio-sim.sh +++ b/tools/testing/selftests/gpio/gpio-sim.sh @@ -46,12 +46,6 @@ remove_chip() { rmdir $CONFIGFS_DIR/$CHIP || fail "Unable to...
a9ae6fe1c319c4776c2b11e85e15109cd3f04076
Analyze and fix the following issue in the Linux kernel code: blk-mq: create correct map for fallback case
Problem Details: The fallback code in blk_mq_map_hw_queues is original from blk_mq_pci_map_queues and was added to handle the case where pci_irq_get_affinity will return NULL for !SMP configuration. blk_mq_map_hw_queues replaces besides blk_mq_pci_map_queues also blk_mq_virtio_map_queues which used to use blk_mq_map_q...
```diff diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c index ad8d6a363f24..444798c5374f 100644 --- a/block/blk-mq-cpumap.c +++ b/block/blk-mq-cpumap.c @@ -87,7 +87,6 @@ void blk_mq_map_hw_queues(struct blk_mq_queue_map *qmap, return; fallback: - WARN_ON_ONCE(qmap->nr_queues > 1); - blk_mq_clear_mq_map(...
4a32a38cb68f55ff9e100df348ddb3d4b3e50643
Analyze and fix the following issue in the Linux kernel code: ASoC: da7213: Initialize the mutex
Problem Details: Initialize the struct da7213_priv::ctrl_lock mutex. Without it the following stack trace is displayed when rebooting and lockdep is enabled: DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 0 PID: 180 at kernel/locking/mutex.c:564 __mutex_lock+0x254/0x4e4 CPU: 0 UID: 0 PID: 180 Comm: alsactl Not...
```diff diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c index ca4cc954efa8..eb97ac73ec06 100644 --- a/sound/soc/codecs/da7213.c +++ b/sound/soc/codecs/da7213.c @@ -2203,6 +2203,8 @@ static int da7213_i2c_probe(struct i2c_client *i2c) return ret; } + mutex_init(&da7213->ctrl_lock); + pm_runti...
e06c9e3682f58fbeb632b7b866bb4fe66a4a4b42
Analyze and fix the following issue in the Linux kernel code: irqchip/lan966x-oic: Make CONFIG_LAN966X_OIC depend on CONFIG_MCHP_LAN966X_PCI
Problem Details: The Microchip LAN966x outband interrupt controller is only present on Microchip LAN966x SoCs, and only used in PCI endpoint mode. Hence add a dependency on MCHP_LAN966X_PCI, to prevent asking the user about this driver when configuring a kernel without Microchip LAN966x PCIe support. Fixes: 3e3a7b353...
```diff diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index be063bfb50c4..c11b9965c4ad 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -169,6 +169,7 @@ config IXP4XX_IRQ config LAN966X_OIC tristate "Microchip LAN966x OIC Support" + depends on MCHP_LAN966X_PCI || COMPILE_TEST ...
381ab12d483ea30af4ca52db51d23c947f2904c1
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix typos in drm/i915 files
Problem Details: Fix all typos in files under drm/i915 reported by codespell tool. v2: Fix commenting style. <Andi> v3: "in case" should be capitalized and fix comment style. <Krzysztof Niemiec> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com> Link: ...
```diff diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index c2ae37d6b94d..91a7748f4492 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1130,7 +1130,7 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation) * lea...
5b056be1f2d6d9ec3c61cc7b6e4c2cebd094f9f9
Analyze and fix the following issue in the Linux kernel code: drm/i915/soc: fix typos in i915/soc files
Problem Details: Fix all typos in files under drm/i915/soc reported by codespell tool. Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250120081517....
```diff diff --git a/drivers/gpu/drm/i915/soc/intel_pch.c b/drivers/gpu/drm/i915/soc/intel_pch.c index 842db43e46c0..9f7c9dbc178e 100644 --- a/drivers/gpu/drm/i915/soc/intel_pch.c +++ b/drivers/gpu/drm/i915/soc/intel_pch.c @@ -243,7 +243,7 @@ void intel_detect_pch(struct drm_i915_private *dev_priv) * underneath. Thi...
accc7f5bf230864eec84b249104cb8649c993a62
Analyze and fix the following issue in the Linux kernel code: drm/i915/selftests: fix typos in i915/selftests files
Problem Details: Fix all typos in files under drm/i915/selftests reported by codespell tool. v2: Fix commenting style <Andi> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250120081517.3237326-6-niti...
```diff diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c index 0727492576be..e817d233df61 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem.c @@ -80,7 +80,7 @@ static void simulate_hibernate(struct drm_i915_private *i91...
5fe543ce678aeaa6298eca9fe49ea1eaea024a6b
Analyze and fix the following issue in the Linux kernel code: drm/i915/pxp: fix typos in i915/pxp files
Problem Details: Fix all typos in files under drm/i915/pxp reported by codespell tool. Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250120081517....
```diff diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_43.h b/drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_43.h index 329b4fcdc040..929c20e98300 100644 --- a/drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_43.h +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_43.h @@ -41,7 +41,7 @@ struct pxp4...
54296aa4cfe71800a68342decc7176b7e1779713
Analyze and fix the following issue in the Linux kernel code: drm/i915/gem: fix typos in i915/gem files
Problem Details: Fix all typos in files under drm/i915/gem reported by codespell tool. v2: Codespell won't catch it, but it should be "user defined" and not "use defined". <Krzysztof Niemiec> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com> Link: http...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index c0543c35cd6a..ab1af978911b 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c @@ -238,7 +238,7 @@ static int proto_context_set_persistence(struct d...
61d9f028936b895d955e6d704055f5d64e6a8e0c
Analyze and fix the following issue in the Linux kernel code: drm/i915/gvt: fix typos in i915/gvt files
Problem Details: Fix all typos in files under drm/i915/gvt reported by codespell tool. v2: Correct comment styling. <Krzysztof Niemiec> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250120081517.323...
```diff diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index 6439c8e91a8d..f25ee2953baf 100644 --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c @@ -1906,7 +1906,7 @@ static int perform_bb_shadow(struct parser_exec_state *s) s->vgpu->g...
c156ef573efe4230ef3dc1ff2ec0038fe0eb217f
Analyze and fix the following issue in the Linux kernel code: drm/i915/gt: fix typos in i915/gt files.
Problem Details: Fix all typos in files under drm/i915/gt reported by codespell tool. v2: Fix grammar mistake in comment. <Andi> v3: Correct typo in commit log. <Krzysztof Niemiec> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com> Link: https://patchwork....
```diff diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c index 4904d0f4162c..8116fd5987e2 100644 --- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c +++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c @@ -179,7 +179,7 @@ u32 *gen5_emit_breadcrumb(struct i915_request *rq, u32 *cs) ...
61dc1fd9205bc9d9918aa933a847b08e80b4dc20
Analyze and fix the following issue in the Linux kernel code: net: fec: implement TSO descriptor cleanup
Problem Details: Implement cleanup of descriptors in the TSO error path of fec_enet_txq_submit_tso(). The cleanup - Unmaps DMA buffers for data descriptors skipping TSO header - Clears all buffer descriptors - Handles extended descriptors by clearing cbd_esc when enabled Fixes: 79f339125ea3 ("net: fec: Add software T...
```diff diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 68725506a095..f7c4ce8e9a26 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -840,6 +840,8 @@ static int fec_enet_txq_submit_tso(struct fec_enet_priv_t...
64b45dd46e154ee7641d7e0457f3fa266e57179f
Analyze and fix the following issue in the Linux kernel code: x86/efi: skip memattr table on kexec boot
Problem Details: efi_memattr_init() added a sanity check to avoid firmware caused corruption. The check is based on efi memmap entry numbers, but kexec only takes the runtime related memmap entries thus this caused many false warnings, see below thread for details: https://lore.kernel.org/all/20250108215957.3437660-2-...
```diff diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 846bf49f2508..553f330198f2 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -561,6 +561,11 @@ int __init efi_reuse_config(u64 tables, int nr_tables) if (!efi_guidcmp(guid, SMBIOS_TABLE_GUID...
a197004cf3c2e6c8cc0695c787a97e62e3229754
Analyze and fix the following issue in the Linux kernel code: net: phy: marvell-88q2xxx: Fix temperature measurement with reset-gpios
Problem Details: When using temperature measurement on Marvell 88Q2XXX devices and the reset-gpios property is set in DT, the device does a hardware reset when interface is brought down and up again. That means that the content of the register MDIO_MMD_PCS_MV_TEMP_SENSOR2 is reset to default and that leads to permanent...
```diff diff --git a/drivers/net/phy/marvell-88q2xxx.c b/drivers/net/phy/marvell-88q2xxx.c index 4494b3e39ce2..a3996471a1c9 100644 --- a/drivers/net/phy/marvell-88q2xxx.c +++ b/drivers/net/phy/marvell-88q2xxx.c @@ -95,6 +95,10 @@ #define MDIO_MMD_PCS_MV_TDR_OFF_CUTOFF 65246 +struct mv88q2xxx_priv { + bool enable...
a3a860bc0fd6c07332e4911cf9a238d20de90173
Analyze and fix the following issue in the Linux kernel code: tpm: Change to kvalloc() in eventlog/acpi.c
Problem Details: The following failure was reported on HPE ProLiant D320: [ 10.693310][ T1] tpm_tis STM0925:00: 2.0 TPM (device-id 0x3, rev-id 0) [ 10.848132][ T1] ------------[ cut here ]------------ [ 10.853559][ T1] WARNING: CPU: 59 PID: 1 at mm/page_alloc.c:4727 __alloc_pages_noprof+0x2ca/0x330 [ ...
```diff diff --git a/drivers/char/tpm/eventlog/acpi.c b/drivers/char/tpm/eventlog/acpi.c index 69533d0bfb51..cf02ec646f46 100644 --- a/drivers/char/tpm/eventlog/acpi.c +++ b/drivers/char/tpm/eventlog/acpi.c @@ -63,6 +63,11 @@ static bool tpm_is_tpm2_log(void *bios_event_log, u64 len) return n == 0; } +static void ...
b049e7abe9001a780d58e78e3833dcceee22f396
Analyze and fix the following issue in the Linux kernel code: gpio: mxc: remove dead code after switch to DT-only
Problem Details: struct platform_device::id was only set by board code, but since i.MX became a devicetree-only platform, this will always be -1 (PLATFORM_DEVID_NONE). Note: of_alias_get_id() returns a negative number on error and base treats all negative errors the same, so we need not add any additional error handli...
```diff diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index 4cb455b2bdee..619b6fb9d833 100644 --- a/drivers/gpio/gpio-mxc.c +++ b/drivers/gpio/gpio-mxc.c @@ -490,8 +490,7 @@ static int mxc_gpio_probe(struct platform_device *pdev) port->gc.request = mxc_gpio_request; port->gc.free = mxc_gpio_free; ...
5247a8b313cc88f18614ea5d163c4f8dc198ccab
Analyze and fix the following issue in the Linux kernel code: drm/bochs: Do not put DRM device in PCI remove callback
Problem Details: Removing the bochs PCI device should mark the DRM device as unplugged without removing it. Hence clear the respective call to drm_dev_put() from bochs_pci_remove(). Fixes a double unref in devm_drm_dev_init_release(). An example error message is shown below: [ 32.958338] BUG: KASAN: use-after-free ...
```diff diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c index 6f91ff1dbf7e..51ade027b92c 100644 --- a/drivers/gpu/drm/tiny/bochs.c +++ b/drivers/gpu/drm/tiny/bochs.c @@ -758,7 +758,6 @@ static void bochs_pci_remove(struct pci_dev *pdev) drm_dev_unplug(dev); drm_atomic_helper_shutdown(dev)...
82ecaae2360776dcd0b9abf9ae6b947c28025931
Analyze and fix the following issue in the Linux kernel code: drm/i915/intel_snps_hdmi_pll: Compute C10 HDMI PLLs with algorithm
Problem Details: Add support for computing C10 HDMI PLLS using the HDMI PLL algorithm. v2: Fix styling issues. (Jani) v3: Rename function to align with filename. (Jani) v4: Add Bspec reference. (Suraj) Bspec: 74166 Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@in...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_snps_hdmi_pll.c b/drivers/gpu/drm/i915/display/intel_snps_hdmi_pll.c index 0e52578ef181..c6321dafef4f 100644 --- a/drivers/gpu/drm/i915/display/intel_snps_hdmi_pll.c +++ b/drivers/gpu/drm/i915/display/intel_snps_hdmi_pll.c @@ -5,6 +5,7 @@ #include <linux/math.h...
92e5995773774a3e70257e9c95ea03518268bea5
Analyze and fix the following issue in the Linux kernel code: net: hns3: fix oops when unload drivers paralleling
Problem Details: When unload hclge driver, it tries to disable sriov first for each ae_dev node from hnae3_ae_dev_list. If user unloads hns3 driver at the time, because it removes all the ae_dev nodes, and it may cause oops. But we can't simply use hnae3_common_lock for this. Because in the process flow of pci_disable...
```diff diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.c b/drivers/net/ethernet/hisilicon/hns3/hnae3.c index 9a63fbc69408..b25fb400f476 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.c +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.c @@ -40,6 +40,21 @@ EXPORT_SYMBOL(hnae3_unregister_ae_algo_prepare); ...
ba1af257a0575bfa86e69eaa85bddcc6cf346df3
Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: qcom,ethqos: Correct fallback compatible for qcom,qcs615-ethqos
Problem Details: The qcs615-ride utilizes the same EMAC as the qcs404, rather than the sm8150. The current incorrect fallback could result in packet loss. The Ethernet on qcs615-ride is currently not utilized by anyone. Therefore, there is no need to worry about any ABI impact. Fixes: 32535b9410b8 ("dt-bindings: net: ...
```diff diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml index 0bcd593a7bd0..1cd028495e6c 100644 --- a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml @@ -21,12 +21,12 @@ prope...
6bb194d036c6e1b329dcdff459338cdd9a54802a
Analyze and fix the following issue in the Linux kernel code: net/ncsi: wait for the last response to Deselect Package before configuring channel
Problem Details: The NCSI state machine as it's currently implemented assumes that transition to the next logical state is performed either explicitly by calling `schedule_work(&ndp->work)` to re-queue itself or implicitly after processing the predefined (ndp->pending_req_num) number of replies. Thus to avoid the confi...
```diff diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c index bf276eaf9330..7891a537bddd 100644 --- a/net/ncsi/ncsi-manage.c +++ b/net/ncsi/ncsi-manage.c @@ -1385,6 +1385,12 @@ static void ncsi_probe_channel(struct ncsi_dev_priv *ndp) nd->state = ncsi_dev_state_probe_package; break; case ncsi_dev_s...
d31a49d37cb132b31cc6683eef2122f8609d6229
Analyze and fix the following issue in the Linux kernel code: net: airoha: Fix wrong GDM4 register definition
Problem Details: Fix wrong GDM4 register definition, in Airoha SDK GDM4 is defined at offset 0x2400 but this doesn't make sense as it does conflict with the CDM4 that is in the same location. Following the pattern where each GDM base is at the FWD_CFG, currently GDM4 base offset is set to 0x2500. This is correct but R...
```diff diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c index 415d784de741..09f448f29124 100644 --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c @@ -266,11 +266,11 @@ #define REG_GDM3_FWD_CFG GDM3_BASE #define GDM3_...
110b43ef05342d5a11284cc8b21582b698b4ef1c
Analyze and fix the following issue in the Linux kernel code: NFC: nci: Add bounds checking in nci_hci_create_pipe()
Problem Details: The "pipe" variable is a u8 which comes from the network. If it's more than 127, then it results in memory corruption in the caller, nci_hci_connect_gate(). Cc: stable@vger.kernel.org Fixes: a1b0b9415817 ("NFC: nci: Create pipe on specific gate in nci_hci_connect_gate") Signed-off-by: Dan Carpenter <...
```diff diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index de175318a3a0..082ab66f120b 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc/nci/hci.c @@ -542,6 +542,8 @@ static u8 nci_hci_create_pipe(struct nci_dev *ndev, u8 dest_host, pr_debug("pipe created=%d\n", pipe); + if (pipe >= NCI_HCI_MAX_PIPES) + pipe = N...
d62b04fca4340a0d468d7853bd66e511935a18cb
Analyze and fix the following issue in the Linux kernel code: net: sched: fix ets qdisc OOB Indexing
Problem Details: Haowei Yan <g1042620637@gmail.com> found that ets_class_from_arg() can index an Out-Of-Bound class in ets_class_from_arg() when passed clid of 0. The overflow may cause local privilege escalation. [ 18.852298] ------------[ cut here ]------------ [ 18.853271] UBSAN: array-index-out-of-bounds in ...
```diff diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c index f80bc05d4c5a..516038a44163 100644 --- a/net/sched/sch_ets.c +++ b/net/sched/sch_ets.c @@ -91,6 +91,8 @@ ets_class_from_arg(struct Qdisc *sch, unsigned long arg) { struct ets_sched *q = qdisc_priv(sch); + if (arg == 0 || arg > q->nbands) + return...
69a62e03f896a7382671877b6ad6aab87c53e9c3
Analyze and fix the following issue in the Linux kernel code: io_uring/msg_ring: don't leave potentially dangling ->tctx pointer
Problem Details: For remote posting of messages, req->tctx is assigned even though it is never used. Rather than leave a dangling pointer, just clear it to NULL and use the previous check for a valid submitter_task to gate on whether or not the request should be terminated. Reported-by: Jann Horn <jannh@google.com> Fi...
```diff diff --git a/io_uring/msg_ring.c b/io_uring/msg_ring.c index bd3cd78d2dba..7e6f68e911f1 100644 --- a/io_uring/msg_ring.c +++ b/io_uring/msg_ring.c @@ -89,8 +89,7 @@ static void io_msg_tw_complete(struct io_kiocb *req, struct io_tw_state *ts) static int io_msg_remote_post(struct io_ring_ctx *ctx, struct io_kioc...
edf3c0860060f8171d60dc5a6c28cb6702559f32
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to avoid changing 'check only' behaior of recovery
Problem Details: The following two 'check only recovery' processes are very dependent on the return value of f2fs_recover_fsync_data, especially when the return value is greater than 0. 1. when device has readonly mode, shown as commit 23738e74472f ("f2fs: fix to restrict mount condition on readonly block device") 2. m...
```diff diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index f35be2c48e3c..69a2027e3ebc 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -899,10 +899,8 @@ skip: * and the f2fs is not read only, check and fix zoned block devices' * write pointer consistency. */ - if (!err) { + if (!err) err ...
f6370a360d46e4cf10f5dde3c857747994fe1fd5
Analyze and fix the following issue in the Linux kernel code: f2fs: procfs: show mtime in segment_bits
Problem Details: Show mtime in segment_bits for debug. cat /proc/fs//f2fs/loop0/segment_bits format: segment_type|valid_blocks|bitmaps|mtime segment_type(0:HD, 1:WD, 2:CD, 3:HN, 4:WN, 5:CN) 0 3|1 | 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0...
```diff diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 6b99dc49f776..d15c68b28952 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -1472,7 +1472,7 @@ static int __maybe_unused segment_bits_seq_show(struct seq_file *seq, le32_to_cpu(sbi->raw_super->segment_count_main); int i, j; - seq_puts(seq, "forma...
207764e5d6f19de483d7f0e43243d1a1fce4fb32
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to avoid return invalid mtime from f2fs_get_section_mtime()
Problem Details: syzbot reported a f2fs bug as below: ------------[ cut here ]------------ kernel BUG at fs/f2fs/gc.c:373! CPU: 0 UID: 0 PID: 5316 Comm: syz.0.0 Not tainted 6.13.0-rc3-syzkaller-00044-gaef25be35d23 #0 RIP: 0010:get_cb_cost fs/f2fs/gc.c:373 [inline] RIP: 0010:get_gc_cost fs/f2fs/gc.c:406 [inline] RIP: 0...
```diff diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 813254dcc00e..b3a82a8cdc5f 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -5549,8 +5549,10 @@ unsigned long long f2fs_get_section_mtime(struct f2fs_sb_info *sbi, secno = GET_SEC_FROM_SEG(sbi, segno); start = GET_SEG_FROM_SEC(sbi, secno); ...
a68905d48a4efe5ca45bb4ceab5cd7d6ac47c300
Analyze and fix the following issue in the Linux kernel code: f2fs: Fix format specifier in sanity_check_inode()
Problem Details: When building for 32-bit platforms, for which 'size_t' is 'unsigned int', there is a warning due to an incorrect format specifier: fs/f2fs/inode.c:320:6: error: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Werror,-Wformat] 318 | f2fs_warn(sbi, ...
```diff diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 7de33da8b3ea..3dd25f64d6f1 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -315,7 +315,7 @@ static bool sanity_check_inode(struct inode *inode, struct page *node_page) f2fs_has_inline_xattr(inode) && (fi->i_inline_xattr_size < MIN_INLINE_XATTR_SIZ...
f520fab580c9179bacc432f3a3bf1eada73fdfcc
Analyze and fix the following issue in the Linux kernel code: ARM: 9440/1: cacheinfo fix format field mask
Problem Details: Fix C&P error left unnoticed during the reviews. The FORMAT field spans over bits 29-31, not 24-27 of the CTR register. Closes: https://lore.kernel.org/linux-arm-msm/01515ea0-c6f0-479f-9da5-764d9ee79ed6@samsung.com/ Fixes: a9ff94477836 ("ARM: 9433/2: implement cacheinfo support") Reported-by: Marek S...
```diff diff --git a/arch/arm/kernel/cacheinfo.c b/arch/arm/kernel/cacheinfo.c index a8eabcaa18d8..e1469b641780 100644 --- a/arch/arm/kernel/cacheinfo.c +++ b/arch/arm/kernel/cacheinfo.c @@ -23,7 +23,7 @@ #define MAX_CACHE_LEVEL 7 /* Max 7 level supported */ -#define CTR_FORMAT_MASK GENMASK(27, 24) +#define CTR_...
8c8ecc98f5c65947b0070a24bac11e12e47cc65d
Analyze and fix the following issue in the Linux kernel code: batman-adv: Drop unmanaged ELP metric worker
Problem Details: The ELP worker needs to calculate new metric values for all neighbors "reachable" over an interface. Some of the used metric sources require locks which might need to sleep. This sleep is incompatible with the RCU list iterator used for the recorded neighbors. The initial approach to work around of thi...
```diff diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c index ac11f1f08db0..d35479c465e2 100644 --- a/net/batman-adv/bat_v.c +++ b/net/batman-adv/bat_v.c @@ -113,8 +113,6 @@ static void batadv_v_hardif_neigh_init(struct batadv_hardif_neigh_node *hardif_neigh) { ewma_throughput_init(&hardif_neigh->bat_v...
6c8ad3ab45ad0e94bfb7a9c71f2fa9c6cacea4b2
Analyze and fix the following issue in the Linux kernel code: atomic64: Use arch_spin_locks instead of raw_spin_locks
Problem Details: raw_spin_locks can be traced by lockdep or tracing itself. Atomic64 operations can be used in the tracing infrastructure. When an architecture does not have true atomic64 operations it can use the generic version that disables interrupts and uses spin_locks. The tracing ring buffer code uses atomic64 ...
```diff diff --git a/lib/atomic64.c b/lib/atomic64.c index caf895789a1e..1a72bba36d24 100644 --- a/lib/atomic64.c +++ b/lib/atomic64.c @@ -25,15 +25,15 @@ * Ensure each lock is in a separate cacheline. */ static union { - raw_spinlock_t lock; + arch_spinlock_t lock; char pad[L1_CACHE_BYTES]; } atomic64_lock[NR_...
eb3fabde15bccdf34f1c9b35a83aa4c0dacbb4ca
Analyze and fix the following issue in the Linux kernel code: pnfs/flexfiles: retry getting layout segment for reads
Problem Details: If ff_layout_pg_get_read()'s attempt to get a layout segment results in -EAGAIN have ff_layout_pg_init_read() retry it after sleeping. If "softerr" mount is used, use 'io_maxretrans' to limit the number of attempts to get a layout segment. This fixes a long-standing issue of O_DIRECT reads failing wi...
```diff diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index ce61bf1ada6c..98b45b636be3 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -848,6 +848,9 @@ ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio, struct n...
c8084a89bd91b05f51a36bff61f63a94c800b0d6
Analyze and fix the following issue in the Linux kernel code: Input: wdt87xx_i2c - fix compiler warning
Problem Details: As reported by the kernel test robot, the following warning occur: >> drivers/input/touchscreen/wdt87xx_i2c.c:1166:36: warning: 'wdt87xx_acpi_id' defined but not used [-Wunused-const-variable=] 1166 | static const struct acpi_device_id wdt87xx_acpi_id[] = { | ...
```diff diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c b/drivers/input/touchscreen/wdt87xx_i2c.c index 27941245e962..88d376090e6e 100644 --- a/drivers/input/touchscreen/wdt87xx_i2c.c +++ b/drivers/input/touchscreen/wdt87xx_i2c.c @@ -1153,11 +1153,13 @@ static const struct i2c_device_id wdt87xx_dev_id[] = { }; M...
1bcd20981834928ccc5d981aacb806bb523d8b29
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Fix DMA buffer allocation to resolve SWIOTLB issues
Problem Details: Currently, the driver allocates cacheable DMA buffers for rings like HAL_REO_DST and HAL_WBM2SW_RELEASE. The buffers for HAL_WBM2SW_RELEASE are large (1024 KiB), exceeding the SWIOTLB slot size of 256 KiB. This leads to "swiotlb buffer is full" error messages on systems without an IOMMU that use SWIOTL...
```diff diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c index fbf666d0ecf1..f124b7329e1a 100644 --- a/drivers/net/wireless/ath/ath11k/dp.c +++ b/drivers/net/wireless/ath/ath11k/dp.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2019 T...
1abf834951fb039f24819283b7abd9f8309852b0
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp_mst: Fix error handling while adding a connector
Problem Details: After an error during adding an MST connector the MST port and the intel_connector object could be leaked, fix this up. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250108151916.491113-2-imre.dea...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index 0c44fc7dd86c..85aafdf573e8 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -1717,11 +1717,8 @@ mst_topology_add_connector(struct drm_dp_mst_t...
448a60e85ae2afe2cb760f5d2ed2c8a49d2bd1b4
Analyze and fix the following issue in the Linux kernel code: cxl/core/regs: Refactor out functions to count regblocks of given type
Problem Details: cxl_find_regblock_instance() counts the number of instances of a register block as a side effect of searching through all available register blocks. cxl_count_regblock() throws away that work and recounts all the register blocks by asking cxl_find_regblock_instance() to redo work it has already done un...
```diff diff --git a/drivers/cxl/core/regs.c b/drivers/cxl/core/regs.c index 59cb35b40c7e..117c2e94c761 100644 --- a/drivers/cxl/core/regs.c +++ b/drivers/cxl/core/regs.c @@ -289,21 +289,17 @@ static bool cxl_decode_regblock(struct pci_dev *pdev, u32 reg_lo, u32 reg_hi, return true; } -/** - * cxl_find_regblock_in...
155c569fa4c3b340fbf8571a0e42dd415c025377
Analyze and fix the following issue in the Linux kernel code: regulator: core: Add missing newline character
Problem Details: dev_err_probe() error messages need newline character. Fixes: 6eabfc018e8d ("regulator: core: Allow specifying an initial load w/ the bulk API") Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://patch.msgid.link/20250122072019.1926093-1-alexander.stein@ew.tq-group.com Sign...
```diff diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 6c0ef1182248..89578b91c468 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -5033,7 +5033,7 @@ int _regulator_bulk_get(struct device *dev, int num_consumers, consumers[i].supply, get_type); if (IS_ERR(...
a2cd92185db0586f2136feae84d98cc54580f381
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl_asrc_m2m: select CONFIG_DMA_SHARED_BUFFER
Problem Details: Randconfig builds without dmabuf result in this link error from the fasl-asrc driver: ERROR: modpost: "dma_buf_put" [sound/core/snd-compress.ko] undefined! ERROR: modpost: "dma_buf_export" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined! Add the missing 'select' statement. Fixes: 24a01710f627 ("ASoC: ...
```diff diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index e5fbf5305ea2..c4cf3cff58de 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig @@ -6,6 +6,7 @@ comment "Common SoC Audio options for Freescale CPUs:" config SND_SOC_FSL_ASRC tristate "Asynchronous Sample Rate Converter (ASRC) module ...
e935f903ab9bee43f3375883c230a32138ae3d1d
Analyze and fix the following issue in the Linux kernel code: ASoC: audio-graph-card2: use correct endpoint when getting link parameters
Problem Details: When link DT nodes are parsed, most functions get port as a parameter, which results in port endpoint@0 always being used. However, each endpoint might have different settings, but those are currently ignored. Fix that by passing endpoint instead of port when parsing link parameters. Signed-off-by: I...
```diff diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index c36b1a2ac949..ee94b256b770 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -648,23 +648,23 @@ multi_err: static int graph_parse_node_single(struct simple_util_pri...
8ba14d9f490aef9fd535c04e9e62e1169eb7a055
Analyze and fix the following issue in the Linux kernel code: efi: libstub: Use '-std=gnu11' to fix build with GCC 15
Problem Details: GCC 15 changed the default C standard version to C23, which should not have impacted the kernel because it requests the gnu11 standard via '-std=' in the main Makefile. However, the EFI libstub Makefile uses its own set of KBUILD_CFLAGS for x86 without a '-std=' value (i.e., using the default), resulti...
```diff diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index ed4e8ddbe76a..1141cd06011f 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -11,7 +11,7 @@ cflags-y := $(KBUILD_CFLAGS) cflags-$(CONFIG_X86_32) := -march=i386 ...
6aa96f780204bfdac225eb4c8f51f86c38cc1a26
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: tas2781-spi: Fix bogus error handling in tas2781_hda_spi_probe()
Problem Details: The error handling in tas2781_hda_spi_probe() has quite a few problems, as reported by Dan Carpenter. The code jumps to err label and calls tas2781_hda_remove(), but this call would rather crash. In some places, no error code is set properly, and the runtime PM setup is doubly done. This patch tries ...
```diff diff --git a/sound/pci/hda/tas2781_hda_spi.c b/sound/pci/hda/tas2781_hda_spi.c index eba9c3a3b944..a42fa990e7b9 100644 --- a/sound/pci/hda/tas2781_hda_spi.c +++ b/sound/pci/hda/tas2781_hda_spi.c @@ -1101,7 +1101,7 @@ static int tas2781_hda_spi_probe(struct spi_device *spi) tas_priv = devm_kzalloc(&spi->dev,...
807563cdc85dac2d151d7d93676d1551d067c72b
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: tas2781-spi: Fix error code in tas2781_read_acpi()
Problem Details: Propagate the error code from devm_gpiod_get_index_optional(). The current code returns success. Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/6103e81a-13bf-4eab-89af-f6830c14e14c@stanley.mo...
```diff diff --git a/sound/pci/hda/tas2781_hda_spi.c b/sound/pci/hda/tas2781_hda_spi.c index 02794fd6003d..eba9c3a3b944 100644 --- a/sound/pci/hda/tas2781_hda_spi.c +++ b/sound/pci/hda/tas2781_hda_spi.c @@ -447,6 +447,7 @@ static int tas2781_read_acpi(struct tas2781_hda *tas_hda, p->reset = devm_gpiod_get_index_opti...
be125a0b8946a69cd8d91340ae14ec72ef6558fc
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: tas2781-spi: Delete some dead code
Problem Details: The scnprintf() function never returns negatives. And it won't return zero here either, plus if it did we'd need to fix the error code. Delete this dead code. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/d57ded9e-9969-4922-8347-67b758499483@stanley.mountain S...
```diff diff --git a/sound/pci/hda/tas2781_hda_spi.c b/sound/pci/hda/tas2781_hda_spi.c index 5be71b538ce0..02794fd6003d 100644 --- a/sound/pci/hda/tas2781_hda_spi.c +++ b/sound/pci/hda/tas2781_hda_spi.c @@ -274,13 +274,9 @@ static int tascodec_spi_init(struct tasdevice_priv *tas_priv, */ guard(mutex)(&tas_priv->co...
5f537664e705b0bf8b7e329861f20128534f6a83
Analyze and fix the following issue in the Linux kernel code: cachestat: fix page cache statistics permission checking
Problem Details: When the 'cachestat()' system call was added in commit cf264e1329fb ("cachestat: implement cachestat syscall"), it was meant to be a much more convenient (and performant) version of mincore() that didn't need mapping things into the user virtual address space in order to work. But it ended up missing ...
```diff diff --git a/mm/filemap.c b/mm/filemap.c index 4f476411a9a2..440922a7d8f1 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -4375,6 +4375,20 @@ resched: rcu_read_unlock(); } +/* + * See mincore: reveal pagecache information only for files + * that the calling process has write access to, or could (if + * tri...
c9c8a17f7aa65b713418626573c5695c2a5d8ecd
Analyze and fix the following issue in the Linux kernel code: bcachefs: bset_blacklisted_journal_seq is now AUTOFIX
Problem Details: Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/sb-errors_format.h b/fs/bcachefs/sb-errors_format.h index 0b4fe899209b..ea0a18364751 100644 --- a/fs/bcachefs/sb-errors_format.h +++ b/fs/bcachefs/sb-errors_format.h @@ -57,7 +57,7 @@ enum bch_fsck_flags { x(bset_wrong_sector_offset, 44, 0) \ x(bset_empty, 45, 0) \ x(b...
1390a33b3d04fdf6ba4e3e7082107a12027fc188
Analyze and fix the following issue in the Linux kernel code: PCI: microchip: Set inbound address translation for coherent or non-coherent mode
Problem Details: On Microchip PolarFire SoC the PCIe Root Port can be behind one of three general purpose Fabric Interface Controller (FIC) buses that encapsulates an AXI-S bus. Depending on which FIC(s) the Root Port is connected through to CPU space, and what address translation is done by that FIC, the Root Port dri...
```diff diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c index 6630cacef301..3fdfffdf0270 100644 --- a/drivers/pci/controller/plda/pcie-microchip-host.c +++ b/drivers/pci/controller/plda/pcie-microchip-host.c @@ -7,20 +7,27 @@ * Author: Daire McNamara ...
b388face5f169e7a41c1b5e1cdd20515160a83b3
Analyze and fix the following issue in the Linux kernel code: Documentation: Fix pci=config_acs= example
Problem Details: The documentation currently says: config_acs= Format: <ACS flags>@<pci_dev>[; ...] Specify one or more PCI devices (in the format specified above) optionally prepended with flags and separated by semicolons. Th...
```diff diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index dc663c0ca670..b1350b66cc4f 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4673,7 +4673,7 @@ '1' – force enabled ...
6f71507415841d1a6d38118e5fa0eaf0caab9c17
Analyze and fix the following issue in the Linux kernel code: drm/i915/backlight: Return immediately when scale() finds invalid parameters
Problem Details: The scale() functions detects invalid parameters, but continues its calculations anyway. This causes bad results if negative values are used for unsigned operations. Worst case, a division by 0 error will be seen if source_min == source_max. On top of that, after v6.13, the sequence of WARN_ON() follo...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c index fc1e517e074a..7e6ce905bdaf 100644 --- a/drivers/gpu/drm/i915/display/intel_backlight.c +++ b/drivers/gpu/drm/i915/display/intel_backlight.c @@ -41,8 +41,9 @@ static u32 scale(u32 source_val, { u...
8b8f8037765757861f899ed3a2bfb34525b5c065
Analyze and fix the following issue in the Linux kernel code: dm-crypt: track tag_offset in convert_context
Problem Details: dm-crypt uses tag_offset to index the integrity metadata for each crypt sector. When the initial crypt_convert() returns BLK_STS_DEV_RESOURCE, dm-crypt will try to continue the crypt/decrypt procedure in a kworker. However, it resets tag_offset as zero instead of using the tag_offset related with curre...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 09f5c1a04fae..02a2919f4e5a 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -59,6 +59,7 @@ struct convert_context { struct bio *bio_out; struct bvec_iter iter_out; atomic_t cc_pending; + unsigned int tag_offset; u64 cc_sec...
9fdbbdbbc92b1474a87b89f8b964892a63734492
Analyze and fix the following issue in the Linux kernel code: dm-crypt: don't update io->sector after kcryptd_crypt_write_io_submit()
Problem Details: The updates of io->sector are the leftovers when dm-crypt allocated pages for partial write request. However, since commit cf2f1abfbd0db ("dm crypt: don't allocate pages for a partial request"), there is no partial request anymore. After the introduction of write request rb-tree, the updates of io->se...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 8a4c24d4ee02..605859ef01b5 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -2090,7 +2090,6 @@ static void kcryptd_crypt_write_continue(struct work_struct *work) struct crypt_config *cc = io->cc; struct convert_context *ctx = ...
5994018ecffc9e70e192bede2270819d8c93b2d4
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Fix sizeof(32) typo
Problem Details: A small typo leads to the following static code checker warning: drivers/gpu/drm/xe/xe_guc_buf.c:81 xe_guc_buf_reserve() warn: sizeof(NUMBER)? Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/intel-xe/0d5bcbf1-79f9-4a10-a221-ddbaec9f6122@stanley.mountain/ Fixes:...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_buf.c b/drivers/gpu/drm/xe/xe_guc_buf.c index ce6d9830e13b..0193c94dd6a0 100644 --- a/drivers/gpu/drm/xe/xe_guc_buf.c +++ b/drivers/gpu/drm/xe/xe_guc_buf.c @@ -78,7 +78,7 @@ struct xe_guc_buf xe_guc_buf_reserve(struct xe_guc_buf_cache *cache, u32 dwords) struct drm_subal...
9ebb5846e1a3b1705f8a7cbc528888a1aa0b163e
Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Fix migration initialization
Problem Details: The migration support only needs to be initialized once, but it was incorrectly called from the xe_gt_sriov_pf_init_hw(), which is part of the reset flow and may be called multiple times. Fixes: d86e3737c7ab ("drm/xe/pf: Add functions to save and restore VF GuC state") Signed-off-by: Michal Wajdeczko ...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c index b5c313a3e946..01a4a852b8f4 100644 --- a/drivers/gpu/drm/xe/xe_gt.c +++ b/drivers/gpu/drm/xe/xe_gt.c @@ -532,8 +532,10 @@ static int all_fw_domain_init(struct xe_gt *gt) if (IS_SRIOV_PF(gt_to_xe(gt)) && !xe_gt_is_media_type(gt)) xe_l...
966a675da844f1a764bb44557c21561cc3d09840
Analyze and fix the following issue in the Linux kernel code: Revert "SUNRPC: Reduce thread wake-up rate when receiving large RPC messages"
Problem Details: I noticed that a handful of NFSv3 fstests were taking an unexpectedly long time to run. Troubleshooting showed that the server's TCP window closed and never re-opened, which caused the client to trigger an RPC retransmit timeout after 180 seconds. The client's recovery action was to establish a fresh ...
```diff diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 95397677673b..cb3bd12f5818 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -1083,9 +1083,6 @@ static void svc_tcp_fragment_received(struct svc_sock *svsk) /* If we have more data, signal svc_xprt_enqueue() to try again */ svsk->s...
cee9b4ef42512a6e57562460a15f18a022c84dda
Analyze and fix the following issue in the Linux kernel code: nfsd: rework NFS4_SHARE_WANT_* flag handling
Problem Details: The delstid draft adds new NFS4_SHARE_WANT_TYPE_MASK values that don't fit neatly into the existing WANT_MASK or WHEN_MASK. Add a new NFS4_SHARE_WANT_MOD_MASK value and redefine NFS4_SHARE_WANT_MASK to include it. Also fix the checks in nfsd4_deleg_xgrade_none_ext() to check for the flags instead of e...
```diff diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index e7b26806797a..780db0992c9f 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -6224,10 +6224,10 @@ static void nfsd4_deleg_xgrade_none_ext(struct nfsd4_open *open, struct nfs4_delegation *dp) { if (deleg_is_write(dp->dl_type)) { - ...
531503054e8fe9f4502fff0dceba20dfaa9920d5
Analyze and fix the following issue in the Linux kernel code: nfsd: fix handling of delegated change attr in CB_GETATTR
Problem Details: RFC8881, section 10.4.3 has some specific guidance as to how the delegated change attribute should be handled. We currently don't follow that guidance properly. In particular, when the file is modified, the server always reports the initial change attribute + 1. Section 10.4.3 however indicates that i...
```diff diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index a8e33f561bb3..1457f61ae051 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -361,12 +361,14 @@ static void encode_cb_getattr4args(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr, struct nfs4_cb_fattr *fattr) { -...
8f21943e101a15f56a8f02970a80edc936de8ec8
Analyze and fix the following issue in the Linux kernel code: tracing: Fix output of set_event for some cached module events
Problem Details: The following works fine: ~# echo ':mod:trace_events_sample' > /sys/kernel/tracing/set_event ~# cat /sys/kernel/tracing/set_event *:*:mod:trace_events_sample ~# But if a name is given without a ':' where it can match an event name or system name, the output of the cached events does not include a...
```diff diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 5217dcddcb4c..a9d7d02bbb20 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -1634,7 +1634,7 @@ static int s_show(struct seq_file *m, void *v) /* When match is set, system and event are not */ if (iter...
f95ee542947d748d4ca01b4d3103dbdc4fdc8889
Analyze and fix the following issue in the Linux kernel code: tracing: Fix allocation of printing set_event file content
Problem Details: The adding of cached events for modules not loaded yet required a descriptor to separate the iteration of events with the iteration of cached events for a module. But the allocation used the size of the pointer and not the size of the contents to allocate its data and caused a slab-out-of-bounds. Cc: ...
```diff diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 51c5014877e8..5217dcddcb4c 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -1588,7 +1588,7 @@ static void *s_start(struct seq_file *m, loff_t *pos) struct set_event_iter *iter; loff_t l; - iter = kza...
cd2375a3567fd3d93aa6c68e0027a5756213bda0
Analyze and fix the following issue in the Linux kernel code: ring-buffer: Do not allow events in NMI with generic atomic64 cmpxchg()
Problem Details: Some architectures can not safely do atomic64 operations in NMI context. Since the ring buffer relies on atomic64 operations to do its time keeping, if an event is requested in NMI context, reject it for these architectures. Cc: stable@vger.kernel.org Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathie...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 6d61ff78926b..b8e0ae15ca5b 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -4398,8 +4398,13 @@ rb_reserve_next_event(struct trace_buffer *buffer, int nr_loops = 0; int add_ts_default; - /* ring buffer do...
392188bb0f6ec5162edf457c062929a6abfa369a
Analyze and fix the following issue in the Linux kernel code: selftests: pci_endpoint: Migrate to Kselftest framework
Problem Details: Migrate the PCI endpoint test to Kselftest framework. All the tests that were part of the previous pcitest.sh file were migrated. Below is the list of tests converted: 1. BAR0 Test 2. BAR1 Test 3. BAR2 Test 4. BAR3 Test 5. BAR4 Test 6. BAR5 Test 7. Consecutive BAR Tests 8. Leg...
```diff diff --git a/Documentation/PCI/endpoint/pci-test-howto.rst b/Documentation/PCI/endpoint/pci-test-howto.rst index c4ae7af50ede..aafc17ef3fd3 100644 --- a/Documentation/PCI/endpoint/pci-test-howto.rst +++ b/Documentation/PCI/endpoint/pci-test-howto.rst @@ -81,8 +81,8 @@ device, the following commands can be used:...
f26d37ee9bda938e968d0e11ba1f8f1588b2a135
Analyze and fix the following issue in the Linux kernel code: misc: pci_endpoint_test: Fix IOCTL return value
Problem Details: IOCTLs are supposed to return 0 for success and negative error codes for failure. Currently, this driver is returning 0 for failure and 1 for success, that's not correct. Hence, fix it! Link: https://lore.kernel.org/r/20250116171650.33585-3-manivannan.sadhasivam@linaro.org Fixes: 2c156ac71c6b ("misc: ...
```diff diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index be0c7c870e6a..d5ac71a49386 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -169,43 +169,47 @@ static void pci_endpoint_test_free_irq_vectors(struct pci_endpoint_test *test) test->irq_...
d3d930411ce390e532470194296658a960887773
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix implicit ODP use after free
Problem Details: Prevent double queueing of implicit ODP mr destroy work by using __xa_cmpxchg() to make sure this is the only time we are destroying this specific mr. Without this change, we could try to invalidate this mr twice, which in turn could result in queuing a MR work destroy twice, and eventually the second...
```diff diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c index f655859eec00..f1e23583e6c0 100644 --- a/drivers/infiniband/hw/mlx5/odp.c +++ b/drivers/infiniband/hw/mlx5/odp.c @@ -228,13 +228,27 @@ static void destroy_unused_implicit_child_mr(struct mlx5_ib_mr *mr) unsigned long idx = i...
dec6b006f4cc13968d75ed28673ca4e3633de96b
Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: ti,pcm1681: Fix the binding title
Problem Details: The PCM1681 is an 8-channel Digital-to-Analog Converter, so fix it accordingly. Signed-off-by: Fabio Estevam <festevam@denx.de> Link: https://patch.msgid.link/20250121155747.3740995-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
```diff diff --git a/Documentation/devicetree/bindings/sound/ti,pcm1681.yaml b/Documentation/devicetree/bindings/sound/ti,pcm1681.yaml index 5aa00617291c..1f0e6787a746 100644 --- a/Documentation/devicetree/bindings/sound/ti,pcm1681.yaml +++ b/Documentation/devicetree/bindings/sound/ti,pcm1681.yaml @@ -4,7 +4,7 @@ $id:...
abb604a1a9c87255c7a6f3b784410a9707baf467
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix a race for an ODP MR which leads to CQE with error
Problem Details: This patch addresses a race condition for an ODP MR that can result in a CQE with an error on the UMR QP. During the __mlx5_ib_dereg_mr() flow, the following sequence of calls occurs: mlx5_revoke_mr() mlx5r_umr_revoke_mr() mlx5r_umr_post_send_wait() At this point, the lkey is freed from the hardwa...
```diff diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 45d9dc9c6c8f..bb02b6adbf2c 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -2021,6 +2021,11 @@ static int mlx5_revoke_mr(struct mlx5_ib_mr *mr) { struct mlx5_ib_dev *dev = to_mdev(mr->ib...
e721f619e3ec9bae08bf419c3944cf1e6966c821
Analyze and fix the following issue in the Linux kernel code: iommufd: Fix struct iommu_hwpt_pgfault init and padding
Problem Details: The iommu_hwpt_pgfault is used to report IO page fault data to userspace, but iommufd_fault_fops_read was never zeroing its padding. This leaks the content of the kernel stack memory to userspace. Also, the iommufd uAPI requires explicit padding and use of __aligned_u64 to ensure ABI compatibility's w...
```diff diff --git a/drivers/iommu/iommufd/fault.c b/drivers/iommu/iommufd/fault.c index a9160f4443d2..d9a937450e55 100644 --- a/drivers/iommu/iommufd/fault.c +++ b/drivers/iommu/iommufd/fault.c @@ -263,7 +263,7 @@ static ssize_t iommufd_fault_fops_read(struct file *filep, char __user *buf, { size_t fault_size = siz...
cfa9d40db8c30d894171010fe765d96e9bc6a47e
Analyze and fix the following issue in the Linux kernel code: drm/xe/oa: Preserve oa_ctrl unused bits
Problem Details: UMD's have interest in setting unused bits of the oa_ctrl register "out of band" for certain experiments. To facilitate this, don't clobber previous oa_ctrl unused bits, i.e. rmw the values rather than simply write them. Fixes: e936f885f1e9 ("drm/xe/oa/uapi: Expose OA stream fd") Signed-off-by: Ashuto...
```diff diff --git a/drivers/gpu/drm/xe/regs/xe_oa_regs.h b/drivers/gpu/drm/xe/regs/xe_oa_regs.h index a49561e9f3c3..a79ad2da070c 100644 --- a/drivers/gpu/drm/xe/regs/xe_oa_regs.h +++ b/drivers/gpu/drm/xe/regs/xe_oa_regs.h @@ -51,6 +51,10 @@ /* Common to all OA units */ #define OA_OACONTROL_REPORT_BC_MASK REG_GENMA...
a8581752278ef9d6ea73bb10eef2657bfb73e116
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix btree_trans_peek_key_cache()
Problem Details: BTREE_ITER_cached_nofill has some tricky corner cases; it's used internally for iterators that aren't walking the key cache, but need to be coherent with the key cache. It tells traverse to look up and lock the key cache entry if present, but don't create one if it doesn't exist. That means we have t...
```diff diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 367231ab1980..5988219c6908 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -2239,8 +2239,6 @@ struct bkey_s_c btree_trans_peek_key_cache(struct btree_iter *iter, struct bpos if (unlikely(ret)) return bkey_s_c_err...
1b3e2d4ec0c5848776cc56d2624998aa5b2f0d27
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions
Problem Details: According to the UFS Device Specification, the dExtendedUFSFeaturesSupport defines the support for TOO_HIGH_TEMPERATURE as bit[4] and the TOO_LOW_TEMPERATURE as bit[5]. Correct the code to match with the UFS device specification definition. Cc: stable@vger.kernel.org Fixes: e88e2d32200a ("scsi: ufs: c...
```diff diff --git a/include/ufs/ufs.h b/include/ufs/ufs.h index 89672ad8c3bb..f151feb0ca8c 100644 --- a/include/ufs/ufs.h +++ b/include/ufs/ufs.h @@ -385,8 +385,8 @@ enum { /* Possible values for dExtendedUFSFeaturesSupport */ enum { - UFS_DEV_LOW_TEMP_NOTIF = BIT(4), - UFS_DEV_HIGH_TEMP_NOTIF = BIT(5), + UFS_DE...
b02cfbd9bfb9f45eebb33771e5705af95b5c9673
Analyze and fix the following issue in the Linux kernel code: dt-bindings: PCI: mobiveil: Convert mobiveil-pcie.txt to YAML
Problem Details: Convert device tree binding document mobiveil-pcie.txt to YAML format and merge layerscape-pcie-gen4.txt into this file. Additional changes: - interrupt-names: "aer", "pme", "intr", which align order in examples. - reg-names: reorder as csr_axi_slave, config_axi_slave to match layerscape-pci...
```diff diff --git a/Documentation/devicetree/bindings/pci/layerscape-pcie-gen4.txt b/Documentation/devicetree/bindings/pci/layerscape-pcie-gen4.txt deleted file mode 100644 index b40fb5d15d3d..000000000000 --- a/Documentation/devicetree/bindings/pci/layerscape-pcie-gen4.txt +++ /dev/null @@ -1,52 +0,0 @@ -NXP Layersca...
0a8f5f4652ef4d530a7cb8bed2b6e502cdfa825f
Analyze and fix the following issue in the Linux kernel code: ALSA: usb: fcp: Fix return code from poll ops
Problem Details: Fix a sparse warning due to the invalid return type from poll ops, which is __poll_t. Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver") Link: https://patch.msgid.link/20250121170032.7236-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/usb/fcp.c b/sound/usb/fcp.c index cfa131b35e43..7df65041ace5 100644 --- a/sound/usb/fcp.c +++ b/sound/usb/fcp.c @@ -843,18 +843,18 @@ static long fcp_hwdep_read(struct snd_hwdep *hw, char __user *buf, return sizeof(event); } -static unsigned int fcp_hwdep_poll(struct snd_hwdep *hw, - ...
f08cc80f69be62beb7a63cd4813c7989c8708831
Analyze and fix the following issue in the Linux kernel code: ALSA: usb: fcp: Fix incorrect resp->opcode retrieval
Problem Details: Fix a wrong conversion macro used for resp->opcode, which is __le32. Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501212331.SaePSmsA-lkp@intel.com/ Link: https://patch.msgid.link...
```diff diff --git a/sound/usb/fcp.c b/sound/usb/fcp.c index 92e3caab0b82..cfa131b35e43 100644 --- a/sound/usb/fcp.c +++ b/sound/usb/fcp.c @@ -266,7 +266,7 @@ retry: if (req->opcode != resp->opcode) { usb_audio_err(mixer->chip, "FCP response %08x opcode mismatch %08x\n", - opcode, le16_to_cpu(res...
e7217011ddd8e86a0d18c6cbfb4f14da3d18eee0
Analyze and fix the following issue in the Linux kernel code: ALSA: usb: fcp: Fix meter_levels type to __le32
Problem Details: The cached level meter values are returned from the USB core as __le32, hence declare properly. Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501212331.SaePSmsA-lkp@intel.com/ Lin...
```diff diff --git a/sound/usb/fcp.c b/sound/usb/fcp.c index ecdd18335ab7..92e3caab0b82 100644 --- a/sound/usb/fcp.c +++ b/sound/usb/fcp.c @@ -100,7 +100,7 @@ struct fcp_data { u8 num_meter_slots; s16 *meter_level_map; - u32 *meter_levels; + __le32 *m...