id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
cb81deefb59de01325ab822f900c13941bfaf67f
Analyze and fix the following issue in the Linux kernel code: x86/idle: Sanitize X86_BUG_AMD_E400 handling
Problem Details: amd_e400_idle(), the idle routine for AMD CPUs which are affected by erratum 400 violates the RCU constraints by invoking tick_broadcast_enter() and tick_broadcast_exit() after the core code has marked RCU non-idle. The functions can end up in lockdep or tracing, which rightfully triggers a RCU warnin...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 502986237cb6..080265369f8e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -147,6 +147,7 @@ config X86 select EDAC_ATOMIC_SCRUB select EDAC_SUPPORT select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC) + select GENERIC_C...
784c93e3ca2e55d917fbb53d1f1ed3f51dd89165
Analyze and fix the following issue in the Linux kernel code: ARM: dts: samsung: exynos4412: decrease memory to account for unusable region
Problem Details: The last 4 MiB of RAM on those devices is likely used by trustzone firmware, and is unusable under Linux. Change the device tree memory node accordingly. The proprietary bootloader (S-BOOT) passes these memory ranges through ATAG_MEM; this change allows us to have the correct memory ranges without rel...
```diff diff --git a/arch/arm/boot/dts/samsung/exynos4412-i9300.dts b/arch/arm/boot/dts/samsung/exynos4412-i9300.dts index 61aca5798f38..b79d456e976d 100644 --- a/arch/arm/boot/dts/samsung/exynos4412-i9300.dts +++ b/arch/arm/boot/dts/samsung/exynos4412-i9300.dts @@ -18,7 +18,7 @@ memory@40000000 { device_type = ...
2761ece8935fbf2fddb8daad0b9f11c045a922f4
Analyze and fix the following issue in the Linux kernel code: btrfs: introduce offload_csum_mode to tweak checksum offloading behavior
Problem Details: We disable offloading checksum to workqueues and do it synchronously when the checksum algorithm is fast. However, as reported in the link below, RAID0 with multiple devices may suffer from the sync checksum, because "fast checksum" is still not fast enough to catch up with RAID0 writing. We don't hav...
```diff diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index 960b81718e29..477f350a8bd0 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -608,8 +608,20 @@ static void run_one_async_done(struct btrfs_work *work, bool do_free) static bool should_async_write(struct btrfs_bio *bbio) { + bool auto_csum_mode = true; + +...
b2324e08b8b3b38bb86ba779970b0caab32ef0ed
Analyze and fix the following issue in the Linux kernel code: btrfs: raid56: extra debugging for raid6 syndrome generation
Problem Details: [BUG] I have got at least two crash report for RAID6 syndrome generation, no matter if it's AVX2 or SSE2, they all seems to have a similar calltrace with corrupted RAX: BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x00...
```diff diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 5c4bf3f907c1..6f4a9cfeea44 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -917,6 +917,13 @@ static struct btrfs_raid_bio *alloc_rbio(struct btrfs_fs_info *fs_info, */ ASSERT(stripe_nsectors <= BITS_PER_LONG); + /* + * Real stripes must ...
f40a3ea94881f668084f68f6b9931486b1606db0
Analyze and fix the following issue in the Linux kernel code: btrfs: delete pointless BUG_ON check on quota root in btrfs_qgroup_account_extent()
Problem Details: The BUG_ON is deep in the qgroup code where we can expect that it exists. A NULL pointer would cause a crash. It was added long ago in 550d7a2ed5db35 ("btrfs: qgroup: Add new qgroup calculation function btrfs_qgroup_account_extents()."). It maybe made sense back then as the quota enable/disable state ...
```diff diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index cfe366110a69..044331228bd0 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -2861,8 +2861,6 @@ int btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans, u64 bytenr, if (nr_old_roots == 0 && nr_new_roots == 0) goto out_free; - BUG_O...
bdc0f89e068a610909579f3d1fc8cf4d54600be3
Analyze and fix the following issue in the Linux kernel code: btrfs: reduce inode lock critical section when setting and clearing delalloc
Problem Details: When setting and clearing a delalloc range, at btrfs_set_delalloc_extent() and btrfs_clear_delalloc_extent(), we are adding/removing the inode to/from the root's list of delalloc inodes while under the protection of the inode's lock. This however is not needed, we can add and remove the inode to the ro...
```diff diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 4d8c2c5ece01..a35adc06ce0c 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -60,7 +60,6 @@ enum { */ BTRFS_INODE_NEEDS_FULL_SYNC, BTRFS_INODE_COPY_EVERYTHING, - BTRFS_INODE_IN_DELALLOC_LIST, BTRFS_INODE_HAS_PROPS, ...
5693a1286aa697fadf8fc8c7abef122ec90ee10c
Analyze and fix the following issue in the Linux kernel code: btrfs: add forward declarations and headers, part 3
Problem Details: Do a cleanup in the rest of the headers: - add forward declarations for types referenced by pointers - add includes when types need them This fixes potential compilation problems if the headers are reordered or the missing includes are not provided indirectly. Signed-off-by: David Sterba <dsterba@su...
```diff diff --git a/fs/btrfs/accessors.h b/fs/btrfs/accessors.h index ed7aa32972ad..fa099f61fc8c 100644 --- a/fs/btrfs/accessors.h +++ b/fs/btrfs/accessors.h @@ -3,8 +3,17 @@ #ifndef BTRFS_ACCESSORS_H #define BTRFS_ACCESSORS_H -#include <linux/stddef.h> #include <asm/unaligned.h> +#include <linux/stddef.h> +#incl...
602035d7fecf4d00c75c2ca5b956fa44136c3b86
Analyze and fix the following issue in the Linux kernel code: btrfs: add forward declarations and headers, part 2
Problem Details: Do a cleanup in more headers: - add forward declarations for types referenced by pointers - add includes when types need them This fixes potential compilation problems if the headers are reordered or the missing includes are not provided indirectly. Signed-off-by: David Sterba <dsterba@suse.com>
```diff diff --git a/fs/btrfs/bio.h b/fs/btrfs/bio.h index bbaed317161a..d9dd5276093d 100644 --- a/fs/btrfs/bio.h +++ b/fs/btrfs/bio.h @@ -7,12 +7,14 @@ #ifndef BTRFS_BIO_H #define BTRFS_BIO_H +#include <linux/types.h> #include <linux/bio.h> #include <linux/workqueue.h> #include "tree-checker.h" struct btrfs_...
22b46bdc5f11c0d3502fbc180cd83a1b5ab3d23d
Analyze and fix the following issue in the Linux kernel code: btrfs: add forward declarations and headers, part 1
Problem Details: Do a cleanup in the short headers: - add forward declarations for types referenced by pointers - add includes when types need them This fixes potential compilation problems if the headers are reordered or the missing includes are not provided indirectly. Signed-off-by: David Sterba <dsterba@suse.com...
```diff diff --git a/fs/btrfs/acl.h b/fs/btrfs/acl.h index a270e71ec05f..48b9ddae4a46 100644 --- a/fs/btrfs/acl.h +++ b/fs/btrfs/acl.h @@ -3,8 +3,15 @@ #ifndef BTRFS_ACL_H #define BTRFS_ACL_H +struct posix_acl; +struct inode; +struct btrfs_trans_handle; + #ifdef CONFIG_BTRFS_FS_POSIX_ACL +struct mnt_idmap; +stru...
e383e158ed1b6abc2d2d3e6736d77a46393f80fa
Analyze and fix the following issue in the Linux kernel code: btrfs: preallocate temporary extent buffer for inode logging when needed
Problem Details: When logging an inode and we require to copy items from subvolume leaves to the log tree, we clone each subvolume leaf and than use that clone to copy items to the log tree. This is required to avoid possible deadlocks as stated in commit 796787c978ef ("btrfs: do not modify log tree while holding a lea...
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 4bca37fd6833..78c3ef68caa3 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1910,6 +1910,8 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) goto out_release_extents; } + btrfs_init_log_ctx_scratch_eb(&ctx); + /*...
edebd19a4ad032498914d790737b14766ae743cb
Analyze and fix the following issue in the Linux kernel code: btrfs: add comment about list_is_singular() use at btrfs_delete_unused_bgs()
Problem Details: At btrfs_delete_unused_bgs(), the use of the list_is_singular() check on a block group may not be immediately obvious. It is there to prevent losing raid profile information for a block group type (data, metadata or system), as that information is removed from fs_info->avail_[data|metadata|system]_allo...
```diff diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index e9e455fd528a..78cae9f9deca 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -1522,6 +1522,13 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info) * outstanding allocations in this block group. We do * the ...
835cd82649aa5d33045fbf6b393bddc3812e9a10
Analyze and fix the following issue in the Linux kernel code: btrfs: zlib: Fix spelling mistake "infalte" -> "inflate"
Problem Details: There is a spelling mistake in a warning message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
```diff diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c index 8da66ea699e8..e5b3f2003896 100644 --- a/fs/btrfs/zlib.c +++ b/fs/btrfs/zlib.c @@ -398,7 +398,7 @@ int zlib_decompress(struct list_head *ws, const u8 *data_in, out: if (unlikely(to_copy != destlen)) { - pr_warn_ratelimited("BTRFS: infalte failed, decompr...
56596a9fdd935dbeccd3027863d7f5988f452f95
Analyze and fix the following issue in the Linux kernel code: btrfs: zstd: fix and simplify the inline extent decompression (v2)
Problem Details: Note: this is a fixed version that was previously reverted as e01a83e12604 ("Revert "btrfs: zstd: fix and simplify the inline extent decompression""), with fixed parameters to memzero_page(). [BUG] If we have a filesystem with 4k sectorsize, and an inlined compressed extent created like this: item 4...
```diff diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index afd7e50d073d..97fe3ebf11a2 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h @@ -169,7 +169,7 @@ int zstd_compress_pages(struct list_head *ws, struct address_space *mapping, unsigned long *total_in, unsigned long *total_out); ...
8fd2b12e6a414b383692c7f5ca05ab75204bdece
Analyze and fix the following issue in the Linux kernel code: btrfs: WARN_ON_ONCE() in our leak detection code
Problem Details: fstests looks for WARN_ON's in dmesg. Add WARN_ON_ONCE() to our leak detection code (enabled only in debug builds) so that fstests will fail if these things trip at all. This will allow us to easily catch problems with our reference counting that may otherwise go unnoticed. Reviewed-by: Neal Gompa <...
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index f405cc278861..bcd35be4b841 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1244,6 +1244,7 @@ void btrfs_check_leaked_roots(struct btrfs_fs_info *fs_info) btrfs_err(fs_info, "leaked root %s refcount %d", btrfs_root_name(&root->root_...
a0d1cf479c5b2d93fbe18a8d675105d1d24f1360
Analyze and fix the following issue in the Linux kernel code: drm/dp: Fix documentation of DP tunnel functions
Problem Details: Fix the documentation issues below, also reported by 'make htmldocs': drivers/gpu/drm/display/drm_dp_tunnel.c:447: warning: Function parameter or struct member 'tunnel' not described in 'drm_dp_tunnel_put' drivers/gpu/drm/display/drm_dp_tunnel.c:447: warning: Function parameter or struct member 'track...
```diff diff --git a/drivers/gpu/drm/display/drm_dp_tunnel.c b/drivers/gpu/drm/display/drm_dp_tunnel.c index 120e0de674c1..017f1d4c6341 100644 --- a/drivers/gpu/drm/display/drm_dp_tunnel.c +++ b/drivers/gpu/drm/display/drm_dp_tunnel.c @@ -436,8 +436,8 @@ EXPORT_SYMBOL(drm_dp_tunnel_get); /** * drm_dp_tunnel_put - ...
6717ff5533f332ef7294655629b8fa5fb8b132de
Analyze and fix the following issue in the Linux kernel code: regulator: rk808: fix LDO range on RK806
Problem Details: The linear ranges aren't really matching what they should be. Indeed, the range is inclusive of the min value, so it makes sense the previous range does NOT include the max step value representing the min value of the range in question. Since 3.4V is represented by the decimal value 232, the previous ...
```diff diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index bfab5468cc54..d89ae7f16d7a 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -1023,8 +1023,8 @@ static const struct linear_range rk806_buck_voltage_ranges[] = { }; static ...
5803b54068435be3a3254f9ecdc1ebd5c18718a8
Analyze and fix the following issue in the Linux kernel code: regulator: rk808: fix buck range on RK806
Problem Details: The linear ranges aren't really matching what they should be. Indeed, the range is inclusive of the min value, so it makes sense the previous range does NOT include the max step value representing the min value of the range in question. Since 1.5V is represented by the decimal value 160, the previous ...
```diff diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index e374fa6e5f28..bfab5468cc54 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -1017,9 +1017,9 @@ static const struct regulator_desc rk805_reg[] = { }; static const struct l...
e62d2e00780b4a465c77d2229837495fcbc480d3
Analyze and fix the following issue in the Linux kernel code: drm/xe: Replace 'grouped target' in Makefile with pattern rule
Problem Details: Since 'grouped target' is used only in 'make' 4.3, it should be avoided. Replace it with 'multi-target pattern rule' which has the same behavior. Fixes: 9616e74b796c ("drm/xe: Add support for OOB workarounds") Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai> Reviewed-by: Lucas De Marchi <lucas....
```diff diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index 1a59c15f4d66..5a428ca00f10 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -42,7 +42,8 @@ generated_oob := $(obj)/generated/xe_wa_oob.c $(obj)/generated/xe_wa_oob.h quiet_cmd_wa_oob = GEN $(notdir $(g...
f7da398935f7ddabf1a098714593e032c875cd74
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix ref counting leak on page fault
Problem Details: If a page fault occurs on VM not in fault a ref can be leaked. Fix this. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/p...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_pagefault.c b/drivers/gpu/drm/xe/xe_gt_pagefault.c index c26e4fcca01e..73c535193a98 100644 --- a/drivers/gpu/drm/xe/xe_gt_pagefault.c +++ b/drivers/gpu/drm/xe/xe_gt_pagefault.c @@ -146,10 +146,12 @@ static int handle_pagefault(struct xe_gt *gt, struct pagefault *pf) /* AS...
c6f6750bd2566a9b06e0ae8a68597168d38da475
Analyze and fix the following issue in the Linux kernel code: drm/xe: Remove obsolete async_ops from struct xe_vm
Problem Details: When sync binds were reworked and worker removed, async_ops became obsolete. Remove it. Fixes: f3e9b1f43458 ("drm/xe: Remove async worker and rework sync binds") Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Signed-off-by: Rodrigo...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h index 7d4f810f9c04..292f8cadb40f 100644 --- a/drivers/gpu/drm/xe/xe_vm_types.h +++ b/drivers/gpu/drm/xe/xe_vm_types.h @@ -189,30 +189,6 @@ struct xe_vm { */ struct xe_range_fence_tree rftree[XE_MAX_TILES_PER_DEVICE]; - /** @...
9eeeed8d7e1db88b3611585dd630beb9efb1ee7b
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Fix missing topology init
Problem Details: init_steering_dss need topology dss mask to be init ahead. Fixed by moving xe_gt_topology_init ahead of xe_gt_mcr_init Fixes: bf8ec3c3e82c ("drm/xe: Initialize GuC earlier during probe") Cc: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com> Reviewed-by:...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c index b75f0bf0a9a1..a0afe1ba6dd5 100644 --- a/drivers/gpu/drm/xe/xe_gt.c +++ b/drivers/gpu/drm/xe/xe_gt.c @@ -314,8 +314,6 @@ int xe_gt_init_early(struct xe_gt *gt) if (err) return err; - xe_gt_topology_init(gt); - err = xe_force_wake...
45cfade303335c486300b81e62caefffa843f585
Analyze and fix the following issue in the Linux kernel code: drm/xe/xe2: fix 64-bit division in pte_update_size
Problem Details: This function does not build on 32-bit targets when the compiler fails to reduce DIV_ROUND_UP() into a shift: ld.lld: error: undefined symbol: __aeabi_uldivmod >>> referenced by xe_migrate.c >>> drivers/gpu/drm/xe/xe_migrate.o:(pte_update_size) in archive vmlinux.a There are two instanc...
```diff diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c index a66fdf2d2991..ee1bb938c493 100644 --- a/drivers/gpu/drm/xe/xe_migrate.c +++ b/drivers/gpu/drm/xe/xe_migrate.c @@ -462,7 +462,7 @@ static u32 pte_update_size(struct xe_migrate *m, } else { /* Clip L0 to available size */ ...
d1d95985ab66b6605286bc00d757054ce22f7d1d
Analyze and fix the following issue in the Linux kernel code: drm/xe/kunit: fix link failure with built-in xe
Problem Details: When the driver is built-in but the tests are in loadable modules, the helpers don't actually get put into the driver: ERROR: modpost: "xe_kunit_helper_alloc_xe_device" [drivers/gpu/drm/xe/tests/xe_test.ko] undefined! Change the Makefile to ensure they are always part of the driver even when the rest...
```diff diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 0e31dfb8989e..1a556d087e63 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -10,6 +10,7 @@ config DRM_XE select DRM_BUDDY select DRM_EXEC select DRM_KMS_HELPER + select DRM_KUNIT_TEST_HELPERS if DRM_XE_KU...
c2b24812f7bc5fbd6f2f92af070856fbe4c37b40
Analyze and fix the following issue in the Linux kernel code: perf: starfive: Add StarLink PMU support
Problem Details: This patch adds support for StarFive's StarLink PMU (Performance Monitor Unit). StarLink PMU integrates one or more CPU cores with a shared L3 memory system. The PMU supports overflow interrupt, up to 16 programmable 64bit event counters, and an independent 64bit cycle counter. StarLink PMU is accessed...
```diff diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig index ec6e0d9194a1..2774b18f4e27 100644 --- a/drivers/perf/Kconfig +++ b/drivers/perf/Kconfig @@ -86,6 +86,15 @@ config RISCV_PMU_SBI full perf feature support i.e. counter overflow, privilege mode filtering, counter configuration. +config STARF...
2fbf96ed883adcdf0f641cfe07e695dac7e5d540
Analyze and fix the following issue in the Linux kernel code: drivers/perf: hisi_pcie: Relax the check on related events
Problem Details: If we use two events with the same filter and related event type (see the following example), the driver check whether they are related events and are in the same group, otherwise the function hisi_pcie_pmu_find_related_event() return -EINVAL, then the 2nd event cannot count but the 1st event is runnin...
```diff diff --git a/drivers/perf/hisilicon/hisi_pcie_pmu.c b/drivers/perf/hisilicon/hisi_pcie_pmu.c index b2dde7559639..5b15f3698188 100644 --- a/drivers/perf/hisilicon/hisi_pcie_pmu.c +++ b/drivers/perf/hisilicon/hisi_pcie_pmu.c @@ -409,14 +409,10 @@ static int hisi_pcie_pmu_find_related_event(struct hisi_pcie_pmu *p...
b6693ad68e2725a61d628f077e75eb3c31b9ea44
Analyze and fix the following issue in the Linux kernel code: drivers/perf: hisi_pcie: Fix incorrect counting under metric mode
Problem Details: The metric counting shows incorrect results if the events in the metric group using the same event but different filter options. This is because we only judge the event code to decide whether the event in the metric group should share the same hardware counter, but ignore the settings of the filter. F...
```diff diff --git a/drivers/perf/hisilicon/hisi_pcie_pmu.c b/drivers/perf/hisilicon/hisi_pcie_pmu.c index 2468cf3b007c..9176242eadb3 100644 --- a/drivers/perf/hisilicon/hisi_pcie_pmu.c +++ b/drivers/perf/hisilicon/hisi_pcie_pmu.c @@ -314,10 +314,16 @@ static bool hisi_pcie_pmu_valid_filter(struct perf_event *event, ...
e10b6976f6b9afdf3564f88c851e42d139bb19c0
Analyze and fix the following issue in the Linux kernel code: drivers/perf: hisi: Enable HiSilicon Erratum 162700402 quirk for HIP09
Problem Details: HiSilicon UC PMU v2 suffers the erratum 162700402 that the PMU counter cannot be set due to the lack of clock under power saving mode. This will lead to error or inaccurate counts. The clock can be enabled by the PMU global enabling control. This patch tries to fix this by set the UC PMU enable before...
```diff diff --git a/drivers/perf/hisilicon/hisi_uncore_uc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_uc_pmu.c index 636fb79647c8..481dcc9e8fbf 100644 --- a/drivers/perf/hisilicon/hisi_uncore_uc_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_uc_pmu.c @@ -287,12 +287,52 @@ static u64 hisi_uc_pmu_read_counter(struct hisi...
07fba2277fcedd0948bec657f76ef374d0157d93
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: remove TDLS peers on link deactivation
Problem Details: If a link is deactivated, we really cannot sustain any TDLS connections on that link any more. With the API now changed, fix this issue and remove TDLS connections. Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Lin...
```diff diff --git a/net/mac80211/link.c b/net/mac80211/link.c index 87a413374ece..685ec66b4264 100644 --- a/net/mac80211/link.c +++ b/net/mac80211/link.c @@ -356,7 +356,7 @@ static int _ieee80211_set_active_links(struct ieee80211_sub_if_data *sdata, link = sdata_dereference(sdata->link[link_id], sdata); - /* F...
85977fc0aa489420709779cbc859966db94be68f
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: remove TDLS peers only on affected link
Problem Details: If a link does CSA, or if it changes SMPS mode, we need to drop the TDLS peers, but we really should drop them only on the affected link. Fix that. Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://msgid....
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 3a9d2ceec752..f03452dc716d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3242,7 +3242,7 @@ int __ieee80211_request_smps_mgd(struct ieee80211_sub_if_data *sdata, if (err) link->u.mgd.req_smps = old_req; else if (smps_mode != IEEE802...
25703adf45f8430ec59effa20920c80139d13cdc
Analyze and fix the following issue in the Linux kernel code: libbpf: Correct debug message in btf__load_vmlinux_btf
Problem Details: In the function btf__load_vmlinux_btf, the debug message incorrectly refers to 'path' instead of 'sysfs_btf_path'. Signed-off-by: Chen Shen <peterchenshen@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/bp...
```diff diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c index a17b4c9c4213..2d0840ef599a 100644 --- a/tools/lib/bpf/btf.c +++ b/tools/lib/bpf/btf.c @@ -4968,7 +4968,7 @@ struct btf *btf__load_vmlinux_btf(void) pr_warn("failed to read kernel BTF from '%s': %d\n", sysfs_btf_path, err); return libbpf_err_pt...
fdf0df8c936c0822570e067009dee6824ff3a2be
Analyze and fix the following issue in the Linux kernel code: bus: bt1-apb: Remove duplicate include
Problem Details: ./drivers/bus/bt1-apb.c: linux/clk.h is included more than once. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8312 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Acked-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: ...
```diff diff --git a/drivers/bus/bt1-apb.c b/drivers/bus/bt1-apb.c index e97c1d1c7578..595fb22b73e0 100644 --- a/drivers/bus/bt1-apb.c +++ b/drivers/bus/bt1-apb.c @@ -22,7 +22,6 @@ #include <linux/clk.h> #include <linux/reset.h> #include <linux/time64.h> -#include <linux/clk.h> #include <linux/sysfs.h> #define A...
6810ee918d23f67170f127a848cf30c257adcaff
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: update scratch_pos after defrag
Problem Details: The scratch_pos update here was lost after defrag, so any other uses of the scratch buffer might overwrite it. Fixes: a286de1aa38f ("wifi: mac80211: Rename multi_link") Reviewed-by: Benjamin Berg <benjamin.berg@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Miriam Rachel Korenbli...
```diff diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c index 196a882e4c19..233c761823d3 100644 --- a/net/mac80211/parse.c +++ b/net/mac80211/parse.c @@ -800,6 +800,7 @@ static void ieee80211_mle_parse_link(struct ieee802_11_elems *elems, elems->ml_basic = (const void *)elems->scratch_pos; elems->ml_basi...
0e3a22389defd20215657f0442ae109b160f2eee
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: Adjust CQM handling for MLO
Problem Details: The CQM handling did not consider the MLO case and thus notified a not-existing link with the CQM change. To fix this, propagate the CQM notification to all the active links (handling both the non-MLO and MLO cases). TODO: this currently propagates the same configuration to all links regardless of the...
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 734368fd3f97..b9c1ec2f9cfc 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3290,33 +3290,57 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, return 0; } +static void ieee80211_set_cqm_rssi_link(struct...
7d8b02592d528b073805af752458a589862b5eb0
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: obtain AP HT/VHT data for assoc request
Problem Details: In the association request, we make some parameters depend on the AP's HT/VHT information. This was broken by my code because it no longer filled that information, making it all zero. For HT that meant we wouldn't reduce our capabilities to 20 MHz if needed, and for VHT we lost beamforming capabilitie...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a2dca15d9c2e..2c72d4d0fc25 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8049,6 +8049,67 @@ ieee80211_setup_assoc_link(struct ieee80211_sub_if_data *sdata, } } +static int +ieee80211_mgd_get_ap_ht_vht_capa(struct ieee80211_sub_if...
bf7bc8c5974b78a09f266be3a5a84ed3865f30a6
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: don't add VHT capa on links without them
Problem Details: When a link doesn't have VHT capability, before the rework we'd have set IEEE80211_CONN_DISABLE_VHT, but now with the linear progression of 'mode', we no longer have that. Add an explicit check for VHT being supported, so we don't add a zeroed VHT capabilities element where it shouldn't be. Fixes: 310...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c60d23da91fe..a2dca15d9c2e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1319,7 +1319,8 @@ static size_t ieee80211_assoc_link_elems(struct ieee80211_sub_if_data *sdata, offset); if (sband->band != NL80211_BAND_6GHZ && - ...
9ad7974856926129f190ffbe3beea78460b3b7cc
Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: check A-MSDU format more carefully
Problem Details: If it looks like there's another subframe in the A-MSDU but the header isn't fully there, we can end up reading data out of bounds, only to discard later. Make this a bit more careful and check if the subframe header can even be present. Reported-by: syzbot+d050d437fe47d479d210@syzkaller.appspotmail.c...
```diff diff --git a/net/wireless/util.c b/net/wireless/util.c index 379f742fd741..2bde8a354631 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -791,15 +791,19 @@ ieee80211_amsdu_subframe_length(void *field, u8 mesh_flags, u8 hdr_type) bool ieee80211_is_valid_amsdu(struct sk_buff *skb, u8 mesh_hdr) { ...
4223675d2b5912060a85e48fd8fee51207e00957
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: Add missing MODULE_FIRMWARE() for *.pnvm
Problem Details: A few models require *.pnvm files while we don't declare them via MODULE_FIRMWARE(). This resulted in the breakage of WiFi on the system that relies on the information from modinfo (e.g. openSUSE installer image). This patch adds those missing MODULE_FIRMWARE() entries for *.pnvm files. type=feature...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c index 2e530fc928a4..25952d0bea99 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c @@ -299,3 +299,9 @@ MODULE_FIRMWARE(IWL_MA_B_HR_B_FW_MODU...
a8bca3e9371dc5e276af4168be099b2a05554c2a
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: track capability/opmode NSS separately
Problem Details: We're currently tracking rx_nss for each station, and that is meant to be initialized to the capability NSS and later reduced by the operating mode notification NSS. However, we're mixing up capabilities and operating mode NSS in the same variable. This forces us to recalculate the NSS capability on o...
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 0744113f3535..3aa96898a250 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1867,7 +1867,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, sband->band); } - ieee80211_sta_set_rx_nss(link_sta); + ieee802...
b73229331ed5dad6479cc3ae9c61d861d5c1f2a2
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix supported rate masking in scan
Problem Details: We have an nl80211 attribute to mask supported rates from probe responses in scanning, e.g. for use in P2P, but in the refactoring I stopped applying this mask. Restore it. Fixes: 07095d167749 ("wifi: mac80211: start building elements in SKBs") Link: https://msgid.link/20240301175451.7ad8ab0bd90c.I46b...
```diff diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 627bd5a8bda5..f810b83a390a 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1216,8 +1216,8 @@ static int ieee80211_put_preq_ies_band(struct sk_buff *skb, if (band == NL80211_BAND_S1GHZ) return ieee80211_put_s1g_cap(skb, &sband->s1g_...
2a705bc314961e9b3eb8561645b7704ff278f032
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: check link exists before use
Problem Details: If the assoc link doesn't exist yet at this point, we cannot use it yet. This isn't normally the case, but e.g. in case of FT-DS (or just broken userspace) the link might not be set up yet and will only be created later in this function. Check that the link exists. Fixes: 310c8387c638 ("wifi: mac80211...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 89c4165f2753..c60d23da91fe 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8173,7 +8173,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, eth_random_addr(assoc_data->link[i].addr); sband = local->hw.wiphy->bands...
01ad6b7be1d259cdf638eaed5c1b122d043f82bd
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: always initialize match_auth
Problem Details: My previous patch only initialized match_auth when the ifmgd->auth_data exists, but that was wrong, it should always be set. Fix that. Fixes: 310c8387c638 ("wifi: mac80211: clean up connection process") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/3151f5d0-c1...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 5f2e9f5e1779..89c4165f2753 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8129,10 +8129,10 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, sizeof(ifmgd->s1g_capa_mask)); /* keep some setup (AP STA, channel,...
f05d2283d11187675569d3a0286dbaf45d8eb70c
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: diag: avoid extra waiting
Problem Details: When creating a lot of listener sockets, it is enough to wait only for the last one, like we are doing before in diag.sh for other subtests. If we do a check for each listener sockets, each time listing all available sockets, it can take a very long time in very slow environments, at the point we can ...
```diff diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index 18d37d4695c1..75fc95675e2d 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -96,8 +96,8 @@ chk_listener_nr() local expected=$1 local msg="$2" - ...
45bcc0346561daa3f59e19a753cc7f3e08e8dff1
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: diag: return KSFT_FAIL not test_cnt
Problem Details: The test counter 'test_cnt' should not be returned in diag.sh, e.g. what if only the 4th test fail? Will do 'exit 4' which is 'exit ${KSFT_SKIP}', the whole test will be marked as skipped instead of 'failed'! So we should do ret=${KSFT_FAIL} instead. Fixes: df62f2ec3df6 ("selftests/mptcp: add diag in...
```diff diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index f300f4e1eb59..18d37d4695c1 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -69,7 +69,7 @@ __chk_nr() else echo "[ fail ] expected $expected fo...
2c79bd34af13de221ddab29d8dfc9d5eeca8fe9b
Analyze and fix the following issue in the Linux kernel code: arm64: prohibit probing on arch_kunwind_consume_entry()
Problem Details: Make arch_kunwind_consume_entry() as __always_inline otherwise the compiler might not inline it and allow attaching probes to it. Without this, just probing arch_kunwind_consume_entry() via <tracefs>/kprobe_events will crash the kernel on arm64. The crash can be reproduced using the following compile...
```diff diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index 7f88028a00c0..b2a60e0bcfd2 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c @@ -247,7 +247,7 @@ struct kunwind_consume_entry_data { void *cookie; }; -static bool +static __always_inline bool ...
72e6d668773fd19f78a6e8017347b08a5cccaaeb
Analyze and fix the following issue in the Linux kernel code: drm: Fix output poll work for drm_kms_helper_poll=n
Problem Details: If drm_kms_helper_poll=n the output poll work will only get scheduled from drm_helper_probe_single_connector_modes() to handle a delayed hotplug event. Since polling is disabled the work in this case should just call drm_kms_helper_hotplug_event() w/o detecting the state of connectors and rescheduling ...
```diff diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 3f479483d7d8..23b4e9a3361d 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -760,9 +760,11 @@ static void output_poll_execute(struct work_struct *work) changed = dev->mode_conf...
65e6a2773d655172143cc0b927cdc89549842895
Analyze and fix the following issue in the Linux kernel code: media: usbtv: Remove useless locks in usbtv_video_free()
Problem Details: Remove locks calls in usbtv_video_free() because are useless and may led to a deadlock as reported here: https://syzkaller.appspot.com/x/bisect.txt?x=166dc872180000 Also remove usbtv_stop() call since it will be called when unregistering the device. Before 'c838530d230b' this issue would only be notic...
```diff diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c index 62a583040cd4..702f1c8bd2ab 100644 --- a/drivers/media/usb/usbtv/usbtv-video.c +++ b/drivers/media/usb/usbtv/usbtv-video.c @@ -963,15 +963,8 @@ ctrl_fail: void usbtv_video_free(struct usbtv *usbtv) { - mutex_lock...
5224ed586ba7f9bba956655a1bfe5b75df7394d4
Analyze and fix the following issue in the Linux kernel code: drm/xe: Replace 'grouped target' in Makefile with pattern rule
Problem Details: Since 'grouped target' is used only in 'make' 4.3, it should be avoided. Replace it with 'multi-target pattern rule' which has the same behavior. Fixes: 9616e74b796c ("drm/xe: Add support for OOB workarounds") Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai> Reviewed-by: Lucas De Marchi <lucas....
```diff diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index 1a59c15f4d66..5a428ca00f10 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -42,7 +42,8 @@ generated_oob := $(obj)/generated/xe_wa_oob.c $(obj)/generated/xe_wa_oob.h quiet_cmd_wa_oob = GEN $(notdir $(g...
154fcf3a788868cb87d8c2e50c0b5b3a2fe89853
Analyze and fix the following issue in the Linux kernel code: x86/msr: Prepare for including <linux/percpu.h> into <asm/msr.h>
Problem Details: To clean up the per CPU insanity of UP which causes sparse to be rightfully unhappy and prevents the usage of the generic per CPU accessors on cpu_info it is necessary to include <linux/percpu.h> into <asm/msr.h>. Including <linux/percpu.h> into <asm/msr.h> is impossible because it ends up in header d...
```diff diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 3804f21ab049..768d1414897f 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -17,6 +17,7 @@ #include <linux/kvm_host.h> #include <asm/cpufeature.h> +#include <asm/debugreg.h> #include <asm/hardirq.h...
9eae297d5d8d87738a14010af62b2b64b9d98097
Analyze and fix the following issue in the Linux kernel code: perf/x86/amd/uncore: Fix __percpu annotation
Problem Details: The __percpu annotation in struct amd_uncore is confusing Sparse: uncore.c:649:10: sparse: warning: incorrect type in initializer (different address spaces) uncore.c:649:10: sparse: expected void const [noderef] __percpu *__vpp_verify uncore.c:649:10: sparse: got union amd_uncore_info * T...
```diff diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c index 5bf03c575812..4ccb8fa483e6 100644 --- a/arch/x86/events/amd/uncore.c +++ b/arch/x86/events/amd/uncore.c @@ -71,7 +71,7 @@ union amd_uncore_info { }; struct amd_uncore { - union amd_uncore_info * __percpu info; + union amd_uncore_...
dd6c6d57ab61d496f6ff7d6ca38611062af142a1
Analyze and fix the following issue in the Linux kernel code: pwm: imx-tpm: fix probe crash due to access registers without clock
Problem Details: The following commit abf6569d6482 ("pwm: imx-tpm: Make use of devm_pwmchip_alloc() function") introduced an issue that accessing registers without clock which results in the following boot crash on MX7ULP platform. Fixed it by enabling clock properly. Unhandled fault: external abort on non-linefetch (...
```diff diff --git a/drivers/pwm/pwm-imx-tpm.c b/drivers/pwm/pwm-imx-tpm.c index b04b974c5f32..c50ddbac43c8 100644 --- a/drivers/pwm/pwm-imx-tpm.c +++ b/drivers/pwm/pwm-imx-tpm.c @@ -337,6 +337,7 @@ static int pwm_imx_tpm_probe(struct platform_device *pdev) { struct pwm_chip *chip; struct imx_tpm_pwm_chip *tpm; + ...
b8b85d048936bd304c7815fd2bce348a22c2055b
Analyze and fix the following issue in the Linux kernel code: Octeontx2-af: Fix an issue in firmware shared data reserved space
Problem Details: The last patch which added support to extend the firmware shared data to add channel data information has introduced a bug due to the reserved space not adjusted accordingly. This patch fixes the issue and also adds BUILD_BUG to avoid this regression error. Fixes: 997814491cee ("Octeontx2-af: Fetch M...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c index edd12d09dc89..07d4859de53a 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c @@ -817,6 +817,8 @@ static int rvu_fwdata_init(struct...
429679dcf7d918b7bb523d89bde3307fb02496c3
Analyze and fix the following issue in the Linux kernel code: page_pool: fix netlink dump stop/resume
Problem Details: If message fills up we need to stop writing. 'break' will only get us out of the iteration over pools of a single netdev, we need to also stop walking netdevs. This results in either infinite dump, or missing pools, depending on whether message full happens on the last netdev (infinite dump) or non-la...
```diff diff --git a/net/core/page_pool_user.c b/net/core/page_pool_user.c index ffe5244e5597..278294aca66a 100644 --- a/net/core/page_pool_user.c +++ b/net/core/page_pool_user.c @@ -94,11 +94,12 @@ netdev_nl_page_pool_get_dump(struct sk_buff *skb, struct netlink_callback *cb, state->pp_id = pool->user.id; err ...
4a0e7b3c37531aabddf6f144b83ae9b65ec809fd
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix applying placement flag
Problem Details: Switching from a separate list to flags introduced a bug here. We were accidentially ORing the flag before initailizing the placement and not after. So this code didn't do nothing except producing a warning. Signed-off-by: Christian König <christian.koenig@amd.com> Reported-by: Stephen Rothwell <sfr@...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index 27dcfd8a34bb..e6f177183c0f 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c @@ -162,10 +162,10 @@ i915_ttm_placement_from_obj(const struct drm_i915_gem_object *o...
056a70924a0272718adfa37ffcfc1e1d426a0d7e
Analyze and fix the following issue in the Linux kernel code: gve: Add header split ethtool stats
Problem Details: To record the stats of header split packets, three stats are added in the driver's ethtool stats. - rx_hsplit_pkt is the split packets count with header split - rx_hsplit_bytes is the received header bytes count with header split - rx_hsplit_unsplit_pkt is the unsplit packet count due to header buffer...
```diff diff --git a/drivers/net/ethernet/google/gve/gve.h b/drivers/net/ethernet/google/gve/gve.h index 5f02b87d7fea..4814c96d5fe7 100644 --- a/drivers/net/ethernet/google/gve/gve.h +++ b/drivers/net/ethernet/google/gve/gve.h @@ -269,15 +269,19 @@ struct gve_rx_ring { }; u64 rbytes; /* free-running bytes receive...
5e37d8254e7f551dda62e7590e819d69c7491845
Analyze and fix the following issue in the Linux kernel code: gve: Add header split data path
Problem Details: Add header buffers and ethtool support to enable header split via the tcp-data-split flag in ethtool's ringparam config. A coherent dma memory is allocated for the header buffers. There is one header buffer per ring entry by calculating the offset to the header-buffers starting address. The header buff...
```diff diff --git a/drivers/net/ethernet/google/gve/gve.h b/drivers/net/ethernet/google/gve/gve.h index 5305404516fc..5f02b87d7fea 100644 --- a/drivers/net/ethernet/google/gve/gve.h +++ b/drivers/net/ethernet/google/gve/gve.h @@ -9,6 +9,7 @@ #include <linux/dma-mapping.h> #include <linux/dmapool.h> +#include <linu...
1ca1ba465e55b9460e4e75dec9fff31e708fec74
Analyze and fix the following issue in the Linux kernel code: geneve: make sure to pull inner header in geneve_rx()
Problem Details: syzbot triggered a bug in geneve_rx() [1] Issue is similar to the one I fixed in commit 8d975c15c0cd ("ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv()") We have to save skb->network_header in a temporary variable in order to be able to recompute the network_header pointer after a pskb_i...
```diff diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 32c51c244153..c4ed36c71897 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -221,7 +221,7 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs, struct genevehdr *gnvh = geneve_hdr(skb); struct metadata_dst *t...
4be445f5b6b6810baf397b2d159bd07c3573fd75
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: capture snapshot on the first commit_done timeout
Problem Details: In order to debug commit_done timeouts, capture the devcoredump state when the first timeout occurs after the encoder has been enabled. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patc...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index e8d123327c41..9a14d2232e4a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -126,6 +126,8 @@ enum dpu_enc_rc_states { * @base: drm_encoder ...
d72a3d35b7ef5a3c0260462f130fa3dd7576aa2f
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: split dpu_encoder_wait_for_event into two functions
Problem Details: Stop multiplexing several events via the dpu_encoder_wait_for_event() function. Split it into two distinct functions two allow separate handling of those events. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patc...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index a0df4fa3871f..e8d123327c41 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -1326,7 +1326,7 @@ static void dpu_encoder_virt_atomic_disable(str...
f1d0b196ff2ec85018edb1f6246c3cc6aa19ab54
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: make "vblank timeout" more useful
Problem Details: We have several reports of vblank timeout messages. However after some debugging it was found that there might be different causes to that. To allow us to identify the DPU block that gets stuck, include the actual CTL_FLUSH value into the timeout message. Reviewed-by: Abhinav Kumar <quic_abhinavk@quic...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index 2ff44295fc9d..d9e7dbf0499c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -502,7 +502,7 @@ static int dp...
138506ab249b7ac7856cb7a5a536a4b61a7a4ae1
Analyze and fix the following issue in the Linux kernel code: ionic: Check stop no restart
Problem Details: If there is a lot of transmit traffic the driver can get into a situation that the device is starved due to the doorbell never being rung. This can happen if xmit_more is set constantly and __netdev_tx_sent_queue() keeps returning false. Fix this by checking if the queue needs to be stopped right befor...
```diff diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c index 1397a0dcf794..d9e23fc78e6b 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c @@ -1665,9 +1665,14 @@ static int ionic_tx(struct...
061b9bedbef124ab28682496bdba7f265f13b2f3
Analyze and fix the following issue in the Linux kernel code: ionic: Rework Tx start/stop flow
Problem Details: Currently the driver attempts to wake the Tx queue for every descriptor processed. However, this is overkill and can cause thrashing since Tx xmit can be running concurrently on a different CPU than Tx clean. Fix this by refactoring Tx cq servicing into its own function so the Tx wake code can run afte...
```diff diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.h b/drivers/net/ethernet/pensando/ionic/ionic_dev.h index bfcfc2d7bcbd..abe64086e8ca 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.h @@ -19,6 +19,7 @@ #define IONIC_DEF_TXRX_DESC 4096 ...
51270d573a8d9dd5afdc7934de97d66c0e14b5fd
Analyze and fix the following issue in the Linux kernel code: tracing/net_sched: Fix tracepoints that save qdisc_dev() as a string
Problem Details: I'm updating __assign_str() and will be removing the second parameter. To make sure that it does not break anything, I make sure that it matches the __string() field, as that is where the string is actually going to be saved in. To make sure there's nothing that breaks, I added a WARN_ON() to make sure...
```diff diff --git a/include/trace/events/qdisc.h b/include/trace/events/qdisc.h index a3995925cb05..1f4258308b96 100644 --- a/include/trace/events/qdisc.h +++ b/include/trace/events/qdisc.h @@ -81,14 +81,14 @@ TRACE_EVENT(qdisc_reset, TP_ARGS(q), TP_STRUCT__entry( - __string( dev, qdisc_dev(q) ) - __string( k...
551ee0f210991d25f336bc27262353bfe99d3eed
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: add division of drm_display_mode's hskew parameter
Problem Details: Setting up the timing engine when the physical encoder has a split role neglects dividing the drm_display_mode's hskew parameter. Let's fix this since this must also be done in preparation for implementing YUV420 over DP. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Paloma Ar...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index 2aa72b578764..c0bf388988cb 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -260,12 +260,14 @@ static void...
32b6ff95b91240e632f55be35c6ccd4bbe7434e4
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: allow certain formats for CDM for DP
Problem Details: CDM block supports formats other than H1V2 for DP. Since we are now adding support for CDM over DP, relax the checks to allow all other formats for DP other than H1V2. Changes in v2: - Add fixes tag - Move patch to top of series Fixes: 0afac0ba6024 ("drm/msm/dpu: add dpu_hw_cdm abstraction for CDM ...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c index e9cdc7934a49..9016b3ade6bc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c @@ -186,7 +186,7 @@ static int dpu_hw_cdm_enable(struct dpu_hw_cdm *ctx, ...
df620d7fabe984accf6567c846e4188fbd8add4d
Analyze and fix the following issue in the Linux kernel code: dt-bindings: leds: pwm-multicolour: re-allow active-low
Problem Details: active-low was lifted to the common schema for leds, but it went unnoticed that the leds-multicolour binding had "additionalProperties: false" where the other users had "unevaluatedProperties: false", thereby disallowing active-low for multicolour leds. Explicitly permit it again. Fixes: c94d1783136e ...
```diff diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml index 5edfbe347341..a31a202afe5c 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multi...
95915ba4b987cf2b222b0f251280228a1ff977ac
Analyze and fix the following issue in the Linux kernel code: tee: optee: Fix kernel panic caused by incorrect error handling
Problem Details: The error path while failing to register devices on the TEE bus has a bug leading to kernel panic as follows: [ 15.398930] Unable to handle kernel paging request at virtual address ffff07ed00626d7c [ 15.406913] Mem abort info: [ 15.409722] ESR = 0x0000000096000005 [ 15.413490] EC = 0x25: D...
```diff diff --git a/drivers/tee/optee/device.c b/drivers/tee/optee/device.c index 4b1092127694..1892e49a8e6a 100644 --- a/drivers/tee/optee/device.c +++ b/drivers/tee/optee/device.c @@ -90,13 +90,14 @@ static int optee_register_device(const uuid_t *device_uuid, u32 func) if (rc) { pr_err("device registration fail...
6214e24cae9b10a7c1572f99552610a24614fffe
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Add quirks for Lenovo Thinkbook 16P laptops
Problem Details: These models use 2 CS35L41 amps with HDA using I2C. Both models have _DSD support inside cs35l41_hda_property.c. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218437 Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20240301160154.158398-3-sbinding@o...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6c57444e4380..b455e6f704c5 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10303,6 +10303,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO D...
37d9d5ff5216df1908a41e6ddd72460c5d938b8a
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cs35l41: Support Lenovo Thinkbook 16P
Problem Details: Adds sound support for 2 Lenovo Thinkbook 16P laptops using CS35L41 HDA with External Boost. SSIDs: - 17AA38A9 - 17AA38AB Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218437 Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20240301160154.158398-2-...
```diff diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c index 87dcb367e239..4c3097bc274b 100644 --- a/sound/pci/hda/cs35l41_hda_property.c +++ b/sound/pci/hda/cs35l41_hda_property.c @@ -97,6 +97,8 @@ static const struct cs35l41_config cs35l41_config_table[] = { { "10431F1F", 2...
ac3e0384073b2408d6cb0d972fee9fcc3776053d
Analyze and fix the following issue in the Linux kernel code: misc: lis3lv02d_i2c: Fix regulators getting en-/dis-abled twice on suspend/resume
Problem Details: When not configured for wakeup lis3lv02d_i2c_suspend() will call lis3lv02d_poweroff() even if the device has already been turned off by the runtime-suspend handler and if configured for wakeup and the device is runtime-suspended at this point then it is not turned back on to serve as a wakeup source. ...
```diff diff --git a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c index c6eb27d46cb0..15119584473c 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c +++ b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c @@ -198,8 +198,14 @@ static int lis3lv02d_i2c_suspend(struct device *dev) struct i2c_cl...
0e3f7d120086c8b9d6e1ae0dd4917fc529daa1ca
Analyze and fix the following issue in the Linux kernel code: hyperv-tlfs: Change prefix of generic HV_REGISTER_* MSRs to HV_MSR_*
Problem Details: The HV_REGISTER_ are used as arguments to hv_set/get_register(), which delegate to arch-specific mechanisms for getting/setting synthetic Hyper-V MSRs. On arm64, HV_REGISTER_ defines are synthetic VP registers accessed via the get/set vp registers hypercalls. The naming matches the TLFS document, alth...
```diff diff --git a/arch/arm64/include/asm/hyperv-tlfs.h b/arch/arm64/include/asm/hyperv-tlfs.h index bc6c7ac934a1..54846d1d29c3 100644 --- a/arch/arm64/include/asm/hyperv-tlfs.h +++ b/arch/arm64/include/asm/hyperv-tlfs.h @@ -21,14 +21,6 @@ * byte ordering of Linux running on ARM64, so no special handling is require...
498d3486376befe4e82b5334d44bbc86b1982ee4
Analyze and fix the following issue in the Linux kernel code: perf vendor events amd: Fix Zen 4 cache latency events
Problem Details: L3PMCx0AC and L3PMCx0AD, used in l3_xi_sampled_latency* events, have a quirk that requires them to be programmed with SliceId set to 0x3. Without this, the events do not count at all and affects dependent metrics such as l3_read_miss_latency. If ThreadMask is not specified, the amd-uncore driver inter...
```diff diff --git a/tools/perf/pmu-events/arch/x86/amdzen4/cache.json b/tools/perf/pmu-events/arch/x86/amdzen4/cache.json index ecbe9660b2b3..e6d710cf3ce2 100644 --- a/tools/perf/pmu-events/arch/x86/amdzen4/cache.json +++ b/tools/perf/pmu-events/arch/x86/amdzen4/cache.json @@ -676,6 +676,10 @@ "EventCode": "0xac"...
9f378a62164cfe218b5a355696464d93b132edfb
Analyze and fix the following issue in the Linux kernel code: soc: qcom: aoss: add missing kerneldoc for qmp members
Problem Details: Add missing kerneldoc to silence: qcom_aoss.c:93: warning: Function parameter or struct member 'debugfs_root' not described in 'qmp' qcom_aoss.c:93: warning: Function parameter or struct member 'debugfs_files' not described in 'qmp' Fixes: d51d984c5525 ("soc: qcom: aoss: Add debugfs interface for...
```diff diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c index e8ae8aa6391f..ca2f6b7629ce 100644 --- a/drivers/soc/qcom/qcom_aoss.c +++ b/drivers/soc/qcom/qcom_aoss.c @@ -71,6 +71,8 @@ struct qmp_cooling_device { * @tx_lock: provides synchronization between multiple callers of qmp_send() * @...
7d474b43087aa356d714d39870c90d77fc6f1186
Analyze and fix the following issue in the Linux kernel code: clk: qcom: gcc-ipq5018: fix register offset for GCC_UBI0_AXI_ARES reset
Problem Details: The current register offset used for the GCC_UBI0_AXI_ARES reset seems wrong. Or at least, the downstream driver uses [1] the same offset which is used for other the GCC_UBI0_*_ARES resets. Change the code to use the same offset used in the downstream driver and also specify the reset bit explicitly t...
```diff diff --git a/drivers/clk/qcom/gcc-ipq5018.c b/drivers/clk/qcom/gcc-ipq5018.c index 5437b66638d4..c1732d70e3a2 100644 --- a/drivers/clk/qcom/gcc-ipq5018.c +++ b/drivers/clk/qcom/gcc-ipq5018.c @@ -3635,7 +3635,7 @@ static const struct qcom_reset_map gcc_ipq5018_resets[] = { [GCC_SYSTEM_NOC_BCR] = { 0x26000, 0 }...
11b752ac5a07cbfd95592fac5237a02f45662926
Analyze and fix the following issue in the Linux kernel code: clk: qcom: gcc-ipq5018: fix 'halt_reg' offset of 'gcc_pcie1_pipe_clk'
Problem Details: The following table shows the values of the 'halt_reg' and the 'enable_reg' fields from the pcie clocks defined in the current driver: clock halt_reg enable_reg gcc_pcie0_ahb_clk 0x75010 0x75010 gcc_pcie0_aux_clk 0x75014 0x75014 gcc_pcie...
```diff diff --git a/drivers/clk/qcom/gcc-ipq5018.c b/drivers/clk/qcom/gcc-ipq5018.c index 6524a7053a03..5437b66638d4 100644 --- a/drivers/clk/qcom/gcc-ipq5018.c +++ b/drivers/clk/qcom/gcc-ipq5018.c @@ -2183,7 +2183,7 @@ static struct clk_branch gcc_pcie1_axi_s_clk = { }; static struct clk_branch gcc_pcie1_pipe_clk...
f982adcc1b1c02a3114f68ac73c811cbfabe90fa
Analyze and fix the following issue in the Linux kernel code: clk: qcom: gcc-ipq5018: fix 'enable_reg' offset of 'gcc_gmac0_sys_clk'
Problem Details: The value of the 'enable_reg' field in the 'gcc_gmac0_sys_clk' clock definition seems wrong as it is greater than the 'max_register' value defined in the regmap configuration. Additionally, all other gmac specific branch clock definitions within the driver uses the same value both for the 'enable_reg' ...
```diff diff --git a/drivers/clk/qcom/gcc-ipq5018.c b/drivers/clk/qcom/gcc-ipq5018.c index 856a2b30e2a8..6524a7053a03 100644 --- a/drivers/clk/qcom/gcc-ipq5018.c +++ b/drivers/clk/qcom/gcc-ipq5018.c @@ -1757,7 +1757,7 @@ static struct clk_branch gcc_gmac0_sys_clk = { .halt_check = BRANCH_HALT_DELAY, .halt_bit = 31,...
26a526c25606495e7442feeea53061f81eca22be
Analyze and fix the following issue in the Linux kernel code: soc: qcom: spm: fix building with CONFIG_REGULATOR=n
Problem Details: The newly added code causes a build failure when -Werror is set: drivers/soc/qcom/spm.c:388:12: error: 'spm_get_cpu' defined but not used [-Werror=unused-function] Remove the #ifdef and instead use an IS_ENABLED() check that lets the compiler perform dead code elimination instead of the preprocessor....
```diff diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c index 5eefaec72a13..06e2c4c2a4a8 100644 --- a/drivers/soc/qcom/spm.c +++ b/drivers/soc/qcom/spm.c @@ -411,7 +411,6 @@ static int spm_get_cpu(struct device *dev) return -EOPNOTSUPP; } -#ifdef CONFIG_REGULATOR static int spm_register_regulator(str...
a4f82b8045e3c7913266aa6ea1ee15752a062abd
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm8650: Fix SPMI channels size
Problem Details: The actual size of the channels registers region is 4MB, according to the documentation. This issue was not caught until now because the driver was supposed to allow same regions being mapped multiple times for supporting multiple buses. Thie driver is using platform_get_resource_byname() and devm_iore...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi index 12ba839f215e..ba72d8f38420 100644 --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi @@ -3749,7 +3749,7 @@ spmi_bus: spmi@c400000 { compatible = "qcom,spmi-pmic-arb"; reg ...
77dd1e50ffcba33c3195ae4fc78f354368ddacb2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm8550: Fix SPMI channels size
Problem Details: The actual size of the channels registers region is 4MB, according to the documentation. This issue was not caught until now because the driver was supposed to allow same regions being mapped multiple times for supporting multiple buses. Thie driver is using platform_get_resource_byname() and devm_iore...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi index 7474cddf7ad3..3904348075f6 100644 --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi @@ -3318,7 +3318,7 @@ spmi_bus: spmi@c400000 { compatible = "qcom,spmi-pmic-arb"; reg ...
4f423c4cbe26d79d8974936eb01e0d6574c5d2ac
Analyze and fix the following issue in the Linux kernel code: Revert "arm64: dts: qcom: msm8996: Hook up MPM"
Problem Details: Commit 09896da07315 ("arm64: dts: qcom: msm8996: Hook up MPM") has hooked up the MPM irq chip on the MSM8996 platform. However this causes my Dragonboard 820c crash during bootup (usually when probing IOMMUs). Revert the offending commit for now. Quick debug shows that making tlmm's wakeup-parent point...
```diff diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 8d41ed261adf..ee6f87c828ae 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -457,25 +457,6 @@ }; }; - mpm: interrupt-controller { - compatible = "qcom,mpm"; -...
d49193be636ab2b6e35727541bbdcdc1eab2d676
Analyze and fix the following issue in the Linux kernel code: Input: xilinx_ps2 - fix kernel-doc for xps2_of_probe function
Problem Details: The existing comment block above the xps2_of_probe function does not conform to the kernel-doc standard. This patch fixes the documentation to match the expected kernel-doc format, which includes a structured documentation header with param and return value. Signed-off-by: Yang Li <yang.lee@linux.alib...
```diff diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index d8f9faf2b529..bb758346a33d 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c @@ -219,8 +219,7 @@ static void sxps2_close(struct serio *pserio) /** * xps2_of_probe - probe method for the...
5969fbf302741c5faf7c25d481593918cad559c6
Analyze and fix the following issue in the Linux kernel code: docs: submit-checklist: structure by category
Problem Details: While going through the submit checklist, the list order seemed rather random, probably just by historical coincidences of always adding yet the next point someone thought of at the end of the list. Structure and order them by the category of such activity, reviewing, documenting, checking with tools,...
```diff diff --git a/Documentation/process/submit-checklist.rst b/Documentation/process/submit-checklist.rst index b1bc2d37bd0a..7d8dba942fe8 100644 --- a/Documentation/process/submit-checklist.rst +++ b/Documentation/process/submit-checklist.rst @@ -11,110 +11,121 @@ These are all above and beyond the documentation th...
155f04366e3cad7cc7471f8736aa05ec0300cddd
Analyze and fix the following issue in the Linux kernel code: RDMA/uverbs: Avoid -Wflex-array-member-not-at-end warnings
Problem Details: -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. There are currently a couple of objects (`alloc_head` and `bundle`) in `struct bundle_priv` that contain a couple of flexible structures: struct bundle_priv { /* Must be first */ struct...
```diff diff --git a/drivers/infiniband/core/uverbs_ioctl.c b/drivers/infiniband/core/uverbs_ioctl.c index d9799706c58e..f80da6a67e24 100644 --- a/drivers/infiniband/core/uverbs_ioctl.c +++ b/drivers/infiniband/core/uverbs_ioctl.c @@ -36,13 +36,15 @@ #include "uverbs.h" struct bundle_alloc_head { - struct bundle_al...
dbd7c0088b7f44aa0b9276ed3449df075a7b5b54
Analyze and fix the following issue in the Linux kernel code: watchdog: stm32_iwdg: initialize default timeout
Problem Details: The driver never sets a default timeout value, therefore it is initialized to zero. When CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED is enabled, the watchdog is started during probe. The kernel is supposed to automatically ping the watchdog from this point until userspace takes over, but this does not happen i...
```diff diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c index d9fd50df9802..5404e0387620 100644 --- a/drivers/watchdog/stm32_iwdg.c +++ b/drivers/watchdog/stm32_iwdg.c @@ -20,6 +20,8 @@ #include <linux/platform_device.h> #include <linux/watchdog.h> +#define DEFAULT_TIMEOUT 10 + /* IWDG r...
8bc22a2f1bf0f402029087fcb53130233a544fed
Analyze and fix the following issue in the Linux kernel code: watchdog: starfive: Check pm_runtime_enabled() before decrementing usage counter
Problem Details: In the probe function, pm_runtime_put_sync() will fail on platform with runtime PM disabled. Check if runtime PM is enabled before calling pm_runtime_put_sync() to fix it. Fixes: db728ea9c7be ("drivers: watchdog: Add StarFive Watchdog driver") Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> Sign...
```diff diff --git a/drivers/watchdog/starfive-wdt.c b/drivers/watchdog/starfive-wdt.c index e28ead24c520..df68ae4acbd7 100644 --- a/drivers/watchdog/starfive-wdt.c +++ b/drivers/watchdog/starfive-wdt.c @@ -494,8 +494,13 @@ static int starfive_wdt_probe(struct platform_device *pdev) if (ret) goto err_exit; - if ...
ca3d3aa14e7673f1b15e862b71998a4664d50ebe
Analyze and fix the following issue in the Linux kernel code: powerpc: Remove cpu-as-y completely
Problem Details: cpu-as-y is there to force assembler building options. But there is no need for that. GCC is passed the necessary options and it automatically pass the appropriate option to GAS. GCC is given -maltivec when relevant, so no need for -Wa,-maltivec either. And -Wa,-many is wrong as it will hide innaprop...
```diff diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 4b8c9ff79d0f..4bd3a1bd02fc 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -219,18 +219,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables # often slow when they are implemented at all KBUILD_CFLAGS += $(call cc-option,-mno...
5f491356b7149564ab22323ccce79c8d595bfd0c
Analyze and fix the following issue in the Linux kernel code: powerpc/fsl: Fix mfpmr build errors with newer binutils
Problem Details: Binutils 2.38 complains about the use of mfpmr when building ppc6xx_defconfig: CC arch/powerpc/kernel/pmc.o {standard input}: Assembler messages: {standard input}:45: Error: unrecognized opcode: `mfpmr' {standard input}:56: Error: unrecognized opcode: `mtpmr' This is because by default...
```diff diff --git a/arch/powerpc/include/asm/reg_fsl_emb.h b/arch/powerpc/include/asm/reg_fsl_emb.h index a21f529c43d9..8359c06d92d9 100644 --- a/arch/powerpc/include/asm/reg_fsl_emb.h +++ b/arch/powerpc/include/asm/reg_fsl_emb.h @@ -12,9 +12,16 @@ #ifndef __ASSEMBLY__ /* Performance Monitor Registers */ #define mf...
4e284e38ed586edeb8bdb2b0c544273a7f72021c
Analyze and fix the following issue in the Linux kernel code: powerpc/64s: Use .machine power4 around dcbt
Problem Details: There are multiple decodings for the "dcbt" mnemonic, so the assembler has to pick one. That requires passing -many to the assembler, which is not recommended. Without -many the clang 14 / binutils 2.38 build fails with: arch/powerpc/kernel/exceptions-64s.S:2976: Error: junk at end of line: `0b010...
```diff diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index 78c7548eac1e..1d1018c1e482 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h @@ -508,11 +508,16 @@ END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96) */ #define ...
ad86d7ee43b22aa2ed60fb982ae94b285c1be671
Analyze and fix the following issue in the Linux kernel code: powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks
Problem Details: Running event hv_gpci/dispatch_timebase_by_processor_processor_time_in_timebase_cycles,phys_processor_idx=0/ in one of the system throws below error: ---Logs--- # perf list | grep hv_gpci/dispatch_timebase_by_processor_processor_time_in_timebase_cycles hv_gpci/dispatch_timebase_by_processor_proces...
```diff diff --git a/arch/powerpc/perf/hv-gpci.c b/arch/powerpc/perf/hv-gpci.c index 27f18119fda1..241551d1282f 100644 --- a/arch/powerpc/perf/hv-gpci.c +++ b/arch/powerpc/perf/hv-gpci.c @@ -695,6 +695,20 @@ static unsigned long single_gpci_request(u32 req, u32 starting_index, ret = plpar_hcall_norets(H_GET_PERF_CO...
4eb20bf34ea296f648971a8528e32cd80efcbe89
Analyze and fix the following issue in the Linux kernel code: powerpc/irq: Allow softirq to hardirq stack transition
Problem Details: Allow a transition from the softirq stack to the hardirq stack when handling a hardirq. Doing so means a hardirq received while deep in softirq processing is less likely to cause a stack overflow of the softirq stack. Previously it wasn't safe to do so because irq_exit() (which initiates softirq proce...
```diff diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 6f7d4edaa0bc..7504ceec5c58 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -284,15 +284,14 @@ static __always_inline void call_do_irq(struct pt_regs *regs, void *sp) void __do_IRQ(struct pt_regs *regs) { struc...
3f9f3557aca2bc5335747f0ac613661fb573be54
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Make some pic_init functions static
Problem Details: These functions can all be static, make them so, which also fixes no previous prototype warnings. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240229114216.744502-1-mpe@ellerman.id.au
```diff diff --git a/arch/powerpc/platforms/85xx/bsc913x_qds.c b/arch/powerpc/platforms/85xx/bsc913x_qds.c index 2eb62bff86d4..3ad8096fcf16 100644 --- a/arch/powerpc/platforms/85xx/bsc913x_qds.c +++ b/arch/powerpc/platforms/85xx/bsc913x_qds.c @@ -19,7 +19,7 @@ #include "mpc85xx.h" #include "smp.h" -void __init bsc9...
f2d5bccaca3e8c09c9b9c8485375f7bdbb2631d2
Analyze and fix the following issue in the Linux kernel code: powerpc/boot: Only free if realloc() succeeds
Problem Details: simple_realloc() frees the original buffer (ptr) even if the reallocation failed. Fix it to behave like standard realloc() and only free the original buffer if the reallocation succeeded. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240229115149.749264-1-mpe@ellerma...
```diff diff --git a/arch/powerpc/boot/simple_alloc.c b/arch/powerpc/boot/simple_alloc.c index db9aaa5face3..d07796fdf91a 100644 --- a/arch/powerpc/boot/simple_alloc.c +++ b/arch/powerpc/boot/simple_alloc.c @@ -112,10 +112,11 @@ static void *simple_realloc(void *ptr, unsigned long size) return ptr; new = simple_...
cda9c0d556283e2d4adaa9960b2dc19b16156bae
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries: Fix potential memleak in papr_get_attr()
Problem Details: `buf` is allocated in papr_get_attr(), and krealloc() of `buf` could fail. We need to free the original `buf` in the case of failure. Fixes: 3c14b73454cf ("powerpc/pseries: Interface to represent PAPR firmware attributes") Signed-off-by: Qiheng Lin <linqiheng@huawei.com> Signed-off-by: Michael Ellerma...
```diff diff --git a/arch/powerpc/platforms/pseries/papr_platform_attributes.c b/arch/powerpc/platforms/pseries/papr_platform_attributes.c index 526c621b098b..eea2041b270b 100644 --- a/arch/powerpc/platforms/pseries/papr_platform_attributes.c +++ b/arch/powerpc/platforms/pseries/papr_platform_attributes.c @@ -101,10 +1...
6035e7e35482653d6d93f35f01e1a320573d58f0
Analyze and fix the following issue in the Linux kernel code: powerpc/32: Curb objtool unannotated intra-function call warning
Problem Details: objtool throws the following warning: arch/powerpc/kexec/relocate_32.o: warning: objtool: .text+0x2bc: unannotated intra-function call Fix this warning by annotating intra-function call, using ANNOTATE_INTRA_FUNCTION_CALL macro, to indicate that the branch target is valid. Reported-by: kernel test ro...
```diff diff --git a/arch/powerpc/kexec/relocate_32.S b/arch/powerpc/kexec/relocate_32.S index d9f0dd9b34ff..104c9911f406 100644 --- a/arch/powerpc/kexec/relocate_32.S +++ b/arch/powerpc/kexec/relocate_32.S @@ -8,6 +8,7 @@ * Author: Suzuki Poulose <suzuki@in.ibm.com> */ +#include <linux/objtool.h> #include <as...
b72c066ba85a131091498a15a62d6068997278a4
Analyze and fix the following issue in the Linux kernel code: powerpc/32: fix ADB_CUDA kconfig warning
Problem Details: Fix a (randconfig) kconfig warning by correcting the select statement: WARNING: unmet direct dependencies detected for ADB_CUDA Depends on [n]: MACINTOSH_DRIVERS [=n] && (ADB [=n] || PPC_PMAC [=y]) && !PPC_PMAC64 [=n] Selected by [y]: - PPC_PMAC [=y] && PPC_BOOK3S [=y] && CPU_BIG_ENDIAN [=y] && ...
```diff diff --git a/arch/powerpc/platforms/powermac/Kconfig b/arch/powerpc/platforms/powermac/Kconfig index 8bdae0caf21e..84f101ec53a9 100644 --- a/arch/powerpc/platforms/powermac/Kconfig +++ b/arch/powerpc/platforms/powermac/Kconfig @@ -2,7 +2,7 @@ config PPC_PMAC bool "Apple PowerMac based machines" depends on ...
1581dafaf0d34bc9c428a794a22110d7046d186d
Analyze and fix the following issue in the Linux kernel code: vt: fix unicode buffer corruption when deleting characters
Problem Details: This is the same issue that was fixed for the VGA text buffer in commit 39cdb68c64d8 ("vt: fix memory overlapping when deleting chars in the buffer"). The cure is also the same i.e. replace memcpy() with memmove() due to the overlaping buffers. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Fixes: 81...
```diff diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 156efda7c80d..38a765eadbe2 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -381,7 +381,7 @@ static void vc_uniscr_delete(struct vc_data *vc, unsigned int nr) u32 *ln = vc->vc_uni_lines[vc->state.y]; unsigned int x = vc->state.x, co...
43066e32227ecde674e8ae1fcdd4a1ede67680c2
Analyze and fix the following issue in the Linux kernel code: serial: port: Don't suspend if the port is still busy
Problem Details: We accidently met the issue that the bash prompt is not shown after the previous command done and until the next input if there's only one CPU (In our issue other CPUs are isolated by isolcpus=). Further analysis shows it's because the port entering runtime suspend even if there's still pending chars i...
```diff diff --git a/drivers/tty/serial/serial_port.c b/drivers/tty/serial/serial_port.c index 88975a4df306..72b6f4f326e2 100644 --- a/drivers/tty/serial/serial_port.c +++ b/drivers/tty/serial/serial_port.c @@ -46,8 +46,31 @@ out: return 0; } +static int serial_port_runtime_suspend(struct device *dev) +{ + struct ...
e5d6bd25f93d6ae158bb4cd04956cb497a85b8ef
Analyze and fix the following issue in the Linux kernel code: serial: 8250_dw: Do not reclock if already at correct rate
Problem Details: When userspace opens the console, we call set_termios() passing a termios with the console's configured baud rate. Currently this causes dw8250_set_termios() to disable and then re-enable the UART clock at the same frequency as it was originally. This can cause corruption of any concurrent console outp...
```diff diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 2d1f350a4bea..c1d43f040c43 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -357,9 +357,9 @@ static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios, long rate...
672448ccf9b6a676f96f9352cbf91f4d35f4084a
Analyze and fix the following issue in the Linux kernel code: tty: serial: imx: Fix broken RS485
Problem Details: When about to transmit the function imx_uart_start_tx is called and in some RS485 configurations this function will call imx_uart_stop_rx. The problem is that imx_uart_stop_rx will enable loopback in order to release the RS485 bus, but when loopback is enabled transmitted data will just be looped to RX...
```diff diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 4aa72d5aeafb..e14813250616 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -462,8 +462,7 @@ static void imx_uart_stop_tx(struct uart_port *port) } } -/* called with port.lock taken and irqs off */ -static void im...
d676822a714af27e346407a4054cb2846d1ab0e5
Analyze and fix the following issue in the Linux kernel code: serial: 8250_pci1xxxx: Drop quirk from 8250_port
Problem Details: We are not supposed to spread quirks in 8250_port module especially when we have a separate driver for the hardware in question. Move quirk from generic module to the driver that uses it. While at it, move IO to ->set_divisor() callback as it has to be from day 1. ->get_divisor() is not supposed to p...
```diff diff --git a/drivers/tty/serial/8250/8250_pci1xxxx.c b/drivers/tty/serial/8250/8250_pci1xxxx.c index 55eada1dba56..2fbb5851f788 100644 --- a/drivers/tty/serial/8250/8250_pci1xxxx.c +++ b/drivers/tty/serial/8250/8250_pci1xxxx.c @@ -94,7 +94,6 @@ #define UART_BIT_SAMPLE_CNT_16 16 #define BAUD_CLOCK_DIV_INT_MS...
73b5a5c00be39e23b194bad10e1ea8bb73eee176
Analyze and fix the following issue in the Linux kernel code: serial: 8250_exar: Don't remove GPIO device on suspend
Problem Details: It seems a copy&paste mistake that suspend callback removes the GPIO device. There is no counterpart of this action, means once suspended there is no more GPIO device available untile full unbind-bind cycle is performed. Remove suspicious GPIO device removal in suspend. Fixes: d0aeaa83f0b0 ("serial: e...
```diff diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 23366f868ae3..dab94835b6f5 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -753,6 +753,7 @@ static void exar_pci_remove(struct pci_dev *pcidev) for (i = 0; i < priv->nr; i...