id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c5e02d6588f2498cf726e13504593f7325f1ee61
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/userq: take the userq_mgr lock in suspend/resume
Problem Details: Add the missing locking. Fixes: 73e12e98ec0c ("drm/amdgpu/userq: add suspend and resume helpers") Reviewed-by: Arvind Yadav <Arvind.Yadav@amd.com> Reviewed-by: Prike Liang <Prike.Liang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index 451890ee3fb7..1fa9d2be87f3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -809,11 +809,13 @@ int amdgpu_userq_suspend(struct amdgpu_device *adev) ...
d85212e1cec1b586160ef4a8e35690dac8c719ad
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: downgrade HDMI infoframe error to one time warning
Problem Details: In certain config, a modeprobe test triggers too many instances of the error related to infoframe. Make it print only once, and also make it a warning. Fixes: 6027cbee1900 ("drm/amd/display: Add error check for avi and vendor infoframe setup function") Signed-off-by: Aurabindo Pillai <aurabindo.pillai...
```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 89a43f33e8a1..51255016e5fb 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6469,13 +6469,13 @@ static void fill_stre...
7295e00df06368b48f386875daaad275d9ca5181
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: add pasid debugfs entries
Problem Details: the entries will be appearing at /sys/kernel/debug/kfd/proc/<pid>/pasid_<gpuid>. Signed-off-by: Eric Huang <jinhuieric.huang@amd.com> Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c b/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c index 4a5a0a4e00f2..9bde2c64540f 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c @@ -27,6 +27,16 @@ #include "kfd_priv.h" static struct dentry *debugfs_root; ...
716ad3c28f9d228558de18d5c4aae00bcc6a2a9c
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix NULL pointer dereference for program_lut_mode in dcn401_populate_mcm_luts
Problem Details: This commit introduces a NULL pointer check for mpc->funcs->program_lut_mode in the dcn401_populate_mcm_luts function. The previous implementation directly called program_lut_mode without validating its existence, which could lead to a NULL pointer dereference. With this change, the function is now on...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c index 8611eb9607df..ae7194da5987 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c @@ -717,7 +71...
aff78a61720edb9123407dd8369a0b1cb97842f1
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/gfx: Fix gfx_v7_0_get_csb_buffer to use rb_config
Problem Details: Instead of having the hardcoded values for the CSB buffer in gfx_v7_0_get_csb_buffer, use the values calculated in previous steps by accessing raster_config and raster_config_1. Signed-off-by: Rodrigo Siqueira <siqueira@igalia.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 16b94ff5a959..da0534ff1271 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c @@ -3897,29 +3897,8 @@ static void gfx_v7_0_get_csb_buffer(struct amdgpu_device *adev, bu...
d8116a32cdbe456c7f511183eb9ab187e3d590fb
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix offset for HDP remap in nbio v7.11
Problem Details: APUs in passthrough mode use HDP flush. 0x7F000 offset used for remapping HDP flush is mapped to VPE space which could get power gated. Use another unused offset in BIF space. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher ...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c index 2ece3ae75ec1..bed5ef4d8788 100644 --- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c @@ -360,7 +360,7 @@ static void nbio_v7_11_get_clockgating_state(struct amdgpu_device...
9d40b05d6daa484b5be4495ec6b1117da1a3f31f
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: add the evf attached gem obj resv dump
Problem Details: This debug dump will help on debugging the evf attached gem obj fence related issue. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Arvind Yadav <Arvind.Yadav@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 0b9987781f76..dbe57996a481 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -1644,7 +1644,11 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo ...
5a2658fda44f67003e7587547da6ac5decc97072
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix spelling mistake "rounter" -> "router"
Problem Details: There is a spelling mistake with the array utcl2_rounter_str, it appears it should be utcl2_router_str. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c index d81449f9d822..c48cd47b531f 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c @@ -1547,7 +1547,7 @@ static void gfx_v9_4_2_log_utc_edc_count(struct amdgpu_device *...
e5f7e4e0a445f1b9b81ddc9b968e52b44f9d4242
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/atom: Work around vbios NULL offset false positive
Problem Details: GCC really does not want to consider NULL (or near-NULL) addresses as valid, so calculations based off of NULL end up getting range-tracked into being an offset wthin a 0 byte array. It gets especially mad about this: if (vbios_str == NULL) vbios_str += sizeof(B...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c index 81d195d366ce..427b073de2fc 100644 --- a/drivers/gpu/drm/amd/amdgpu/atom.c +++ b/drivers/gpu/drm/amd/amdgpu/atom.c @@ -1444,6 +1444,7 @@ static void atom_get_vbios_pn(struct atom_context *ctx) if (vbios_str == NULL) v...
d4673f3c3b3dcb74e36e53cdfc880baa7a87b330
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix slab-use-after-free in hdcp
Problem Details: The HDCP code in amdgpu_dm_hdcp.c copies pointers to amdgpu_dm_connector objects without incrementing the kref reference counts. When using a USB-C dock, and the dock is unplugged, the corresponding amdgpu_dm_connector objects are freed, creating dangling pointers in the HDCP code. When the dock is plu...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c index 2bd8dee1b7c2..26922d870b89 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c @@ -202,6 +202,9 @@ void ...
af0819755c8cf746930627b7f88b34566240815a
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix NULL pointer dereferences in dm_update_crtc_state() v2
Problem Details: Added checks for NULL values after retrieving drm_new_conn_state to prevent dereferencing NULL pointers. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:10751 dm_update_crtc_state() warn: 'drm_new_conn_state' can also be NULL drivers/gpu/drm/amd/amdgpu/../display/amdgpu_...
```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 e7da058b4aaf..89a43f33e8a1 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -10864,8 +10864,8 @@ static int dm_update_...
e6a3fc4f10b872d02e25f83227e725c79b25d893
Analyze and fix the following issue in the Linux kernel code: genirq/msi: Prevent NULL pointer dereference in msi_domain_debug_show()
Problem Details: irq_domain_debug_show_one() calls msi_domain_debug_show() with a non-NULL domain pointer and a NULL irq_data pointer. irq_debug_show_data() calls it with a NULL domain pointer. The domain pointer is not used, but the irq_data pointer is required to be non-NULL and lacks a NULL pointer check. Add the ...
```diff diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 5c8d43cdb0a3..c05ba7ca00fa 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -761,7 +761,7 @@ static int msi_domain_translate(struct irq_domain *domain, struct irq_fwspec *fw static void msi_domain_debug_show(struct seq_file *m, struct irq_domain *d,...
797002deed03491215a352ace891749b39741b69
Analyze and fix the following issue in the Linux kernel code: selftests/seccomp: fix syscall_restart test for arm compat
Problem Details: The inconsistencies in the systcall ABI between arm and arm-compat can can cause a failure in the syscall_restart test due to the logic attempting to work around the differences. The 'machine' field for an ARM64 device running in compat mode can report 'armv8l' or 'armv8b' which matches with the string...
```diff diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c index b2f76a52215a..53bf6a9c801f 100644 --- a/tools/testing/selftests/seccomp/seccomp_bpf.c +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c @@ -3166,12 +3166,15 @@ TEST(syscall_restart) ret = get_sys...
20acf4dd46e4c0905676ad2a1d9a32041469893f
Analyze and fix the following issue in the Linux kernel code: char: misc: make miscdevice unit test built-in only
Problem Details: Since it uses __init symbols, it cannot be a module. Builds with CONFIG_TEST_MISC_MINOR=m will fail with: ERROR: modpost: "init_mknod" [drivers/misc/misc_minor_kunit.ko] undefined! ERROR: modpost: "init_unlink" [drivers/misc/misc_minor_kunit.ko] undefined! Reported-by: Stephen Rothwell <sfr@canb.auug...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index f9051ab610d5..0117b852bd13 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2512,7 +2512,7 @@ config TEST_IDA tristate "Perform selftest on IDA functions" config TEST_MISC_MINOR - tristate "miscdevice KUnit test" if !KUNIT_ALL_TESTS + bool ...
c44572e0cc13c9afff83fd333135a0aa9b27ba26
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix MAX_REG_OFFSET
Problem Details: Fix MAX_REG_OFFSET to point to the last register in 'pt_regs' and not to the marker itself, which could allow regs_get_register() to return an invalid offset. Fixes: 40e084a506eb ("MIPS: Add uprobes support.") Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thorsten Blum <thorsten.b...
```diff diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h index 85fa9962266a..ef72c46b5568 100644 --- a/arch/mips/include/asm/ptrace.h +++ b/arch/mips/include/asm/ptrace.h @@ -65,7 +65,8 @@ static inline void instruction_pointer_set(struct pt_regs *regs, /* Query offset/name of register fr...
f699c66691fb7e08a5a631c5baf5f2a19b7a6468
Analyze and fix the following issue in the Linux kernel code: arm64/fpsimd: Avoid warning when sve_to_fpsimd() is unused
Problem Details: Historically fpsimd_to_sve() and sve_to_fpsimd() were (conditionally) called by functions which were defined regardless of CONFIG_ARM64_SVE. Hence it was necessary that both fpsimd_to_sve() and sve_to_fpsimd() were always defined and not guarded by ifdeffery. As a result of the removal of fpsimd_signa...
```diff diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index b0874402f7ec..422b9d43b1e6 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -649,7 +649,7 @@ static void __fpsimd_to_sve(void *sst, struct user_fpsimd_state const *fst, * task->thread.uw.fpsimd_state must be ...
003f144ca04621e598fc1c5c4ce0a851cddfe104
Analyze and fix the following issue in the Linux kernel code: x86/CPU/AMD: Replace strcpy() with strscpy()
Problem Details: strcpy() is deprecated due to issues with bounds checking and overflows. Replace it with strscpy(). Signed-off-by: Ruben Wauters <rubenru09@aol.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/20250429230710.54014-1-rubenru09@aol.com
```diff diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 2b36379ff675..0feb717a3624 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -643,7 +643,7 @@ static void init_amd_k8(struct cpuinfo_x86 *c) } if (!c->x86_model_id[0]) - strcpy(c->x86_model_id, "Hammer"); + ...
650266ac4c7230c89bcd1307acf5c9c92cfa85e2
Analyze and fix the following issue in the Linux kernel code: dm: add missing unlock on in dm_keyslot_evict()
Problem Details: We need to call dm_put_live_table() even if dm_get_live_table() returns NULL. Fixes: 9355a9eb21a5 ("dm: support key eviction from keyslot managers of underlying devices") Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Mikulas Patocka <mpatock...
```diff diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 9e175c5e0634..31d67a1a91dd 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -1173,7 +1173,7 @@ static int dm_keyslot_evict(struct blk_crypto_profile *profile, t = dm_get_live_table(md, &srcu_idx); if (!t) - return 0; + got...
358b1c0f56ebb6996fcec7dcdcf6bae5dcbc8b6c
Analyze and fix the following issue in the Linux kernel code: libbpf: Use proper errno value in linker
Problem Details: Return values of the linker_append_sec_data() and the linker_append_elf_relos() functions are propagated all the way up to users of libbpf API. In some error cases these functions return -1 which will be seen as -EPERM from user's point of view. Instead, return a more reasonable -EINVAL. Fixes: faf6ed...
```diff diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c index 56f5068e2eba..a469e5d4fee7 100644 --- a/tools/lib/bpf/linker.c +++ b/tools/lib/bpf/linker.c @@ -1376,7 +1376,7 @@ static int linker_append_sec_data(struct bpf_linker *linker, struct src_obj *obj } else { if (!secs_match(dst_sec, src_sec))...
63f5235e0291152a2ac2c4ef3c1196cb6dfb3ef7
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - Add more HP laptops which need mute led fixup
Problem Details: More HP EliteBook with Realtek HDA codec ALC3247 and combined CS35L56 Amplifiers need quirk ALC236_FIXUP_HP_GPIO_LED to fix the micmute LED. Signed-off-by: Chris Chiu <chris.chiu@canonical.com> Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20250430101843.150833-1-chris.chiu@canonical.com...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7810d5f9b5aa..8a2b09e4a7d5 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10863,8 +10863,11 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", A...
5e63d579e752549dc256a952bcb35ade398ee921
Analyze and fix the following issue in the Linux kernel code: bcachefs: readdir fixes
Problem Details: - Don't call bch2_trans_relock() after dir_emit(); taking a transaction restart here will cause us to emit the same dirent to userspace twice - Fix incorrect checking of the return value on dir_emit(): "true" means success, keep going, but bch2_dir_emit() needs to return true when we're finished...
```diff diff --git a/fs/bcachefs/dirent.c b/fs/bcachefs/dirent.c index 92ee59d9e00e..8a680e52c1ed 100644 --- a/fs/bcachefs/dirent.c +++ b/fs/bcachefs/dirent.c @@ -685,7 +685,7 @@ static int bch2_dir_emit(struct dir_context *ctx, struct bkey_s_c_dirent d, subv vfs_d_type(d.v->d_type)); if (ret) ctx->pos = ...
b43dc4ab097859c24e2a6993119c927cffc856aa
Analyze and fix the following issue in the Linux kernel code: x86/microcode/AMD: Do not return error when microcode update is not necessary
Problem Details: After 6f059e634dcd("x86/microcode: Clarify the late load logic"), if the load is up-to-date, the AMD side returns UCODE_OK which leads to load_late_locked() returning -EBADFD. Handle UCODE_OK in the switch case to avoid this error. [ bp: Massage commit message. ] Fixes: 6f059e634dcd ("x86/micr...
```diff diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index b3658d11e7b6..2309321cf6a1 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -686,6 +686,8 @@ static int load_late_locked(void) return load_late_stop_cpus(true); case...
f122121796f91168d0894c2710b8dd71330a34f8
Analyze and fix the following issue in the Linux kernel code: cifs: Fix changing times and read-only attr over SMB1 smb_set_file_info() function
Problem Details: Function CIFSSMBSetPathInfo() is not supported by non-NT servers and returns error. Fallback code via open filehandle and CIFSSMBSetFileInfo() does not work neither because CIFS_open() works also only on NT server. Therefore currently the whole smb_set_file_info() function as a SMB1 callback for the -...
```diff diff --git a/fs/smb/client/cifspdu.h b/fs/smb/client/cifspdu.h index 18d67ab113f0..1b79fe07476f 100644 --- a/fs/smb/client/cifspdu.h +++ b/fs/smb/client/cifspdu.h @@ -1266,10 +1266,9 @@ typedef struct smb_com_query_information_rsp { typedef struct smb_com_setattr_req { struct smb_hdr hdr; /* wct = 8 */ __l...
1041c117a2c33cdffc4f695ac4b469e9124d24d5
Analyze and fix the following issue in the Linux kernel code: cifs: Fix and improve cifs_query_path_info() and cifs_query_file_info()
Problem Details: When CAP_NT_SMBS was not negotiated then do not issue CIFSSMBQPathInfo() and CIFSSMBQFileInfo() commands. CIFSSMBQPathInfo() is not supported by non-NT Win9x SMB server and CIFSSMBQFileInfo() returns from Win9x SMB server bogus data in Attributes field (for example lot of files are marked as reparse po...
```diff diff --git a/fs/smb/client/smb1ops.c b/fs/smb/client/smb1ops.c index 0adeec652dc1..5c7a80bce5bd 100644 --- a/fs/smb/client/smb1ops.c +++ b/fs/smb/client/smb1ops.c @@ -543,24 +543,104 @@ static int cifs_query_path_info(const unsigned int xid, const char *full_path, struct cifs_open_info_data *data) { ...
74c72419ec8da5cbc9c49410d3c44bb954538bdd
Analyze and fix the following issue in the Linux kernel code: smb: client: fix zero length for mkdir POSIX create context
Problem Details: SMB create requests issued via smb311_posix_mkdir() have an incorrect length of zero bytes for the POSIX create context data. ksmbd server rejects such requests and logs "cli req too short" causing mkdir to fail with "invalid argument" on the client side. It also causes subsequent rmmod to crash in ci...
```diff diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index c4d52bebd37d..a9a49555d43b 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -2921,6 +2921,7 @@ replay_again: req->CreateContextsOffset = cpu_to_le32( sizeof(struct smb2_create_req) + iov[1].iov_len); + le32_add...
ac4e04d9e378f5aa826c2406ad7871ae1b6a6fb9
Analyze and fix the following issue in the Linux kernel code: cpufreq: intel_pstate: Unchecked MSR aceess in legacy mode
Problem Details: When turbo mode is unavailable on a Skylake-X system, executing the command: # echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo results in an unchecked MSR access error: WRMSR to 0x199 (attempted to write 0x0000000100001300). This issue was reproduced on an OEM (Original Equipment Manufactu...
```diff diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index f41ed0b9e610..ba9bf06f1c77 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -598,6 +598,9 @@ static bool turbo_is_disabled(void) { u64 misc_en; + if (!cpu_feature_enabled(X86_FEATURE_IDA)) ...
533a8a67cc3b072a24122d1ea10a8db66a5c9393
Analyze and fix the following issue in the Linux kernel code: soundwire: intel_auxdevice: Fix system suspend/resume handling
Problem Details: Before commit bca84a7b93fd ("PM: sleep: Use DPM_FLAG_SMART_SUSPEND conditionally") the runtime PM status of the device in intel_resume() had always been RPM_ACTIVE because setting DPM_FLAG_SMART_SUSPEND had caused the core to call pm_runtime_set_active() for that device during the "noirq" resume phase....
```diff diff --git a/drivers/soundwire/intel_auxdevice.c b/drivers/soundwire/intel_auxdevice.c index 5ea6399e6c9b..10a602d4843a 100644 --- a/drivers/soundwire/intel_auxdevice.c +++ b/drivers/soundwire/intel_auxdevice.c @@ -353,9 +353,6 @@ static int intel_link_probe(struct auxiliary_device *auxdev, /* use generic ban...
a244a18c15fef479bce3eee68ffcab4a393b7b51
Analyze and fix the following issue in the Linux kernel code: coresight: Add claim tag warnings and debug messages
Problem Details: Add a dev_dbg() message so that external debugger conflicts are more visible. There are multiple reasons for -EBUSY so a message for this particular one could be helpful. Add errors for and enumerate all the other cases that are impossible. Reviewed-by: Leo Yan <leo.yan@arm.com> Reviewed-by: Yeoreum Y...
```diff diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c index 9f183064285d..8f2a40510b09 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -135,16 +135,6 @@ static inline u32 coresight_read_claim_tags_...
8a39f1c870e9d6fbac5638f3a42a6a6363829c49
Analyze and fix the following issue in the Linux kernel code: ovl: Check for NULL d_inode() in ovl_dentry_upper()
Problem Details: In ovl_path_type() and ovl_is_metacopy_dentry() GCC notices that it is possible for OVL_E() to return NULL (which implies that d_inode(dentry) may be NULL). This would result in out of bounds reads via container_of(), seen with GCC 15's -Warray-bounds -fdiagnostics-details. For example: In file includ...
```diff diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index 0819c739cc2f..5d6b60d56c27 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c @@ -305,7 +305,9 @@ enum ovl_path_type ovl_path_realdata(struct dentry *dentry, struct path *path) struct dentry *ovl_dentry_upper(struct dentry *dentry) { - ret...
f6028eeeb5e4cf86f93f805098c84974a79bba8a
Analyze and fix the following issue in the Linux kernel code: coresight: core: Disable helpers for devices that fail to enable
Problem Details: When enabling a SINK or LINK type coresight device fails, the associated helpers should be disabled. Fixes: 6148652807ba ("coresight: Enable and disable helper devices adjacent to the path") Signed-off-by: Yabin Cui <yabinc@google.com> Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com> Reviewed-b...
```diff diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c index dabec7073aed..d3523f0262af 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -465,7 +465,7 @@ int coresight_enable_path(struct coresight_pa...
a03a0a08c6fe5e50c1b12ea41b9e228e7f649c22
Analyze and fix the following issue in the Linux kernel code: coresight: catu: Introduce refcount and spinlock for enabling/disabling
Problem Details: When tracing ETM data on multiple CPUs concurrently via the perf interface, the CATU device is shared across different CPU paths. This can lead to race conditions when multiple CPUs attempt to enable or disable the CATU device simultaneously. To address these race conditions, this patch introduces the...
```diff diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c index 96cb48b140af..d4e2e175e077 100644 --- a/drivers/hwtracing/coresight/coresight-catu.c +++ b/drivers/hwtracing/coresight/coresight-catu.c @@ -458,12 +458,17 @@ static int catu_enable_hw(struct catu_drvda...
f024d3a8ded0d8d2129ae123d7a5305c29ca44ce
Analyze and fix the following issue in the Linux kernel code: io_uring/fdinfo: annotate racy sq/cq head/tail reads
Problem Details: syzbot complains about the cached sq head read, and it's totally right. But we don't need to care, it's just reading fdinfo, and reading the CQ or SQ tail/head entries are known racy in that they are just a view into that very instant and may of course be outdated by the time they are reported. Annota...
```diff diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c index f60d0a9d505e..9414ca6d101c 100644 --- a/io_uring/fdinfo.c +++ b/io_uring/fdinfo.c @@ -123,11 +123,11 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file) seq_printf(m, "SqMask:\t0x%x\n", sq_mask); seq_printf(m, "SqHead:\t%u\n", s...
8edb86b2ed1d63cc400aecae8eb8c8114837171a
Analyze and fix the following issue in the Linux kernel code: nvmet-auth: always free derived key data
Problem Details: After calling nvme_auth_derive_tls_psk() we need to free the resulting psk data, as either TLS is disable (and we don't need the data anyway) or the psk data is copied into the resulting key (and can be free, too). Fixes: fa2e0f8bbc68 ("nvmet-tcp: support secure channel concatenation") Reported-by: Yi...
```diff diff --git a/drivers/nvme/target/auth.c b/drivers/nvme/target/auth.c index cef8d77f477b..9429b8218408 100644 --- a/drivers/nvme/target/auth.c +++ b/drivers/nvme/target/auth.c @@ -600,13 +600,12 @@ void nvmet_auth_insert_psk(struct nvmet_sq *sq) pr_warn("%s: ctrl %d qid %d failed to refresh key, error %ld\n",...
46d22b47df2741996af277a2838b95f130436c13
Analyze and fix the following issue in the Linux kernel code: nvmet-tcp: don't restore null sk_state_change
Problem Details: queue->state_change is set as part of nvmet_tcp_set_queue_sock(), but if the TCP connection isn't established when nvmet_tcp_set_queue_sock() is called then queue->state_change isn't set and sock->sk->sk_state_change isn't replaced. As such we don't need to restore sock->sk->sk_state_change if queue->...
```diff diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c index f2d0c920269b..12a5cb8641ca 100644 --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -1560,6 +1560,9 @@ static void nvmet_tcp_restore_socket_callbacks(struct nvmet_tcp_queue *queue) { struct socket *sock = queue->sock; ...
ac38b7ef704c0659568fd4b2c7e6c1255fc51798
Analyze and fix the following issue in the Linux kernel code: nvmet-tcp: select CONFIG_TLS from CONFIG_NVME_TARGET_TCP_TLS
Problem Details: Ensure that TLS support is enabled in the kernel when CONFIG_NVME_TARGET_TCP_TLS is enabled. Without this the code compiles, but does not actually work unless something else enables CONFIG_TLS. Fixes: 675b453e0241 ("nvmet-tcp: enable TLS handshake upcall") Signed-off-by: Alistair Francis <alistair.fra...
```diff diff --git a/drivers/nvme/target/Kconfig b/drivers/nvme/target/Kconfig index fb7446d6d682..4c253b433bf7 100644 --- a/drivers/nvme/target/Kconfig +++ b/drivers/nvme/target/Kconfig @@ -98,6 +98,7 @@ config NVME_TARGET_TCP_TLS bool "NVMe over Fabrics TCP target TLS encryption support" depends on NVME_TARGET_TC...
521987940ad4fd37fe3d0340ec6f39c4e8e91e36
Analyze and fix the following issue in the Linux kernel code: nvme-tcp: select CONFIG_TLS from CONFIG_NVME_TCP_TLS
Problem Details: Ensure that TLS support is enabled in the kernel when CONFIG_NVME_TCP_TLS is enabled. Without this the code compiles, but does not actually work unless something else enables CONFIG_TLS. Fixes: be8e82caa68 ("nvme-tcp: enable TLS handshake upcall") Signed-off-by: Alistair Francis <alistair.francis@wdc....
```diff diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig index d47dfa80fb95..4d64b6935bb9 100644 --- a/drivers/nvme/host/Kconfig +++ b/drivers/nvme/host/Kconfig @@ -102,6 +102,7 @@ config NVME_TCP_TLS depends on NVME_TCP select NET_HANDSHAKE select KEYS + select TLS help Enables TLS encryp...
77e40bbce93059658aee02786a32c5c98a240a8a
Analyze and fix the following issue in the Linux kernel code: nvme-tcp: fix premature queue removal and I/O failover
Problem Details: This patch addresses a data corruption issue observed in nvme-tcp during testing. In an NVMe native multipath setup, when an I/O timeout occurs, all inflight I/Os are canceled almost immediately after the kernel socket is shut down. These canceled I/Os are reported as host path errors, triggering a fa...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 72d260201d8c..aba365f97cf6 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1946,7 +1946,7 @@ static void __nvme_tcp_stop_queue(struct nvme_tcp_queue *queue) cancel_work_sync(&queue->io_work); } -static void nvme_tcp...
39bb67edcc582b3b386a9ec983da67fa8a10ec03
Analyze and fix the following issue in the Linux kernel code: tee: Prevent size calculation wraparound on 32-bit kernels
Problem Details: The current code around TEE_IOCTL_PARAM_SIZE() is a bit wrong on 32-bit kernels: Multiplying a user-provided 32-bit value with the size of a structure can wrap around on such platforms. Fix it by using saturating arithmetic for the size calculation. This has no security consequences because, in all u...
```diff diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index d113679b1e2d..acc7998758ad 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -10,6 +10,7 @@ #include <linux/fs.h> #include <linux/idr.h> #include <linux/module.h> +#include <linux/overflow.h> #include <linux/slab.h> #inclu...
b389df0f6b5a2e0655e9f101af97d75e35fb874c
Analyze and fix the following issue in the Linux kernel code: drm/st7571-i2c: Fix IS_ERR() vs NULL checks in probe()
Problem Details: The devm_kzalloc() function returns NULL on failure, not error pointers. Also printing an error message for kmalloc() failures is against kernel style so just return -ENOMEM without printing a message. (Kmalloc already prints a message). Fixes: 4b35f0f41ee2 ("drm/st7571-i2c: add support for Sitronix ...
```diff diff --git a/drivers/gpu/drm/tiny/st7571-i2c.c b/drivers/gpu/drm/tiny/st7571-i2c.c index dc410ec41baf..eec846892962 100644 --- a/drivers/gpu/drm/tiny/st7571-i2c.c +++ b/drivers/gpu/drm/tiny/st7571-i2c.c @@ -908,16 +908,14 @@ static int st7571_probe(struct i2c_client *client) st7571->hwbuf = devm_kzalloc(&clie...
b7ca5743a2604156d6083b88cefacef983f3a3a6
Analyze and fix the following issue in the Linux kernel code: sched/core: Tweak wait_task_inactive() to force dequeue sched_delayed tasks
Problem Details: It was reported that in 6.12, smpboot_create_threads() was taking much longer then in 6.6. I narrowed down the call path to: smpboot_create_threads() -> kthread_create_on_cpu() -> kthread_bind() -> __kthread_bind_mask() ->wait_task_inactive() Where in wait_task_inactive() we we...
```diff diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 79692f85643f..a3507ed58424 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2283,6 +2283,12 @@ unsigned long wait_task_inactive(struct task_struct *p, unsigned int match_state * just go back and repeat. */ rq = task_rq_lock(p,...
02e8be5a032cae0f4ca33c6053c44d83cf4acc93
Analyze and fix the following issue in the Linux kernel code: bnxt_en: Fix ethtool -d byte order for 32-bit values
Problem Details: For version 1 register dump that includes the PCIe stats, the existing code incorrectly assumes that all PCIe stats are 64-bit values. Fix it by using an array containing the starting and ending index of the 32-bit values. The loop in bnxt_get_regs() will use the array to do proper endian swap for th...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 7be37976f3e4..f5d490bf997e 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -2062,6 +2062,17 @@ static int bnxt_get_re...
6b87bd94f34370bbf1dfa59352bed8efab5bf419
Analyze and fix the following issue in the Linux kernel code: bnxt_en: Fix out-of-bound memcpy() during ethtool -w
Problem Details: When retrieving the FW coredump using ethtool, it can sometimes cause memory corruption: BUG: KFENCE: memory corruption in __bnxt_get_coredump+0x3ef/0x670 [bnxt_en] Corrupted memory at 0x000000008f0f30e8 [ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ] (in kfence-#45): __bnxt_get_coredump+0x3ef/0x670 [bnxt_en] eth...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c index 9a74793648f6..a000d3f630bd 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c @@ -110,10 +110,19 @@ static int bnxt_hwr...
ea9376cf68230e05492f22ca45d329f16e262c7b
Analyze and fix the following issue in the Linux kernel code: bnxt_en: Fix coredump logic to free allocated buffer
Problem Details: When handling HWRM_DBG_COREDUMP_LIST FW command in bnxt_hwrm_dbg_dma_data(), the allocated buffer info->dest_buf is not freed in the error path. In the normal path, info->dest_buf is assigned to coredump->data and it will eventually be freed after the coredump is collected. Free info->dest_buf immedi...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c index 5576e7cf8463..9a74793648f6 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c @@ -116,6 +116,11 @@ static int bnxt_hwrm...
1ae04e489dd757e1e61999362f33e7c554c3b9e3
Analyze and fix the following issue in the Linux kernel code: bnxt_en: call pci_alloc_irq_vectors() after bnxt_reserve_rings()
Problem Details: On some architectures (e.g. ARM), calling pci_alloc_irq_vectors() will immediately cause the MSIX table to be written. This will not work if we haven't called bnxt_reserve_rings() to properly map the MSIX table to the MSIX vectors reserved by FW. Fix the FW error recovery path to delay the bnxt_init_...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index cfc9ccab39bf..3b2ea36f25a2 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -12399,13 +12399,8 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool...
a63db07e4ecd45b027718168faf7d798bb47bf58
Analyze and fix the following issue in the Linux kernel code: bnxt_en: Add missing skb_mark_for_recycle() in bnxt_rx_vlan()
Problem Details: If bnxt_rx_vlan() fails because the VLAN protocol ID is invalid, the SKB is freed but we're missing the call to recycle it. This may cause the warning: "page_pool_release_retry() stalled pool shutdown" Add the missing skb_mark_for_recycle() in bnxt_rx_vlan(). Fixes: 86b05508f775 ("bnxt_en: Use the ...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index c4bccc683597..cfc9ccab39bf 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -2015,6 +2015,7 @@ static struct sk_buff *bnxt_rx_vlan(struct sk_buff *skb...
8e6cc9045380f3f0c48ebda2bda5e1abe263388d
Analyze and fix the following issue in the Linux kernel code: bnxt_en: Fix ethtool selftest output in one of the failure cases
Problem Details: When RDMA driver is loaded, running offline self test is not supported and driver returns failure early. But it is not clearing the input buffer and hence the application prints some junk characters for individual test results. Fix it by clearing the buffer before returning. Fixes: 895621f1c816 ("bnx...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 48dd5922e4dd..7be37976f3e4 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -4991,6 +4991,7 @@ static void bnxt_self_t...
9ab7a709c926c16b4433cf02d04fcbcf35aaab2b
Analyze and fix the following issue in the Linux kernel code: bnxt_en: Fix error handling path in bnxt_init_chip()
Problem Details: WARN_ON() is triggered in __flush_work() if bnxt_init_chip() fails because we call cancel_work_sync() on dim work that has not been initialized. WARNING: CPU: 37 PID: 5223 at kernel/workqueue.c:4201 __flush_work.isra.0+0x212/0x230 The driver relies on the BNXT_STATE_NAPI_DISABLED bit to check if dim ...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 2c8e2c19d854..c4bccc683597 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -11602,6 +11602,9 @@ static void bnxt_init_napi(struct bnxt *bp) poll_f...
2cb291596e2c1837238bc322ae3545dacb99d584
Analyze and fix the following issue in the Linux kernel code: objtool: Fix up st_info in COMDAT group section
Problem Details: When __elf_create_symbol creates a local symbol, it relocates the first global symbol upwards to make space. Subsequently, elf_update_symbol() is called to refresh the symbol table section. However, this isn't sufficient, as other sections might have the reference to the old symbol index, for instance,...
```diff diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index 727a3a4fd9d7..8dffe68d705c 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -572,6 +572,30 @@ err: return -1; } +/* + * @sym's idx has changed. Update the sh_info in group sections. + */ +static void elf_update_group_sh_info(struct ...
58f6217e5d0132a9f14e401e62796916aa055c1b
Analyze and fix the following issue in the Linux kernel code: perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value.
Problem Details: When generating the MSR_IA32_PEBS_ENABLE value that will be loaded on VM-Entry to a KVM guest, mask the value with the vCPU's desired PEBS_ENABLE value. Consulting only the host kernel's host vs. guest masks results in running the guest with PEBS enabled even when the guest doesn't want to use PEBS. ...
```diff diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 00dfe487bd00..c5f385413392 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -4395,7 +4395,7 @@ static struct perf_guest_switch_msr *intel_guest_get_msrs(int *nr, void *data) arr[pebs_enable] = (struct...
144530c15ec7fa95b29812d86f4be527338ea204
Analyze and fix the following issue in the Linux kernel code: pds_core: remove extra name description
Problem Details: Fix the kernel-doc complaint include/linux/pds/pds_adminq.h:481: warning: Excess struct member 'name' description in 'pds_core_lif_getattr_comp' Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq.h index ddd111f04ca0..339156113fa5 100644 --- a/include/linux/pds/pds_adminq.h +++ b/include/linux/pds/pds_adminq.h @@ -463,7 +463,6 @@ struct pds_core_lif_getattr_cmd { * @rsvd: Word boundary padding * @comp_index: Index in th...
4b4da10b1f7eda3c698b924ce2051d3e56e652fe
Analyze and fix the following issue in the Linux kernel code: platform/x86: alienware-wmi-wmax: Fix awcc_hwmon_fans_init() label logic
Problem Details: To avoid passing an uninitialized `temp_id` to awcc_get_fan_label(), pass the `fan_temps` bitmap instead, to work only on set bits. Additionally, awcc_get_fan_label() leaves `dev` unused, so remove it from it's signature and it does not fail, so remove error handling. Reported-by: kernel test robot <...
```diff diff --git a/drivers/platform/x86/dell/alienware-wmi-wmax.c b/drivers/platform/x86/dell/alienware-wmi-wmax.c index 27e5b0b23c27..f3ad47c9edfa 100644 --- a/drivers/platform/x86/dell/alienware-wmi-wmax.c +++ b/drivers/platform/x86/dell/alienware-wmi-wmax.c @@ -958,15 +958,19 @@ static int awcc_hwmon_temps_init(st...
1fe9596a70d40b017f698db42621ec96da3a0cac
Analyze and fix the following issue in the Linux kernel code: platform/x86: alienware-wmi-wmax: Fix uninitialized bitmap in awcc_hwmon_fans_init()
Problem Details: Initialize fan_temps bitmap to zero before using it for the first time in each iteration. Fixes: d69990783495 ("platform/x86: alienware-wmi-wmax: Add HWMON support") Signed-off-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20250425-temp-id-fix-v1-1-372d71f732bf@gmail.com Reviewed-b...
```diff diff --git a/drivers/platform/x86/dell/alienware-wmi-wmax.c b/drivers/platform/x86/dell/alienware-wmi-wmax.c index faeddfe3b79e..27e5b0b23c27 100644 --- a/drivers/platform/x86/dell/alienware-wmi-wmax.c +++ b/drivers/platform/x86/dell/alienware-wmi-wmax.c @@ -1027,6 +1027,8 @@ static int awcc_hwmon_fans_init(str...
d9c4037fed897ddcb512fdf03bafed9451cb5006
Analyze and fix the following issue in the Linux kernel code: ABI: testing: sysfs-class-oxp: add missing documentation
Problem Details: Add missing documentation about the tt_toggle attribute that was added in kernel 6.5. Fixes: be144ee491272 ("hwmon: (oxp-sensors) Add tt_toggle attribute on supported boards") Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com> Signed-off-by: An...
```diff diff --git a/Documentation/ABI/testing/sysfs-platform-oxp b/Documentation/ABI/testing/sysfs-platform-oxp new file mode 100644 index 000000000000..091269ab2c8c --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-oxp @@ -0,0 +1,13 @@ +What: /sys/devices/platform/<platform>/tt_toggle +Date: Jun 2023 +Ke...
dcc160b3a090b1ffa0710ed72ae325be37298c0e
Analyze and fix the following issue in the Linux kernel code: s390/ap: Introduce ap message buffer pool
Problem Details: There is a need for a do-not-allocate-memory path through the AP bus layer. The pkey layer may be triggered via the in-kernel interface from a protected key crypto algorithm (namely PAES) to convert a secure key into a protected key. This happens in a workqueue context, so sleeping is allowed but memor...
```diff diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 8935b3ee3a33..1e4784e9efd1 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -41,6 +41,7 @@ #include <linux/module.h> #include <asm/uv.h> #include <asm/chsc.h> +#include <linux/mempool.h> #include ...
75680b7cd461b169c7ccd2a0fba7542868b7fce2
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Correct mutex unlock order in job submission
Problem Details: The mutex unlock for vdev->submitted_jobs_lock was incorrectly placed before unlocking file_priv->lock. Change order of unlocks to avoid potential race conditions. Fixes: 5bbccadaf33e ("accel/ivpu: Abort all jobs after command queue unregister") Signed-off-by: Karol Wachowski <karol.wachowski@intel.co...
```diff diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c index e17b3deda201..b28da35c30b6 100644 --- a/drivers/accel/ivpu/ivpu_job.c +++ b/drivers/accel/ivpu/ivpu_job.c @@ -681,8 +681,8 @@ static int ivpu_job_submit(struct ivpu_job *job, u8 priority, u32 cmdq_id) err_erase_xa: xa_erase(&vde...
f2ecc700d1ef53127c14a3463442a8ac2a6a5cf5
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Fix pm related deadlocks in cmdq ioctls
Problem Details: Fix deadlocks in ivpu_cmdq_create_ioctl() and ivpu_cmdq_destroy_ioctl() related to runtime suspend. Runtime suspend acquires file_priv->lock mutex by calling ivpu_cmdq_reset_all_contexts(). The same lock is acquired in the cmdq ioctls. If one of the cmdq ioctls is called while runtime suspend is in pr...
```diff diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c index 863e3cd6ace5..e17b3deda201 100644 --- a/drivers/accel/ivpu/ivpu_job.c +++ b/drivers/accel/ivpu/ivpu_job.c @@ -874,15 +874,21 @@ int ivpu_cmdq_submit_ioctl(struct drm_device *dev, void *data, struct drm_file * int ivpu_cmdq_create_...
c4eb2f88d2796ab90c5430e11c48709716181364
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Increase state dump msg timeout
Problem Details: Increase JMS message state dump command timeout to 100 ms. On some platforms, the FW may take a bit longer than 50 ms to dump its state to the log buffer and we don't want to miss any debug info during TDR. Fixes: 5e162f872d7a ("accel/ivpu: Add FW state dump on TDR") Cc: stable@vger.kernel.org # v6.13...
```diff diff --git a/drivers/accel/ivpu/ivpu_hw.c b/drivers/accel/ivpu/ivpu_hw.c index ec9a3629da3a..633160470c93 100644 --- a/drivers/accel/ivpu/ivpu_hw.c +++ b/drivers/accel/ivpu/ivpu_hw.c @@ -119,7 +119,7 @@ static void timeouts_init(struct ivpu_device *vdev) else vdev->timeout.autosuspend = 100; vdev->tim...
a6fcfe9bb26df18ba7b5c4d064edd13c80ea2466
Analyze and fix the following issue in the Linux kernel code: ovl: make redirect/metacopy rejection consistent
Problem Details: When overlayfs finds a file with metacopy and/or redirect attributes and the metacopy and/or redirect features are not enabled, then it refuses to act on those attributes while also issuing a warning. There was an inconsistency in not checking metacopy found from the index. And also only warning on a...
```diff diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index be5c65d6f848..f010e7456668 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -16,6 +16,7 @@ struct ovl_lookup_data { struct super_block *sb; + struct dentry *dentry; const struct ovl_layer *layer; struct qstr name; bool is_d...
924577e4f6ca473de1528953a0e13505fae61d7b
Analyze and fix the following issue in the Linux kernel code: ovl: Fix nested backing file paths
Problem Details: When the lowerdir of an overlayfs is a merged directory of another overlayfs, ovl_open_realfile() will fail to open the real file and point to a lower dentry copy, without the proper parent path. After this, d_path() will then display the path incorrectly as if the file is placed in the root directory....
```diff diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 969b458100fe..dfea7bd800cb 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -48,8 +48,8 @@ static struct file *ovl_open_realfile(const struct file *file, if (!inode_owner_or_capable(real_idmap, realinode)) flags &= ~O_NOATIME; - ...
68ef71400d0e7a9049c36cd0954ecc67521b0bc8
Analyze and fix the following issue in the Linux kernel code: gpio: imx-scu: destroy the mutex in detach path
Problem Details: Use devm_mutex_init() in order to clean up after the mutex debug data in detach and error path. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-3-b22245cde81a@linaro.org Signed-off-by:...
```diff diff --git a/drivers/gpio/gpio-imx-scu.c b/drivers/gpio/gpio-imx-scu.c index 99df95e65820..cf98b948f804 100644 --- a/drivers/gpio/gpio-imx-scu.c +++ b/drivers/gpio/gpio-imx-scu.c @@ -88,7 +88,10 @@ static int imx_scu_gpio_probe(struct platform_device *pdev) return ret; priv->dev = dev; - mutex_init(&priv...
f00aef8e2ee0b642abdb91682bec5af38532faf7
Analyze and fix the following issue in the Linux kernel code: clk: samsung: exynosautov920: Fix incorrect CLKS_NR_CPUCL0 definition
Problem Details: The CLKS_NR_CPUCL0 macro was incorrectly defined based on a wrong clock ID. It mistakenly referenced CLK_DOUT_CLUSTER0_PERIPHCLK, which corresponds to a cluster peripheral clock, not the last clock ID for CPUCL0 as intended. This patch corrects the definition to use CLK_DOUT_CPUCL0_NOCP + 1, properly ...
```diff diff --git a/drivers/clk/samsung/clk-exynosautov920.c b/drivers/clk/samsung/clk-exynosautov920.c index c1b0203b8cb4..f8168eed4a66 100644 --- a/drivers/clk/samsung/clk-exynosautov920.c +++ b/drivers/clk/samsung/clk-exynosautov920.c @@ -18,7 +18,7 @@ /* NOTE: Must be equal to the last clock ID increased by one...
3e6244429ba38f8dee3336b8b805948276b281ab
Analyze and fix the following issue in the Linux kernel code: riscv: dts: sophgo: fix DMA data-width configuration for CV18xx
Problem Details: The "snps,data-width" property[1] defines the AXI data width of the DMA controller as: width = 8 × (2^n) bits (0 = 8 bits, 1 = 16 bits, 2 = 32 bits, ..., 6 = 512 bits) where "n" is the value of "snps,data-width". For the CV18xx DMA controller, the correct AXI data width is 32 bits, corresponding...
```diff diff --git a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi index c18822ec849f..58cd546392e0 100644 --- a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi @@ -341,7 +341,7 @@ 1024 1024 1024 1024>; snps,priority = <0 1 2 3 4 5 6 7>;...
417fae2c40896f0a67ce7fa7d9b8c6056ec36dd9
Analyze and fix the following issue in the Linux kernel code: xfrm: ipcomp: fix truesize computation on receive
Problem Details: ipcomp_post_acomp currently drops all frags (via pskb_trim_unique(skb, 0)), and then subtracts the old skb->data_len from truesize. This adjustment has already be done during trimming (in skb_condense), so we don't need to do it again. This shows up for example when running fragmented traffic over ipc...
```diff diff --git a/net/xfrm/xfrm_ipcomp.c b/net/xfrm/xfrm_ipcomp.c index 0c1420534394..907c3ccb440d 100644 --- a/net/xfrm/xfrm_ipcomp.c +++ b/net/xfrm/xfrm_ipcomp.c @@ -48,7 +48,6 @@ static int ipcomp_post_acomp(struct sk_buff *skb, int err, int hlen) { struct acomp_req *req = ipcomp_cb(skb)->req; struct ipcomp_...
4d5b71b487291da9f92e352c0a7e39f256d60db8
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Fix built-mic regression on other ASUS models
Problem Details: A few ASUS models use the ALC256_FIXUP_ASUS_HEADSET_MODE although they have no built-in mic pin on NID 0x13, as found in the commit c1732ede5e80 ("ALSA: hda/realtek - Fix headset and mic on several Asus laptops with ALC256"). This was relatively harmless in the past as NID 0x13 was assigned as the sec...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 1799203af35a..7810d5f9b5aa 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10910,10 +10910,10 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM"...
5b39aa368bcfe193666ad4a68ef55f41dfd74028
Analyze and fix the following issue in the Linux kernel code: crypto: s390/sha512 - Fix sha512 state size
Problem Details: The sha512 state size in s390_sha_ctx is out by a factor of 8, fix it so that it stays below HASH_MAX_DESCSIZE. Also fix the state init function which was writing garbage to the state. Luckily this is not actually used for anything other than export. Reported-by: Harald Freudenberger <freude@linux.i...
```diff diff --git a/arch/s390/crypto/sha.h b/arch/s390/crypto/sha.h index 0a3cc1739144..d757ccbce2b4 100644 --- a/arch/s390/crypto/sha.h +++ b/arch/s390/crypto/sha.h @@ -24,7 +24,7 @@ struct s390_sha_ctx { union { u32 state[CPACF_MAX_PARMBLOCK_SIZE / sizeof(u32)]; struct { - u64 state[SHA512_DIGEST_SIZE]; + ...
4d728bb93bab6c2a3c0dc98df8799b668f948b18
Analyze and fix the following issue in the Linux kernel code: perf symbols: Handle 'u' and 'l' symbols in /proc/kallsyms
Problem Details: I started seeing this in recent Fedora 42 kernels: # uname -a Linux number 6.14.3-300.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Apr 20 16:08:39 UTC 2025 x86_64 GNU/Linux # # perf test vmlinux 1: vmlinux symtab matches kallsyms : FAILED! # Where we have Rust...
```diff diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 11540219481b..fe801880afea 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -98,10 +98,12 @@ static enum dso_binary_type binary_type_symtab[] = { #define DSO_BINARY_TYPE__SYMTAB_CNT ARRAY_SIZE(binary_type_symtab) ...
1d0ee0c9df31c9fd1e4f8d7e2464e36fbf6e3f75
Analyze and fix the following issue in the Linux kernel code: spi: axi-spi-engine: wait for completion in setup
Problem Details: Add a polling wait for SPI instruction execution to complete in the spi_engine_setup() function. In practice, these instructions complete in a few 10s of nanoseconds, so we never ran into any race conditions, but it is good practice to wait for the completion of the SPI engine instructions before retur...
```diff diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c index da9840957778..d040deffa9bb 100644 --- a/drivers/spi/spi-axi-spi-engine.c +++ b/drivers/spi/spi-axi-spi-engine.c @@ -14,6 +14,7 @@ #include <linux/fpga/adi-axi-common.h> #include <linux/interrupt.h> #include <linux/io.h> +#...
94602d84163c127ec2374fba0fcb6587a07785ce
Analyze and fix the following issue in the Linux kernel code: ASoC: wm_adsp: Don't use no_free_ptr() when passing to PTR_ERR()
Problem Details: It's no longer necessary to no_free_ptr() an auto-freed pointer before passing it to PTR_ERR(). This was fixed by commit cd7eb8f83fcf ("mm/slab: make __free(kfree) accept error pointers"). Removing the no_free_ptr() avoids the spurious warning "inconsistent IS_ERR and PTR_ERR". Fixes: b5d057a86e20 ("...
```diff diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index a2e9f32209cf..e822979e6a19 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -419,7 +419,7 @@ static int wm_coeff_tlv_put(struct snd_kcontrol *kctl, void *scratch __free(kvfree) = vmemdup_user(bytes, size); ...
00a371adbbfb46db561db85a9d7b53b2363880a1
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: ipc4-pcm: Adjust pipeline_list->pipelines allocation type
Problem Details: In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned t...
```diff diff --git a/sound/soc/sof/ipc4-pcm.c b/sound/soc/sof/ipc4-pcm.c index 1a2841899ff5..52903503cf3b 100644 --- a/sound/soc/sof/ipc4-pcm.c +++ b/sound/soc/sof/ipc4-pcm.c @@ -784,7 +784,8 @@ static int sof_ipc4_pcm_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm /* allocate memory for max number of pi...
114a6e63d9cc11311587773d5db4cf4105cf658f
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: topology: Fix null pointer dereference
Problem Details: The "get_function_tplg_files" function is only applicable to ACPI-based devices (sof_pdata->machine and not sof_pdata->of_machine). Skip this check for OF-based devices to avoid a NULL pointer dereference in snd_sof_load_topology(). Fixes: 6d5997c412cc ("ASoC: SOF: topology: load multiple topologies")...
```diff diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index e19ba94f2c80..5d3ee3a86392 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -2481,7 +2481,7 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file) if (!tplg_files) return -ENOMEM; - if (...
36fd6275818e93d5bc44140d546bf2a45e88feee
Analyze and fix the following issue in the Linux kernel code: spi: spi-qpic-snand: fix NAND_READ_LOCATION_2 register handling
Problem Details: The precomputed value for the NAND_READ_LOCATION_2 register should be stored in 'snandc->regs->read_location2'. Fix the qcom_spi_set_read_loc_first() function accordingly. Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface") Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>...
```diff diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c index ae32c452d0bc..94948c8781e8 100644 --- a/drivers/spi/spi-qpic-snand.c +++ b/drivers/spi/spi-qpic-snand.c @@ -142,7 +142,7 @@ static void qcom_spi_set_read_loc_first(struct qcom_nand_controller *snandc, else if (reg == NAND_READ_LOCA...
8e36fcaa494d7e3fefabb187c4931f107e010cf0
Analyze and fix the following issue in the Linux kernel code: tools: ynl: fix typo in info string
Problem Details: replaces formmated with formatted also corrects grammar by replacing a with an, and capitalises RST Signed-off-by: Ruben Wauters <rubenru09@aol.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250428215541.6029-1-rubenru09@aol.com Signed-off-by: Jakub Kicinski...
```diff diff --git a/tools/net/ynl/pyynl/ynl_gen_rst.py b/tools/net/ynl/pyynl/ynl_gen_rst.py index 6c56d0d726b4..0cb6348e28d3 100755 --- a/tools/net/ynl/pyynl/ynl_gen_rst.py +++ b/tools/net/ynl/pyynl/ynl_gen_rst.py @@ -392,7 +392,7 @@ def parse_arguments() -> argparse.Namespace: def parse_yaml_file(filename: str) ...
aa6dcab1ea92a8a1f5a2ff7dec825f25eeebf17d
Analyze and fix the following issue in the Linux kernel code: net: phy: aquantia: fix commenting format
Problem Details: Comment was erroneously added with /**, amend this to use /* as it is not a kernel-doc. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202504262247.1UBrDBVN-lkp@intel.com/ Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz> Reviewed-by: ...
```diff diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c index 08b1c9cc902b..77a48635d7bf 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -516,8 +516,7 @@ static int aqr105_read_status(struct phy_device *phydev) if...
b5cd5c42a9182cf6602b2a68201d39bd60a2a65e
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: add prefix for Pegatron Corporation
Problem Details: PEGATRON Corporation is a Taiwanese electronics manufacturing company that mainly develops computing, communications and consumer electronics for branded vendors. Link https://www.pegatroncorp.com/ Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link:...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 86f6a19b28ae..75ffaebc749d 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1158,6 +1158,8 @@ pat...
d4d2dc1b590c7416e1cf5fb6750fff2fa841690b
Analyze and fix the following issue in the Linux kernel code: power: supply: cros_charge-control: Avoid -Wflex-array-member-not-at-end warning
Problem Details: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Replace an on-stack definition of a flexible structure with a call to utility function cros_ec_cmd(). So, with these changes, fix the following warning: drivers/power/supply/cros_charge-control....
```diff diff --git a/drivers/power/supply/cros_charge-control.c b/drivers/power/supply/cros_charge-control.c index 02d5bdbe2e8d..53e6a77e03fc 100644 --- a/drivers/power/supply/cros_charge-control.c +++ b/drivers/power/supply/cros_charge-control.c @@ -47,29 +47,20 @@ struct cros_chctl_priv { static int cros_chctl_send_...
b936a9b8d4a585ccb6d454921c36286bfe63e01d
Analyze and fix the following issue in the Linux kernel code: net: ipv6: fix UDPv6 GSO segmentation with NAT
Problem Details: If any address or port is changed, update it in all packets and recalculate checksum. Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.") Signed-off-by: Felix Fietkau <nbd@nbd.name> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250426153210.14044-1-nbd@nbd....
```diff diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index 2c0725583be3..9a8142ccbabe 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -247,6 +247,62 @@ static struct sk_buff *__udpv4_gso_segment_list_csum(struct sk_buff *segs) return segs; } +static void __udpv6_gso_segment_csum...
fc55584e00fc8409cbaef4bcd984016dca6f1b6b
Analyze and fix the following issue in the Linux kernel code: rust: device: conditionally expect `dead_code` for `parent()`
Problem Details: When `CONFIG_AUXILIARY_BUS` is disabled, `parent()` is still dead code: error: method `parent` is never used --> rust/kernel/device.rs:71:19 | 64 | impl<Ctx: DeviceContext> Device<Ctx> { | ------------------------------------ method in this implementation ... 71 | ...
```diff diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs index 40c1f549b0ba..f08583fa39c9 100644 --- a/rust/kernel/device.rs +++ b/rust/kernel/device.rs @@ -68,6 +68,7 @@ impl<Ctx: DeviceContext> Device<Ctx> { } /// Returns a reference to the parent device, if any. + #[cfg_attr(not(CONFIG_AUXIL...
426d487bca38b34f39c483edfc6313a036446b33
Analyze and fix the following issue in the Linux kernel code: net: dsa: felix: fix broken taprio gate states after clock jump
Problem Details: Simplest setup to reproduce the issue: connect 2 ports of the LS1028A-RDB together (eno0 with swp0) and run: $ ip link set eno0 up && ip link set swp0 up $ tc qdisc replace dev swp0 parent root handle 100 taprio num_tc 8 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 map 0 1 2 3 4 5 6 7 \ base-time 0 sche...
```diff diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 940f1b71226d..7b35d24c38d7 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1543,7 +1543,7 @@ static void vsc9959_tas_clock_adjust(struct ocelot *ocelot) struc...
6e0490fc36cdac696f96e57b61d93b9ae32e0f4c
Analyze and fix the following issue in the Linux kernel code: net: ethernet: mtk_eth_soc: fix SER panic with 4GB+ RAM
Problem Details: If the mtk_poll_rx() function detects the MTK_RESETTING flag, it will jump to release_desc and refill the high word of the SDP on the 4GB RFB. Subsequently, mtk_rx_clean will process an incorrect SDP, leading to a panic. Add patch from MediaTek's SDK to resolve this. Fixes: 2d75891ebc09 ("net: ethern...
```diff diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 83068925c589..8fda4ce80d81 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -2248,14 +2248,18 @@ skip_rx: ring->data[idx] = new_data; rx...
c7d6cb96d5c33b5148f3dc76fcd30a9b8cd9e973
Analyze and fix the following issue in the Linux kernel code: igc: fix lock order in igc_ptp_reset
Problem Details: Commit 1a931c4f5e68 ("igc: add lock preventing multiple simultaneous PTM transactions") added a new mutex to protect concurrent PTM transactions. This lock is acquired in igc_ptp_reset() in order to ensure the PTM registers are properly disabled after a device reset. The flow where the lock is acquire...
```diff diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c index 612ed26a29c5..efc7b30e4211 100644 --- a/drivers/net/ethernet/intel/igc/igc_ptp.c +++ b/drivers/net/ethernet/intel/igc/igc_ptp.c @@ -1290,6 +1290,8 @@ void igc_ptp_reset(struct igc_adapter *adapter) /* reset ...
ed375b182140eeb9c73609b17939c8a29b27489e
Analyze and fix the following issue in the Linux kernel code: idpf: protect shutdown from reset
Problem Details: Before the referenced commit, the shutdown just called idpf_remove(), this way IDPF_REMOVE_IN_PROG was protecting us from the serv_task rescheduling reset. Without this flag set the shutdown process is vulnerable to HW reset or any other triggering conditions (such as default mailbox being destroyed). ...
```diff diff --git a/drivers/net/ethernet/intel/idpf/idpf_main.c b/drivers/net/ethernet/intel/idpf/idpf_main.c index bec4a02c5373..b35713036a54 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_main.c +++ b/drivers/net/ethernet/intel/idpf/idpf_main.c @@ -89,6 +89,7 @@ static void idpf_shutdown(struct pci_dev *pdev) { ...
8a558cbda51bef09773c72bf74a32047479110c7
Analyze and fix the following issue in the Linux kernel code: idpf: fix potential memory leak on kcalloc() failure
Problem Details: In case of failing on rss_data->rss_key allocation the function is freeing vport without freeing earlier allocated q_vector_idxs. Fix it. Move from freeing in error branch to goto scheme. Fixes: d4d558718266 ("idpf: initialize interrupts and enable vport") Reviewed-by: Pavan Kumar Linga <pavan.kumar....
```diff diff --git a/drivers/net/ethernet/intel/idpf/idpf_lib.c b/drivers/net/ethernet/intel/idpf/idpf_lib.c index 730a9c7a59f2..82f09b4030bc 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_lib.c +++ b/drivers/net/ethernet/intel/idpf/idpf_lib.c @@ -1113,11 +1113,9 @@ static struct idpf_vport *idpf_vport_alloc(struct ...
7625645e69454f984f09ea450b9eb1293467aa39
Analyze and fix the following issue in the Linux kernel code: bpf: net_sched: Fix using bpf qdisc as default qdisc
Problem Details: Use bpf_try_module_get()/bpf_module_put() instead of try_module_get()/ module_put() when handling default qdisc since users can assign a bpf qdisc to it. To trigger the bug: $ bpftool struct_ops register bpf_qdisc_fq.bpf.o /sys/fs/bpf $ echo bpf_fq > /proc/sys/net/core/default_qdisc Fixes: c824034495...
```diff diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index db6330258dda..c5e3673aadbe 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -208,7 +208,7 @@ static struct Qdisc_ops *qdisc_lookup_default(const char *name) for (q = qdisc_base; q; q = q->next) { if (!strcmp(name, q->id)) { - if ...
4bf593be2e462623c4c34c7e3b604eb3f8f9de45
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fix Sige5 RTC interrupt pin
Problem Details: Someone made a typo when they added the RTC to the Sige5 DTS, which resulted in it using interrupts from GPIO0 B0 instead of GPIO0 A0. The pinctrl entry for it wasn't typoed though, curiously enough. The Sige5 v1.1 schematic was used to verify that GPIO0 A0 is the correct pin for the RTC wakeup interr...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts index 828bde7fab68..314067ba6f3c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts +++ b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts @@ -610,7 +610,7 @@ reg = <0x5...
090a47b4cd2800164c4e6f3b333e8534736960c0
Analyze and fix the following issue in the Linux kernel code: drm/i915/pch: fix warning for coffeelake on SunrisePoint PCH
Problem Details: i915/pch reports a warning on a mini PC which has a CoffeeLake-S GT2 [UHD Graphics 630] [8086:3e92] and an ISA bridge - H110 LPC Controller [8086:a143]. [5.608723] i915 0000:00:02.0: [drm] Found coffeelake (device ID 3e92) integrated display version 9.00 stepping N/A [5.608969] ------------[ cut here ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_pch.c b/drivers/gpu/drm/i915/display/intel_pch.c index 5035b63a4889..469e8a3cfb49 100644 --- a/drivers/gpu/drm/i915/display/intel_pch.c +++ b/drivers/gpu/drm/i915/display/intel_pch.c @@ -125,7 +125,8 @@ intel_pch_type(const struct intel_display *display, unsigned ...
1ce65102d2d3c54862f7b59479135168ed512cd2
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix compilation errors
Problem Details: If the CONFIG_NET_SCH_BPF configuration is not enabled, the BPF test compilation will report the following error: In file included from progs/bpf_qdisc_fq.c:39: progs/bpf_qdisc_common.h:17:51: error: declaration of 'struct bpf_sk_buff_ptr' will not be visible outside of this function [-Werror,-Wvisibil...
```diff diff --git a/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h b/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h index 65a2c561c0bb..7e7f2fe04f22 100644 --- a/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h +++ b/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h @@ -12,6 +12,8 @@ #define priv...
38d976c32d85ef12dcd2b8a231196f7049548477
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix kmem_cache iterator draining
Problem Details: The closing parentheses around the read syscall is misplaced, causing single byte reads from the iterator instead of buf sized reads. While the end result is the same, many more read calls than necessary are performed. $ tools/testing/selftests/bpf/vmtest.sh "./test_progs -t kmem_cache_iter" 145/1 ...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/kmem_cache_iter.c b/tools/testing/selftests/bpf/prog_tests/kmem_cache_iter.c index 8e13a3416a21..1de14b111931 100644 --- a/tools/testing/selftests/bpf/prog_tests/kmem_cache_iter.c +++ b/tools/testing/selftests/bpf/prog_tests/kmem_cache_iter.c @@ -104,7 +104,7 ...
dba7d17d50b4488c697e991d18a0e55669d9fa59
Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Fix guc_info debugfs for VFs
Problem Details: The guc_info debugfs attempts to read a bunch of registers that the VFs doesn't have access to, so fix it by skipping the reads. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4775 Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michal Wajdeczko <michal.wajde...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c index c5aace59b62c..bac5471a1a78 100644 --- a/drivers/gpu/drm/xe/xe_guc.c +++ b/drivers/gpu/drm/xe/xe_guc.c @@ -1510,30 +1510,32 @@ void xe_guc_print_info(struct xe_guc *guc, struct drm_printer *p) xe_uc_fw_print(&guc->fw, p); - fw_ref...
a256ae22570ee4c3427fdc703a58a89afee6a332
Analyze and fix the following issue in the Linux kernel code: bitfield: Add FIELD_MODIFY() helper
Problem Details: Add a helper for replacing the contents of bitfield in memory with the specified value. Even though a helper xxx_replace_bits() is available, it is not well documented, and only reports errors at the run time, which will not be helpful to catch possible overflow errors due to incorrect parameter types...
```diff diff --git a/include/linux/bitfield.h b/include/linux/bitfield.h index 63928f173223..6d9a53db54b6 100644 --- a/include/linux/bitfield.h +++ b/include/linux/bitfield.h @@ -8,6 +8,7 @@ #define _LINUX_BITFIELD_H #include <linux/build_bug.h> +#include <linux/typecheck.h> #include <asm/byteorder.h> /* @@ -38...
243c90e917f5cfc99821e5104d1c8a81c11cda4c
Analyze and fix the following issue in the Linux kernel code: build_bug.h: more user friendly error messages in BUILD_BUG_ON_ZERO()
Problem Details: __BUILD_BUG_ON_ZERO_MSG(), as introduced in [1], makes it possible to do a static assertions in expressions. The direct benefit is to provide a meaningful error message instead of the cryptic negative bitfield size error message currently returned by BUILD_BUG_ON_ZERO(): ./include/linux/build_bug.h:...
```diff diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h index 3aa3640f8c18..2cfbb4c65c78 100644 --- a/include/linux/build_bug.h +++ b/include/linux/build_bug.h @@ -4,17 +4,17 @@ #include <linux/compiler.h> -#ifdef __CHECKER__ -#define BUILD_BUG_ON_ZERO(e) (0) -#else /* __CHECKER__ */ /* * For...
19408200c094858d952a90bf4977733dc89a4df5
Analyze and fix the following issue in the Linux kernel code: bits: introduce fixed-type GENMASK_U*()
Problem Details: Add GENMASK_TYPE() which generalizes __GENMASK() to support different types, and implement fixed-types versions of GENMASK() based on it. The fixed-type version allows more strict checks to the min/max values accepted, which is useful for defining registers like implemented by i915 and xe drivers with ...
```diff diff --git a/include/linux/bitops.h b/include/linux/bitops.h index c1cb53cf2f0f..9be2d50da09a 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -8,7 +8,6 @@ #include <uapi/linux/kernel.h> -#define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE) #define BITS_TO_LONGS(nr) __KERNEL_DIV_R...
e5bf9a4b68fae70e41d1410656490d8ac00c02fe
Analyze and fix the following issue in the Linux kernel code: riscv: switch set_icache_stale_mask() to using non-atomic assign_cpu()
Problem Details: The atomic cpumask_assign_cpu() follows non-atomic cpumask_setall(), which makes the whole operation non-atomic. Fix this by relaxing to non-atomic __assign_cpu(). Fixes: 7c1e5b9690b0e14 ("riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF") Signed-off-by: Yury Norov [NVIDIA] <yury.no...
```diff diff --git a/arch/riscv/mm/cacheflush.c b/arch/riscv/mm/cacheflush.c index b81672729887..b8e96dfff19d 100644 --- a/arch/riscv/mm/cacheflush.c +++ b/arch/riscv/mm/cacheflush.c @@ -172,7 +172,7 @@ static void set_icache_stale_mask(void) stale_cpu = cpumask_test_cpu(cpu, mask); cpumask_setall(mask); - cpumas...
9d4b78df5dc58ba4506e12f1cc92d3bebf0caffa
Analyze and fix the following issue in the Linux kernel code: selftests/perf_events: Fix spelling mistake "sycnhronize" -> "synchronize"
Problem Details: There is a spelling mistake in an error message. Fix it. Link: https://lore.kernel.org/r/20240327110649.283925-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Acked-by: Kyle Huey <khuey@kylehuey.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
```diff diff --git a/tools/testing/selftests/perf_events/watermark_signal.c b/tools/testing/selftests/perf_events/watermark_signal.c index 49dc1e831174..e03fe1b9bba2 100644 --- a/tools/testing/selftests/perf_events/watermark_signal.c +++ b/tools/testing/selftests/perf_events/watermark_signal.c @@ -75,7 +75,7 @@ TEST(wa...
8988c4b91945173a6b5505764915d470f0238fdc
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix in-source libperf build
Problem Details: When libperf is built alone in-source, $(OUTPUT) isn't set. This causes the generated uapi path to resolve to '/../arch' which results in a permissions error: mkdir: cannot create directory '/../arch': Permission denied Fix it by removing the preceding '/..' which means that it gets generated eithe...
```diff diff --git a/tools/lib/perf/Makefile b/tools/lib/perf/Makefile index 1a19b5013f45..7fbb50b74c00 100644 --- a/tools/lib/perf/Makefile +++ b/tools/lib/perf/Makefile @@ -42,7 +42,7 @@ libdir_relative_SQ = $(subst ','\'',$(libdir_relative)) TEST_ARGS := $(if $(V),-v) INCLUDES = \ --I$(OUTPUT)/../arch/$(SRCARCH)...
b23285e93bef729e67519a5209d5b7fde3b4af50
Analyze and fix the following issue in the Linux kernel code: net: mdio: mux-meson-gxl: set reversed bit when using internal phy
Problem Details: This bit is necessary to receive packets from the internal PHY. Without this bit set, no activity occurs on the interface. Normally u-boot sets this bit, but if u-boot is compiled without net support, the interface will be up but without any activity. If bit is set once, it will work until the IP is p...
```diff diff --git a/drivers/net/mdio/mdio-mux-meson-gxl.c b/drivers/net/mdio/mdio-mux-meson-gxl.c index 00c66240136b..3dd12a8c8b03 100644 --- a/drivers/net/mdio/mdio-mux-meson-gxl.c +++ b/drivers/net/mdio/mdio-mux-meson-gxl.c @@ -17,6 +17,7 @@ #define REG2_LEDACT GENMASK(23, 22) #define REG2_LEDLINK GENMASK(25, ...
e7e5ae71831c44d58627a991e603845a2fed2cab
Analyze and fix the following issue in the Linux kernel code: net: dlink: Correct endianness handling of led_mode
Problem Details: As it's name suggests, parse_eeprom() parses EEPROM data. This is done by reading data, 16 bits at a time as follows: for (i = 0; i < 128; i++) ((__le16 *) sromdata)[i] = cpu_to_le16(read_eeprom(np, i)); sromdata is at the same memory location as psrom. And the type of psrom is a po...
```diff diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c index d88fbecdab4b..232e839a9d07 100644 --- a/drivers/net/ethernet/dlink/dl2k.c +++ b/drivers/net/ethernet/dlink/dl2k.c @@ -352,7 +352,7 @@ parse_eeprom (struct net_device *dev) eth_hw_addr_set(dev, psrom->mac_addr); if (np...
0759e77a6d9bd34a874da73721ce4a7dc6665023
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Fix duplicated name in MIDI substream names
Problem Details: The MIDI substream name string is constructed from the combination of the card shortname (which is taken from USB iProduct) and the USB iJack. The problem is that some devices put the product name to the iJack field, too. For example, aplaymidi -l output on the Lanchkey MK 49 are like: % aplaymidi...
```diff diff --git a/sound/usb/midi.c b/sound/usb/midi.c index dcdd7e9e1ae9..cfed000f243a 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c @@ -1885,10 +1885,18 @@ static void snd_usbmidi_init_substream(struct snd_usb_midi *umidi, } port_info = find_port_info(umidi, number); - name_format = port_info ? port_in...
eed848871c96d4b5a7b06307755b75abd0cc7a06
Analyze and fix the following issue in the Linux kernel code: crypto/krb5: Fix change to use SG miter to use offset
Problem Details: The recent patch to make the rfc3961 simplified code use sg_miter rather than manually walking the scatterlist to hash the contents of a buffer described by that scatterlist failed to take the starting offset into account. This is indicated by the selftests reporting: krb5: Running aes128-cts-hma...
```diff diff --git a/crypto/krb5/rfc3961_simplified.c b/crypto/krb5/rfc3961_simplified.c index 79180d28baa9..e49cbdec7c40 100644 --- a/crypto/krb5/rfc3961_simplified.c +++ b/crypto/krb5/rfc3961_simplified.c @@ -89,6 +89,7 @@ int crypto_shash_update_sg(struct shash_desc *desc, struct scatterlist *sg, sg_miter_start(...
f64cf7b681af72d3f715c0d0fd72091a54471c1a
Analyze and fix the following issue in the Linux kernel code: drm/gpusvm: set has_dma_mapping inside mapping loop
Problem Details: The 'has_dma_mapping' flag should be set once there is a mapping so it could be unmapped in case of error. v2: - Resend for CI Fixes: 99624bdff867 ("drm/gpusvm: Add support for GPU Shared Virtual Memory") Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@intel.com> Reviewed-by: Matthew Brost <matthew...
```diff diff --git a/drivers/gpu/drm/drm_gpusvm.c b/drivers/gpu/drm/drm_gpusvm.c index 38431e8360e7..de424e670995 100644 --- a/drivers/gpu/drm/drm_gpusvm.c +++ b/drivers/gpu/drm/drm_gpusvm.c @@ -1469,9 +1469,9 @@ map_pages: } i += 1 << order; num_dma_mapped = i; + range->flags.has_dma_mapping = true; } - ...
e38be1c7647c8c78304ce6d931b3b654e27948b3
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix rq lock state in hotplug ops
Problem Details: The ops.cpu_online() and ops.cpu_offline() callbacks incorrectly assume that the rq involved in the operation is locked, which is not the case during hotplug, triggering the following warning: WARNING: CPU: 1 PID: 20 at kernel/sched/sched.h:1504 handle_hotplug+0x280/0x340 Fix by not tracking the ta...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index dddb0af36f8d..4e37b40ce280 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -3477,9 +3477,9 @@ static void handle_hotplug(struct rq *rq, bool online) scx_idle_update_selcpu_topology(&scx_ops); if (online && SCX_HAS_OP(cpu_online)) - S...