id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
b3281eb5ded17f88d7d4fa5fb39a709c195e56c2
Analyze and fix the following issue in the Linux kernel code: PCI: Always have realloc_head in __assign_resources_sorted()
Problem Details: Add a dummy list to always have a non-NULL realloc head in __assign_resources_sorted() as it allows only checking list_empty(). In future, it would be good to ensure all callers provide a valid realloc_head but that is relatively complex to do in practice and not necessary for the subsequent optional ...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 0b11069938b6..aa092644808b 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -400,14 +400,18 @@ static void __assign_resources_sorted(struct list_head *head, */ LIST_HEAD(save_head); LIST_HEAD(local_fail_head); + LIS...
ff61f380de5652e723168341480cc7adf1dd6213
Analyze and fix the following issue in the Linux kernel code: PCI: Fix old_size lower bound in calculate_iosize() too
Problem Details: Commit 903534fa7d30 ("PCI: Fix resource double counting on remove & rescan") fixed double counting of mem resources because of old_size being applied too early. Fix a similar counting bug on the io resource side. Link: https://lore.kernel.org/r/20241216175632.4175-6-ilpo.jarvinen@linux.intel.com Sign...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 447f3aa1037c..7c966e3f5060 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -814,11 +814,9 @@ static resource_size_t calculate_iosize(resource_size_t size, size = (size & 0xff) + ((size & ~0xffUL) << 2); #endif size =...
67f9085596ee55dd27b540ca6088ba0717ee511c
Analyze and fix the following issue in the Linux kernel code: PCI: Allow relaxed bridge window tail sizing for optional resources
Problem Details: Commit 566f1dd52816 ("PCI: Relax bridge window tail sizing rules") relaxed the bridge window requirements for non-optional size (size0) but pbus_size_mem() also handles optional sizes (IOV resources) using size1. This can manifest, e.g., as a failure to resize a BAR back to its original size after it w...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index fd78606526ec..447f3aa1037c 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -1146,7 +1146,6 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, min_align = calculate_mem_align(aligns, max_order); min_a...
d06cc1e3809040e8250f69a4c656e3717e6b963c
Analyze and fix the following issue in the Linux kernel code: PCI: Remove add_align overwrite unrelated to size0
Problem Details: Commit 566f1dd52816 ("PCI: Relax bridge window tail sizing rules") relaxed bridge window tail alignment rule for the non-optional part (size0, no add_size/add_align). The change, however, also overwrote add_align, which is only related to case where optional size1 related entry is added into realloc he...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 3d876d493faf..3a1fcaad142a 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -1149,7 +1149,6 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, min_align = 1ULL << (max_order + __ffs(SZ_1M)); min_ali...
d05c76fceb096b4423745856325d72c048d681e4
Analyze and fix the following issue in the Linux kernel code: Hid: Intel-thc-hid: Intel-thc: Fix "dubious: !x | !y" issue
Problem Details: Change to use "||" to make it more readable and avoid miss understanding. Signed-off-by: Even Xu <even.xu@intel.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501292144.eFDq4ovr-lkp@intel.com Signed-off-by: Jiri Kosina <jkosina@suse.com>
```diff diff --git a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c index eb23bea77686..8f97e71df7f4 100644 --- a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c +++ b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c @@ -295,7 +295,7 @@ static void relea...
b9c340b67b33cd37e543195b157c73a7bb0c8d4a
Analyze and fix the following issue in the Linux kernel code: HID: hid-universal-pidff: Fix spelling mistake "sucessfully" -> "successfully"
Problem Details: There is a spelling mistake in a hid_info message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Acked-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
```diff diff --git a/drivers/hid/hid-universal-pidff.c b/drivers/hid/hid-universal-pidff.c index 5b89ec7b5c26..001a0f5efb9d 100644 --- a/drivers/hid/hid-universal-pidff.c +++ b/drivers/hid/hid-universal-pidff.c @@ -104,7 +104,7 @@ static int universal_pidff_probe(struct hid_device *hdev, goto err; } - hid_info(h...
70409f3bc0c0f47bc4be05658395b7eb825e8a59
Analyze and fix the following issue in the Linux kernel code: HID: appletb-kbd: Fix inconsistent indentation and pass -ENODEV to dev_err_probe
Problem Details: The following warnings were flagged by the kernel test robot: drivers/hid/hid-appletb-kbd.c:405 appletb_kbd_probe() warn: inconsistent indenting drivers/hid/hid-appletb-kbd.c:406 appletb_kbd_probe() warn: passing zero to 'dev_err_probe' This patch aims at fixing those warnings. Reported-by: kernel t...
```diff diff --git a/drivers/hid/hid-appletb-kbd.c b/drivers/hid/hid-appletb-kbd.c index e45cc3ac46ee..d4b95aa3eecb 100644 --- a/drivers/hid/hid-appletb-kbd.c +++ b/drivers/hid/hid-appletb-kbd.c @@ -402,13 +402,13 @@ static int appletb_kbd_probe(struct hid_device *hdev, const struct hid_device_id } kbd->backlight...
172e23f5d05d476820d240d5a4af77c0bc0fbafd
Analyze and fix the following issue in the Linux kernel code: HID: hid-appletb-bl: fix incorrect error message for default brightness
Problem Details: The error message responsible to show failure to set default backlight brightness incorrectly showed the intended brightness as off irrespective of what the user had set it. This patch intends to fix the same. Also, a small typo in MODULE_DESCRIPTION has been fixed. Signed-off-by: Aditya Garg <gargad...
```diff diff --git a/drivers/hid/hid-appletb-bl.c b/drivers/hid/hid-appletb-bl.c index 1a3dcd44bf1a..bad2aead8780 100644 --- a/drivers/hid/hid-appletb-bl.c +++ b/drivers/hid/hid-appletb-bl.c @@ -145,7 +145,8 @@ static int appletb_bl_probe(struct hid_device *hdev, const struct hid_device_id appletb_bl_brightness_map[...
534bac4f126bc3a97c93c5757e17f533a9f598b4
Analyze and fix the following issue in the Linux kernel code: HID: hid-appletb-kbd: simplify logic used to switch between media and function keys on pressing fn key
Problem Details: This commit simplifies the logic in appletb_kbd_inp_event used for switching between the media and function keys on pressing the fn key. We now also prevent touching the kbd->saved_mode variable in case the esc key only mode is chosen. The following small fixes have also been done in this patch: - A...
```diff diff --git a/drivers/hid/hid-appletb-kbd.c b/drivers/hid/hid-appletb-kbd.c index 38fc0e58cb42..e45cc3ac46ee 100644 --- a/drivers/hid/hid-appletb-kbd.c +++ b/drivers/hid/hid-appletb-kbd.c @@ -236,13 +236,13 @@ static void appletb_kbd_inp_event(struct input_handle *handle, unsigned int type reset_inactivity_t...
56f2399f0e9063973f5ca65626d6effb2d2e1ee7
Analyze and fix the following issue in the Linux kernel code: Documentation: typo fixes
Problem Details: Fixed some spelling issues in documentations. Signed-off-by: Armin Mahdilou <Armin.Mahdilou@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250210192754.30283-1-Armin.Mahdilou@gmail.com
```diff diff --git a/Documentation/ABI/testing/configfs-usb-gadget-midi2 b/Documentation/ABI/testing/configfs-usb-gadget-midi2 index 0eac3aaba137..d76a52e2ca7f 100644 --- a/Documentation/ABI/testing/configfs-usb-gadget-midi2 +++ b/Documentation/ABI/testing/configfs-usb-gadget-midi2 @@ -47,7 +47,7 @@ Description: mid...
213e24250feed3bcf58d7594298df2d7e78a88ab
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Fix size_t print format
Problem Details: Use %zx format to print size_t to remove the following warning when building for i386: >> drivers/gpu/drm/xe/xe_guc_ct.c:1727:43: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] 1727 | drm_printf(p, "[CTB].le...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c index 497036675a38..72ad576fc18e 100644 --- a/drivers/gpu/drm/xe/xe_guc_ct.c +++ b/drivers/gpu/drm/xe/xe_guc_ct.c @@ -1724,7 +1724,7 @@ void xe_guc_ct_snapshot_print(struct xe_guc_ct_snapshot *snapshot, snapshot->g2h_outstanding...
1a596ad00ffe9b37fc60a93cbdd4daead3bf95f3
Analyze and fix the following issue in the Linux kernel code: PCI: Use downstream bridges for distributing resources
Problem Details: 7180c1d08639 ("PCI: Distribute available resources for root buses, too") breaks BAR assignment on some devices: pci 0006:03:00.0: BAR 0 [mem 0x6300c0000000-0x6300c1ffffff 64bit pref]: assigned pci 0006:03:00.1: BAR 0 [mem 0x6300c2000000-0x6300c3ffffff 64bit pref]: assigned pci 0006:03:00.2: BAR ...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 5e00cecf1f1a..3d876d493faf 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -2102,8 +2102,7 @@ pci_root_bus_distribute_available_resources(struct pci_bus *bus, * in case of root bus. */ if (bridge && pci_bridge_...
8b2ee518fc062320416359379c2c74dcc8a4de71
Analyze and fix the following issue in the Linux kernel code: Documentation/kernel-parameters: fix typo in description of reserve_mem
Problem Details: The format description of reserve_mem uses [KNG] as units, rather than [KMG]. Fix it. Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250218070845.3769520-1-rppt...
```diff diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index fb8752b42ec8..bf00552908bc 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -6082,7 +6082,7 @@ is assumed to be I/O ports;...
0c28e4d1e10d2aae608094620bb386e6fd73d55e
Analyze and fix the following issue in the Linux kernel code: HID: corsair-void: Update power supply values with a unified work handler
Problem Details: corsair_void_process_receiver can be called from an interrupt context, locking battery_mutex in it was causing a kernel panic. Fix it by moving the critical section into its own work, sharing this work with battery_add_work and battery_remove_work to remove the need for any locking Closes: https://bug...
```diff diff --git a/drivers/hid/hid-corsair-void.c b/drivers/hid/hid-corsair-void.c index 56e858066c3c..afbd67aa9719 100644 --- a/drivers/hid/hid-corsair-void.c +++ b/drivers/hid/hid-corsair-void.c @@ -71,11 +71,9 @@ #include <linux/bitfield.h> #include <linux/bitops.h> -#include <linux/cleanup.h> #include <linux...
a3f172359e22b2c11b750d23560481a55bf86af1
Analyze and fix the following issue in the Linux kernel code: ASoC: tas2764: Fix power control mask
Problem Details: Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250218-apple-codec-changes-v2-1-932760fd7e07@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
```diff diff --git a/sound/soc/codecs/tas2764.h b/sound/soc/codecs/tas2764.h index 168af772a898..d13ecae9c9c2 100644 --- a/sound/soc/codecs/tas2764.h +++ b/sound/soc/codecs/tas2764.h @@ -25,7 +25,7 @@ /* Power Control */ #define TAS2764_PWR_CTRL TAS2764_REG(0X0, 0x02) -#define TAS2764_PWR_CTRL_MASK GENMASK(1, 0) ...
0172be244ce367dd51d77b777244ea9c8de34a3a
Analyze and fix the following issue in the Linux kernel code: IB/iser: fix typos in iscsi_iser.c comments
Problem Details: Fixes multiple occurrences of the misspelled word "occured" in the comments of `iscsi_iser.c`, replacing them with the correct spelling "occurred". This improves readability without affecting functionality. Signed-off-by: Imanol <imvalient@protonmail.com> Link: https://patch.msgid.link/20250217183048...
```diff diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index bb9aaff92ca3..a5be6f1ba12b 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -393,10 +393,10 @@ static void iscsi_iser_cleanup_task(struct iscsi_task *task...
d403120cb9d4787b283ea202b2162f459d18fe9d
Analyze and fix the following issue in the Linux kernel code: ACPI: platform_profile: Fix memory leak in profile_class_is_visible()
Problem Details: If class_find_device() finds a device, it's reference count is incremented. Call put_device() to drop this reference before returning. Fixes: 77be5cacb2c2 ("ACPI: platform_profile: Create class for ACPI platform profile") Signed-off-by: Kurt Borja <kuurtb@gmail.com> Reviewed-by: Mark Pearson <mpearso...
```diff diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c index fc92e43d0fe9..2ad53cc6aae5 100644 --- a/drivers/acpi/platform_profile.c +++ b/drivers/acpi/platform_profile.c @@ -417,8 +417,14 @@ static int profile_class_registered(struct device *dev, const void *data) static umode_t prof...
293f324ce96d700112c726682b14094d1b54e09c
Analyze and fix the following issue in the Linux kernel code: tools: Unify top-level quiet infrastructure
Problem Details: Commit f2868b1a66d4f40f ("perf tools: Expose quiet/verbose variables in Makefile.perf") moved the quiet infrastructure out of tools/build/Makefile.build and into the top-level Makefile.perf file so that the quiet infrastructure could be used throughout perf and not just in Makefile.build. Extract out ...
```diff diff --git a/tools/build/Makefile b/tools/build/Makefile index 18ad131f6ea7..63ef21878761 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -17,13 +17,7 @@ $(call allow-override,LD,$(CROSS_COMPILE)ld) export HOSTCC HOSTLD HOSTAR -ifeq ($(V),1) - Q = -else - Q = @ -endif - -export Q srctree ...
cccf6ee090c8c133072d5d5b52ae25f3bc907a16
Analyze and fix the following issue in the Linux kernel code: ACPI: HED: Always initialize before evged
Problem Details: When the HED driver is built-in, it initializes after evged because they both are at the same initcall level, so the initialization ordering depends on the Makefile order. However, this prevents RAS records coming in between the evged driver initialization and the HED driver initialization from being ...
```diff diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index d81b55f5068c..7f10aa38269d 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -452,7 +452,7 @@ config ACPI_SBS the modules will be called sbs and sbshc. config ACPI_HED - tristate "Hardware Error Device" + bool "Hardware Error De...
dd4f730b557ce701a2cd4f604bf1e57667bd8b6e
Analyze and fix the following issue in the Linux kernel code: ACPI: platform-profile: Fix CFI violation when accessing sysfs files
Problem Details: When an attribute group is created with sysfs_create_group(), the ->sysfs_ops() callback is set to kobj_sysfs_ops, which sets the ->show() and ->store() callbacks to kobj_attr_show() and kobj_attr_store() respectively. These functions use container_of() to get the respective callback from the passed at...
```diff diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c index fc92e43d0fe9..1b6317f759f9 100644 --- a/drivers/acpi/platform_profile.c +++ b/drivers/acpi/platform_profile.c @@ -260,14 +260,14 @@ static int _aggregate_choices(struct device *dev, void *data) /** * platform_profile_choic...
92d03904b26d330b9a20f3abaa9cb78e6aba2265
Analyze and fix the following issue in the Linux kernel code: s390/vfio-ap: Make mdev_types not look like a fake flex array
Problem Details: The vfio-ap driver and the vfio parent device provided by it (matrix_dev) support just a single mdev_type, and this is not likely to change any time soon. Despite that matrix_dev->mdev_types started out as a C99 flexible array presumably as a typo, and since the typo messed up the allocation, commit e...
```diff diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c index 155e19aef5df..4c6a6d91a13f 100644 --- a/drivers/s390/crypto/vfio_ap_ops.c +++ b/drivers/s390/crypto/vfio_ap_ops.c @@ -2316,10 +2316,10 @@ int vfio_ap_mdev_register(void) matrix_dev->mdev_type.sysfs_name = VFIO_AP_MDEV_T...
bd0ab337ff8638bcaeb9a199c2f8d31aec7e3f0c
Analyze and fix the following issue in the Linux kernel code: s390/vfio-ap: Fix indentation in vfio_ap_mdev_ioctl()
Problem Details: Remove any extra indentation to improve the code's readability. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Anthony Krowiak <akrowiak@linux.ibm.com> Link: https://lore.kernel.org/r/20250116131146.105439-2-thorsten.blum@linux.dev Signed-off-by: Alexander Gordeev <agordeev@linux....
```diff diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c index a52c2690933f..155e19aef5df 100644 --- a/drivers/s390/crypto/vfio_ap_ops.c +++ b/drivers/s390/crypto/vfio_ap_ops.c @@ -2199,8 +2199,8 @@ static ssize_t vfio_ap_mdev_ioctl(struct vfio_device *vdev, ret = vfio_ap_mdev_reset...
ceb3b35f5ef4a0c490f54eb8b53075fd83a97d11
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: cleanup ath12k_mac_mlo_ready()
Problem Details: There is a possibility for an uninitialized *ret* variable to be returned in some code paths. This explicitly returns 0 without an error. Also removes goto that returned *ret* and simply returns in place. Closes: https://scan5.scan.coverity.com/#/project-view/63541/10063?selectedIssue=1642337 Fixes: ...
```diff diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index 0c556023141b..0b2dec081c6e 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -961,12 +961,11 @@ int ath12k_mac_mlo_ready(struct ath12k_hw_group *ag) ar = &ah->...
c3a589fd9fcbf295a7402a4b188dc9277d505f4f
Analyze and fix the following issue in the Linux kernel code: s390/boot: Fix ESSA detection
Problem Details: The cmma_test_essa() inline assembly uses tmp as input and output, however tmp is specified as output only, which allows the compiler to optimize the initialization of tmp away. Therefore the ESSA detection may or may not work depending on previous contents of the register that the compiler selected f...
```diff diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c index 885bd1dd2c82..9276e0576d0a 100644 --- a/arch/s390/boot/startup.c +++ b/arch/s390/boot/startup.c @@ -86,7 +86,7 @@ static int cmma_test_essa(void) : [reg1] "=&d" (reg1), [reg2] "=&a" (reg2), [rc] "+&d" (rc), - [tmp] "=&d" (tmp...
173767c218cc1da74704e7863f165ac8a9796f3e
Analyze and fix the following issue in the Linux kernel code: s390/purgatory: Use -D__DISABLE_EXPORTS
Problem Details: The object files in purgatory do not export symbols, so disable exports for all the object files, not only sha256.o, with -D__DISABLE_EXPORTS. This fixes a build failure with CONFIG_GENDWARFKSYMS, where we would otherwise attempt to calculate symbol versions for purgatory objects and fail because they...
```diff diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile index bdcf2a3b6c41..bd39b36e7bd6 100644 --- a/arch/s390/purgatory/Makefile +++ b/arch/s390/purgatory/Makefile @@ -8,7 +8,7 @@ PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y)) $(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE $(c...
01ca2846338d314cdcd3da1aca7f290ec380542c
Analyze and fix the following issue in the Linux kernel code: ACPI: thermal: Fix stale comment regarding trip points
Problem Details: Update the comment next to acpi_thermal_get_trip_points() call site in acpi_thermal_add() to reflect what the code does. It has diverged from the code after changes that removed the _CRT evaluation from acpi_thermal_get_trip_points() among other things. Signed-off-by: xueqin Luo <luoxueqin@kylinos.cn...
```diff diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 95982c098d5b..0c874186f8ae 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -803,7 +803,7 @@ static int acpi_thermal_add(struct acpi_device *device) acpi_thermal_aml_dependency_fix(tz); - /* Get trip points [_CRT, _PSV, ...
00834971f0d9e38beae37e92055b1432782827d0
Analyze and fix the following issue in the Linux kernel code: soc: apple: rtkit: Fix use-after-free in apple_rtkit_crashlog_rx()
Problem Details: This code calls kfree(bfr); and then passes "bfr" to rtk->ops->crashed() which is a use after free. The ->crashed function pointer is implemented by apple_nvme_rtkit_crashed() and it doesn't use the "bfr" pointer so this doesn't cause a problem. But it still looks sketchy as can be. Fix this by movi...
```diff diff --git a/drivers/soc/apple/rtkit.c b/drivers/soc/apple/rtkit.c index f19061967459..2f5f878bf899 100644 --- a/drivers/soc/apple/rtkit.c +++ b/drivers/soc/apple/rtkit.c @@ -370,7 +370,6 @@ static void apple_rtkit_crashlog_rx(struct apple_rtkit *rtk, u64 msg) apple_rtkit_memcpy(rtk, bfr, &rtk->crashlog_buff...
f54af4af7bd282c0ca9eef3f3bc239ae2fd9a58a
Analyze and fix the following issue in the Linux kernel code: bitmap: Align documentation between bitmap_gather() and bitmap_scatter()
Problem Details: The bitmap_scatter() mistakenly refers to itself for detailed explanation about the relationships of two. Instead of simply fixing this, align text in both making a cross-reference. Fixes: de5f84338970 ("lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers") Signed-off-by: Andy Shevchenk...
```diff diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 2026953e2c4e..595217b7a6e7 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -560,9 +560,9 @@ void bitmap_replace(unsigned long *dst, * ...0..11...0..10 * dst: 0000001100000010 * - * A relationship exists between b...
1f7af2931158a5e819ac71bcba91e961ac5ca3ea
Analyze and fix the following issue in the Linux kernel code: arm64: dts: apple: t8103: Fix spi4 power domain sort order
Problem Details: Signed-off-by: Hector Martin <marcan@marcan.st> Reviewed-by: Neal Gompa <neal@gompa.dev> Link: https://lore.kernel.org/r/20241203-asahi-spi-dt-v2-1-cd68bfaf0c84@jannau.net Signed-off-by: Sven Peter <sven@svenpeter.dev>
```diff diff --git a/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi b/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi index 9645861a858c..c41c57d63997 100644 --- a/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi @@ -387,6 +387,15 @@ power-domains = <&ps_sio>, <&ps_spi_p>; }; + ps_s...
eb79d71e506a1caeb0dedd1bab0e6899e8e74f5b
Analyze and fix the following issue in the Linux kernel code: drm/xe: Add xe_mmio_init() initialization function
Problem Details: Add a convenience function for minimal initialization of struct xe_mmio. This function also validates that the entirety of the provided mmio region is usable with struct xe_reg. v2: Modify commit message, add kernel doc, refactor assert (Michal) v3: Fix off-by-one bug, add clarifying macro (Michal) v4...
```diff diff --git a/drivers/gpu/drm/xe/regs/xe_reg_defs.h b/drivers/gpu/drm/xe/regs/xe_reg_defs.h index 89716172fbb8..c39aab843e35 100644 --- a/drivers/gpu/drm/xe/regs/xe_reg_defs.h +++ b/drivers/gpu/drm/xe/regs/xe_reg_defs.h @@ -7,9 +7,21 @@ #define _XE_REG_DEFS_H_ #include <linux/build_bug.h> +#include <linux/lo...
d1a09c610027e446ed30c21f61c2f2443bf92a3f
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: adjust the file entry in SPI OFFLOAD
Problem Details: Commit 8e02d1886988 ("spi: add basic support for SPI offloading") adds a new MAINTAINERS section referring to the non-existent file include/linux/spi/spi-offload.h rather than referring to the files added with this commit in the directory include/linux/spi/offload/. Adjust the file reference to the in...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 9fae4aa36beb..3b0668b8dbdb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22299,7 +22299,7 @@ SPI OFFLOAD R: David Lechner <dlechner@baylibre.com> F: drivers/spi/spi-offload-trigger-pwm.c F: drivers/spi/spi-offload.c -F: include/linux/spi/spi-offload.h +F: include...
5d9fca12f54d3e25e02521aa8f3ec5d53759b334
Analyze and fix the following issue in the Linux kernel code: ASoC: amd: ps: fix inconsistent indenting warning in check_and_handle_sdw_dma_irq()
Problem Details: Fix below inconsistent indenting smatch warning. smatch warnings: sound/soc/amd/ps/pci-ps.c:68 check_and_handle_sdw_dma_irq() warn: inconsistent indenting Fixes: 4516be370ced ("ASoC: amd: ps: refactor soundwire dma interrupt handling") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lor...
```diff diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c index 2ff8e67c19bd..221c65ff03c9 100644 --- a/sound/soc/amd/ps/pci-ps.c +++ b/sound/soc/amd/ps/pci-ps.c @@ -129,7 +129,7 @@ static short int check_and_handle_sdw_dma_irq(struct acp63_dev_data *adata, u32 if (ext_intr_stat1 & ACP63_P1_AUDIO1_R...
a78f244a9150da0878a37a1b59fb0608b1ccfb9d
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: imx: Fix error code in probe()
Problem Details: This accidentally returns "common->clk_num" instead of "ret". Fixes: 651e0ed391b1 ("ASoC: SOF: imx: introduce more common structures and functions") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/b30ffe7f-21fd-45f9-9528-d6d689e04003@stanley.mountain Signed-off-b...
```diff diff --git a/sound/soc/sof/imx/imx-common.c b/sound/soc/sof/imx/imx-common.c index ea4651a0995c..62bf707aa909 100644 --- a/sound/soc/sof/imx/imx-common.c +++ b/sound/soc/sof/imx/imx-common.c @@ -425,8 +425,7 @@ static int imx_probe(struct snd_sof_dev *sdev) ret = devm_clk_bulk_get_all(sdev->dev, &common->cl...
b20be2c77ce5341ded1a2d8aec119f6dca8ef1ad
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: imx: Fix an IS_ERR() vs NULL bug in imx_parse_ioremap_memory()
Problem Details: The devm_ioremap() function doesn't return error pointers, it returns NULL on error. Update the checking to match. Fixes: 651e0ed391b1 ("ASoC: SOF: imx: introduce more common structures and functions") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/68973636-eab...
```diff diff --git a/sound/soc/sof/imx/imx-common.c b/sound/soc/sof/imx/imx-common.c index c3594815e60e..ea4651a0995c 100644 --- a/sound/soc/sof/imx/imx-common.c +++ b/sound/soc/sof/imx/imx-common.c @@ -338,9 +338,9 @@ static int imx_parse_ioremap_memory(struct snd_sof_dev *sdev) } sdev->bar[blk_type] = devm_io...
97aeb6507356c72d87fd93f45705d3f4b1a05d14
Analyze and fix the following issue in the Linux kernel code: arm64: dts: apple: t7000: Add missing CPU p-state 7 for J96 and J97
Problem Details: Add missing CPU p-state 7 @ 1512 MHz for iPad mini 4. Fixes: e97323994f4a ("arm64: dts: apple: t7000: Add cpufreq nodes") Signed-off-by: Nick Chan <towinchenmi@gmail.com> Link: https://lore.kernel.org/r/20250217-mini4-cpufreq-v1-1-8974e90dd806@gmail.com Signed-off-by: Sven Peter <sven@svenpeter.dev>
```diff diff --git a/arch/arm64/boot/dts/apple/t7000-mini4.dtsi b/arch/arm64/boot/dts/apple/t7000-mini4.dtsi index 6da15d15601b..cc235c5a0c43 100644 --- a/arch/arm64/boot/dts/apple/t7000-mini4.dtsi +++ b/arch/arm64/boot/dts/apple/t7000-mini4.dtsi @@ -57,3 +57,7 @@ &typhoon_opp06 { status = "okay"; }; + +&typhoon_op...
487a3ea7b1b8ba2ca7d2c2bb3c3594dc360d6261
Analyze and fix the following issue in the Linux kernel code: nvme/ioctl: add missing space in err message
Problem Details: nvme_validate_passthru_nsid() logs an err message whose format string is split over 2 lines. There is a missing space between the two pieces, resulting in log lines like "... does not match nsid (1)of namespace". Add the missing space between ")" and "of". Also combine the format string pieces onto a s...
```diff diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c index e8930146847a..b1b46c2713e1 100644 --- a/drivers/nvme/host/ioctl.c +++ b/drivers/nvme/host/ioctl.c @@ -283,8 +283,7 @@ static bool nvme_validate_passthru_nsid(struct nvme_ctrl *ctrl, { if (ns && nsid != ns->head->ns_id) { dev_err(ctrl...
578539e0969028f711c34d9a4565931edfe1d730
Analyze and fix the following issue in the Linux kernel code: nvme-tcp: fix connect failure on receiving partial ICResp PDU
Problem Details: nvme_tcp_init_connection() attempts to receive an ICResp PDU but only checks that the return value from recvmsg() is non-negative. If the sender closes the TCP connection or sends fewer than 128 bytes, this check will pass even though the full PDU wasn't received. Ensure the full ICResp PDU is receive...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index a7398e9e5f71..8a9131c95a3d 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1492,11 +1492,14 @@ static int nvme_tcp_init_connection(struct nvme_tcp_queue *queue) msg.msg_control = cbuf; msg.msg_controllen = sizeof(c...
cd513e0434c3e736c549bc99bf7982658b25114d
Analyze and fix the following issue in the Linux kernel code: nvme: tcp: Fix compilation warning with W=1
Problem Details: When compiling with W=1, a warning result for the function nvme_tcp_set_queue_io_cpu(): host/tcp.c:1578: warning: Function parameter or struct member 'queue' not described in 'nvme_tcp_set_queue_io_cpu' host/tcp.c:1578: warning: expecting prototype for Track the number of queues assigned to each cpu u...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 038b35238c26..a7398e9e5f71 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1608,7 +1608,7 @@ static bool nvme_tcp_poll_queue(struct nvme_tcp_queue *queue) ctrl->io_queues[HCTX_TYPE_POLL]; } -/** +/* * Track th...
01ef7ff7dd3cd8cc71af8d1d1496be853281a948
Analyze and fix the following issue in the Linux kernel code: nvmet: pci-epf: Avoid RCU stalls under heavy workload
Problem Details: The delayed work item function nvmet_pci_epf_poll_sqs_work() polls all submission queues and keeps running in a loop as long as commands are being submitted by the host. Depending on the preemption configuration of the kernel, under heavy command workload, this function can thus run for more than RCU_C...
```diff diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c index b646a8f468ea..565d2bd36dcd 100644 --- a/drivers/nvme/target/pci-epf.c +++ b/drivers/nvme/target/pci-epf.c @@ -1694,6 +1694,7 @@ static void nvmet_pci_epf_poll_sqs_work(struct work_struct *work) struct nvmet_pci_epf_ctrl *ctrl = ...
ffa35567632c0059e7f380ed155e26a07ec4153f
Analyze and fix the following issue in the Linux kernel code: nvmet: pci-epf: Do not uselessly write the CSTS register
Problem Details: The function nvmet_pci_epf_poll_cc_work() will do nothing if there are no changes to the controller configuration (CC) register. However, even for such case, this function still calls nvmet_update_cc() and uselessly writes the CSTS register. Avoid this by simply rescheduling the poll_cc work if the CC ...
```diff diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c index efd4623fb002..b646a8f468ea 100644 --- a/drivers/nvme/target/pci-epf.c +++ b/drivers/nvme/target/pci-epf.c @@ -46,7 +46,7 @@ static DEFINE_MUTEX(nvmet_pci_epf_ports_mutex); /* * BAR CC register and SQ polling intervals. */ -#de...
68a5c91f01fc9f086567b260cced003ed9fdff3f
Analyze and fix the following issue in the Linux kernel code: nvmet: pci-epf: Correctly initialize CSTS when enabling the controller
Problem Details: The function nvmet_pci_epf_poll_cc_work() sets the NVME_CSTS_RDY bit of the controller status register (CSTS) when nvmet_pci_epf_enable_ctrl() returns success. However, since this function can be called several times (e.g. if the host reboots), instead of setting the bit in ctrl->csts, initialize this ...
```diff diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c index ac30b42cc622..efd4623fb002 100644 --- a/drivers/nvme/target/pci-epf.c +++ b/drivers/nvme/target/pci-epf.c @@ -1822,14 +1822,14 @@ static int nvmet_pci_epf_enable_ctrl(struct nvmet_pci_epf_ctrl *ctrl) if (ctrl->io_sqes < sizeof(st...
4082326807072b71496501b6a0c55ffe8d5092a5
Analyze and fix the following issue in the Linux kernel code: nvmet: Fix crash when a namespace is disabled
Problem Details: The namespace percpu counter protects pending I/O, and we can only safely diable the namespace once the counter drop to zero. Otherwise we end up with a crash when running blktests/nvme/058 (eg for loop transport): [ 2352.930426] [ T53909] Oops: general protection fault, probably for non-canonical ad...
```diff diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index cdc4a09a6e8a..2e741696f371 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -606,6 +606,9 @@ int nvmet_ns_enable(struct nvmet_ns *ns) goto out_dev_put; } + if (percpu_ref_init(&ns->ref, nvmet_destroy_na...
4991b88c2514e62bd8410e0a96999ef662765d9d
Analyze and fix the following issue in the Linux kernel code: net: phy: marvell-88q2xxx: Init PHY private structure for mv88q211x
Problem Details: When adding LED support for mv88q222x devices the PHY private data structure was added to the mv88q211x code path, the data structure is however only allocated during mv88q222x probe. This results in a nullptr deference for mv88q2110 devices. Unable to handle kernel NULL pointer dereference at virtua...
```diff diff --git a/drivers/net/phy/marvell-88q2xxx.c b/drivers/net/phy/marvell-88q2xxx.c index 1859db10b391..15c0f8adc2f5 100644 --- a/drivers/net/phy/marvell-88q2xxx.c +++ b/drivers/net/phy/marvell-88q2xxx.c @@ -834,13 +834,24 @@ static int mv88q2xxx_leds_probe(struct phy_device *phydev) static int mv88q2xxx_probe(...
a3bdd8f5c2217e1cb35db02c2eed36ea20fb50f5
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Avoid dropping MIDI events at closing multiple ports
Problem Details: We fixed the UAF issue in USB MIDI code by canceling the pending work at closing each MIDI output device in the commit below. However, this assumed that it's the only one that is tied with the endpoint, and it resulted in unexpected data truncations when multiple devices are assigned to a single endpo...
```diff diff --git a/sound/usb/midi.c b/sound/usb/midi.c index 737dd00e97b1..779d97d31f17 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c @@ -1145,7 +1145,7 @@ static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream) { struct usbmidi_out_port *port = substream->runtime->private_data; - can...
d42d543368343c0449a4e433b5f02e063a86209c
Analyze and fix the following issue in the Linux kernel code: vxlan: Join / leave MC group after remote changes
Problem Details: When a vxlan netdevice is brought up, if its default remote is a multicast address, the device joins the indicated group. Therefore when the multicast remote address changes, the device should leave the current group and subscribe to the new one. Similarly when the interface used for endpoint communic...
```diff diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c index 9d3919265a52..e2354c02def0 100644 --- a/drivers/net/vxlan/vxlan_core.c +++ b/drivers/net/vxlan/vxlan_core.c @@ -4419,6 +4419,7 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[], struct netlink_ext...
857ae05549ee2542317e7084ecaa5f8536634dd9
Analyze and fix the following issue in the Linux kernel code: vsock/bpf: Warn on socket without transport
Problem Details: In the spirit of commit 91751e248256 ("vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]"), armorize the "impossible" cases with a warning. Fixes: 634f1a7110b4 ("vsock: support sockmap") Signed-off-by: Michal Luczaj <mhal@rbox.co> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed...
```diff diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 53a081d49d28..7e3db87ae433 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1189,6 +1189,9 @@ static int vsock_read_skb(struct sock *sk, skb_read_actor_t read_actor) { struct vsock_sock *vsk = vsock_sk(sk); + if ...
8fb5bb169d17cdd12c2dcc2e96830ed487d77a0f
Analyze and fix the following issue in the Linux kernel code: sockmap, vsock: For connectible sockets allow only connected
Problem Details: sockmap expects all vsocks to have a transport assigned, which is expressed in vsock_proto::psock_update_sk_prot(). However, there is an edge case where an unconnected (connectible) socket may lose its previously assigned transport. This is handled with a NULL check in the vsock/BPF recv path. Another...
```diff diff --git a/net/core/sock_map.c b/net/core/sock_map.c index f1b9b3958792..2f1be9baad05 100644 --- a/net/core/sock_map.c +++ b/net/core/sock_map.c @@ -541,6 +541,9 @@ static bool sock_map_sk_state_allowed(const struct sock *sk) return (1 << sk->sk_state) & (TCPF_ESTABLISHED | TCPF_LISTEN); if (sk_is_stream...
b4164de5041b51cda3438e75bce668e2556057c3
Analyze and fix the following issue in the Linux kernel code: octeontx2-pf: Add AF_XDP non-zero copy support
Problem Details: Set xdp rx ring memory type as MEM_TYPE_PAGE_POOL for af-xdp to work. This is needed since xdp_return_frame internally will use page pools. Fixes: 06059a1a9a4a ("octeontx2-pf: Add XDP support to netdev PF") Signed-off-by: Suman Ghosh <sumang@marvell.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index 2b49bfec7869..161cf33ef89e 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -1047,6 +1047,...
9c9b2d86a642a83ade5ea4df2bceb4d568e3e9e3
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx5: Fix the CCM interrupts description
Problem Details: On the i.MX5 chips the peripheral interrupts are represented directly only by their interrupt numbers. The CCM nodes are not following this format and cause the following dt-schema warnings: ccm@73fd4000: interrupts: [[0], [71], [4], [0], [72], [4]] is too long Fix it by passing only the two interru...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx50.dtsi b/arch/arm/boot/dts/nxp/imx/imx50.dtsi index 1b6f444443dd..d76c496b3f71 100644 --- a/arch/arm/boot/dts/nxp/imx/imx50.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx50.dtsi @@ -338,7 +338,7 @@ clks: ccm@53fd4000 { compatible = "fsl,imx50-ccm"; reg = <0x53f...
bb93ead69410a8096b3e33d197eb26e003abb0dc
Analyze and fix the following issue in the Linux kernel code: ARM: dts: vfxxx: Fix the CAAM job ring node names
Problem Details: According to fsl,sec-v4.0.yaml, the job ring node names should be 'jr'. Change them to fix the following dt-schema warnings: crypto@400f0000: 'jr0@1000', 'jr1@2000' do not match any of the regexes: '^jr@[0-9a-f]+$', '^rtic@[0-9a-f]+$', 'pinctrl-[0-9]+' Signed-off-by: Fabio Estevam <festevam@denx.de>...
```diff diff --git a/arch/arm/boot/dts/nxp/vf/vfxxx.dtsi b/arch/arm/boot/dts/nxp/vf/vfxxx.dtsi index acccf9a3c898..6334ad4aec4b 100644 --- a/arch/arm/boot/dts/nxp/vf/vfxxx.dtsi +++ b/arch/arm/boot/dts/nxp/vf/vfxxx.dtsi @@ -725,13 +725,13 @@ clocks = <&clks VF610_CLK_CAAM>; clock-names = "ipg"; - sec_jr0:...
83964a29379cb08929a39172780a4c2992bc7c93
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6qdl-apalis: Fix poweroff on Apalis iMX6
Problem Details: The current solution for powering off the Apalis iMX6 is not functioning as intended. To resolve this, it is necessary to power off the vgen2_reg, which will also set the POWER_ENABLE_MOCI signal to a low state. This ensures the carrier board is properly informed to initiate its power-off sequence. Th...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi index dffab5aa8b9c..88be29166c1a 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi @@ -108,6 +108,11 @@ }; }; + poweroff { + compatible ...
9d7de2aa8b41407bc96d89a80dc1fd637d389d42
Analyze and fix the following issue in the Linux kernel code: x86/percpu/64: Use relative percpu offsets
Problem Details: The percpu section is currently linked at absolute address 0, because older compilers hard-coded the stack protector canary value at a fixed offset from the start of the GS segment. Now that the canary is a normal percpu variable, the percpu section does not need to be linked at a specific address. x...
```diff diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index a4687122951f..b8fee88dac3d 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -431,7 +431,11 @@ DECLARE_INIT_PER_CPU(fixed_percpu_data); static inline unsigned long cpu_kernelmode_gs_ba...
78c4374ef8b842c6abf195d6f963853c7ec464d2
Analyze and fix the following issue in the Linux kernel code: x86/module: Deal with GOT based stack cookie load on Clang < 17
Problem Details: Clang versions before 17 will not honour -fdirect-access-external-data for the load of the stack cookie emitted into each function's prologue and epilogue. This is not an issue for the core kernel, as the linker will relax these loads into LEA instructions that take the address of __stack_chk_guard di...
```diff diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index 1fb83d47711f..128602612eca 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h @@ -54,8 +54,9 @@ typedef struct user_i387_struct elf_fpregset_t; #define R_X86_64_GLOB_DAT 6 /* Create GOT entry */ #define R_X86_64_J...
76b35f59bbe66d3eda8a98021bc01f9200131f09
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt6359: fix dtbs_check error for audio-codec
Problem Details: This change fixes these dtbs_check errors for audio-codec: 1. pmic: 'mt6359codec' does not match any of the regexes: 'pinctrl-[0-9]+' - Replace device node name to generic 'audio-codec' 2. pmic: regulators: 'compatible' is a required property - Add 'mediatek,mt6359-codec' to compatible. Fixes: 3b7d1...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt6359.dtsi b/arch/arm64/boot/dts/mediatek/mt6359.dtsi index 150ad84d5d2b..7b10f9c59819 100644 --- a/arch/arm64/boot/dts/mediatek/mt6359.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6359.dtsi @@ -15,7 +15,8 @@ #io-channel-cells = <1>; }; - mt6359codec: mt6359code...
02d954c0fdf91845169cdacc7405b120f90afe01
Analyze and fix the following issue in the Linux kernel code: sched: Compact RSEQ concurrency IDs with reduced threads and affinity
Problem Details: When a process reduces its number of threads or clears bits in its CPU affinity mask, the mm_cid allocation should eventually converge towards smaller values. However, the change introduced by: commit 7e019dcc470f ("sched: Improve cache locality of RSEQ concurrency IDs for intermittent workloads") a...
```diff diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 6b27db7f9496..0234f14f2aa6 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -875,10 +875,11 @@ struct mm_struct { */ unsigned int nr_cpus_allowed; /** - * @max_nr_cid: Maximum number of concurrency IDs allo...
91c4ee4a7628fcfc16bdb936db0433ea54cd1a89
Analyze and fix the following issue in the Linux kernel code: media: radio-aztech.c: fix old email in comment
Problem Details: Fix a wrong email address. It's only used in a comment, but it's easy enough to fix. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
```diff diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index 4909c337b027..d989c0b3966f 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c @@ -2,7 +2,7 @@ /* * radio-aztech.c - Aztech radio card driver * - * Converted to the radio-isa fram...
e4740118b752005cbed339aec9a1d1c43620e0b9
Analyze and fix the following issue in the Linux kernel code: media: test-drivers: vivid: don't call schedule in loop
Problem Details: Artem reported that the CPU load was 100% when capturing from vivid at low resolution with ffmpeg. This was caused by: while (time_is_after_jiffies(cur_jiffies + wait_jiffies) && !kthread_should_stop()) schedule(); If there are no other processes running that can be scheduled, then th...
```diff diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c index 669bd96da4c7..273e8ed8c2a9 100644 --- a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c @@ -789,9 +789,14 @@ static int v...
8344017aaf32a7532cff293eb3df7fd2265ebafd
Analyze and fix the following issue in the Linux kernel code: test_xarray: fix failure in check_pause when CONFIG_XARRAY_MULTI is not defined
Problem Details: In case CONFIG_XARRAY_MULTI is not defined, xa_store_order can store a multi-index entry but xas_for_each can't tell sbiling entry from valid entry. So the check_pause failed when we store a multi-index entry and wish xas_for_each can handle it normally. Avoid to store multi-index entry when CONFIG_X...
```diff diff --git a/lib/test_xarray.c b/lib/test_xarray.c index 6932a26f4927..0e865bab4a10 100644 --- a/lib/test_xarray.c +++ b/lib/test_xarray.c @@ -1418,7 +1418,7 @@ static noinline void check_pause(struct xarray *xa) { XA_STATE(xas, xa, 0); void *entry; - unsigned int order; + int order; unsigned long index ...
ac7af1f57acd1e1d112b36e036584ca4bc4c284a
Analyze and fix the following issue in the Linux kernel code: kasan: don't call find_vm_area() in a PREEMPT_RT kernel
Problem Details: The following bug report was found when running a PREEMPT_RT debug kernel. BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 140605, name: kunit_try_catch preempt_count: 1, expected: 0 Call trace: rt_spin...
```diff diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 3fe77a360f1c..8357e1a33699 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -370,6 +370,36 @@ static inline bool init_task_stack_addr(const void *addr) sizeof(init_thread_union.stack)); } +/* + * This function is invoked with report_lock (...
5dcf52e2ce0fe3c4516b1e494c1af6d3a69e30e7
Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix check for running THP tests
Problem Details: When testing if we should try to compact memory or drop caches before we run the THP or HugeTLB tests we use | as an or operator. This doesn't work since run_vmtests.sh is written in shell where this is used to pipe the output of the first argument into the second. Instead use the shell's -o operator...
```diff diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh index 333c468c2699..da7e26668103 100755 --- a/tools/testing/selftests/mm/run_vmtests.sh +++ b/tools/testing/selftests/mm/run_vmtests.sh @@ -220,7 +220,7 @@ run_test() { if test_selected ${CATEGORY}; then # On...
6d7bc938adca9024a6b51cf55d9b0542b653b69c
Analyze and fix the following issue in the Linux kernel code: mm: hugetlb: avoid fallback for specific node allocation of 1G pages
Problem Details: When using the HugeTLB kernel command-line to allocate 1G pages from a specific node, such as: default_hugepagesz=1G hugepages=1:1 If node 1 happens to not have enough memory for the requested number of 1G pages, the allocation falls back to other nodes. A quick way to reproduce this is by creati...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 65068671e460..163190e89ea1 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3145,7 +3145,7 @@ int __alloc_bootmem_huge_page(struct hstate *h, int nid) /* do node specific alloc */ if (nid != NUMA_NO_NODE) { - m = memblock_alloc_try_nid_raw(huge_page_size(h),...
99333229dee41b992f3b0493f6aa2e3528138384
Analyze and fix the following issue in the Linux kernel code: memcg: avoid dead loop when setting memory.max
Problem Details: A softlockup issue was found with stress test: watchdog: BUG: soft lockup - CPU#27 stuck for 26s! [migration/27:181] CPU: 27 UID: 0 PID: 181 Comm: migration/27 6.14.0-rc2-next-20250210 #1 Stopper: multi_cpu_stop <- stop_machine_from_inactive_cpu RIP: 0010:stop_machine_yield+0x2/0x10 RSP: 0000:ff4a...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 46f8b372d212..4de6acb9b8ec 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4166,6 +4166,7 @@ static ssize_t memory_max_write(struct kernfs_open_file *of, memcg_memory_event(memcg, MEMCG_OOM); if (!mem_cgroup_out_of_memory(memcg, GFP_KERNEL, 0)) ...
f39edcf6349abb2ca2df96acc8645f4d2631d0a7
Analyze and fix the following issue in the Linux kernel code: mm: pgtable: fix incorrect reclaim of non-empty PTE pages
Problem Details: In zap_pte_range(), if the pte lock was released midway, the pte entries may be refilled with physical pages by another thread, which may cause a non-empty PTE page to be reclaimed and eventually cause the system to crash. To fix it, fall back to the slow path in this case to recheck if all pte entrie...
```diff diff --git a/mm/memory.c b/mm/memory.c index 539c0f7c6d54..b4d3d4893267 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1719,7 +1719,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, pmd_t pmdval; unsigned long start = addr; bool can_reclaim_pt = reclaim_pt_is_enabled(start, end, details); - ...
b016d0873777462e55af4c615104cc684fce086d
Analyze and fix the following issue in the Linux kernel code: taskstats: modify taskstats version
Problem Details: After adding "delay max" and "delay min" to the taskstats structure, the taskstats version needs to be updated. Link: https://lkml.kernel.org/r/20250208144901218Q5ptVpqsQkb2MOEmW4Ujn@zte.com.cn Fixes: f65c64f311ee ("delayacct: add delay min to record delay peak") Signed-off-by: Wang Yaxin <wang.yaxin@...
```diff diff --git a/include/uapi/linux/taskstats.h b/include/uapi/linux/taskstats.h index 934e20ef7f79..95762232e018 100644 --- a/include/uapi/linux/taskstats.h +++ b/include/uapi/linux/taskstats.h @@ -34,7 +34,7 @@ */ -#define TASKSTATS_VERSION 14 +#define TASKSTATS_VERSION 15 #define TS_COMM_LEN 32 /* should...
2272dbc471037b78f308b44351ab1b9f88d32628
Analyze and fix the following issue in the Linux kernel code: getdelays: fix error format characters
Problem Details: getdelays had a compilation issue because the format string was not updated when the "delay min" was added. For example, after adding the "delay min" in printf, there were 7 strings but only 6 "%s" format specifiers. Similarly, after adding the 't->cpu_delay_total', there were 7 variables but only 6 ...
```diff diff --git a/tools/accounting/getdelays.c b/tools/accounting/getdelays.c index 100ad3dc091a..3feac0482fe9 100644 --- a/tools/accounting/getdelays.c +++ b/tools/accounting/getdelays.c @@ -196,22 +196,22 @@ static int get_family_id(int sd) static void print_delayacct(struct taskstats *t) { - printf("\n\nCPU ...
41cddf83d8b00f29fd105e7a0777366edc69a5cf
Analyze and fix the following issue in the Linux kernel code: mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize()
Problem Details: If migration succeeded, we called folio_migrate_flags()->mem_cgroup_migrate() to migrate the memcg from the old to the new folio. This will set memcg_data of the old folio to 0. Similarly, if migration failed, memcg_data of the dst folio is left unset. If we call folio_putback_lru() on such folios (...
```diff diff --git a/mm/migrate_device.c b/mm/migrate_device.c index 9cf26592ac93..5bd888223cc8 100644 --- a/mm/migrate_device.c +++ b/mm/migrate_device.c @@ -840,20 +840,15 @@ void migrate_device_finalize(unsigned long *src_pfns, dst = src; } + if (!folio_is_zone_device(dst)) + folio_add_lru(dst); remov...
035d3c778709680288b3954ee896043132bc3f8d
Analyze and fix the following issue in the Linux kernel code: tools/mm: fix build warnings with musl-libc
Problem Details: musl-libc warns about the following: /home/florian/dev/buildroot/output/arm64/rpi4-b/host/aarch64-buildroot-linux-musl/sysroot/usr/include/sys/errno.h:1:2: attention: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Wcpp] 1 | #warning redirecting incorrect #include <sys/errno.h...
```diff diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c index bcac7ebfb51f..d7e5e8902af8 100644 --- a/tools/mm/page-types.c +++ b/tools/mm/page-types.c @@ -24,8 +24,8 @@ #include <signal.h> #include <inttypes.h> #include <sys/types.h> -#include <sys/errno.h> -#include <sys/fcntl.h> +#include <errno.h> +#i...
2ede647a6fde3e54a6bfda7cf01c716649655900
Analyze and fix the following issue in the Linux kernel code: mm,madvise,hugetlb: check for 0-length range after end address adjustment
Problem Details: Add a sanity check to madvise_dontneed_free() to address a corner case in madvise where a race condition causes the current vma being processed to be backed by a different page size. During a madvise(MADV_DONTNEED) call on a memory region registered with a userfaultfd, there's a period of time where t...
```diff diff --git a/mm/madvise.c b/mm/madvise.c index 49f3a75046f6..08b207f8e61e 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -933,7 +933,16 @@ static long madvise_dontneed_free(struct vm_area_struct *vma, */ end = vma->vm_end; } - VM_WARN_ON(start >= end); + /* + * If the memory region between star...
63895d20d63b446f5049a963983489319c2ea3e2
Analyze and fix the following issue in the Linux kernel code: mm/zswap: fix inconsistency when zswap_store_page() fails
Problem Details: Commit b7c0ccdfbafd ("mm: zswap: support large folios in zswap_store()") skips charging any zswap entries when it failed to zswap the entire folio. However, when some base pages are zswapped but it failed to zswap the entire folio, the zswap operation is rolled back. When freeing zswap entries for th...
```diff diff --git a/mm/zswap.c b/mm/zswap.c index 6504174fbc6a..ac9d299e7d0c 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -1445,9 +1445,9 @@ resched: * main API **********************************/ -static ssize_t zswap_store_page(struct page *page, - struct obj_cgroup *objcg, - struct zswap_pool *pool) +stati...
f4b78260fc678ccd7169f32dc9f3bfa3b93931c7
Analyze and fix the following issue in the Linux kernel code: lib/iov_iter: fix import_iovec_ubuf iovec management
Problem Details: import_iovec() says that it should always be fine to kfree the iovec returned in @iovp regardless of the error code. __import_iovec_ubuf() never reallocates it and thus should clear the pointer even in cases when copy_iovec_*() fail. Link: https://lkml.kernel.org/r/378ae26923ffc20fd5e41b4360d673bf47b...
```diff diff --git a/lib/iov_iter.c b/lib/iov_iter.c index 9ec806f989f2..65f550cb5081 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -1428,6 +1428,8 @@ static ssize_t __import_iovec_ubuf(int type, const struct iovec __user *uvec, struct iovec *iov = *iovp; ssize_t ret; + *iovp = NULL; + if (compat) ret ...
c8a3e63ff9d75b9f3f031c90d218876051dea0ba
Analyze and fix the following issue in the Linux kernel code: procfs: fix a locking bug in a vmcore_add_device_dump() error path
Problem Details: Unlock vmcore_mutex when returning -EBUSY. Link: https://lkml.kernel.org/r/20250129222003.1495713-1-bvanassche@acm.org Fixes: 0f3b1c40c652 ("fs/proc/vmcore: disallow vmcore modifications while the vmcore is open") Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Michael S. Tsirkin <mst@re...
```diff diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index a00120a3c099..10d01eb09c43 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -1524,7 +1524,7 @@ int vmcore_add_device_dump(struct vmcoredd_data *data) pr_warn_once("Unexpected adding of device dump\n"); if (vmcore_open) { ret = -EBUSY; - goto...
8ce68566fa2ce8855860112d6c6188d460ea1cdb
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx53-ppd: Fix touchscreen reset-gpios
Problem Details: According to atmel,maxtouch.yaml, the correct property that describes the GPIO connected to the touchscreen reset line is 'reset-gpios'. Change it accordingly to fix the following dt-schema warning: 'reset-gpio' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Fabio Estevam <festev...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx53-ppd.dts b/arch/arm/boot/dts/nxp/imx/imx53-ppd.dts index e939acc1c88b..2892e457fea7 100644 --- a/arch/arm/boot/dts/nxp/imx/imx53-ppd.dts +++ b/arch/arm/boot/dts/nxp/imx/imx53-ppd.dts @@ -593,7 +593,7 @@ touchscreen@4b { compatible = "atmel,maxtouch"; - reset-g...
38f59e0e8bd2b3e1319716e4aeaeb9a6223b006d
Analyze and fix the following issue in the Linux kernel code: arm64: dts: freescale: tqma8mpql: Fix vqmmc-supply
Problem Details: eMMC is supplied by BUCK5 rail. Use the actual regulator instead of a virtual fixed regulator. Fixes: 418d1d840e421 ("arm64: dts: freescale: add initial device tree for TQMa8MPQL with i.MX8MP") Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Shawn Guo <shawnguo@kernel.o...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi index 336785a9fba8..3ddc5aaa7c5f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi @@ -1,7 +1,8 @@ // SPDX-License-Iden...
e0daff38f48ce33e5691d4bc1df93daca3213c45
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx7s: Move csi-mux to below root
Problem Details: fsl,imx-iomuxc-gpr.yaml only contains the mux-controller but the actual video-mux is not part of it. So move it below root node. Fixes the dtbs_check warning: arch/arm/boot/dts/nxp/imx/imx7s-mba7.dtb: iomuxc-gpr@30340000: 'csi-mux' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: ...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx7s.dtsi b/arch/arm/boot/dts/nxp/imx/imx7s.dtsi index 22dd72499ef2..2629968001a7 100644 --- a/arch/arm/boot/dts/nxp/imx/imx7s.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx7s.dtsi @@ -176,6 +176,34 @@ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>; }; ...
fbf10b86f6057cf79300720da4ea4b77e6708b0d
Analyze and fix the following issue in the Linux kernel code: firmware: imx-scu: fix OF node leak in .probe()
Problem Details: imx_scu_probe() calls of_parse_phandle_with_args(), but does not release the OF node reference obtained by it. Add a of_node_put() call after done with the node. Fixes: f25a066d1a07 ("firmware: imx-scu: Support one TX and one RX") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Signed-off-by: S...
```diff diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c index 1dd4362ef9a3..8c28e25ddc8a 100644 --- a/drivers/firmware/imx/imx-scu.c +++ b/drivers/firmware/imx/imx-scu.c @@ -280,6 +280,7 @@ static int imx_scu_probe(struct platform_device *pdev) return ret; sc_ipc->fast_ipc = of_devic...
8d9f547f74c7b984dd903c4ffec026f2b2d46c58
Analyze and fix the following issue in the Linux kernel code: bpf: Allow struct_ops prog to return referenced kptr
Problem Details: Allow a struct_ops program to return a referenced kptr if the struct_ops operator's return type is a struct pointer. To make sure the returned pointer continues to be valid in the kernel, several constraints are required: 1) The type of the pointer must matches the return type 2) The pointer originall...
```diff diff --git a/kernel/bpf/bpf_struct_ops.c b/kernel/bpf/bpf_struct_ops.c index 0ef00f7f64c9..db13ee70d94d 100644 --- a/kernel/bpf/bpf_struct_ops.c +++ b/kernel/bpf/bpf_struct_ops.c @@ -390,7 +390,7 @@ int bpf_struct_ops_desc_init(struct bpf_struct_ops_desc *st_ops_desc, st_ops_desc->value_type = btf_type_by_id(...
bdf5d13aa05ec314d4385b31ac974d6c7e0997c9
Analyze and fix the following issue in the Linux kernel code: ibmvnic: Don't reference skb after sending to VIOS
Problem Details: Previously, after successfully flushing the xmit buffer to VIOS, the tx_bytes stat was incremented by the length of the skb. It is invalid to access the skb memory after sending the buffer to the VIOS because, at any point after sending, the VIOS can trigger an interrupt to free this memory. A race be...
```diff diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index e95ae0d39948..0676fc547b6f 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2408,6 +2408,7 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev) d...
915e34d5ad35a6a9e56113f852ade4a730fb88f0
Analyze and fix the following issue in the Linux kernel code: s390/ism: add release function for struct device
Problem Details: According to device_release() in /drivers/base/core.c, a device without a release function is a broken device and must be fixed. The current code directly frees the device after calling device_add() without waiting for other kernel parts to release their references. Thus, a reference could still be he...
```diff diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c index e36e3ea165d3..2f34761e6413 100644 --- a/drivers/s390/net/ism_drv.c +++ b/drivers/s390/net/ism_drv.c @@ -588,6 +588,15 @@ out: return ret; } +static void ism_dev_release(struct device *dev) +{ + struct ism_dev *ism; + + ism = contain...
07b598c0e6f06a0f254c88dafb4ad50f8a8c6eea
Analyze and fix the following issue in the Linux kernel code: drop_monitor: fix incorrect initialization order
Problem Details: Syzkaller reports the following bug: BUG: spinlock bad magic on CPU#1, syz-executor.0/7995 lock: 0xffff88805303f3e0, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 CPU: 1 PID: 7995 Comm: syz-executor.0 Tainted: G E 5.10.209+ #1 Hardware name: VMware, Inc. VMware Virtual Platform/44...
```diff diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 6efd4cccc9dd..212f0a048cab 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c @@ -1734,30 +1734,30 @@ static int __init init_net_drop_monitor(void) return -ENOSPC; } - rc = genl_register_family(&net_drop_monitor_family);...
dbcbec81c9b8899cf92f6a763a4119aff61ba778
Analyze and fix the following issue in the Linux kernel code: selftests: net: fix grammar in reuseaddr_ports_exhausted.c log message
Problem Details: This patch fixes a grammatical error in a test log message in reuseaddr_ports_exhausted.c for better clarity. Signed-off-by: Pranav Tyagi <pranav.tyagi03@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250213152612.4434-1-pranav.tyagi03@gmail.com Signed-off-by:...
```diff diff --git a/tools/testing/selftests/net/reuseaddr_ports_exhausted.c b/tools/testing/selftests/net/reuseaddr_ports_exhausted.c index 066efd30e294..7b9bf8a7bbe1 100644 --- a/tools/testing/selftests/net/reuseaddr_ports_exhausted.c +++ b/tools/testing/selftests/net/reuseaddr_ports_exhausted.c @@ -112,7 +112,7 @@ T...
b9b72ce0f5f4679fc878ad010658a72f30595118
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Prefix temperature event bitmap with '0x' for clarity
Problem Details: Prepend '0x' to the sensor bitmap in the warning message to clearly indicate that the bitmap is in hexadecimal format. Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Link: https://patch...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/events.c b/drivers/net/ethernet/mellanox/mlx5/core/events.c index e8beb6289d01..a661aa522a9a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/events.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/events.c @@ -167,7 +167,7 @@ static int temp_warn(struct n...
afa08fde7c4780ea5556d9d4df6c1daa38ba0d6b
Analyze and fix the following issue in the Linux kernel code: net: phy: mediatek: Add token ring access helper functions in mtk-phy-lib
Problem Details: This patch adds TR(token ring) manipulations and adds correct macro names for those magic numbers. TR is a way to access proprietary registers on page 52b5. Use these helper functions so we can see which fields we're going to modify/set/clear. TR functions with __* prefix mean that the operations insi...
```diff diff --git a/drivers/net/phy/mediatek/mtk-ge-soc.c b/drivers/net/phy/mediatek/mtk-ge-soc.c index 69cd6a1cbad4..5d7373793659 100644 --- a/drivers/net/phy/mediatek/mtk-ge-soc.c +++ b/drivers/net/phy/mediatek/mtk-ge-soc.c @@ -25,6 +25,90 @@ #define MTK_PHY_PAGE_EXTENDED_2A30 0x2a30 +/* Registers on Token Rin...
d7e3fd658248f257006227285095d190e70ee73a
Analyze and fix the following issue in the Linux kernel code: irqchip/jcore-aic, clocksource/drivers/jcore: Fix jcore-pit interrupt request
Problem Details: The jcore-aic irqchip does not have separate interrupt numbers reserved for cpu-local vs global interrupts. Therefore the device drivers need to request the given interrupt as per CPU interrupt. 69a9dcbd2d65 ("clocksource/drivers/jcore: Use request_percpu_irq()") converted the clocksource driver over ...
```diff diff --git a/drivers/clocksource/jcore-pit.c b/drivers/clocksource/jcore-pit.c index a3fe98cd3838..82815428f8f9 100644 --- a/drivers/clocksource/jcore-pit.c +++ b/drivers/clocksource/jcore-pit.c @@ -114,6 +114,18 @@ static int jcore_pit_local_init(unsigned cpu) pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER...
4cb77793842a351b39a030f77caebace3524840e
Analyze and fix the following issue in the Linux kernel code: irqchip/gic-v3: Fix rk3399 workaround when secure interrupts are enabled
Problem Details: Christoph reports that their rk3399 system dies since commit 773c05f417fa1 ("irqchip/gic-v3: Work around insecure GIC integrations"). It appears that some rk3399 have secure payloads, and that the firmware sets SCR_EL3.FIQ==1. Obivously, disabling security in that configuration leads to even more prob...
```diff diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 76dce0aac246..270d7a4d85a6 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -44,6 +44,7 @@ static u8 dist_prio_nmi __ro_after_init = GICV3_PRIO_NMI; #define FLAGS_WORKAROUND_GICR_WAKER_MSM8996 (1ULL <<...
a19bcde49998aac0a4ff99e9a84339adecffbfcb
Analyze and fix the following issue in the Linux kernel code: Revert "fsverity: relax build time dependency on CRYPTO_SHA256"
Problem Details: This reverts commit e3a606f2c544b231f6079c8c5fea451e772e1139 because it allows people to create broken configurations that enable FS_VERITY but not SHA-256 support. The commit did allow people to disable the generic SHA-256 implementation when it's not needed. But that at best allowed saving a bit of...
```diff diff --git a/fs/verity/Kconfig b/fs/verity/Kconfig index e1036e535352..40569d3527a7 100644 --- a/fs/verity/Kconfig +++ b/fs/verity/Kconfig @@ -4,13 +4,9 @@ config FS_VERITY bool "FS Verity (read-only file-based authenticity protection)" select CRYPTO select CRYPTO_HASH_INFO - # SHA-256 is implied as it's ...
75eb8b9410ee5f75851cfda9a328dab891e452d8
Analyze and fix the following issue in the Linux kernel code: Revert "fscrypt: relax Kconfig dependencies for crypto API algorithms"
Problem Details: This mostly reverts commit a0fc20333ee4bac1147c4cf75dea098c26671a2f. Keep the relevant parts of the comment added by that commit. The problem with that commit is that it allowed people to create broken configurations that enabled FS_ENCRYPTION but not the mandatory algorithms. An example of this can ...
```diff diff --git a/fs/crypto/Kconfig b/fs/crypto/Kconfig index 5aff5934baa1..332d828fe6fa 100644 --- a/fs/crypto/Kconfig +++ b/fs/crypto/Kconfig @@ -24,20 +24,16 @@ config FS_ENCRYPTION # # Also note that this option only pulls in the generic implementations of the # algorithms, not any per-architecture optimized ...
b1118df145faab925637da0e02c53e8b3072699a
Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: Limit jpeg rings as per max for jpeg_v_4_0_3
Problem Details: Since pmfw supports for smuv13_0_6 is limited to 8 jpeg rings per instance, which is the max for jpeg_v_4_0_3. Limit it to same to avoid out of bound access. Fixes: 568199a5c7a9 ("drm/amd/pm: Limit to 8 jpeg rings per instance") Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <l...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c index 3fa671f4981c..9f2de69f53b2 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c @@ -2644,7 +2644,7 @@ static ssiz...
196222dccb3e1f3defe85919ae9f00f6f4a3f4c4
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Reapply 2fde4fdddc1f
Problem Details: Commit 2563391e57b5 ("drm/amd/display: DML2.1 resynchronization") blew away the compiler warning fix from commit 2fde4fdddc1f ("drm/amd/display: Avoid -Wenum-float-conversion in add_margin_and_round_to_dfs_grainularity()"), causing the warning to reappear. drivers/gpu/drm/amd/amdgpu/../display/dc/dm...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c index 02004b7efa8c..15507926f3a4 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c +++ b/drivers/gpu/drm/amd/displa...
e7a477735f1771b9a9346a5fbd09d7ff0641723a
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix user queue validation on Gfx7/8
Problem Details: To workaround queue full h/w issue on Gfx7/8, when application create AQL queue, the ring buffer bo allocate size is queue_size/2 and map queue_size ring buffer to GPU in 2 pieces using 2 attachments, each attachment map size is queue_size/2, with same ring_bo backing memory. For Gfx7/8, user queue bu...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c index ecccd7adbab4..62c635e9d1aa 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c @@ -233,6 +233,7 @@ void kfd_queue_buffer_put(struct amdgpu_bo **bo) int kfd_queue_acqui...
2012aff9815e8a0b6439a2fe73aedef12ba4595e
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Rename VCN clock gating function for consistency
Problem Details: Change the function name from vcn_v2_5_enable_clock_gating_inst to vcn_v2_5_enable_clock_gating to ensure consistency in naming. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:781: warning: expecting prototype for vcn_v2_5_enable_clock_gating_inst(). Prototype was for vcn_v2_5_ena...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c index b9be304aa294..105e59f6132b 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c @@ -770,7 +770,7 @@ static void vcn_v2_5_clock_gating_dpg_mode(struct amdgpu_device *adev, }...
0487f50310cfeec1bb4480a67294fc7081c5ed22
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn5.0.1: use correct dpm helper
Problem Details: The VCN and UVD helpers were split in commit ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") However, this happened in parallel to the vcn 5.0.1 development so it was missed there. Fixes: 346492f30ce3 ("drm/amdgpu: Add VCN_5_0_1 support") Reviewed-by: Lijo Lazar <lijo.lazar@amd.com...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c index 8b463c977d08..8b0b3739a537 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c @@ -575,8 +575,10 @@ static int vcn_v5_0_1_start(struct amdgpu_device *adev) uint32...
c917e39cbdcd9fff421184db6cc461cc58d52c17
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/umsch: fix ucode check
Problem Details: Return an error if the IP version doesn't match otherwise we end up passing a NULL string to amdgpu_ucode_request. We should never hit this in practice today since we only enable the umsch code on the supported IP versions, but add a check to be safe. Reported-by: kernel test robot <lkp@intel.com> Clo...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c index 78319988b054..a7f2648245ec 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c @@ -129,7 +129,7 @@ int amdgpu_umsch_mm_init_microcode(struct amd...
fe652becdbfccf265f4cea0eb379418d08c6596a
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/umsch: declare umsch firmware
Problem Details: Needed to be properly picked up for the initrd, etc. Fixes: 3488c79beafa ("drm/amdgpu: add initial support for UMSCH") Reviewed-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Lang Yu <Lang.Yu@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c index 2cfa2447d13e..78319988b054 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c @@ -32,6 +32,8 @@ #include "amdgpu_umsch_mm.h" #include "umsch_...
80513e389765c8f9543b26d8fa4bbdf0e59ff8bc
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/gfx: only call mes for enforce isolation if supported
Problem Details: This should not be called on chips without MES so check if MES is enabled and if the cleaner shader is supported. Fixes: 8521e3c5f058 ("drm/amd/amdgpu: limit single process inside MES") Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd....
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index 27f5318c3a26..b9bd6654f317 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -1670,11 +1670,13 @@ static ssize_t amdgpu_gfx_set_enforce_isolation(struct device...
8c6631234557515a7567c6251505a98e9793c8a6
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: refine smu send msg debug log format
Problem Details: remove unnecessary line breaks. [ 51.280860] amdgpu 0000:24:00.0: amdgpu: smu send message: GetEnabledSmuFeaturesHigh(13) param: 0x00000000, resp: 0x00000001, readval: 0x00003763 Fixes: 0cd2bc06de72 ("drm/amd/pm: enable amdgpu smu send message log") Signed-off-by: Yang Wang <...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c index 9f55207ea9bc..d834d134ad2b 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c @@ -459,8 +459,7 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu, } if...
e77aa4b2eaa7fb31b2a7a50214ecb946b2a8b0f6
Analyze and fix the following issue in the Linux kernel code: ALSA: seq: Drop UMP events when no UMP-conversion is set
Problem Details: When a destination client is a user client in the legacy MIDI mode and it sets the no-UMP-conversion flag, currently the all UMP events are still passed as-is. But this may confuse the user-space, because the event packet size is different from the legacy mode. Since we cannot handle UMP events in us...
```diff diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index 073b56dc2225..cb66ec42a3f8 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -678,12 +678,18 @@ static int snd_seq_deliver_single_event(struct snd_seq_client *client, dest_port->time_real...
290237fde9491ca26cf4020bbf5a2b330452e7db
Analyze and fix the following issue in the Linux kernel code: btrfs: selftests: fix btrfs_test_delayed_refs() leak of transaction
Problem Details: The btrfs_transaction struct leaks, which can cause sporadic fstests failures when kmemleak checking is enabled: kmemleak: 5 new suspected memory leaks (see /sys/kernel/debug/kmemleak) > cat /sys/kernel/debug/kmemleak unreferenced object 0xffff88810fdc6c00 (size 512): comm "modprobe", pid 203, jiffi...
```diff diff --git a/fs/btrfs/tests/delayed-refs-tests.c b/fs/btrfs/tests/delayed-refs-tests.c index 6558508c2ddf..265370e79a54 100644 --- a/fs/btrfs/tests/delayed-refs-tests.c +++ b/fs/btrfs/tests/delayed-refs-tests.c @@ -1009,6 +1009,7 @@ int btrfs_test_delayed_refs(u32 sectorsize, u32 nodesize) if (!ret) ret = ...
dd8b0582e25e36bba483c60338741c0ba5bc426c
Analyze and fix the following issue in the Linux kernel code: block: fix NULL pointer dereferenced within __blk_rq_map_sg
Problem Details: The block layer internal flush request may not have bio attached, so the request iterator has to be initialized from valid req->bio, otherwise NULL pointer dereferenced is triggered. Cc: Christoph Hellwig <hch@lst.de> Reported-and-tested-by: Cheyenne Wills <cheyenne.wills@gmail.com> Fixes: b7175e24d6a...
```diff diff --git a/block/blk-merge.c b/block/blk-merge.c index 39b738c0e4c9..c7c85e10cf9c 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -556,11 +556,14 @@ int __blk_rq_map_sg(struct request_queue *q, struct request *rq, { struct req_iterator iter = { .bio = rq->bio, - .iter = rq->bio->bi_iter, };...
46dcd68aaccac0812c12ec3f4e59c8963e2760ad
Analyze and fix the following issue in the Linux kernel code: firmware: arm_ffa: Unregister the FF-A devices when cleaning up the partitions
Problem Details: Both the FF-A core and the bus were in a single module before the commit 18c250bd7ed0 ("firmware: arm_ffa: Split bus and driver into distinct modules"). The arm_ffa_bus_exit() takes care of unregistering all the FF-A devices. Now that there are 2 distinct modules, if the core driver is unloaded and re...
```diff diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c index a90e2faa9902..98118823cf84 100644 --- a/drivers/firmware/arm_ffa/bus.c +++ b/drivers/firmware/arm_ffa/bus.c @@ -160,11 +160,12 @@ static int __ffa_devices_unregister(struct device *dev, void *data) return 0; } -static void f...
7bc0f589c81d62bc95f9ed142847219fc5d8ef6c
Analyze and fix the following issue in the Linux kernel code: firmware: arm_ffa: Fix big-endian support in __ffa_partition_info_regs_get()
Problem Details: Currently the FF-A driver doesn't support big-endian correctly. It is hard to regularly test the setup due to lack of test infrastructure and tools. In order to support full stack, we need to take small steps in getting the support for big-endian kernel added slowly. This change fixes the support in _...
```diff diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c index bc6ffd25ad2e..87e106c728b8 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -307,14 +307,24 @@ __ffa_partition_info_get(u32 uuid0, u32 uuid1, u32 uuid2, u32 uuid3, #define CURRENT_I...