id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
ad85de0fc09eb3236e73df5acb2bc257625103f5 | Analyze and fix the following issue in the Linux kernel code: ice: fix inverted ready check for VF representors | Problem Details:
Commit 0f00a897c9fcbd ("ice: check if SF is ready in ethtool ops")
refactored the VF readiness check into a generic repr->ops.ready()
callback but implemented ice_repr_ready_vf() with inverted logic:
return !ice_check_vf_ready_for_cfg(repr->vf);
ice_check_vf_ready_for_cfg() returns 0 on success, so... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice_repr.c b/drivers/net/ethernet/intel/ice/ice_repr.c
index 90f99443a922..68cdd04dd3aa 100644
--- a/drivers/net/ethernet/intel/ice/ice_repr.c
+++ b/drivers/net/ethernet/intel/ice/ice_repr.c
@@ -315,7 +315,7 @@ ice_repr_reg_netdev(struct net_device *netdev, const stru... |
c7fcd269e1e07b2aa4bb37ffce7543c340796433 | Analyze and fix the following issue in the Linux kernel code: ice: set max queues in alloc_etherdev_mqs() | Problem Details:
When allocating netdevice using alloc_etherdev_mqs() the maximum
supported queues number should be passed. The vsi->alloc_txq/rxq is
storing current number of queues, not the maximum ones.
Use the same function for getting max Tx and Rx queues which is used
during ethtool -l call to set maximum number... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 2b2b22af42be..eb3a48330cc1 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -839,6 +839,28 @@ static inline void ice_tx_xsk_pool(struct ice_vsi *vsi, u16 qid)
WRITE_ONC... |
1001b4735137894a6bd7b5bf73375cfa27b6125e | Analyze and fix the following issue in the Linux kernel code: ASoC: soc-topology: fix __le32 conversion in printed values | Problem Details:
A number of dev_dbg() and dev_err() calls get passed values that are
of __le32 type which does not get noticed by sparse until my variadic
checking patches.
There are a number of these, and we should probably fix these up.
The sparse warnings are numerous so the first few are listed here that
this pa... | ```diff
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 064b8d76b955..85679c8e0229 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -224,8 +224,11 @@ static inline void soc_control_err(struct soc_tplg *tplg,
struct snd_soc_tplg_ctl_hdr *hdr, const char *name)
{
dev_err... |
f9f0b4a1f35d39a1a2a2f8ec46eb7b81efc70a63 | Analyze and fix the following issue in the Linux kernel code: rust: interop: Add list module for C linked list interface | Problem Details:
Add a new module `kernel::interop::list` for working with C's doubly
circular linked lists. Provide low-level iteration over list nodes.
Typed iteration over actual items is provided with a `clist_create`
macro to assist in creation of the `CList` type.
Cc: Nikola Djukic <ndjukic@nvidia.com>
Reviewed... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 2c0077bc5b0b..fa30c515d1d3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23191,6 +23191,15 @@ T: git https://github.com/Rust-for-Linux/linux.git alloc-next
F: rust/kernel/alloc.rs
F: rust/kernel/alloc/
+RUST [INTEROP]
+M: Joel Fernandes <joelagnelf@nvidia.com>
+... |
1c37d896b12dfd0d4c96e310b0033c6676933917 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix lost error when running device stats on multiple devices fs | Problem Details:
Whenever we get an error updating the device stats item for a device in
btrfs_run_dev_stats() we allow the loop to go to the next device, and if
updating the stats item for the next device succeeds, we end up losing
the error we had from the previous device.
Fix this by breaking out of the loop once w... | ```diff
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 8fbd736aad9f..117e13d245f6 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -8099,8 +8099,9 @@ int btrfs_run_dev_stats(struct btrfs_trans_handle *trans)
smp_rmb();
ret = update_dev_stat_item(trans, device);
- if (!ret)
- atomic_sub... |
0dcabcb920a5c143c568f37c26c6f2b4b9206bd1 | Analyze and fix the following issue in the Linux kernel code: btrfs: zlib: handle page aligned compressed size correctly | Problem Details:
[BUG]
Since commit 3d74a7556fba ("btrfs: zlib: introduce zlib_compress_bio()
helper"), there are some reports about different crashes in zlib
compression path. One of the symptoms is list corruption like the
following:
list_del corruption. next->prev should be fffffbb340204a08, but was ffff8d6517cb7... | ```diff
diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c
index 0a8fcee16428..27fc2b828002 100644
--- a/fs/btrfs/zlib.c
+++ b/fs/btrfs/zlib.c
@@ -308,7 +308,9 @@ int zlib_compress_bio(struct list_head *ws, struct compressed_bio *cb)
}
/* Queue the remaining part of the folio. */
if (workspace->strm.total_out > bio->... |
a4376d9a5d4c9610e69def3fc0b32c86a7ab7a41 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix leak of kobject name for sub-group space_info | Problem Details:
When create_space_info_sub_group() allocates elements of
space_info->sub_group[], kobject_init_and_add() is called for each
element via btrfs_sysfs_add_space_info_type(). However, when
check_removing_space_info() frees these elements, it does not call
btrfs_sysfs_remove_space_info() on them. As a resul... | ```diff
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index fa55d868ecd8..f7fcff7dca8f 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -4584,7 +4584,7 @@ static void check_removing_space_info(struct btrfs_space_info *space_info)
for (int i = 0; i < BTRFS_SPACE_INFO_SUB_GROUP_MAX; i... |
5254d4181add9dfaa5e3519edd71cc8f752b2f85 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix zero size inode with non-zero size after log replay | Problem Details:
When logging that an inode exists, as part of logging a new name or
logging new dir entries for a directory, we always set the generation of
the logged inode item to 0. This is to signal during log replay (in
overwrite_item()), that we should not set the i_size since we only logged
that an inode exists... | ```diff
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 9ff3933bc382..fce1b16a882b 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -4616,21 +4616,32 @@ static void fill_inode_item(struct btrfs_trans_handle *trans,
struct inode *inode, bool log_inode_only,
u64 logged_isize)
{
... |
b52fe51f724385b3ed81e37e510a4a33107e8161 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix super block offset in error message in btrfs_validate_super() | Problem Details:
Fix the superblock offset mismatch error message in
btrfs_validate_super(): we changed it so that it considers all the
superblocks, but the message still assumes we're only looking at the
first one.
The change from %u to %llu is because we're changing from a constant to
a u64.
Fixes: 069ec957c35e ("b... | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b1b53d713ee9..3524976ccc1d 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2531,8 +2531,8 @@ int btrfs_validate_super(const struct btrfs_fs_info *fs_info,
if (mirror_num >= 0 &&
btrfs_super_bytenr(sb) != btrfs_sb_offset(mirror_num... |
a31566762d4075646a8a2214586158b681e94305 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Implement recent spec updates to Wa_16025250150 | Problem Details:
The hardware teams noticed that the originally documented workaround
steps for Wa_16025250150 may not be sufficient to fully avoid a hardware
issue. The workaround documentation has been augmented to suggest
programming one additional register; make the corresponding change in
the driver.
Fixes: 7654... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index 84b80e83ac46..4ebaa0888a43 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -578,6 +578,7 @@
#define ENABLE_SMP_LD_RENDER_SURFACE_CONTROL REG_BIT(44 - 32)
#define F... |
cdbc3b62cfc2785da32b82260f852370cc1f2a6a | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: Skip redundant UCLK restore in smu_v13_0_6 | Problem Details:
Only reapply UCLK soft limits during PP_OD_RESTORE_DEFAULT when the
current max differs from the DPM table max. This avoids redundant
SMC updates and prevents -EINVAL on restore when no change is needed.
Fixes: b7a900344546 ("drm/amd/pm: Allow setting max UCLK on SMU v13.0.6")
Signed-off-by: Asad Kama... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
index 896b51c8a9a7..b44a85697a30 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
@@ -2122,6 +2122,7 @@ static int ... |
37c2caa167b0b8aca4f74c32404c5288b876a2a3 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix drm_edid leak in amdgpu_dm | Problem Details:
[WHAT]
When a sink is connected, aconnector->drm_edid was overwritten without
freeing the previous allocation, causing a memory leak on resume.
[HOW]
Free the previous drm_edid before updating it.
Reviewed-by: Roman Li <roman.li@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Chu... | ```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 a9c398b1516b..acc3d8dad4a3 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3909,8 +3909,9 @@ void amdgpu_dm_update_c... |
2d300ebfc411205fa31ba7741c5821d381912381 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix strsep() corrupting lockup_timeout on multi-GPU (v3) | Problem Details:
amdgpu_device_get_job_timeout_settings() passes a pointer directly
to the global amdgpu_lockup_timeout[] buffer into strsep().
strsep() destructively replaces delimiter characters with '\0'
in-place.
On multi-GPU systems, this function is called once per device.
When a multi-value setting like "0,0,0,... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index d8296dfc5e8a..6d8531f9b882 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -4207,7 +4207,8 @@ fail:
static int amdgpu_device_get_job_timeout_s... |
aed3d041ab061ec8a64f50a3edda0f4db7280025 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Do not skip unrelated mode changes in DSC validation | Problem Details:
Starting with commit 17ce8a6907f7 ("drm/amd/display: Add dsc pre-validation in
atomic check"), amdgpu resets the CRTC state mode_changed flag to false when
recomputing the DSC configuration results in no timing change for a particular
stream.
However, this is incorrect in scenarios where a change in M... | ```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 085cc98bd875..a9c398b1516b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -12523,6 +12523,11 @@ static int amdgpu_dm... |
bb6da652c585c397fc2c98df9e7534197e1b1cb1 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Improve connect_force_port test reliability | Problem Details:
The connect_force_port test fails intermittently in CI because the
hardcoded server ports (60123/60124) may already be in use by other
tests or processes [1].
Fix this by passing port 0 to start_server(), letting the kernel assign
a free port dynamically. The actual assigned port is then propagated to... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/connect_force_port.c b/tools/testing/selftests/bpf/prog_tests/connect_force_port.c
index 24d553109f8d..dfb7f6cf3ee1 100644
--- a/tools/testing/selftests/bpf/prog_tests/connect_force_port.c
+++ b/tools/testing/selftests/bpf/prog_tests/connect_force_port.c
@@ -5... |
63542bb402b7013171c9f621c28b609eda4dbf1f | Analyze and fix the following issue in the Linux kernel code: spi: meson-spicc: Fix double-put in remove path | Problem Details:
meson_spicc_probe() registers the controller with
devm_spi_register_controller(), so teardown already drops the
controller reference via devm cleanup.
Calling spi_controller_put() again in meson_spicc_remove()
causes a double-put.
Fixes: 8311ee2164c5 ("spi: meson-spicc: fix memory leak in meson_spicc... | ```diff
diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
index a7001b9e36e6..57768da3205d 100644
--- a/drivers/spi/spi-meson-spicc.c
+++ b/drivers/spi/spi-meson-spicc.c
@@ -1101,8 +1101,6 @@ static void meson_spicc_remove(struct platform_device *pdev)
/* Disable SPI */
writel(0, spicc->b... |
3f5c75634fb5dfa4896e74f39e8b04e879fb4de9 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix NULL pointer assumptions in dcn42_init_hw() | Problem Details:
dcn42_init_hw() calls update_bw_bounding_box() when FAMS2 is disabled or
when the dchub reference clock changes. However the existing condition
mixes the callback pointer check with only one side of the || expression:
((!fams2_enable && update_bw_bounding_box) || freq_changed)
This allows the block... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
index 7bf94eae30a6..7f9c121c00e6 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
@@ -69,6 +69,7 @@ voi... |
b4a8a2aba4e3a02ebbf8d2708fcafd491ebd4644 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add clk_mgr NULL checks in dcn32_initialize_min_clocks() | Problem Details:
dcn32_init_hw() checks dc->clk_mgr before calling init_clocks(), so the
clock manager is not treated as unconditionally present on this path.
However, dcn32_initialize_min_clocks() later dereferences dc->clk_mgr,
bw_params, and clk_mgr callbacks without validating them.
Add the required guards in dcn3... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
index a0aaa727e9fa..e5d93dd348dd 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
@@ -757,6 +757,9 @@ s... |
0a66ca3b351f107fdc485cb5c3b4b76ab0c1e4e5 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: add get_gpu_metrics support for 15.0.8 | Problem Details:
export .get_gpu_metrics interface for 15.0.8
v2: Remove members already exposed by other interfaces, use mask,
logical conversion (Lijo)
v3: Use correct logic for hbm stacks loop (Lijo)
Remove buffer allocation
v4: Make out of bound check outside loop (Lijo)
v5: fix locking in error case (Alex)
Si... | ```diff
diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
index 33a1404bb666..89b440edd15b 100644
--- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
@@ -587,6 +587,7 @@ enum amdgpu_metrics_attr_id {
AMDGP... |
8f402ddd4f2321485fff7384c003124681a08146 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/userq: cleanup amdgpu_userq_get/put where not needed | Problem Details:
amdgpu_userq_put/get are not needed in case we already holding
the userq_mutex and reference is valid already from queue create
time or from signal ioctl. These additional get/put could be a
potential reason for deadlock in case the ref count reaches zero
and destroy is called which again try to take t... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index d94f4966fea9..b75b44a3169b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -999,15 +999,11 @@ amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mg... |
5da89a8afca14a266e82d2c99e0bd5ae6db23611 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: Add custom fclk setting support | Problem Details:
Add custom fclk setting support for smu_v13_x_x
v2: Move uclk fix to separate patch, return EOPNOTSUPP in case of dpm
disabled (Lijo)
v3: remove dpm check for filling fclk pstate table (Lijo)
Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: A... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index a3b755c61b1f..be9a7a32de99 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -2466,4 +2466,6 @@ void smu_v13_0_reset_custom_level(s... |
17f11bbbc76c8e83c8474ea708316b1e3631d927 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: Skip redundant UCLK restore in smu_v13_0_6 | Problem Details:
Only reapply UCLK soft limits during PP_OD_RESTORE_DEFAULT when the
current max differs from the DPM table max. This avoids redundant
SMC updates and prevents -EINVAL on restore when no change is needed.
Fixes: b7a900344546 ("drm/amd/pm: Allow setting max UCLK on SMU v13.0.6")
Signed-off-by: Asad Kama... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
index bc361fee5777..13a544e8cf85 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
@@ -2125,6 +2125,7 @@ static int ... |
38f471d38be6629a38ed12377937927b8086894e | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Promote DC to 3.2.375 | Problem Details:
This version brings along following fixes:
- Rework YCbCr422 DSC policy
- Restore full update for tiling change to linear
- add dccg FGCG mask init
- Remove unnecessary completion flag for secure display
- Agument live + capture with CVT case.
- remove dc_clock_limit for apu
- Fix Signed/Unsigned Int ... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 2bb4c7751c01..80e217c5a23d 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -63,7 +63,7 @@ struct dcn_dsc_reg_state;
struct dcn_optc_reg_state;
struct dcn_dccg_reg_state;
... |
3967ab83a5075c05be3c614f1dc8460f66ee77ad | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Restore full update for tiling change to linear | Problem Details:
[Why]
There was previously a dc debug flag to indicate that tiling
changes should only be a medium update instead of full. The
function get_plane_info_type was refactored to not rely on dc
state, but in the process the logic was unintentionally changed,
which leads to screen corruption in some cases.
... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 1c57bfd1fd2d..7dac3f35f0e8 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2769,28 +2769,12 @@ static struct surface_update_descriptor get_plane_info_up... |
370b132a3ed5c80093b668bb518984bfff6638fb | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix Signed/Unsigned Int Usage Compiler Warning | Problem Details:
[Why] Compiler generates compiler warnings when signed enum
constants or literal -1 are implicitly converted to unsigned
integer types, cluttering build output and masking genuine issues.
[How] Use UINT_MAX as the invalid sentinel for unsigned IDs and align
loop/index types to unsigned where appropria... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c b/drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c
index 74812a7d5e28..fd3c61509f1b 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt... |
3cf496080f539b69f069027cece82642b46a6cb5 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Revert inbox0 lock for cursor due to deadlock | Problem Details:
[Why]
A deadlock occurs when using inbox0 lock for cursor operations on
PSR-SU and Replays that does not when using the inbox1 locking path.
This is because of a priority inversion issue where inbox1 work
cannot be serviced while holding the HW lock from driver and sending
cursor notifications to DMUB... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index 908f79b02102..daa7ab362239 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -33,7 +33,6 @@
#include "dc_dmub_srv.h"
#include... |
60e8ffaf96267e8c520ffa9411f4893ace7a0a11 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix Silence warnings | Problem Details:
Also affects: freesync, hdcp, info_packet, power
[Why] Resolve compiler warnings by marking unused parameters explicitly.
[How] In .c/.h keep parameter names in signatures and add a line with
`(void)param;` inside the function body
Preserved function signatures and avoids breaking code paths ... | ```diff
diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
index 2639163b8ba2..1f225d0d6c44 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
@@ -896,6 +896,7 @@ s... |
3eb8ae187d35e75bbdcb5c4410b33a70ef6b1355 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: remove disable_sutter touch pstate debug code | Problem Details:
[why]
diags is using disable_stutter, this will cause issue when pstate switch
enabled
Reviewed-by: Ilya Bakoulin <ilya.bakoulin@amd.com>
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Chuanyu Tseng <chuanyu.tseng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c b/drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c
index 8582dcab1f22..a436fa71d4b4 100644
--- a/drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c
+++ b/drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c
@@ -430,1... |
52024a94e7111366141cfc5d888b2ef011f879e5 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix drm_edid leak in amdgpu_dm | Problem Details:
[WHAT]
When a sink is connected, aconnector->drm_edid was overwritten without
freeing the previous allocation, causing a memory leak on resume.
[HOW]
Free the previous drm_edid before updating it.
Reviewed-by: Roman Li <roman.li@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Chu... | ```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 1e010d095f06..35c8666b23dc 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3994,8 +3994,9 @@ void amdgpu_dm_update_c... |
6c006fac2c17797510691c1848320a1659ff58b4 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix DCN42 memory clock table using MemClk instead of UClk | Problem Details:
[Why]
DCN42 was using UClk values instead of MemClk from MemPstateTable, causing
DML to see half the actual DRAM bandwidth on DDR5 systems and reject high
refresh rate modes.
[How]
Change dcn42_init_clocks() to use MemPstateTable[i].MemClk instead of
MemPstateTable[i].UClk for memclk_mhz initializatio... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c
index 7134d8998efc..24834f89711d 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c
@... |
c096932fd4f72f89fed0b80df473f3af8217d818 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Update underflow detection for DCN42 | Problem Details:
[Why]
The DCN42 underflow detection functions in dcn42_optc.c use
OPTC_RSMU_UNDERFLOW register but the register offset definitions
were missing from dcn_4_2_0_offset.h and dcn42_resource.h.
[How]
Add missing register definitions.
Fixes: e56e3cff2a1b ("drm/amd/display: Sync dcn42 with DC 3.2.373")
Rev... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.h b/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.h
index a9b26df14520..8e7a09402de5 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.h
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_reso... |
68bd4f6b8310f309eb63b41e15088690c9cec0a9 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix some more bug in amdgpu_gem_va_ioctl | Problem Details:
Some illegal combination of input flags were not checked and we need to
take the PDEs into account when returning the fence as well.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 01dc73309d73..4ebb99e22ff2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -30,6 +30,7 @@
#include <linux/pagemap.h>
#include <linux/pci.h>
#include <linu... |
5a90bb2160394fc2fb835ad8142891aea194fe3c | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Clamp min DS DCFCLK value to DCN limit | Problem Details:
[why & how]
DCN has a global limit for minimum DS DCFCLK during any operation.
Adhere to that limit and add a debug flag.
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Signed-off-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Signed-off-by: Chuanyu Tseng <Chuany... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c
index a0296d5f0102..bc11510b63a1 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c
@... |
c446748aa3f233451955bf63ac9887047fe13e73 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add missing dcn42 hubbub function pointers | Problem Details:
This aligning commit combines:
- fix dcn42 det programming)
- fix missing dcn42 pointers
- fix SDPIF_Request_Rate_Limit programming value
V2: Add back dchvm_init for DCN42
Reviewed-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Leo Chen <leo.chen@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Si... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c b/drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c
index d6e6fbaa041b..9e4d526b6d52 100644
--- a/drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c
+++ b/drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c
@@ -6,6 +... |
b6c0783ff278671e38fed978fefb732101ac8836 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add get_default_tiling_info for dcn42 | Problem Details:
Add DCN42 portion that was stripped during previously.
Fixes: 8333f22e44a9 ("drm/amd/display: Query DC for gfx handling when setting linear tiling")
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Signed-off-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by:... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c
index aef187bcf5c3..7b451c7db02c 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_reso... |
6c36d8b0c93f18c97d26f92d13945ddc56e4fd86 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: System Hang When System enters to S0i3 w/ iGPU | Problem Details:
[why]
System Hang when system enters to S0i3 w/ iGPU
some link_enc are NULL due to BIOS integration info table not correct,
but driver should have enough null pointer protection.
Reviewed-by: Leo Chen <leo.chen@amd.com>
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Roman Li <roman.... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
index 8e12dc1297c4..7bf94eae30a6 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
@@ -203,7 +203,8 @@ v... |
94d79f51efecb74be1d88dde66bdc8bfcca17935 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix strsep() corrupting lockup_timeout on multi-GPU (v3) | Problem Details:
amdgpu_device_get_job_timeout_settings() passes a pointer directly
to the global amdgpu_lockup_timeout[] buffer into strsep().
strsep() destructively replaces delimiter characters with '\0'
in-place.
On multi-GPU systems, this function is called once per device.
When a multi-value setting like "0,0,0,... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ac5769d9e75c..a7038f039b10 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3498,7 +3498,8 @@ fail:
static int amdgpu_device_get_job_timeout_s... |
f9a4e81bcbd04e6f967d851f9fe69d8bb3cc08b3 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/gfx11: look at the right prop for gfx queue priority | Problem Details:
Look at hqd_queue_priority rather than hqd_pipe_priority.
In practice, it didn't matter as both were always set for
kernel queues, but that will change in the future.
Fixes: 2e216b1e6ba2 ("drm/amdgpu/gfx11: handle priority setup for gfx pipe1")
Reviewed-by:Jesse Zhang <jesse.zhang@amd.com>
Signed-off-... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index b1a1b8a10a08..78d1f3eb522e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -4088,7 +4088,7 @@ static void gfx_v11_0_gfx_mqd_set_priority(struct amdgpu_device *ad... |
355d96cdec5c61fd83f7eb54f1a28e38809645d6 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/gfx10: look at the right prop for gfx queue priority | Problem Details:
Look at hqd_queue_priority rather than hqd_pipe_priority.
In practice, it didn't matter as both were always set for
kernel queues, but that will change in the future.
Fixes: b07d1d73b09e ("drm/amd/amdgpu: Enable high priority gfx queue")
Reviewed-by:Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Ale... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 1893ceeeb26c..8b60299b73ef 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -6752,7 +6752,7 @@ static void gfx_v10_0_gfx_mqd_set_priority(struct amdgpu_device *ad... |
809773e06692b9feef372c56ca0747cce9bbf860 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Avoid NULL dereference in discovery topology coredump path v3 | Problem Details:
When a GPU fault or timeout happens, the driver creates a devcoredump
to collect debug information.
During this, amdgpu_devcoredump_format() calls
amdgpu_discovery_dump() to print IP discovery data.
amdgpu_discovery_dump() uses:
adev->discovery.ip_top
and then accesses:
ip_top->die_kset
amdgpu_... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 0eb0c62d2f4f..d42a9ff2f78e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -1394,6 +1394,9 @@ static void amdgpu_discovery_sysfs_fini... |
cc7c7121ae082b7b82891baa7280f1ff2608f22b | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Do not skip unrelated mode changes in DSC validation | Problem Details:
Starting with commit 17ce8a6907f7 ("drm/amd/display: Add dsc pre-validation in
atomic check"), amdgpu resets the CRTC state mode_changed flag to false when
recomputing the DSC configuration results in no timing change for a particular
stream.
However, this is incorrect in scenarios where a change in M... | ```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 6fb8c4f447a9..1e010d095f06 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -12528,6 +12528,11 @@ static int amdgpu_dm... |
fd490bb9e1054705e1b35e6f321cdc713e0c7348 | Analyze and fix the following issue in the Linux kernel code: drm/amd/ras: Remove redundant NULL check in pending bad-bank list iteration | Problem Details:
ras_umc_log_pending_bad_bank() walks through a list of pending ECC
bad-bank entries. These entries are saved when a bad-bank error cannot
be processed immediately, for example during a GPU reset.
Later, this function iterates over the pending list and retries logging
each bad-bank error. If logging su... | ```diff
diff --git a/drivers/gpu/drm/amd/ras/rascore/ras_umc.c b/drivers/gpu/drm/amd/ras/rascore/ras_umc.c
index 23118f41eb96..c7ae005ea705 100644
--- a/drivers/gpu/drm/amd/ras/rascore/ras_umc.c
+++ b/drivers/gpu/drm/amd/ras/rascore/ras_umc.c
@@ -222,7 +222,7 @@ int ras_umc_log_pending_bad_bank(struct ras_core_context ... |
e9cf8f83c9857a32494002c72b5f6e36ff4dfcd5 | Analyze and fix the following issue in the Linux kernel code: bitmap: test bitmap_weight() for more | Problem Details:
Test the function for correctness when some bits are set in the last word
of bitmap beyond nbits. This is motivated by commit a9dadc1c512807f9
("powerpc/xive: Fix the size of the cpumask used in
xive_find_target_in_mask()").
Signed-off-by: Yury Norov <ynorov@nvidia.com> | ```diff
diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index cd4cb36e42a5..eeb497016ed3 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -858,6 +858,7 @@ static void __init test_bitmap_weight(void)
{
unsigned int bit, w1, w2, w;
DECLARE_BITMAP(b, 30);
+ DECLARE_BITMAP(b1, 128);
bitmap_parselist("a... |
4624211bc633481523475d0586a47c0a31c91fa4 | Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix invalid kobj cast in scx_uevent() | Problem Details:
When scx_alloc_and_add_sched() creates the sub-scheduler kset, it sets
sch->kobj as the parent. Because sch->kobj.kset points to scx_kset,
registering this sub-kset triggers a KOBJ_ADD uevent. The uevent walk
finds scx_kset and calls scx_uevent() with the sub-kset's kobject.
scx_uevent() unconditional... | ```diff
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 72a07eb050a3..2472231ec556 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -4842,7 +4842,17 @@ static const struct kobj_type scx_ktype = {
static int scx_uevent(const struct kobject *kobj, struct kobj_uevent_env *env)
{
- const struct sc... |
cb251eae7b0aec8a7924fb27bcb5b0388a3706bc | Analyze and fix the following issue in the Linux kernel code: tools/sched_ext: Add scx_bpf_sub_dispatch() compat wrapper | Problem Details:
Add a transparent compatibility wrapper for the scx_bpf_sub_dispatch()
kfunc in compat.bpf.h. This allows BPF schedulers using the sub-sched
dispatch feature to build and run on older kernels that lack the kfunc.
To avoid requiring code changes in individual schedulers, the
transparent wrapper pattern... | ```diff
diff --git a/tools/sched_ext/include/scx/common.bpf.h b/tools/sched_ext/include/scx/common.bpf.h
index a63a98a96b86..19459dedde41 100644
--- a/tools/sched_ext/include/scx/common.bpf.h
+++ b/tools/sched_ext/include/scx/common.bpf.h
@@ -101,7 +101,6 @@ struct rq *scx_bpf_locked_rq(void) __ksym;
struct task_struc... |
f3e9c1138e9d20677ed085107cd2872d5218e3b1 | Analyze and fix the following issue in the Linux kernel code: asm-generic/bitops: Fix a comment typo in instrumented-atomic.h | Problem Details:
The comment after the '#endif' at the end of the instrumented-atomic.h
is a typo. The "NON_ATOMIC" part should be "ATOMIC". Fix it.
Signed-off-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com> | ```diff
diff --git a/include/asm-generic/bitops/instrumented-atomic.h b/include/asm-generic/bitops/instrumented-atomic.h
index 4225a8ca9c1a..c010d54275e4 100644
--- a/include/asm-generic/bitops/instrumented-atomic.h
+++ b/include/asm-generic/bitops/instrumented-atomic.h
@@ -100,4 +100,4 @@ static __always_inline bool t... |
7b52b262f8a8cd96dac33721389a884420c18365 | Analyze and fix the following issue in the Linux kernel code: bitops: fix kernel-doc parameter name for parity8() | Problem Details:
The kernel-doc comment for parity8() documents the parameter as @value
but the actual parameter name is @val. Fix the mismatch.
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Kit Dallege <xaum.io@gmail.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com> | ```diff
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index ea7898cc5903..1fe46703792f 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -230,7 +230,7 @@ static inline int get_count_order_long(unsigned long l)
/**
* parity8 - get the parity of an u8 value
- * @value: the value to b... |
4e64c91b813f666dffc3962a815a8a50b7d6f468 | Analyze and fix the following issue in the Linux kernel code: lib: count_zeros: fix 32/64-bit inconsistency in count_trailing_zeros() | Problem Details:
Based on 'sizeof(x) == 4' condition, in 32-bit case the function is wired
to ffs(), while in 64-bit case to __ffs(). The difference is substantial:
ffs(x) == __ffs(x) + 1. Also, ffs(0) == 0, while __ffs(0) is undefined.
The 32-bit behaviour is inconsistent with the function description, so it
needs to... | ```diff
diff --git a/include/linux/count_zeros.h b/include/linux/count_zeros.h
index 4e5680327ece..5034a30b5c7c 100644
--- a/include/linux/count_zeros.h
+++ b/include/linux/count_zeros.h
@@ -10,6 +10,8 @@
#include <asm/bitops.h>
+#define COUNT_TRAILING_ZEROS_0 (-1)
+
/**
* count_leading_zeros - Count the number... |
18c48899653fa7a04120537c228031b5c7e4e9d6 | Analyze and fix the following issue in the Linux kernel code: lib: crypto: fix comments for count_leading_zeros() | Problem Details:
count_leading_zeros() is based on fls(), which is defined for x == 0,
contrary to __ffs() family. The comment in crypto/mpi erroneously
states that the function may return undef in such case.
Fix the comment together with the outdated function signature, and now
that COUNT_LEADING_ZEROS_0 is not refer... | ```diff
diff --git a/include/linux/count_zeros.h b/include/linux/count_zeros.h
index 5b8ff5ac660d..4e5680327ece 100644
--- a/include/linux/count_zeros.h
+++ b/include/linux/count_zeros.h
@@ -18,7 +18,7 @@
*
* If the MSB of @x is set, the result is 0.
* If only the LSB of @x is set, then the result is BITS_PER_LON... |
6c88ba561cfc2c5f35067519f46310059a9dc39a | Analyze and fix the following issue in the Linux kernel code: lib/find_bit_benchmark: avoid clearing randomly filled bitmap in test_find_first_bit() | Problem Details:
test_find_first_bit() searches for a set bit from the beginning of the
test bitmap and clears it repeatedly, eventually clearing the entire
bitmap.
After test_find_first_bit() is executed, test_find_first_and_bit() and
test_find_next_and_bit() are executed without randomly reinitializing the
cleared b... | ```diff
diff --git a/lib/find_bit_benchmark.c b/lib/find_bit_benchmark.c
index 402e160e7186..00d9dc61cd46 100644
--- a/lib/find_bit_benchmark.c
+++ b/lib/find_bit_benchmark.c
@@ -30,18 +30,20 @@ static DECLARE_BITMAP(bitmap, BITMAP_LEN) __initdata;
static DECLARE_BITMAP(bitmap2, BITMAP_LEN) __initdata;
/*
- * This ... |
a676643709115816d3ce7e50aa5b5a4af1ee6c45 | Analyze and fix the following issue in the Linux kernel code: bitmap: drop __find_nth_andnot_bit() | Problem Details:
Remove find_nth_andnot_bit() leftovers.
CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Fixes: b0c85e99458a ("cpumask: Remove unnecessary cpumask_nth_andnot()")
Signed-off-by: Yury Norov <ynorov@nvidia.com> | ```diff
diff --git a/include/linux/find.h b/include/linux/find.h
index 9d720ad92bc1..6c2be8ca615d 100644
--- a/include/linux/find.h
+++ b/include/linux/find.h
@@ -22,8 +22,6 @@ extern unsigned long _find_first_bit(const unsigned long *addr, unsigned long si
unsigned long __find_nth_bit(const unsigned long *addr, unsig... |
5a184f1cb43a8e035251c635f5c47da5dc3e3049 | Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: catpt: Fix the device initialization | Problem Details:
The DMA mask shall be coerced before any buffer allocations for the
device are done. At the same time explain why DMA mask of 31 bits is
used in the first place.
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: 7a10b66a5df9 ("ASoC: Intel: catpt: Device driver lifecycle")
Signed-off-by: ... | ```diff
diff --git a/sound/soc/intel/catpt/device.c b/sound/soc/intel/catpt/device.c
index 0638aecba40d..0b3f20e384c7 100644
--- a/sound/soc/intel/catpt/device.c
+++ b/sound/soc/intel/catpt/device.c
@@ -281,7 +281,15 @@ static int catpt_acpi_probe(struct platform_device *pdev)
if (IS_ERR(cdev->pci_ba))
return PTR_... |
0e4c1eb59909ddaef19cd997e646d5d1ce251a6c | Analyze and fix the following issue in the Linux kernel code: dm-verity-fec: warn even when there were no errors | Problem Details:
Currently FEC logs a warning message if at least one error was
corrected, or an error message if there were uncorrectable errors.
However, it doesn't log anything if there were no errors.
"No errors" is actually unexpected, though, considering that dm-verity
calls verity_fec_decode() only when a block... | ```diff
diff --git a/drivers/md/dm-verity-fec.c b/drivers/md/dm-verity-fec.c
index fb71e83e6404..85ad9dc210ff 100644
--- a/drivers/md/dm-verity-fec.c
+++ b/drivers/md/dm-verity-fec.c
@@ -133,7 +133,7 @@ done:
if (r < 0 && neras)
DMERR_LIMIT("%s: FEC %llu: failed to correct: %d",
v->data_dev->name, target_b... |
d1c73884858cb3ce2a0f761988a6f279bff32b91 | Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: fix missing newline in pr_err message | Problem Details:
Add missing newline to pr_err message in amdxdna_mailbox.c.
Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
Signed-off-by: haoyu.lu <hechushiguitu666@gmail.com>
Reviewed-by: Lizhi.hou <lizhi.hou@amd.com>
Signed-off-by: Lizhi.hou <lizhi.hou@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@a... | ```diff
diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c
index 46d844a73a94..e681a090752d 100644
--- a/drivers/accel/amdxdna/amdxdna_mailbox.c
+++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
@@ -499,7 +499,7 @@ xdna_mailbox_start_channel(struct mailbox_channel *mb_chann,
in... |
84481e705ab07ed46e56587fe846af194acacafe | Analyze and fix the following issue in the Linux kernel code: mm/damon/stat: monitor all System RAM resources | Problem Details:
DAMON_STAT usage document (Documentation/admin-guide/mm/damon/stat.rst)
says it monitors the system's entire physical memory. But, it is
monitoring only the biggest System RAM resource of the system. When there
are multiple System RAM resources, this results in monitoring only an
unexpectedly small f... | ```diff
diff --git a/mm/damon/stat.c b/mm/damon/stat.c
index 25fb44ccf99d..cf2c5a541eee 100644
--- a/mm/damon/stat.c
+++ b/mm/damon/stat.c
@@ -145,12 +145,59 @@ static int damon_stat_damon_call_fn(void *data)
return 0;
}
+struct damon_stat_system_ram_range_walk_arg {
+ bool walked;
+ struct resource res;
+};
+
+st... |
631c1111501f34980649242751e93cfdadfd1f1c | Analyze and fix the following issue in the Linux kernel code: mm/zswap: add missing kunmap_local() | Problem Details:
Commit e2c3b6b21c77 ("mm: zswap: use SG list decompression APIs from
zsmalloc") updated zswap_decompress() to use the scatterwalk API to copy
data for uncompressed pages.
In doing so, it mapped kernel memory locally for 32-bit kernels using
kmap_local_folio(), however it never unmapped this memory.
T... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index e6ec3295bdb0..16b2ef7223e1 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -942,9 +942,15 @@ static bool zswap_decompress(struct zswap_entry *entry, struct folio *folio)
/* zswap entries of length PAGE_SIZE are not compressed. */
if (entry->length == PAGE_SIZE) {
+ ... |
13f55a7ca773c731a1e645934c1ae48577f48785 | Analyze and fix the following issue in the Linux kernel code: PCI: dwc: rcar-gen4: Change EPC BAR alignment to 4K as per the documentation | Problem Details:
R-Car S4 Series (R8A779F[4-7]*) EP controller uses a 4K minimum iATU region
size (CX_ATU_MIN_REGION_SIZE = 4K) as per R19UH0161EJ0130 Rev.1.30. Also,
the controller itself can only be configured in the range 4 KB to 64 KB, so
the current 1 MB alignment requirement is incorrect.
Hence, change the align... | ```diff
diff --git a/drivers/pci/controller/dwc/pcie-rcar-gen4.c b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
index 3d4a889e38cc..396ef9432299 100644
--- a/drivers/pci/controller/dwc/pcie-rcar-gen4.c
+++ b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
@@ -428,7 +428,7 @@ static const struct pci_epc_features rcar_gen4_pc... |
09a1361db3abfcb76d936aa76820c37e0ee36c04 | Analyze and fix the following issue in the Linux kernel code: regulator: core: fix typo in comments | Problem Details:
Replace another->other so that the sentence makes sense.
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260323140340.105362-1-hugo@hugovil.com
Signed-off-by: Mark Brown <broonie@kernel.org> | ```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 2286bdf6edcb..dc5d67767336 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1550,7 +1550,7 @@ static int set_machine_constraints(struct regulator_dev *rdev,
* Existing logic does not warn if over_current_protection... |
3fc66a103395b4ae8d032dcda5621423d94902f6 | Analyze and fix the following issue in the Linux kernel code: kselftest/coredump: reintroduce null pointer dereference | Problem Details:
Commit 673a55cc49da replaced the null pointer dereference used in
crashing_child() with __builtin_trap to address the following LLVM warnings:
coredump_test_helpers.c:59:6: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference]
coredump_test_helpers.c:59:6: ... | ```diff
diff --git a/tools/testing/selftests/coredump/coredump_test_helpers.c b/tools/testing/selftests/coredump/coredump_test_helpers.c
index 5c8adee63641..2c850e0b1b57 100644
--- a/tools/testing/selftests/coredump/coredump_test_helpers.c
+++ b/tools/testing/selftests/coredump/coredump_test_helpers.c
@@ -56,7 +56,7 @@... |
ef3d549e1deb3466c61f3b01d22fc3fe3e5efb08 | Analyze and fix the following issue in the Linux kernel code: spi: sn-f-ospi: Fix resource leak in f_ospi_probe() | Problem Details:
In f_ospi_probe(), when num_cs validation fails, it returns without
calling spi_controller_put() on the SPI controller, which causes a
resource leak.
Use devm_spi_alloc_host() instead of spi_alloc_host() to ensure the
SPI controller is properly freed when probe fails.
Fixes: 1b74dd64c861 ("spi: Add S... | ```diff
diff --git a/drivers/spi/spi-sn-f-ospi.c b/drivers/spi/spi-sn-f-ospi.c
index bfcc140df810..1f554aa7ca27 100644
--- a/drivers/spi/spi-sn-f-ospi.c
+++ b/drivers/spi/spi-sn-f-ospi.c
@@ -612,7 +612,7 @@ static int f_ospi_probe(struct platform_device *pdev)
u32 num_cs = OSPI_NUM_CS;
int ret;
- ctlr = spi_alloc... |
7ee65cdf54fc9eb4eaf2ffc5c5d1409a90ff4efa | Analyze and fix the following issue in the Linux kernel code: dt-bindings: mmc: rockchip-dw-mshc: Fix the RV1103B compatible | Problem Details:
RV1103B uses the same DesignWare MSHC controller IP version as RK3576.
They have no "ciu-drive" nor "ciu-sample" clocks and use the phase
tuning inside the controller.
Fix it accordingly.
Fixes: 517b1e3c9455 ("dt-bindings: mmc: rockchip-dw-mshc: Add RV1103B compatible")
Suggested-by: Shawn Lin <shaw... | ```diff
diff --git a/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml
index a75209bd2710..4965bb518c54 100644
--- a/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml
+++ b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml
@@ -4... |
e3f1ce073a0dd2b319bd1541c461f153306ca163 | Analyze and fix the following issue in the Linux kernel code: ASoC: wm_adsp: select CONFIG_SND_SOC_WM_ADSP from all users | Problem Details:
The addition of the kunit test made it possible to enable the WM_ADSP
driver even when there are no users. However, an unintended side-effect
was that it is also possible to turn it off when it is actually required,
leading to build failures:
ERROR: modpost: "wm_halo_init" [sound/soc/codecs/snd-soc-cs... | ```diff
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index f9e6a83e55c6..d6104796db4f 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -401,28 +401,6 @@ config SND_SOC_WM_ADSP
tristate "Cirrus Logic wm_adsp driver" if KUNIT
select FW_CS_DSP
select SND_SOC_COMPRESS
- defa... |
e031e7ceac4ee04973bd77362c363734e79dd08c | Analyze and fix the following issue in the Linux kernel code: soc: qcom: ubwc: disable bank swizzling for Glymur platform | Problem Details:
Due to the way the DDR controller is organized on Glymur, hardware
engineers strongly recommended disabling UBWC bank swizzling on Glymur.
Follow that recommendation.
Fixes: 9b21c3bd2480 ("soc: qcom: ubwc: Add configuration Glymur platform")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualco... | ```diff
diff --git a/drivers/soc/qcom/ubwc_config.c b/drivers/soc/qcom/ubwc_config.c
index 1c25aaf55e52..8304463f238a 100644
--- a/drivers/soc/qcom/ubwc_config.c
+++ b/drivers/soc/qcom/ubwc_config.c
@@ -231,8 +231,7 @@ static const struct qcom_ubwc_cfg_data x1e80100_data = {
static const struct qcom_ubwc_cfg_data glym... |
87997b6c6516e049cbaf2fc6810b213d587a06b1 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Fix use-after-free in migration restore | Problem Details:
When an error is returned from xe_sriov_pf_migration_restore_produce(),
the data pointer is not set to NULL, which can trigger use-after-free
in subsequent .write() calls.
Set the pointer to NULL upon error to fix the problem.
Fixes: 1ed30397c0b92 ("drm/xe/pf: Add support for encap/decap of bitstream ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_sriov_packet.c b/drivers/gpu/drm/xe/xe_sriov_packet.c
index 968f32496282..2ae9eff2a7c0 100644
--- a/drivers/gpu/drm/xe/xe_sriov_packet.c
+++ b/drivers/gpu/drm/xe/xe_sriov_packet.c
@@ -341,6 +341,8 @@ ssize_t xe_sriov_packet_write_single(struct xe_device *xe, unsigned int vfid,... |
e32701726c0e6312aabd83aa1c00f59b0d7df276 | Analyze and fix the following issue in the Linux kernel code: firmware: qcom_scm: don't opencode kmemdup | Problem Details:
Lets not opencode kmemdup which is reported by coccinelle tool.
Fix it using kmemdup.
cocci warnings: (new ones prefixed by >>)
>> drivers/firmware/qcom/qcom_scm.c:916:11-18: WARNING opportunity for kmemdup
Fixes: 8b9d2050cfa0 ("firmware: qcom_scm: Add qcom_scm_pas_get_rsc_table() to get resource tab... | ```diff
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 33333384ac81..d1082695ec38 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -922,14 +922,13 @@ struct resource_table *qcom_scm_pas_get_rsc_table(struct qcom_scm_pas_context *c
goto fr... |
67807fbaf12719fca46a622d759484652b79c7c3 | Analyze and fix the following issue in the Linux kernel code: block: fix bio_alloc_bioset slowpath GFP handling | Problem Details:
bio_alloc_bioset() first strips __GFP_DIRECT_RECLAIM from the optimistic
fast allocation attempt with try_alloc_gfp(). If that fast path fails,
the slowpath checks saved_gfp to decide whether blocking allocation is
allowed, but then still calls mempool_alloc() with the stripped gfp mask.
That can lead ... | ```diff
diff --git a/block/bio.c b/block/bio.c
index 5057047194c4..77067fa346d3 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -581,11 +581,11 @@ struct bio *bio_alloc_bioset(struct block_device *bdev, unsigned short nr_vecs,
*/
opf &= ~REQ_ALLOC_CACHE;
- p = mempool_alloc(&bs->bio_pool, gfp);
+ p = mempool_a... |
34006f77890d050e6d80cbee365b5d703c1140b4 | Analyze and fix the following issue in the Linux kernel code: pinctrl: abx500: Fix type of 'argument' variable | Problem Details:
The argument variable is assigned the return value of
pinconf_to_config_argument(), which returns a u32. Change its type from
enum pin_config_param to unsigned int to correctly store the configuration
argument.
Fixes: 03b054e9696c ("pinctrl: Pass all configs to driver on pin_config_set()")
Signed-off-... | ```diff
diff --git a/drivers/pinctrl/nomadik/pinctrl-abx500.c b/drivers/pinctrl/nomadik/pinctrl-abx500.c
index fc7ebeda8440..858fbaebcf8e 100644
--- a/drivers/pinctrl/nomadik/pinctrl-abx500.c
+++ b/drivers/pinctrl/nomadik/pinctrl-abx500.c
@@ -852,7 +852,7 @@ static int abx500_pin_config_set(struct pinctrl_dev *pctldev,... |
70f8915ea4e909826306a8567c7fa46959e278db | Analyze and fix the following issue in the Linux kernel code: pinctrl: sunxi: fix gpiochip_lock_as_irq() failure when pinmux is unknown | Problem Details:
Fixes kernel hang during boot due to inability to set up IRQ on AXP313a.
The issue is caused by gpiochip_lock_as_irq() which is failing when gpio
is in uninitialized state.
Solution is to set pinmux to GPIO INPUT in
sunxi_pinctrl_irq_request_resources() if it wasn't initialized
earlier.
Tested on Or... | ```diff
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
index 685b79fc0bf8..d3042e0c9712 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@ -1092,6 +1092,9 @@ static int sunxi_pinctrl_irq_request_resources(struct irq_data *d)
{
... |
3645eb7e3915990a149460c151a00894cb586253 | Analyze and fix the following issue in the Linux kernel code: x86/fred: Fix early boot failures on SEV-ES/SNP guests | Problem Details:
FRED-enabled SEV-(ES,SNP) guests fail to boot due to the following issues
in the early boot sequence:
* FRED does not have a #VC exception handler in the dispatch logic
* Early FRED #VC exceptions attempt to use uninitialized per-CPU GHCBs
instead of boot_ghcb
Add X86_TRAP_VC case to fred_hwexc() ... | ```diff
diff --git a/arch/x86/coco/sev/noinstr.c b/arch/x86/coco/sev/noinstr.c
index 9d94aca4a698..5afd663a1c21 100644
--- a/arch/x86/coco/sev/noinstr.c
+++ b/arch/x86/coco/sev/noinstr.c
@@ -121,6 +121,9 @@ noinstr struct ghcb *__sev_get_ghcb(struct ghcb_state *state)
WARN_ON(!irqs_disabled());
+ if (!sev_cfg.ghc... |
34420cb92dbb9e37ff6c6603f4f5e1807db3f1de | Analyze and fix the following issue in the Linux kernel code: smb/client: ensure smb2_mapping_table rebuild on cmd changes | Problem Details:
The current rule for smb2_mapping_table.c uses `$(call cmd,...)`, which
fails to track command line modifications in the Makefile (e.g., modifying
the command to `perl -d` or `perl -w` for debug will not trigger a rebuild)
and does not generate the required .cmd file for Kbuild.
Fix this by transition... | ```diff
diff --git a/fs/smb/client/Makefile b/fs/smb/client/Makefile
index 26b6105f04d1..1a6e1e1c9764 100644
--- a/fs/smb/client/Makefile
+++ b/fs/smb/client/Makefile
@@ -48,8 +48,8 @@ cifs-$(CONFIG_CIFS_COMPRESSION) += compress.o compress/lz77.o
# Build the SMB2 error mapping table from smb2status.h
#
$(obj)/smb2_m... |
411df123c017169922cc767affce76282b8e6c85 | Analyze and fix the following issue in the Linux kernel code: x86/cpu: Remove X86_CR4_FRED from the CR4 pinned bits mask | Problem Details:
Commit in Fixes added the FRED CR4 bit to the CR4 pinned bits mask so
that whenever something else modifies CR4, that bit remains set. Which
in itself is a perfectly fine idea.
However, there's an issue when during boot FRED is initialized: first on
the BSP and later on the APs. Thus, there's a window... | ```diff
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 7840b224d6a7..c57e8972d30f 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -433,7 +433,7 @@ static __always_inline void setup_lass(struct cpuinfo_x86 *c)
/* These bits should not change their value ... |
a8d51efb5929ae308895455a3e496b5eca2cd143 | Analyze and fix the following issue in the Linux kernel code: PM: sleep: Drop spurious WARN_ON() from pm_restore_gfp_mask() | Problem Details:
Commit 35e4a69b2003f ("PM: sleep: Allow pm_restrict_gfp_mask()
stacking") introduced refcount-based GFP mask management that warns
when pm_restore_gfp_mask() is called with saved_gfp_count == 0.
Some hibernation paths call pm_restore_gfp_mask() defensively where
the GFP mask may or may not be restrict... | ```diff
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 5f8c9e12eaec..5429e9f19b65 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -40,7 +40,7 @@ void pm_restore_gfp_mask(void)
{
WARN_ON(!mutex_is_locked(&system_transition_mutex));
- if (WARN_ON(!saved_gfp_count) || --saved_gfp_count)
+ ... |
e02ea3ae8ee40d5835a845884c7b161a27c10bcb | Analyze and fix the following issue in the Linux kernel code: platform/x86: intel-hid: disable wakeup_mode during hibernation | Problem Details:
Add a freeze handler which clears wakeup_mode. This fixes aborted hibernation on
Dell Precision 3880.
Wakeup event detected during hibernation, rolling back
This system sends power button events during hibernation, even when triggered by
software.
Closes: https://bugzilla.kernel.org/show_bug.cgi?i... | ```diff
diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
index 95c405c8bac0..2ddd8af8c1ce 100644
--- a/drivers/platform/x86/intel/hid.c
+++ b/drivers/platform/x86/intel/hid.c
@@ -438,6 +438,14 @@ static int intel_hid_pl_suspend_handler(struct device *device)
return 0;
}
+static int ... |
7ff61be5a4844d4aaa31732a5831dd5cd6136448 | Analyze and fix the following issue in the Linux kernel code: platform/x86/amd/hsmp: Fix typo in error message | Problem Details:
Fix a typo in the HSMP error message where "tmeout" should be "timeout".
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Link: https://patch.msgid.link/20260310125307.700108-1-alok.a.tiwari@oracle.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.j... | ```diff
diff --git a/drivers/platform/x86/amd/hsmp/hsmp.c b/drivers/platform/x86/amd/hsmp/hsmp.c
index 19f82c1d3090..631ffc0978d1 100644
--- a/drivers/platform/x86/amd/hsmp/hsmp.c
+++ b/drivers/platform/x86/amd/hsmp/hsmp.c
@@ -117,7 +117,7 @@ static int __hsmp_send_message(struct hsmp_socket *sock, struct hsmp_message ... |
2061f7b042f88d372cca79615f8425f3564c0b40 | Analyze and fix the following issue in the Linux kernel code: platform/olpc: olpc-xo175-ec: Fix overflow error message to print inlen | Problem Details:
The command length check validates inlen (> 5), but the error message
incorrectly printed resp_len. Print inlen so the log reflects the
actual command length.
Fixes: 0c3d931b3ab9e ("Platform: OLPC: Add XO-1.75 EC driver")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Acked-by: Lubomir Rintel <... | ```diff
diff --git a/drivers/platform/olpc/olpc-xo175-ec.c b/drivers/platform/olpc/olpc-xo175-ec.c
index fa7b3bda688a..bee271a4fda1 100644
--- a/drivers/platform/olpc/olpc-xo175-ec.c
+++ b/drivers/platform/olpc/olpc-xo175-ec.c
@@ -482,7 +482,7 @@ static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp,
... |
5a3955f3602950d1888df743a5b1889e43b5cb60 | Analyze and fix the following issue in the Linux kernel code: platform/x86: lenovo: wmi-gamezone: Drop gz_chain_head | Problem Details:
The gz_chain_head variable has been unused since the driver's initial
addition to the tree. Its use was eliminated between v3 and v4 during
development but due to the reference of gz_chain_head's wait_list
member, the compiler could not warn that it was unused.
After a (tip) commit ("locking/rwsem: Re... | ```diff
diff --git a/drivers/platform/x86/lenovo/wmi-gamezone.c b/drivers/platform/x86/lenovo/wmi-gamezone.c
index 381836d29a96..c7fe7e3c9f17 100644
--- a/drivers/platform/x86/lenovo/wmi-gamezone.c
+++ b/drivers/platform/x86/lenovo/wmi-gamezone.c
@@ -31,8 +31,6 @@
#define LWMI_GZ_METHOD_ID_SMARTFAN_SET 44
#define LWM... |
9f11d9b15efb5f77e810b6dfbeb01b4650a79eae | Analyze and fix the following issue in the Linux kernel code: platform/x86: ISST: Check HWP support before MSR access | Problem Details:
On some systems, HWP can be explicitly disabled in the BIOS settings
When HWP is disabled by firmware, the HWP CPUID bit is not set, and
attempting to read MSR_PM_ENABLE will result in a General Protection
(GP) fault.
unchecked MSR access error: RDMSR from 0x770 at rIP: 0xffffffffc33db92e (disable_d... | ```diff
diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
index b8cdaa233ea9..6f46cbb2898f 100644
--- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
+++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
@@ -5... |
435da773966c80e1b2b6aea75460ef0e893fd9e9 | Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-wmi: Add support for Omen 16-k0xxx (8A4D) | Problem Details:
The HP Omen 16-k0xxx (board ID: 8A4D) has the same WMI interface as
other Victus S boards, but requires additional quirks for correctly
switching thermal profile.
Create a new quirk omen_v1_legacy_thermal_params which allows a board to
use Omen V1 thermal values, but rely on the older legacy
HP_OMEN_E... | ```diff
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 0e5d491fd450..988a0acc9622 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -120,6 +120,13 @@ static const struct thermal_profile_params omen_v1_thermal_params = {
.ec_tp_offset = HP_V... |
84d29bfd1929d08f092851162a3d055a2134d043 | Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-wmi: Add support for Omen 16-wf1xxx (8C76) | Problem Details:
The HP Omen 16-wf1xxx (board ID: 8C76) has the same WMI interface as
other Victus S boards, but requires quirks for correctly switching
thermal profile (similar to board 8C78).
Add the DMI board name to victus_s_thermal_profile_boards[] table and
map it to omen_v1_thermal_params.
Testing on board 8C7... | ```diff
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 0a3fc2942ed0..0e5d491fd450 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -199,6 +199,10 @@ static const struct dmi_system_id victus_s_thermal_profile_boards[] __initconst
.matches ... |
734eba62cd32cb9ceffa09e57cdc03d761528525 | Analyze and fix the following issue in the Linux kernel code: PM: hibernate: Drain trailing zero pages on userspace restore | Problem Details:
Commit 005e8dddd497 ("PM: hibernate: don't store zero pages in the
image file") added an optimization to skip zero-filled pages in the
hibernation image. On restore, zero pages are handled internally by
snapshot_write_next() in a loop that processes them without returning
to the caller.
With the users... | ```diff
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 6e1321837c66..a564650734dc 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -2855,6 +2855,17 @@ int snapshot_write_finalize(struct snapshot_handle *handle)
{
int error;
+ /*
+ * Call snapshot_write_next() to drain an... |
8f13c0c6cb75cc4421d5a60fc060e9e6fd9d1097 | Analyze and fix the following issue in the Linux kernel code: cpufreq: Don't skip cpufreq_frequency_table_cpuinfo() | Problem Details:
The commit 6db0f533d320 ("cpufreq: preserve freq_table_sorted
across suspend/hibernate") unintentionally made a change where
cpufreq_frequency_table_cpuinfo() isn't getting called anymore
for old policies getting re-initialized.
This leads to potentially invalid values of policy->max and
policy->cpuin... | ```diff
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 277884d91913..1f794524a1d9 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1427,12 +1427,9 @@ static int cpufreq_policy_online(struct cpufreq_policy *policy,
* If there is a problem with its frequency table, ... |
05243d490bb7852a8acca7b5b5658019c7797a52 | Analyze and fix the following issue in the Linux kernel code: x86/cpu: Enable FSGSBASE early in cpu_init_exception_handling() | Problem Details:
Move FSGSBASE enablement from identify_cpu() to cpu_init_exception_handling()
to ensure it is enabled before any exceptions can occur on both boot and
secondary CPUs.
== Background ==
Exception entry code (paranoid_entry()) uses ALTERNATIVE patching based on
X86_FEATURE_FSGSBASE to decide whether to ... | ```diff
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index a8ff4376c286..7840b224d6a7 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -2050,12 +2050,6 @@ static void identify_cpu(struct cpuinfo_x86 *c)
setup_umip(c);
setup_lass(c);
- /* Enable FSGSBASE i... |
e43dce8a0bc09083ea1145a1a0c61d83cbe72d97 | Analyze and fix the following issue in the Linux kernel code: fs: fix archiecture-specific compat_ftruncate64 | Problem Details:
The "small" argument to do_sys_ftruncate indicates if > 32-bit size
should be reject, but all the arch-specific compat ftruncate64
implementations get this wrong. Merge do_sys_ftruncate and
ksys_ftruncate, replace the integer as boolean small flag with a
descriptive one about LFS semantics, and use it... | ```diff
diff --git a/arch/arm64/kernel/sys32.c b/arch/arm64/kernel/sys32.c
index 96bcfb907443..12a948f3a504 100644
--- a/arch/arm64/kernel/sys32.c
+++ b/arch/arm64/kernel/sys32.c
@@ -89,7 +89,7 @@ COMPAT_SYSCALL_DEFINE4(aarch32_truncate64, const char __user *, pathname,
COMPAT_SYSCALL_DEFINE4(aarch32_ftruncate64, unsi... |
a0e0c2f8c5f32b675f58e25a9338283cedb5ad2b | Analyze and fix the following issue in the Linux kernel code: reset: spacemit: k3: Decouple composite reset lines | Problem Details:
Instead of grouping several different reset lines into one composite
reset, decouple them to individual ones which make it more aligned
with underlying hardware. And for DWC USB driver, it will match well
with the number of the reset property in the DT bindings.
The DWC3 USB host controller in K3 SoC ... | ```diff
diff --git a/drivers/reset/spacemit/reset-spacemit-k3.c b/drivers/reset/spacemit/reset-spacemit-k3.c
index e9e32e4c1ba5..9841f5e057b2 100644
--- a/drivers/reset/spacemit/reset-spacemit-k3.c
+++ b/drivers/reset/spacemit/reset-spacemit-k3.c
@@ -112,16 +112,21 @@ static const struct ccu_reset_data k3_apmu_resets[]... |
fbffb8c7c7bb4d38e9f65e0bee446685011de5d8 | Analyze and fix the following issue in the Linux kernel code: reset: gpio: fix double free in reset_add_gpio_aux_device() error path | Problem Details:
When __auxiliary_device_add() fails, reset_add_gpio_aux_device()
calls auxiliary_device_uninit(adev).
The device release callback reset_gpio_aux_device_release() frees
adev, but the current error path then calls kfree(adev) again,
causing a double free.
Keep kfree(adev) for the auxiliary_device_init(... | ```diff
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index fceec45c8afc..352c2360603b 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -856,7 +856,6 @@ static int reset_add_gpio_aux_device(struct device *parent,
ret = __auxiliary_device_add(adev, "reset");
if (ret) {
auxiliary_device_u... |
4ebfa3230b40728638a6acceb709f900f920f921 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: pkvm: Move error handling to the end of kvm_hyp_cpu_entry | Problem Details:
We currently handle CPUs having booted at EL1 in the middle of
the kvm_hyp_cpu_entry function. Not only this adversely affects
readability, but this is also at a bizarre spot should more
error handling be added (which we're about to do).
Move the WFE/WFI loop to the end of the function and fix a comme... | ```diff
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S b/arch/arm64/kvm/hyp/nvhe/hyp-init.S
index 0d42eedc7167..5d00bde09201 100644
--- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S
+++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S
@@ -201,14 +201,9 @@ SYM_CODE_START_LOCAL(__kvm_hyp_init_cpu)
/* Check that the core was booted in EL2.... |
907150bbe566e23714a25d7bcb910f236c3c44c0 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: microchip: sam9x7: fix gpio-lines count for pioB | Problem Details:
The pioB controller on the SAM9X7 SoC actually supports 27 GPIO lines.
The previous value of 26 was incorrect, leading to the last pin being
unavailable for use by the GPIO subsystem.
Update the #gpio-lines property to reflect
the correct hardware specification.
Fixes: 41af45af8bc3 ("ARM: dts: at91: s... | ```diff
diff --git a/arch/arm/boot/dts/microchip/sam9x7.dtsi b/arch/arm/boot/dts/microchip/sam9x7.dtsi
index 46dacbbd201d..d242d7a934d0 100644
--- a/arch/arm/boot/dts/microchip/sam9x7.dtsi
+++ b/arch/arm/boot/dts/microchip/sam9x7.dtsi
@@ -1226,7 +1226,7 @@
interrupt-controller;
#gpio-cells = <2>;
gpio-co... |
8cd35ceadcfc8c5da2eb7f7ce24525ce9d4ee62e | Analyze and fix the following issue in the Linux kernel code: media: amphion: Fix race between m2m job_abort and device_run | Problem Details:
Fix kernel panic caused by race condition where v4l2_m2m_ctx_release()
frees m2m_ctx while v4l2_m2m_try_run() is about to call device_run
with the same context.
Race sequence:
v4l2_m2m_try_run(): v4l2_m2m_ctx_release():
lock/unlock v4l2_m2m_cancel_job()
... | ```diff
diff --git a/drivers/media/platform/amphion/vpu_v4l2.c b/drivers/media/platform/amphion/vpu_v4l2.c
index 64fc88d89ccc..7cccc994fc50 100644
--- a/drivers/media/platform/amphion/vpu_v4l2.c
+++ b/drivers/media/platform/amphion/vpu_v4l2.c
@@ -447,17 +447,14 @@ static void vpu_m2m_device_run(void *priv)
{
}
-sta... |
35c8178ed2bd9821a75a406d762b2f2e161f9c70 | Analyze and fix the following issue in the Linux kernel code: media: dt-bindings: rockchip,vdec: Add alternative reg-names order for RK35{76,88} | Problem Details:
With the introduction of the RK3588 SoC, and RK3576 afterwards, three
register blocks have been provided for the video decoder unit instead of
just one, which are further referenced in vendor's datasheet by 'link
table', 'function' and 'cache'. The former is present at the top of the
listing, starting... | ```diff
diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
index dc4ebb50b316..42022401d0ff 100644
--- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
@@ -28,16... |
a11db8d8b403eba1f82728f440727128e9997edd | Analyze and fix the following issue in the Linux kernel code: media: dt-bindings: rockchip,vdec: Mark reg-names required for RK35{76,88} | Problem Details:
The Rockchip Video Decoder driver expects reg-names to be mandatory for
RK3576 and RK3588 SoCs, however the binding does not currently require
the use of them.
As a consequence, driver would fail to probe with a hypothetical
devicetree that doesn't provide the reg-names for these SoCs, but which
is ot... | ```diff
diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
index 809fda45b3bd..dc4ebb50b316 100644
--- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
@@ -123,6... |
76e35091ffc722ba39b303e48bc5d08abb59dd56 | Analyze and fix the following issue in the Linux kernel code: media: mediatek: vcodec: fix use-after-free in encoder release path | Problem Details:
The fops_vcodec_release() function frees the context structure (ctx)
without first cancelling any pending or running work in ctx->encode_work.
This creates a race window where the workqueue handler (mtk_venc_worker)
may still be accessing the context memory after it has been freed.
Race condition:
... | ```diff
diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c
index c977ed0c09b6..4e4541b2fc8e 100644
--- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mediatek/vcodec/en... |
34c519feef3e4fcff1078dc8bdb25fbbbd10303f | Analyze and fix the following issue in the Linux kernel code: media: mtk-jpeg: fix use-after-free in release path due to uncancelled work | Problem Details:
The mtk_jpeg_release() function frees the context structure (ctx) without
first cancelling any pending or running work in ctx->jpeg_work. This
creates a race window where the workqueue callback may still be accessing
the context memory after it has been freed.
Race condition:
CPU 0 (release) ... | ```diff
diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
index c01124a349f6..8c684756d5fc 100644
--- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
@@ -1202,6 +1202,7 @@ static int ... |
cb8bdd3ffca280d014311ab395651d33f58a8708 | Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: add missing spinlock protection for handle_dynamic_resolution_change() | Problem Details:
Add spin_lock_irqsave()/spin_unlock_irqrestore() around the
handle_dynamic_resolution_change() call in initialize_sequence() to fix
the missing lock protection.
initialize_sequence() calls handle_dynamic_resolution_change() without
holding inst->state_spinlock. However, handle_dynamic_resolution_chang... | ```diff
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
index 18cd1a6a7e1d..d419076d7052 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
@@ -1593,6 +1593,... |
f48050436746be75227fbc90066a8658cbe94d17 | Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: add missing spinlock protection for send_eos_event() | Problem Details:
Add spin_lock_irqsave()/spin_unlock_irqrestore() around send_eos_event()
calls in the VB2 buffer queue and streamoff callbacks to fix the missing
lock protection.
wave5_vpu_dec_buf_queue_dst() and streamoff_output() call send_eos_event()
without holding inst->state_spinlock. However, send_eos_event() ... | ```diff
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
index 80e1831a42e0..18cd1a6a7e1d 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
@@ -1303,13 +1303... |
95bd174a453f77b09ea66e1e22834680754ba501 | Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init() | Problem Details:
Add wave5_vdi_free_dma_memory() in the error path of
wave5_vdi_init() to prevent a potential memory leak.
Fixes: 45d1a2b93277 ("media: chips-media: wave5: Add vpuapi layer")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Reviewed-by: Nicolas Dufresne <nicolas.dufre... | ```diff
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vdi.c b/drivers/media/platform/chips-media/wave5/wave5-vdi.c
index bb13267ced38..8f71920a8a35 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vdi.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vdi.c
@@ -49,6 +49,7 @@ int wave5_vdi_i... |
1c9d30d37aaffe3454d70b89a77f8aaecda257bf | Analyze and fix the following issue in the Linux kernel code: platform/x86: barco-p50-gpio: normalize return value of gpio_get | Problem Details:
The GPIO get callback is expected to return 0 or 1 (or a negative error
code). Ensure that the value returned by p50_gpio_get() is normalized
to the [0, 1] range.
Fixes: 86ef402d805d606a ("gpiolib: sanitize the return value of gpio_chip::get()")
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-of... | ```diff
diff --git a/drivers/platform/x86/barco-p50-gpio.c b/drivers/platform/x86/barco-p50-gpio.c
index 6f13e81f98fb..360ffd8505d6 100644
--- a/drivers/platform/x86/barco-p50-gpio.c
+++ b/drivers/platform/x86/barco-p50-gpio.c
@@ -275,8 +275,11 @@ static int p50_gpio_get(struct gpio_chip *gc, unsigned int offset)
mut... |
a35bb0dec9552aa2bc69a24e3126c68c257bf55e | Analyze and fix the following issue in the Linux kernel code: iomap, xfs: lift zero range hole mapping flush into xfs | Problem Details:
iomap zero range has a wart in that it also flushes dirty pagecache
over hole mappings (rather than only unwritten mappings). This was
included to accommodate a quirk in XFS where COW fork preallocation
can exist over a hole in the data fork, and the associated range is
reported as a hole. This is beca... | ```diff
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index a0c46aadb97d..e5e7127a4e92 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1641,7 +1641,7 @@ iomap_zero_range(struct inode *inode, loff_t pos, loff_t len, bool *did_zero,
srcmap->type == IOMAP_UNWRITTEN)) {
s64 s... |
92e9dff9ca5026805798b13b967760f8058794e8 | Analyze and fix the following issue in the Linux kernel code: xfs: fix iomap hole map reporting for zoned zero range | Problem Details:
The hole mapping logic for zero range in zoned mode is not quite
correct. It currently reports a hole whenever one exists in the data
fork. If the first write to a sparse range has completed and not yet
written back, the blocks exist in the COW fork as delalloc until
writeback completes, at which point... | ```diff
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index be86d43044df..8c3469d2c73e 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -1651,14 +1651,6 @@ xfs_zoned_buffered_write_iomap_begin(
&smap))
smap.br_startoff = end_fsb; /* fake hole until EOF */
if (smap.br_startoff > offset_fsb)... |
8de4e0f44c638c66cdc5eeb4d5ab9acd61c31e4f | Analyze and fix the following issue in the Linux kernel code: gpio: qixis-fpga: Fix error handling for devm_regmap_init_mmio() | Problem Details:
devm_regmap_init_mmio() returns an ERR_PTR() on failure, not NULL.
The original code checked for NULL which would never trigger on error,
potentially leading to an invalid pointer dereference.
Use IS_ERR() and PTR_ERR() to properly handle the error case.
Fixes: e88500247dc3 ("gpio: add QIXIS FPGA GPIO... | ```diff
diff --git a/drivers/gpio/gpio-qixis-fpga.c b/drivers/gpio/gpio-qixis-fpga.c
index 6e67f43ac0bd..3ced47db1521 100644
--- a/drivers/gpio/gpio-qixis-fpga.c
+++ b/drivers/gpio/gpio-qixis-fpga.c
@@ -60,8 +60,8 @@ static int qixis_cpld_gpio_probe(struct platform_device *pdev)
return PTR_ERR(reg);
regmap = d... |
d72f2084e30966097c8eae762e31986a33c3c0ae | Analyze and fix the following issue in the Linux kernel code: xfs: fix ri_total validation in xlog_recover_attri_commit_pass2 | Problem Details:
The ri_total checks for SET/REPLACE operations are hardcoded to 3,
but xfs_attri_item_size() only emits a value iovec when value_len > 0,
so ri_total is 2 when value_len == 0.
For PPTR_SET/PPTR_REMOVE/PPTR_REPLACE, value_len is validated by
xfs_attri_validate() to be exactly sizeof(struct xfs_parent_r... | ```diff
diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c
index 354472bf45f1..83d09635b200 100644
--- a/fs/xfs/xfs_attr_item.c
+++ b/fs/xfs/xfs_attr_item.c
@@ -1047,8 +1047,8 @@ xlog_recover_attri_commit_pass2(
break;
case XFS_ATTRI_OP_FLAGS_SET:
case XFS_ATTRI_OP_FLAGS_REPLACE:
- /* Log item, attr n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.