id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
285cae57a51664cc94e85de0ff994f9965b3aca8
Analyze and fix the following issue in the Linux kernel code: kunit: Extend kconfig help text for KUNIT_UML_PCI
Problem Details: Checkpatch.pl expects at least 4 lines of help text. Extend the help text to make checkpatch.pl happy. Link: https://lore.kernel.org/r/20250916-kunit-pci-kconfig-v1-1-6d1369f06f2a@linutronix.de Fixes: 031cdd3bc3f3 ("kunit: Enable PCI on UML without triggering WARN()") Suggested-by: Shuah Khan <skhan@...
```diff diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig index 1823539e96da..7a6af361d2fc 100644 --- a/lib/kunit/Kconfig +++ b/lib/kunit/Kconfig @@ -112,5 +112,9 @@ config KUNIT_UML_PCI select UML_PCI help Enables the PCI subsystem on UML for use by KUnit tests. + Some KUnit tests require the PCI core which...
288dac9fb6084330d968459c750c838fd06e10e6
Analyze and fix the following issue in the Linux kernel code: drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path
Problem Details: Add missing mutex unlock before returning from the error path in cdns_mhdp_atomic_enable(). Fixes: 935a92a1c400 ("drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Qi Xi <xiqi2@huawei.com> Reviewed-by: Luca Ceresoli <luca.cer...
```diff diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index a614d1384f71..38726ae1bf15 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -1984,8 +1984,10 @@ static void cd...
a46d47ae302304d41f4b7f52d183968659897573
Analyze and fix the following issue in the Linux kernel code: Docs/zh_CN: Translate ubifs-authentication.rst to Simplified Chinese
Problem Details: translate the "ubifs-authentication.rst" into Simplified Chinese. Update to commit d56b699d76d1("Documentation: Fix typos") Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Signed-off-by: yang tao <yang.tao172@zte.com.cn> Signed-off-by: Alex Shi <alexs@kernel.org>
```diff diff --git a/Documentation/translations/zh_CN/filesystems/index.rst b/Documentation/translations/zh_CN/filesystems/index.rst index 6049b599dec8..2fbaadba77a7 100644 --- a/Documentation/translations/zh_CN/filesystems/index.rst +++ b/Documentation/translations/zh_CN/filesystems/index.rst @@ -27,3 +27,4 @@ Linux K...
0e6d01c464560b56139902dbf9bc4f075469fc51
Analyze and fix the following issue in the Linux kernel code: Docs/zh_CN: Translate ubifs.rst to Simplified Chinese
Problem Details: translate the "ubifs.rst" into Simplified Chinese. Update to commit 5f5cae9b0e81("Documentation: ubifs: Fix compression idiom") Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Signed-off-by: yang tao <yang.tao172@zte.com.cn> Signed-off-by: Alex Shi <alexs@kernel.org>
```diff diff --git a/Documentation/translations/zh_CN/filesystems/index.rst b/Documentation/translations/zh_CN/filesystems/index.rst index 9f2a8b003778..6049b599dec8 100644 --- a/Documentation/translations/zh_CN/filesystems/index.rst +++ b/Documentation/translations/zh_CN/filesystems/index.rst @@ -26,4 +26,4 @@ Linux K...
c92f59bac078465425f1223b29a8d63c89027eba
Analyze and fix the following issue in the Linux kernel code: drm/display: bridge-connector: use scope-specific variable for the bridge pointer
Problem Details: Currently drm_bridge_connector_init() reuses the 'bridge' variable, first as a loop variable in the long drm_for_each_bridge_in_chain() and then in the HDMI-specific code as a shortcut to bridge_connector->bridge_cec. We are about to remove the 'bridge' loop variable for drm_for_each_bridge_in_chain()...
```diff diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c index baacd21e7341..b4fa929bd146 100644 --- a/drivers/gpu/drm/display/drm_bridge_connector.c +++ b/drivers/gpu/drm/display/drm_bridge_connector.c @@ -818,7 +818,7 @@ struct drm_connector *drm_bridge_conn...
f7381b9116407ba2a429977c80ff8df953ea9354
Analyze and fix the following issue in the Linux kernel code: slab: mark slab->obj_exts allocation failures unconditionally
Problem Details: alloc_slab_obj_exts() should mark failed obj_exts vector allocations independent on whether the vector is being allocated for a new or an existing slab. Current implementation skips doing this for existing slabs. Fix this by marking failed allocations unconditionally. Fixes: 09c46563ff6d ("codetag: de...
```diff diff --git a/mm/slub.c b/mm/slub.c index 674c5036a18a..b74d65aa32c6 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2039,8 +2039,7 @@ int alloc_slab_obj_exts(struct slab *slab, struct kmem_cache *s, slab_nid(slab)); if (!vec) { /* Mark vectors which failed to allocate */ - if (new_slab) - mark_failed_...
4038016397da5c1cebb10e7c85a36d06123724a8
Analyze and fix the following issue in the Linux kernel code: slab: prevent warnings when slab obj_exts vector allocation fails
Problem Details: When object extension vector allocation fails, we set slab->obj_exts to OBJEXTS_ALLOC_FAIL to indicate the failure. Later, once the vector is successfully allocated, we will use this flag to mark codetag references stored in that vector as empty to avoid codetag warnings. slab_obj_exts() used to retri...
```diff diff --git a/mm/slab.h b/mm/slab.h index 248b34c839b7..0dd3f33c0963 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -526,8 +526,12 @@ static inline struct slabobj_ext *slab_obj_exts(struct slab *slab) unsigned long obj_exts = READ_ONCE(slab->obj_exts); #ifdef CONFIG_MEMCG - VM_BUG_ON_PAGE(obj_exts && !(obj_exts ...
930f2361fe542a00de9ce6070b1b6edb976f1165
Analyze and fix the following issue in the Linux kernel code: x86/bugs: Report correct retbleed mitigation status
Problem Details: On Intel CPUs, the default retbleed mitigation is IBRS/eIBRS but this requires that a similar spectre_v2 mitigation is applied. If the user selects a different spectre_v2 mitigation (like spectre_v2=retpoline) a warning is printed but sysfs will still report 'Mitigation: IBRS' or 'Mitigation: Enhanced...
```diff diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 66dbb3bd2791..6a526ae1fe99 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -1462,8 +1462,10 @@ static void __init retbleed_update_mitigation(void) retbleed_mitigation = RETBLEED_MITIGATION_EIBRS; break...
d1cc1baef67ac6c09b74629ca053bf3fb812f7dc
Analyze and fix the following issue in the Linux kernel code: x86/bugs: Fix reporting of LFENCE retpoline
Problem Details: The LFENCE retpoline mitigation is not secure but the kernel prints inconsistent messages about this fact. The dmesg log says 'Mitigation: LFENCE', implying the system is mitigated. But sysfs reports 'Vulnerable: LFENCE' implying the system (correctly) is not mitigated. Fix this by printing a consis...
```diff diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 145f8777aa32..66dbb3bd2791 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -2032,7 +2032,7 @@ static void __init spectre_v2_user_apply_mitigation(void) static const char * const spectre_v2_strings[] = { [SP...
30ef245c6f5a6842d60308590cf26d0ae836fbf0
Analyze and fix the following issue in the Linux kernel code: x86/bugs: Fix spectre_v2 forcing
Problem Details: There were two oddities with spectre_v2 command line options. First, any option other than 'off' or 'auto' would force spectre_v2 mitigations even if the CPU (hypothetically) wasn't vulnerable to spectre_v2. That was inconsistent with all the other bugs where mitigations are ignored unless an explicit...
```diff diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index f28a7383b88b..145f8777aa32 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -2057,29 +2057,32 @@ static int __init spectre_v2_parse_cmdline(char *str) if (nospectre_v2) return 0; - if (!strcmp(str, "off"...
9316512b717f6f25c4649b3fdb0a905b6a318e9f
Analyze and fix the following issue in the Linux kernel code: powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure
Problem Details: PAGE_KERNEL_TEXT is an old macro that is used to tell kernel whether kernel text has to be mapped read-only or read-write based on build time options. But nowadays, with functionnalities like jump_labels, static links, etc ... more only less all kernels need to be read-write at some point, and some co...
```diff diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index fd29fb289d1e..17fd7ff6e535 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h @@ -20,18 +20,6 @@ struct mm_struct; #include <asm/nohash/pgtable.h> #endif /* !CONFIG_PPC_BOOK3S */ ...
7cec88bfdd33434d62d4d5ba664127fa175b50e7
Analyze and fix the following issue in the Linux kernel code: powerpc/fprobe: fix updated fprobe for function-graph tracer
Problem Details: Since commit 4346ba160409 ("fprobe: Rewrite fprobe on function-graph tracer"), FPROBE depends on HAVE_FUNCTION_GRAPH_FREGS. With previous patch adding HAVE_FUNCTION_GRAPH_FREGS for powerpc, FPROBE can be enabled on powerpc. But with the commit b5fa903b7f7c ("fprobe: Add fprobe_header encoding feature")...
```diff diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 449404d3932b..325c1171894d 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -243,6 +243,7 @@ config PPC select HAVE_EFFICIENT_UNALIGNED_ACCESS select HAVE_GUP_FAST select HAVE_FTRACE_GRAPH_FUNC + select HAVE_FTRACE_REGS_HAVING_P...
e747883c7d7306acb4d683038d881528fbfbe749
Analyze and fix the following issue in the Linux kernel code: xfs: fix log CRC mismatches between i386 and other architectures
Problem Details: When mounting file systems with a log that was dirtied on i386 on other architectures or vice versa, log recovery is unhappy: [ 11.068052] XFS (vdb): Torn write (CRC failure) detected at log block 0x2. Truncating head block from 0xc. This is because the CRCs generated by i386 and other architecture...
```diff diff --git a/fs/xfs/libxfs/xfs_log_format.h b/fs/xfs/libxfs/xfs_log_format.h index a42a83211724..fd00b77af32b 100644 --- a/fs/xfs/libxfs/xfs_log_format.h +++ b/fs/xfs/libxfs/xfs_log_format.h @@ -173,12 +173,40 @@ typedef struct xlog_rec_header { __be32 h_prev_block; /* block number to previous LR : 4 */ ...
476688c8ac60da9bfcb3ce7f5a2d30a145ef7f76
Analyze and fix the following issue in the Linux kernel code: xfs: remove the xfs_extent_t typedef
Problem Details: There are almost no users of the typedef left, kill it and switch the remaining users to use the underlying struct. Also fix up the comment about the struct xfs_extent definition to be correct and read more easily. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@ker...
```diff diff --git a/fs/xfs/libxfs/xfs_log_format.h b/fs/xfs/libxfs/xfs_log_format.h index 2c3c5e67f78a..6d0cad455a8f 100644 --- a/fs/xfs/libxfs/xfs_log_format.h +++ b/fs/xfs/libxfs/xfs_log_format.h @@ -605,16 +605,17 @@ xfs_blft_from_flags(struct xfs_buf_log_format *blf) /* * EFI/EFD log format definitions */ -ty...
e3df98d30369d7859a855bd3e500ea46205640ca
Analyze and fix the following issue in the Linux kernel code: xfs: extend removed sysctls table
Problem Details: Commit 21d59d00221e4e ("xfs: remove deprecated sysctl knobs") moves recently-removed sysctls to the removed sysctls table but fails to extend the table, hence triggering Sphinx warning: Documentation/admin-guide/xfs.rst:365: ERROR: Malformed table. Text in column margin in table line 8. =============...
```diff diff --git a/Documentation/admin-guide/xfs.rst b/Documentation/admin-guide/xfs.rst index d6f531f2c0e6..c85cd327af28 100644 --- a/Documentation/admin-guide/xfs.rst +++ b/Documentation/admin-guide/xfs.rst @@ -355,15 +355,15 @@ None currently. Removed Sysctls =============== -============================= ====...
8d7de4a014f589c1776959f7fdadbf7b12045aac
Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: asahi-kasei,ak4458: Reference common DAI properties
Problem Details: Reference the dai-common.yaml schema to allow '#sound-dai-cells' and "sound-name-prefix' to be used. Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20250910-imx8mp-prt8ml-v1-2-fd04aed15670@pengutronix.de Signed-off-by: ...
```diff diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml index 4477f84b7acc..1fdbeecc5eff 100644 --- a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml +++ b/Documentation/devicetree/bindings/sound/asahi-kasei,a...
17628f1abbf4bd4162c655f3260d68bc1934ec73
Analyze and fix the following issue in the Linux kernel code: dt-bindings: gpio: fix trivial-gpio's schema id
Problem Details: In case the trivial-gpio schema is referenced through a $ref like /schemas/trivial-gpio.yaml to match its current schema ID, the following error message is displayed: Error in referenced schema matching $id: http://devicetree.org/schemas/trivial-gpio.yaml Tried these paths (check schema $id if path is...
```diff diff --git a/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml b/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml index 0299d4a25086..c994177de940 100644 --- a/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml @@ -1,7 +1,7 @@ ...
9fc4a3da9a0259a0500848b5d8657918efde176b
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm: Disable bottom softirqs as part of spin_lock_irq() on PREEMPT_RT
Problem Details: snd_pcm_group_lock_irq() acquires a spinlock_t and disables interrupts via spin_lock_irq(). This also implicitly disables the handling of softirqs such as TIMER_SOFTIRQ. On PREEMPT_RT softirqs are preemptible and spin_lock_irq() does not disable them. That means a timer can be invoked during spin_lock_...
```diff diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 1eab940fa2e5..68bee40c9ada 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -84,19 +84,24 @@ void snd_pcm_group_init(struct snd_pcm_group *group) } /* define group lock helpers */ -#define DEFINE_PCM_GROUP_LOCK(action,...
d5aeec592154716ae8ba2cf094c1f04b077998a3
Analyze and fix the following issue in the Linux kernel code: hinic3: Fix code style (Missing a blank line before return)
Problem Details: Fix code style of missing a blank line before return. Co-developed-by: Zhu Yikai <zhuyikai1@h-partners.com> Signed-off-by: Zhu Yikai <zhuyikai1@h-partners.com> Signed-off-by: Fan Gong <gongfan1@huawei.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/e4b34db5...
```diff diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_lld.c b/drivers/net/ethernet/huawei/hinic3/hinic3_lld.c index 10477fb9cc34..3db8241a3b0c 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_lld.c +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_lld.c @@ -122,6 +122,7 @@ static int hinic3_attach_aux_devi...
4404f6af810829588a51968959c6b85574109c13
Analyze and fix the following issue in the Linux kernel code: hinic3: Fix missing napi->dev in netif_queue_set_napi
Problem Details: As netif_queue_set_napi checks napi->dev, if it doesn't have it and it will warn_on and return. So we should use netif_napi_add before netif_queue_set_napi because netif_napi_add has "napi->dev = dev". Co-developed-by: Zhu Yikai <zhuyikai1@h-partners.com> Signed-off-by: Zhu Yikai <zhuyikai1@h-partners...
```diff diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_irq.c b/drivers/net/ethernet/huawei/hinic3/hinic3_irq.c index 33eb9080739d..a69b361225e9 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_irq.c +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_irq.c @@ -42,11 +42,11 @@ static void qp_add_napi(struct hi...
225d1ee0f5ba3218d1814d36564fdb5f37b50474
Analyze and fix the following issue in the Linux kernel code: platform/x86: asus-wmi: Re-add extra keys to ignore_key_wlan quirk
Problem Details: It turns out that the dual screen models use 0x5E for attaching and detaching the keyboard instead of 0x5F. So, re-add the codes by reverting commit cf3940ac737d ("platform/x86: asus-wmi: Remove extra keys from ignore_key_wlan quirk"). For our future reference, add a comment next to 0x5E indicating tha...
```diff diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index 3a488cf9ca06..6a62bc5b02fd 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c @@ -673,6 +673,8 @@ static void asus_nb_wmi_key_filter(struct asus_wmi_driver *asus_wmi, int *code, if...
35e526398bd0faddef3396d71760e4c5ea75868f
Analyze and fix the following issue in the Linux kernel code: drm/i915/backlight: Honor VESA eDP backlight luminance control capability
Problem Details: The VESA AUX backlight fails to be enable luminance based backlight mainpulation becaused luminance_set is false by default. Fix it by using luminance support control capabitliy. Fixes: e13af5166a359 ("drm/i915/backlight: Use drm helper to initialize edp backlight") Signed-off-by: Aaron Ma <aaron.ma@c...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c index 41228478b21c..0a3a3f6a5f9d 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c @@ -546,7 +546,7 @@ static in...
85afa9ea122dd9d4a2ead104a951d318975dcd25
Analyze and fix the following issue in the Linux kernel code: PCI: endpoint: pci-epf-test: Add NULL check for DMA channels before release
Problem Details: The fields dma_chan_tx and dma_chan_rx of the struct pci_epf_test can be NULL even after EPF initialization. Then it is prudent to check that they have non-NULL values before releasing the channels. Add the checks in pci_epf_test_clean_dma_chan(). Without the checks, NULL pointer dereferences happen a...
```diff diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 09e1b8b46b55..31617772ad51 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -301,15 +301,20 @@ static void pci_epf_test_clean_dma_chan...
2b351e3d04be9e1533f26c3464f1e44a5beace30
Analyze and fix the following issue in the Linux kernel code: RISC-V: KVM: Write hgatp register with valid mode bits
Problem Details: According to the RISC-V Privileged Architecture Spec, when MODE=Bare is selected,software must write zero to the remaining fields of hgatp. We have detected the valid mode supported by the HW before, So using a valid mode to detect how many vmid bits are supported. Fixes: fd7bb4a251df ("RISC-V: KVM: ...
```diff diff --git a/arch/riscv/kvm/vmid.c b/arch/riscv/kvm/vmid.c index 3b426c800480..5f33625f4070 100644 --- a/arch/riscv/kvm/vmid.c +++ b/arch/riscv/kvm/vmid.c @@ -14,6 +14,7 @@ #include <linux/smp.h> #include <linux/kvm_host.h> #include <asm/csr.h> +#include <asm/kvm_mmu.h> #include <asm/kvm_tlb.h> #include <a...
f4103c1171a4e661a61783e16073160be31b956f
Analyze and fix the following issue in the Linux kernel code: KVM: riscv: selftests: Add missing headers for new testcases
Problem Details: Add missing headers to fix the build for new RISC-V KVM selftests. Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Signed-off-by: Dong Yang <dayss1224@gmail.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/bfb66541918de68cd89b83bc3430af94bdc75a85.1756710918.git....
```diff diff --git a/tools/testing/selftests/kvm/access_tracking_perf_test.c b/tools/testing/selftests/kvm/access_tracking_perf_test.c index c9de66537ec3..b058f27b2141 100644 --- a/tools/testing/selftests/kvm/access_tracking_perf_test.c +++ b/tools/testing/selftests/kvm/access_tracking_perf_test.c @@ -50,6 +50,7 @@ #i...
c2f7c32b254006ad48f8e4efb2e7e7bf71739f17
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to mitigate overhead of f2fs_zero_post_eof_page()
Problem Details: f2fs_zero_post_eof_page() may cuase more overhead due to invalidate_lock and page lookup, change as below to mitigate its overhead: - check new_size before grabbing invalidate_lock - lookup and invalidate pages only in range of [old_size, new_size] Fixes: ba8dac350faf ("f2fs: fix to zero post-eof page...
```diff diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 1aae4361d0a8..ffa045b39c01 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -35,15 +35,23 @@ #include <trace/events/f2fs.h> #include <uapi/linux/f2fs.h> -static void f2fs_zero_post_eof_page(struct inode *inode, loff_t new_size) +static void f2fs_zero_pos...
ce4be9e4307c5a60701ff6e0cafa74caffdc54ce
Analyze and fix the following issue in the Linux kernel code: zram: fix slot write race condition
Problem Details: Parallel concurrent writes to the same zram index result in leaked zsmalloc handles. Schematically we can have something like this: CPU0 CPU1 zram_slot_lock() zs_free(handle) zram_slot_lock() zram_slot_lock() zs_free(handle) zram_slot_lock() compress compre...
```diff diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 8acad3cc6e6e..f31652085adc 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1795,6 +1795,7 @@ static int write_same_filled_page(struct zram *zram, unsigned long fill, u32 index) { zram_sl...
d625a2b08c089397d3a03bff13fa8645e4ec7a01
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to avoid migrating empty section
Problem Details: It reports a bug from device w/ zufs: F2FS-fs (dm-64): Inconsistent segment (173822) type [1, 0] in SSA and SIT F2FS-fs (dm-64): Stopped filesystem due to reason: 4 Thread A Thread B - f2fs_expand_inode_data - f2fs_allocate_pinning_section - f2fs_gc_range - do_garbage_collect w/ segno #x ...
```diff diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index ed3acbfc83ca..a7708cf80c04 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1794,6 +1794,13 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi, struct folio *sum_folio = filemap_get_folio(META_MAPPING(sbi), GET_SUM_BLOCK(sbi, segno)); + if (is_cu...
9251a9e6e871cb03c4714a18efa8f5d4a8818450
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to truncate first page in error path of f2fs_truncate()
Problem Details: syzbot reports a bug as below: loop0: detected capacity change from 0 to 40427 F2FS-fs (loop0): Wrong SSA boundary, start(3584) end(4096) blocks(3072) F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop0): invalid crc value F2FS-fs (loop0): f2fs_convert_inline_folio: corr...
```diff diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 42faaed6a02d..1aae4361d0a8 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -904,8 +904,16 @@ int f2fs_truncate(struct inode *inode) /* we should check inline_data size */ if (!f2fs_may_inline_data(inode)) { err = f2fs_convert_inline_inode(inode); - ...
869833f54e8306326b85ca3ed08979b7ad412a4a
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to update map->m_next_extent correctly in f2fs_map_blocks()
Problem Details: Script to reproduce: mkfs.f2fs -O extra_attr,compression /dev/vdb -f mount /dev/vdb /mnt/f2fs -o mode=lfs,noextent_cache cd /mnt/f2fs f2fs_io write 1 0 1024 rand dsync testfile xfs_io testfile -c "fsync" f2fs_io write 1 0 512 rand dsync testfile xfs_io testfile -c "fsync" cd / umount /mnt/f2fs mount /d...
```diff diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 86395b546311..2bec936174e2 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1776,7 +1776,7 @@ sync_out: map->m_len - ofs); } if (map->m_next_extent) - *map->m_next_extent = pgofs + 1; + *map->m_next_extent = is_hole ? pgofs + 1 : pgofs; } ...
93ab4881a4e2b9657bdce4b8940073bfb4ed5eab
Analyze and fix the following issue in the Linux kernel code: net: natsemi: fix `rx_dropped` double accounting on `netif_rx()` failure
Problem Details: `netif_rx()` already increments `rx_dropped` core stat when it fails. The driver was also updating `ndev->stats.rx_dropped` in the same path. Since both are reported together via `ip -s -s` command, this resulted in drops being counted twice in user-visible stats. Keep the driver update on `if (unlike...
```diff diff --git a/drivers/net/ethernet/natsemi/ns83820.c b/drivers/net/ethernet/natsemi/ns83820.c index 56d5464222d9..cdbf82affa7b 100644 --- a/drivers/net/ethernet/natsemi/ns83820.c +++ b/drivers/net/ethernet/natsemi/ns83820.c @@ -820,7 +820,7 @@ static void rx_irq(struct net_device *ndev) struct ns83820 *dev = P...
f2d81dd6751ae4a28456ed5b8807f381dc0dc6ad
Analyze and fix the following issue in the Linux kernel code: scsi: target: iscsi: fix typos and formatting in lio_target messages
Problem Details: Fix several minor issues in lio_target code and messages: - Correct typo "locatel" -> "locate" in error log. - Add missing space in pr_debug() message for better readability. - Fix comment typo: "contig_item" -> "config_item". These changes improve code clarity and log readability. Signed-off-b...
```diff diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index 88db94f382bb..efe8cdb20060 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c @@ -665,7 +665,7 @@ static ssize_t lio_target_nacl_cmdsn_depth_st...
0bd0e43776b6a0ff5f7aa3783f547849356ac899
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: exynos: Correct sync pattern mask timing comment
Problem Details: Fix the comment for SYNC_LEN_G2 in exynos_ufs_config_sync_pattern_mask(). The actual value is 40us, not 44us, matching the configured mask timing. This change improves code clarity and avoids potential confusion for readers and maintainers. No functional changes. Signed-off-by: Alok Tiwari <alok.a.ti...
```diff diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 513cbcfa10ac..70d195179eba 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -776,7 +776,7 @@ static void exynos_ufs_config_sync_pattern_mask(struct exynos_ufs *ufs, u32 mask, sync_len; enum { ...
05c05d14d95fa54814f39197dfa4ad2a241c46bc
Analyze and fix the following issue in the Linux kernel code: net: ravb: Fix -Wmaybe-uninitialized warning
Problem Details: Fix a -Wmaybe-uninitialized warning by initializing the variable to NULL. The warning is bogus and should not happen, but fixing it allows running the check on the driver to catch potential future problems. $ make CFLAGS_ravb_main.o=-Wmaybe-uninitialized In function 'ravb_rx_csum_gbeth', in...
```diff diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 94b6fb94f8f1..9d3bd65b85ff 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -802,7 +802,6 @@ static int ravb_rx_gbeth(struct net_device *ndev, int budget,...
fc812c40f5eeee81836eabc3cdd017a46fe39d4c
Analyze and fix the following issue in the Linux kernel code: ecryptfs: get rid of pointless mount references in ecryptfs dentries
Problem Details: ->lower_path.mnt has the same value for all dentries on given ecryptfs instance and if somebody goes for mountpoint-crossing variant where that would not be true, we can deal with that when it happens (and _not_ with duplicating these reference into each dentry). As it is, we are better off just stick...
```diff diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c index 1dfd5b81d831..6648a924e31a 100644 --- a/fs/ecryptfs/dentry.c +++ b/fs/ecryptfs/dentry.c @@ -59,14 +59,6 @@ static int ecryptfs_d_revalidate(struct inode *dir, const struct qstr *name, return rc; } -struct kmem_cache *ecryptfs_dentry_info_cache;...
3f9a22be374b864c9199a43971d0eec18a88cde4
Analyze and fix the following issue in the Linux kernel code: mptcp: pm: netlink: fix if-idx type
Problem Details: As pointed out by Donald, when parsing an entry, the wrong type was set for the temp value: this value is signed. There are no real issues here, because the intermediate variable was only wrong for the sign, not for the size, and the final variable had the right sign. But this feels wrong, and is conf...
```diff diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 50aaf259959a..2225b1c5b966 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -113,7 +113,7 @@ int mptcp_pm_parse_entry(struct nlattr *attr, struct genl_info *info, return err; if (tb[MPTCP_PM_ADDR_ATTR_IF_IDX]) { - u32 ...
e3241506a47175de74f65bc638e588b9f70dc105
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: close server IPC descriptors
Problem Details: The client-side function connect_one_server() properly closes its IPC descriptor after use, but the server-side code in both mptcp_sockopt.c and mptcp_inq.c was missing corresponding close() calls for their IPC descriptors, leaving file descriptors open unnecessarily. This change ensures proper cleanu...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_inq.c b/tools/testing/selftests/net/mptcp/mptcp_inq.c index 40f2a1b24763..8e8f6441ad8b 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_inq.c +++ b/tools/testing/selftests/net/mptcp/mptcp_inq.c @@ -581,8 +581,12 @@ int main(int argc, char *argv[]) die_...
dab86ee688ae03919648c871c603356818090797
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: close server file descriptors
Problem Details: The server file descriptor ('fd') is opened in server() but never closed. While accepted connections are properly closed in process_one_client(), the main listening socket remains open, causing a resource leak. This patch ensures the server fd is properly closed after processing clients, bringing the ...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_inq.c b/tools/testing/selftests/net/mptcp/mptcp_inq.c index f3bcaa48df8f..40f2a1b24763 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_inq.c +++ b/tools/testing/selftests/net/mptcp/mptcp_inq.c @@ -502,6 +502,7 @@ static int server(int unixfd) process...
3a0ac202534bcd397e6fd744b6d1038d372c5b5e
Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
Problem Details: ifq->if_rxq has not been assigned, is -1, the correct value is in reg.if_rxq. Fixes: 59b8b32ac8d469958936fcea781c7f58e3d64742 ("io_uring/zcrx: add support for custom DMA devices") Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com> Reviewed-by: Jens Axboe <axboe@kernel.dk> Link: https://patch.msgid.l...
```diff diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index 319eddfd30e0..3639283c87ca 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -600,7 +600,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx, goto err; } - ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, ifq->if_rxq); + ifq->dev = netdev_queue_g...
1bdf99fd1d82622c8c0da2b6189ca257662ea307
Analyze and fix the following issue in the Linux kernel code: bonding: fix standard reference typo in ad_select description
Problem Details: The bonding option description for "ad_select" mistakenly referred to "803.ad". Update it to the correct IEEE standard "802.3ad". Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Link: https://patch.msgid.link/20250912133132.3920213-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski <kuba@k...
```diff diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index 5b275cb266bc..495a87f2ea7c 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c @@ -379,7 +379,7 @@ static const struct bond_option bond_opts[BOND_OPT_LAST] = { [BOND_OPT_AD_SELECT] =...
b86418beade11d45540a2d20c4ec1128849b6c27
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: sockopt: fix error messages
Problem Details: This patch fixes several issues in the error reporting of the MPTCP sockopt selftest: 1. Fix diff not printed: The error messages for counter mismatches had the actual difference ('diff') as argument, but it was missing in the format string. Displaying it makes the debugging easier. 2. Fix vari...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c index e934dd26a59d..112c07c4c37a 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c @@ -667,22 +667,26 @@ static void process_one...
92da495cb65719583aa06bc946aeb18a10e1e6e2
Analyze and fix the following issue in the Linux kernel code: mptcp: tfo: record 'deny join id0' info
Problem Details: When TFO is used, the check to see if the 'C' flag (deny join id0) was set was bypassed. This flag can be set when TFO is used, so the check should also be done when TFO is used. Note that the set_fully_established label is also used when a 4th ACK is received. In this case, deny_join_id0 will not be...
```diff diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 2a8ea28442b2..1103b3341a70 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -985,13 +985,13 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, return false; } - if (mp_opt->deny_join_id0) - WRITE_ONCE...
24733e193a0d68f20d220e86da0362460c9aa812
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: userspace pm: validate deny-join-id0 flag
Problem Details: The previous commit adds the MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 flag. Make sure it is correctly announced by the other peer when it has been received. pm_nl_ctl will now display 'deny_join_id0:1' when monitoring the events, and when this flag was set by the other peer. The 'Fixes' tag here below is the s...
```diff diff --git a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c index 994a556f46c1..93fea3442216 100644 --- a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c +++ b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c @@ -188,6 +188,13 @@ static int capture_events(int fd, int ev...
2293c57484ae64c9a3c847c8807db8c26a3a4d41
Analyze and fix the following issue in the Linux kernel code: mptcp: pm: nl: announce deny-join-id0 flag
Problem Details: During the connection establishment, a peer can tell the other one that it cannot establish new subflows to the initial IP address and port by setting the 'C' flag [1]. Doing so makes sense when the sender is behind a strict NAT, operating behind a legacy Layer 4 load balancer, or using anycast IP addr...
```diff diff --git a/Documentation/netlink/specs/mptcp_pm.yaml b/Documentation/netlink/specs/mptcp_pm.yaml index d15335684ec3..d1b4829b580a 100644 --- a/Documentation/netlink/specs/mptcp_pm.yaml +++ b/Documentation/netlink/specs/mptcp_pm.yaml @@ -28,13 +28,13 @@ definitions: traffic-patterns it can take a lo...
96939cec994070aa5df852c10fad5fc303a97ea3
Analyze and fix the following issue in the Linux kernel code: mptcp: set remote_deny_join_id0 on SYN recv
Problem Details: When a SYN containing the 'C' flag (deny join id0) was received, this piece of information was not propagated to the path-manager. Even if this flag is mainly set on the server side, a client can also tell the server it cannot try to establish new subflows to the client's initial IP address and port. ...
```diff diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 3f1b62a9fe88..f31a3a79531a 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -883,6 +883,10 @@ create_child: ctx->subflow_id = 1; owner = mptcp_sk(ctx->conn); + + if (mp_opt.deny_join_id0) + WRITE_ONCE(owner->pm.remote_deny_...
cf74e0aa0eb024741c8b5cb7e839d2824ca77336
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: connect: print pcap prefix
Problem Details: To be able to find which capture files have been produced after several runs. This prefix was not printed anywhere before. While at it, always use the same prefix by taking info from ns1, instead of "$connector_ns", which is sometimes ns1, sometimes ns2 in the subtests. Reviewed-by: Mat Martineau <m...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index c2ab9f7f0d21..47ecb5b3836e 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -211,6 +211,11 @@ if $checksum; then ...
a17c5aa3a32373f80b4714b411bd8d4ffee6fc6a
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: print trailing bytes with od
Problem Details: This is better than printing random bytes in the terminal. Note that Jakub suggested 'hexdump', but Mat found out this tool is not often installed by default. 'od' can do a similar job, and it is in the POSIX specs and available in coreutils, so it should be on more systems. While at it, display a fe...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh index 09cd24b2ae46..d62e653d48b0 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -384,7 +384,7 @@ mptcp_lib_make_file() { mptcp_lib_pr...
8708c5d8b3fb3f6d5d3b9e6bfe01a505819f519a
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: avoid spurious errors on TCP disconnect
Problem Details: The disconnect test-case, with 'plain' TCP sockets generates spurious errors, e.g. 07 ns1 TCP -> ns1 (dead:beef:1::1:10006) MPTCP read: Connection reset by peer read: Connection reset by peer (duration 155ms) [FAIL] client exit code 3, server 3 netns ns1-FloSdv (listener) socket stat fo...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c index 1408698df099..b148cadb96d0 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c @@ -1248,7 +1248,7 @@ void xdisconnect(int fd...
14e22b43df25dbd4301351b882486ea38892ae4f
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: connect: catch IO errors on listen side
Problem Details: IO errors were correctly printed to stderr, and propagated up to the main loop for the server side, but the returned value was ignored. As a consequence, the program for the listener side was no longer exiting with an error code in case of IO issues. Because of that, some issues might not have been se...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c index 4f07ac9fa207..1408698df099 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c @@ -1093,6 +1093,7 @@ int main_loop_s(int lis...
f755be0b1ff429a2ecf709beeb1bcd7abc111c2b
Analyze and fix the following issue in the Linux kernel code: mptcp: propagate shutdown to subflows when possible
Problem Details: When the MPTCP DATA FIN have been ACKed, there is no more MPTCP related metadata to exchange, and all subflows can be safely shutdown. Before this patch, the subflows were actually terminated at 'close()' time. That's certainly fine most of the time, but not when the userspace 'shutdown()' a connectio...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index e6fd97b21e9e..5e497a83e967 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -371,6 +371,20 @@ static void mptcp_close_wake_up(struct sock *sk) sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); } +static void mptcp_shutdown_subflows(s...
71379e1c95af2c57567fcac24184c94cb7de4cd6
Analyze and fix the following issue in the Linux kernel code: selftests: bonding: add fail_over_mac testing
Problem Details: Add a test to check each value of bond fail_over_mac option. Also fix a minor garp_test print issue. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Link: https://patch.msgid.link/20250910024336.400253-2-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/tools/testing/selftests/drivers/net/bonding/bond_options.sh b/tools/testing/selftests/drivers/net/bonding/bond_options.sh index 7bc148889ca7..e3f3cc803b56 100755 --- a/tools/testing/selftests/drivers/net/bonding/bond_options.sh +++ b/tools/testing/selftests/drivers/net/bonding/bond_options.sh @@ -7...
35ae4e86292ef7dfe4edbb9942955c884e984352
Analyze and fix the following issue in the Linux kernel code: bonding: set random address only when slaves already exist
Problem Details: After commit 5c3bf6cba791 ("bonding: assign random address if device address is same as bond"), bonding will erroneously randomize the MAC address of the first interface added to the bond if fail_over_mac = follow. Correct this by additionally testing for the bond being empty before randomizing the MA...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 257333c88710..8832bc9f107b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -2132,6 +2132,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev, memcpy(ss.__data...
4351ca3fcb3ffecf12631b4996bf085a2dad0db6
Analyze and fix the following issue in the Linux kernel code: rds: ib: Increment i_fastreg_wrs before bailing out
Problem Details: We need to increment i_fastreg_wrs before we bail out from rds_ib_post_reg_frmr(). We have a fixed budget of how many FRWR operations that can be outstanding using the dedicated QP used for memory registrations and de-registrations. This budget is enforced by the atomic_t i_fastreg_wrs. If we bail out...
```diff diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c index 28c1b0022178..bd861191157b 100644 --- a/net/rds/ib_frmr.c +++ b/net/rds/ib_frmr.c @@ -133,12 +133,15 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr) ret = ib_map_mr_sg_zbva(frmr->mr, ibmr->sg, ibmr->sg_dma_len, &off, PAGE_SIZE); - if (...
c5931d590e793c0291c0ba9fd1247567786612ea
Analyze and fix the following issue in the Linux kernel code: nvme-auth: use hkdf_expand_label()
Problem Details: When generating keying material during an authentication transaction (secure channel concatenation), the HKDF-Expand-Label function is part of the specified key derivation process. The current open-coded implementation misses the length prefix requirements on the HkdfLabel label and context variable-l...
```diff diff --git a/drivers/nvme/common/auth.c b/drivers/nvme/common/auth.c index c6eae8e6b6f9..1f51fbebd9fa 100644 --- a/drivers/nvme/common/auth.c +++ b/drivers/nvme/common/auth.c @@ -768,10 +768,10 @@ int nvme_auth_derive_tls_psk(int hmac_id, u8 *psk, size_t psk_len, { struct crypto_shash *hmac_tfm; const char...
b7df2e7eaef7c5402d47553b2cc82f92b301ecb4
Analyze and fix the following issue in the Linux kernel code: selftests/tc-testing: Adapt tc police action tests for Gb rounding changes
Problem Details: For the tc police action, iproute2 rounds up mtu and burst sizes to a higher order representation. For example, if the user specifies the default mtu for a police action instance (4294967295 bytes), iproute2 will output it as 4096Mb when this action instance is dumped. After Jay's changes [1], iproute2...
```diff diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/police.json b/tools/testing/selftests/tc-testing/tc-tests/actions/police.json index 5596f4df0e9f..b2cc6ea74450 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/actions/police.json +++ b/tools/testing/selftests/tc-testing/tc-tests/actions/p...
a318eb807825d71900e212f5aab3469e86feff8e
Analyze and fix the following issue in the Linux kernel code: vhost-scsi: fix argument order in tport allocation error message
Problem Details: The error log in vhost_scsi_make_tport() prints the arguments in the wrong order, producing confusing output. For example, when creating a target with a name in WWNN format such as "fc.port1234", the log looks like: Emulated fc.port1234 Address: FCP, exceeds max: 64 Instead, the message should repo...
```diff diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index abf51332a5c5..98e4f68f4e3c 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -2884,7 +2884,7 @@ vhost_scsi_make_tport(struct target_fabric_configfs *tf, check_len: if (strlen(name) >= VHOST_SCSI_NAMELEN) { pr_err("Emulated %s Add...
29a2f430475357f760679b249f33e7282688e292
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Allow RX6xxx & RX7700 to invoke amdgpu_irq_get/put
Problem Details: [Why&How] As reported on https://gitlab.freedesktop.org/drm/amd/-/issues/3936, SMU hang can occur if the interrupts are not enabled appropriately, causing a vblank timeout. This patch reverts commit 5009628d8509 ("drm/amd/display: Remove unnecessary amdgpu_irq_get/put"), but only for RX6xxx & RX7700 G...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 4e86370ae705..97d9eba17963 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8717,7 +8717,16 @@ static int amdgpu_dm_e...
6cbe6e072c5d088101cd542ad8ef8541edeea5c3
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Don't use non-registered VUPDATE on DCE 6
Problem Details: The VUPDATE interrupt isn't registered on DCE 6, so don't try to use that. This fixes a page flip timeout after sleep/resume on DCE 6. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Revie...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 38fa6319265e..9dd2d1ed674d 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3047,14 +3047,20 @@ static void dm_gpures...
0449726b58ea64ec96b95f95944f0a3650204059
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Keep PLL0 running on DCE 6.0 and 6.4
Problem Details: DC can turn off the display clock when no displays are connected or when all displays are off, for reference see: - dce*_validate_bandwidth DC also assumes that the DP clock is always on and never powers it down, for reference see: - dce110_clock_source_power_down In case of DCE 6.0 and 6.4, PLL0 is ...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c index 53b60044653f..c164d2500c2a 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_reso...
489f0f600ce2c0dae640df9035e1d82677d2580f
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix DVI-D/HDMI adapters
Problem Details: When the EDID has the HDMI bit, we should simply select the HDMI signal type even on DVI ports. For reference see, the legacy amdgpu display code: amdgpu_atombios_encoder_get_encoder_mode which selects ATOM_ENCODER_MODE_HDMI for the same case. This commit fixes DVI connectors to work with DVI-D/HDMI ...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c b/drivers/gpu/drm/amd/display/dc/link/link_detection.c index b717e430051a..85303167a553 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c @@ -1140,6 +1140,10 @@ static boo...
85442bac84666640354c6728fd5d5d241190d960
Analyze and fix the following issue in the Linux kernel code: drm/amd/amdgpu: Fix the mes version that support inv_tlbs
Problem Details: MES pipe0 will do VM invalidation with engine set 5 when assign VMID to a process, driver will submit inv_tlb package to mes pipe1. It might run into race condition if both pipes use the same invalidate engine set. From MES version 0x83 it will use invalidate engine set 6 for pipe1 to fix the issue Si...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index 76d3c40735b0..7cc16af1868b 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c @@ -337,7 +337,7 @@ static void gmc_v12_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,...
d7d0008ece3785ab19412be07d12f798c0feb5b1
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Promote DC to 3.2.350
Problem Details: This version brings along following updates: - Add DSC padding for OVT support - Setup pixel encoding for YCBCR422 - Fix dml ms order - Rename header file link.h to link_service.h - Fix DMUB loading sequence - Modify link training policy Signed-off-by: Taimur Hassan <Syed.Hassan@amd.com> Acked-by: Way...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index aa808675fead..8bee44cd4609 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -55,7 +55,7 @@ struct aux_payload; struct set_config_cmd_payload; struct dmub_notification; -#...
02a6c2e4b28ff31f7a904c196a99fb2efe81e2cf
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix dml ms order of operations
Problem Details: [why&how] small error in order of operations in immediateflipbytes calculation on dml ms side that can result in dml ms and mp mismatch immediateflip support for a given pipe and thus an invalid hw state, correct the order to align with mp. Reviewed-by: Leo Chen <leo.chen@amd.com> Signed-off-by: Ausef...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c index 715f9019a33e..4b9b2e84d381 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c @@ -6529,7 +6529,7 @@...
95d168b367aa28a59f94fc690ff76ebf69312c6d
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Allow RX6xxx & RX7700 to invoke amdgpu_irq_get/put
Problem Details: [Why&How] As reported on https://gitlab.freedesktop.org/drm/amd/-/issues/3936, SMU hang can occur if the interrupts are not enabled appropriately, causing a vblank timeout. This patch reverts commit 5009628d8509 ("drm/amd/display: Remove unnecessary amdgpu_irq_get/put"), but only for RX6xxx & RX7700 G...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index fadc6098eaee..b088cb8ae780 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8796,7 +8796,16 @@ static int amdgpu_dm_e...
18e755155caa57a6e6c4aa4a40b0db0fba015289
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix DMCUB loading sequence for DCN3.2
Problem Details: [Why] New sequence from HW for reset and firmware reloading has been provided that aims to stabilize the reload sequence in the case the firmware is hung or has outstanding requests. [How] Update the sequence to remove the DMUIF reset and the redundant writes in the release. Reviewed-by: Sreeja Golui...
```diff diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c index e7056205b050..ce041f6239dc 100644 --- a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c +++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c @@ -89,44 +89,50 @@ static inline void dmub_d...
ae5c2bee1680436d9bf8bfaca7416496adff0ee0
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix allocating extra dwords for rings (v2)
Problem Details: Rename extra_dw to extra_bytes and document what it's for. The value is already used as if it were bytes in vcn_v4_0.c and in amdgpu_ring_init. Just adjust the dword count in jpeg_v1_0.c so that it becomes a byte count. v2: Rename extra_dw to extra_bytes as discussed during review. Fixes: c8c1a1d2ef...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index 486c3646710c..8f6ce948c684 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -364,7 +364,8 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgp...
9d73b107a61b73e7101d4b728ddac3d2c77db111
Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: Use pm_display_cfg in legacy DPM (v2)
Problem Details: This commit is necessary for DC to function well with chips that use the legacy power management code, ie. SI and KV. Communicate display information from DC to the legacy PM code. Currently DC uses pm_display_cfg to communicate power management requirements from the display code to the DPM code. Howe...
```diff diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c b/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c index 2d2d2d5e6763..9ef965e4a92e 100644 --- a/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c @@ -100,3 +100,70 @@ u32 amdgpu_dpm_get_vrefresh(struct amdgpu_de...
fb5a52dbe9fecde432b4da7ea2d2724a947e9a79
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Implement TTM handling for MMIO_REMAP placement
Problem Details: Implement TTM-level behavior for AMDGPU_PL_MMIO_REMAP so it behaves as a CPU-visible IO page: * amdgpu_evict_flags(): mark as unmovable * amdgpu_res_cpu_visible(): consider CPU-visible * amdgpu_bo_move(): use null move when src/dst is MMIO_REMAP * amdgpu_ttm_io_mem_reserve(): program base/is_iomem/cac...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 27ab4e754b2a..42f97d568059 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -123,6 +123,7 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo, ca...
b13448dd64e27752fad252cec7da1a50ab9f0b6f
Analyze and fix the following issue in the Linux kernel code: bpf: potential double-free of env->insn_aux_data
Problem Details: Function bpf_patch_insn_data() has the following structure: static struct bpf_prog *bpf_patch_insn_data(... env ...) { struct bpf_prog *new_prog; struct bpf_insn_aux_data *new_data = NULL; if (len > 1) { new_data = vrealloc(...); // <--------- (1) ...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 17fe623400a5..1029380f84db 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -20800,7 +20800,6 @@ static struct bpf_prog *bpf_patch_insn_data(struct bpf_verifier_env *env, u32 of verbose(env, "insn %d cannot be patched due...
a10f910c77f280327b481e77eab909934ec508f0
Analyze and fix the following issue in the Linux kernel code: drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ
Problem Details: If the interrupt occurs before resource initialization is complete, the interrupt handler/worker may access uninitialized data such as the I2C tcpc_client device, potentially leading to NULL pointer dereference. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Fixes: 8bdfc5dae4e3 ("drm/brid...
```diff diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index c0ad8f59e483..8b3304dedcd9 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -2677,7 +2677,7 @@ static int anx7625_i2c_probe(struct i2c_client *client)...
a9d4e9f0e871352a48a82da11a50df7196fe567a
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix arena_spin_lock selftest failure
Problem Details: For systems having CONFIG_NR_CPUS set to > 1024 in kernel config the selftest fails as arena_spin_lock_irqsave() returns EOPNOTSUPP. (eg - incase of powerpc default value for CONFIG_NR_CPUS is 8192) The selftest is skipped incase bpf program returns EOPNOTSUPP, with a descriptive message logged. Test...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c b/tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c index 0223fce4db2b..693fd86fbde6 100644 --- a/tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c +++ b/tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c @@ -40,8 +40,13 @...
7926ba2143d8fef40bb940232818c7363e33598c
Analyze and fix the following issue in the Linux kernel code: drm/xe: defer free of NVM auxiliary container to device release callback
Problem Details: Do not kfree the intel_dg_nvm_dev in xe_nvm_fini() right after auxiliary_device_delete/uninit. The auxiliary_device embeds the device/kobject (and its name); freeing it too early can race with asynchronous device_del/udev processing and cause a use-after-free. Signed-off-by: Nitin Gote <nitin.r.gote@i...
```diff diff --git a/drivers/gpu/drm/xe/xe_nvm.c b/drivers/gpu/drm/xe/xe_nvm.c index 61b0a1531a53..2cfe9eb67391 100644 --- a/drivers/gpu/drm/xe/xe_nvm.c +++ b/drivers/gpu/drm/xe/xe_nvm.c @@ -35,6 +35,10 @@ static const struct intel_dg_nvm_region regions[INTEL_DG_NVM_REGIONS] = { static void xe_nvm_release_dev(struct...
dcfd151d3277cc3bc73c94114e360556d47b992d
Analyze and fix the following issue in the Linux kernel code: drm/xe/hwmon: Remove type casting
Problem Details: Refactor: eliminate type casts by using proper u32 declarations. v2: - Address review comments. (Karthik) v3: - Use the proper u32 type and drop cast. (Lucas De Marchi) - Modify variable when actually using u64 value. - Change r value to reg_value with u32 type. v4: - Remove newline between trailer ...
```diff diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c index c17ed1ae8649..c5b63e10bb91 100644 --- a/drivers/gpu/drm/xe/xe_hwmon.c +++ b/drivers/gpu/drm/xe/xe_hwmon.c @@ -286,7 +286,7 @@ static struct xe_reg xe_hwmon_get_reg(struct xe_hwmon *hwmon, enum xe_hwmon_reg */ static void xe_hwmo...
32d376610bdfdcda39e0a74aac7c6c3b92f91098
Analyze and fix the following issue in the Linux kernel code: bpftool: Search for tracefs at /sys/kernel/tracing first
Problem Details: With "bpftool prog tracelog", bpftool prints messages from the trace pipe. To do so, it first needs to find the tracefs mount point to open the pipe. Bpftool looks at a few "default" locations, including /sys/kernel/debug/tracing and /sys/kernel/tracing. Some of these locations, namely /tracing and /t...
```diff diff --git a/tools/bpf/bpftool/tracelog.c b/tools/bpf/bpftool/tracelog.c index 31d806e3bdaa..573a8d99f009 100644 --- a/tools/bpf/bpftool/tracelog.c +++ b/tools/bpf/bpftool/tracelog.c @@ -57,10 +57,8 @@ find_tracefs_mnt_single(unsigned long magic, char *mnt, const char *mntpt) static bool get_tracefs_pipe(char ...
20c9ccffccd61b37325a0519fb6d485caeecf7fa
Analyze and fix the following issue in the Linux kernel code: perf maps: Ensure kmap is set up for all inserts
Problem Details: __maps__fixup_overlap_and_insert may split or directly insert a map, when doing this the map may need to have a kmap set up for the sake of the kmaps. The missing kmap set up fails the check_invariants test in maps, later "Internal error" reports from map__kmap and ultimately causes segfaults. Similar...
```diff diff --git a/tools/perf/util/maps.c b/tools/perf/util/maps.c index 85b2a93a59ac..779f6230130a 100644 --- a/tools/perf/util/maps.c +++ b/tools/perf/util/maps.c @@ -477,6 +477,7 @@ static int __maps__insert(struct maps *maps, struct map *new) } /* Insert the value at the end. */ maps_by_address[nr_maps] = m...
456b32c9c1bc6c99310163281edb53eefd51330c
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Add test for G2G communications
Problem Details: Add a test for sending messages from every GuC to every other GuC to test G2G communications. Note that, being a debug only feature, the test interface only exists in pre-production builds of the GuC firmware. v2: Fix 'default' case to actually use the driver's registration code as well as allocation...
```diff diff --git a/drivers/gpu/drm/xe/abi/guc_actions_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_abi.h index 1baa969aaa7c..31090c69dfbe 100644 --- a/drivers/gpu/drm/xe/abi/guc_actions_abi.h +++ b/drivers/gpu/drm/xe/abi/guc_actions_abi.h @@ -155,6 +155,8 @@ enum xe_guc_action { XE_GUC_ACTION_NOTIFY_FLUSH_LOG_BUFFER_...
cd4ea81be3eb94047ad023c631afd9bd6c295400
Analyze and fix the following issue in the Linux kernel code: io_uring/io-wq: fix `max_workers` breakage and `nr_workers` underflow
Problem Details: Commit 88e6c42e40de ("io_uring/io-wq: add check free worker before create new worker") reused the variable `do_create` for something else, abusing it for the free worker check. This caused the value to effectively always be `true` at the time `nr_workers < max_workers` was checked, but it should reall...
```diff diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index 17dfaa0395c4..1d03b2fc4b25 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -352,16 +352,16 @@ static void create_worker_cb(struct callback_head *cb) struct io_wq *wq; struct io_wq_acct *acct; - bool do_create = false; + bool activated_free_wor...
7f830e126dc357fc086905ce9730140fd4528d66
Analyze and fix the following issue in the Linux kernel code: x86/sev: Guard sev_evict_cache() with CONFIG_AMD_MEM_ENCRYPT
Problem Details: The sev_evict_cache() is guest-related code and should be guarded by CONFIG_AMD_MEM_ENCRYPT, not CONFIG_KVM_AMD_SEV. CONFIG_AMD_MEM_ENCRYPT=y is required for a guest to run properly as an SEV-SNP guest, but a guest kernel built with CONFIG_KVM_AMD_SEV=n would get the stub function of sev_evict_cache()...
```diff diff --git a/arch/x86/include/asm/sev.h b/arch/x86/include/asm/sev.h index 02236962fdb1..465b19fd1a2d 100644 --- a/arch/x86/include/asm/sev.h +++ b/arch/x86/include/asm/sev.h @@ -562,6 +562,24 @@ enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb, extern struct ghcb *boot_ghcb; +static inline void sev_ev...
6131690df4adae33e01c0b51b9b78b3e8ed3b76f
Analyze and fix the following issue in the Linux kernel code: firmware: tegra: Do not warn on missing memory-region property
Problem Details: The IPC shared memory can reside in system memory or SRAM. In the latter case the memory-region property is expected not to be present, so do not warn about it. Reported-by: Jonathan Hunter <jonathanh@nvidia.com> Fixes: dbe4efea38d0 ("firmware: tegra: bpmp: Use of_reserved_mem_region_to_resource() for...
```diff diff --git a/drivers/firmware/tegra/bpmp-tegra186.c b/drivers/firmware/tegra/bpmp-tegra186.c index 7cfc5fdfa49d..64863db7a715 100644 --- a/drivers/firmware/tegra/bpmp-tegra186.c +++ b/drivers/firmware/tegra/bpmp-tegra186.c @@ -198,7 +198,10 @@ static int tegra186_bpmp_dram_init(struct tegra_bpmp *bpmp) err ...
df4666a4908a6d883f628f93a3e6c80981332035
Analyze and fix the following issue in the Linux kernel code: nvme-tcp: send only permitted commands for secure concat
Problem Details: In addition to sending permitted commands such as connect/auth over the initial unencrypted admin connection as part of secure channel concatenation, the host also sends commands such as Property Get and Identify on the same. This is a spec violation leading to secure concat failures. Fix this by ensur...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index c0fe8cfb7229..1413788ca7d5 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -2250,6 +2250,9 @@ static int nvme_tcp_configure_admin_queue(struct nvme_ctrl *ctrl, bool new) if (error) goto out_cleanup_tagset; + if (ct...
10c165af35d225eb033f4edc7fcc699a8d2d533d
Analyze and fix the following issue in the Linux kernel code: nvmet-fcloop: call done callback even when remote port is gone
Problem Details: When the target port is gone, it's not possible to access any of the request resources. The function should just silently drop the response. The comment is misleading in this regard. Though it's still necessary to call the driver via the ->done callback so the driver is able to release all resources. ...
```diff diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c index 257b497d515a..5dffcc5becae 100644 --- a/drivers/nvme/target/fcloop.c +++ b/drivers/nvme/target/fcloop.c @@ -496,13 +496,15 @@ fcloop_t2h_xmt_ls_rsp(struct nvme_fc_local_port *localport, if (!targetport) { /* * The target por...
db5a5406fb7e5337a074385c7a3e53c77f2c1bd3
Analyze and fix the following issue in the Linux kernel code: nvmet-fc: move lsop put work to nvmet_fc_ls_req_op
Problem Details: It’s possible for more than one async command to be in flight from __nvmet_fc_send_ls_req. For each command, a tgtport reference is taken. In the current code, only one put work item is queued at a time, which results in a leaked reference. To fix this, move the work item to the nvmet_fc_ls_req_op st...
```diff diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c index a9b18c051f5b..6725c34dd7c9 100644 --- a/drivers/nvme/target/fc.c +++ b/drivers/nvme/target/fc.c @@ -54,6 +54,8 @@ struct nvmet_fc_ls_req_op { /* for an LS RQST XMT */ int ls_error; struct list_head lsreq_list; /* tgtport->ls_req_lis...
53c18dc078bb6d9e9dfe2cc0671ab78588c44723
Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: fix memory region size on stm32mp235f-dk
Problem Details: STM32MP23x SoCs provide a DDR controller supporting up to 4GB/16-bit. The control pin to properly configure 4GB/16-bit is not routed on stm32mp235f-dk, that's why the board only supports 2GB. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20250910-stm32mp2...
```diff diff --git a/arch/arm64/boot/dts/st/stm32mp235f-dk.dts b/arch/arm64/boot/dts/st/stm32mp235f-dk.dts index 29ccf8dab35e..c3e688068223 100644 --- a/arch/arm64/boot/dts/st/stm32mp235f-dk.dts +++ b/arch/arm64/boot/dts/st/stm32mp235f-dk.dts @@ -57,7 +57,7 @@ memory@80000000 { device_type = "memory"; - reg = <...
d0647b20d1e19a6d8dc44e57d2d453610c0f29f2
Analyze and fix the following issue in the Linux kernel code: ARM: dts: stm32: add Hardware debug port (HDP) on stm32mp157c-dk2 board
Problem Details: On the stm32mp157fc-dk2 board, we can observe the hdp GPOVAL function on SoC pin E13 accessible on the pin 5 on the Arduino connector CN13. Add the relevant configuration but keep it disabled as it's used for debug only. Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com> Link: https://lor...
```diff diff --git a/arch/arm/boot/dts/st/stm32mp157c-dk2.dts b/arch/arm/boot/dts/st/stm32mp157c-dk2.dts index 78165c7865e1..1ec3b8f2faa9 100644 --- a/arch/arm/boot/dts/st/stm32mp157c-dk2.dts +++ b/arch/arm/boot/dts/st/stm32mp157c-dk2.dts @@ -62,6 +62,12 @@ remote-endpoint = <&panel_in>; }; +&hdp { + pinctrl-names...
f398bb61833500bceb81c2445f2a9e6e8cbc3551
Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: add Hardware debug port (HDP) on stm32mp25
Problem Details: Add the hdp devicetree node for stm32mp25 SoC family Keep the node disabled as HDP needs the pinctrl SoC configuration to be able to output its mux output signal outside of the SoC, on the SoC pad. This configuration is provided in the board dtsi file through 'pinctrl-*' properties as well as HDP mux ...
```diff diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi index 303abf915b8e..9372bc3c3a4b 100644 --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi @@ -1672,6 +1672,13 @@ }; }; + hdp: pinctrl@44090000 { + compatible = "st,stm...
6ff1bd7846680dfdaafc68d7fcd0ab7e3bcbc4a0
Analyze and fix the following issue in the Linux kernel code: nvme-auth: update bi_directional flag
Problem Details: While setting chap->s2 to zero as part of secure channel concatenation, the host missed out to disable the bi_directional flag to indicate that controller authentication is not requested. Fix the same. Fixes: e88a7595b57f ("nvme-tcp: request secure channel concatenation") Signed-off-by: Martin George ...
```diff diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c index 201fc8809a62..012fcfc79a73 100644 --- a/drivers/nvme/host/auth.c +++ b/drivers/nvme/host/auth.c @@ -331,9 +331,10 @@ static int nvme_auth_set_dhchap_reply_data(struct nvme_ctrl *ctrl, } else { memset(chap->c2, 0, chap->hash_len); } - ...
c5e389cc6b36701098d31fa3438c553c7fe7c1bb
Analyze and fix the following issue in the Linux kernel code: net/mlx5: fix typo in pci_irq.c comment
Problem Details: Fix a typo in a comment in pci_irq.c: "ssigned" → "assigned" Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250912135050.3921116-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c index 692ef9c2f729..e18a850c615c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c @@ -54,7 +54,7 @@ static int mlx5_core_func_t...
1b3aa3900782707ec2f4cc1651bc82c628f25d2b
Analyze and fix the following issue in the Linux kernel code: io_uring/uring_cmd: correct signature for io_uring_mshot_cmd_post_cqe()
Problem Details: The !CONFIG_IO_URING signature is wrong, fix that up. The non stub signature got updated for the io_br_sel changes that happened before this patch went in, but the stub one did not. Fixes: 620a50c92700 ("io_uring: uring_cmd: add multishot support") Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/include/linux/io_uring/cmd.h b/include/linux/io_uring/cmd.h index 1350af846ddd..c8185f54fde9 100644 --- a/include/linux/io_uring/cmd.h +++ b/include/linux/io_uring/cmd.h @@ -126,7 +126,7 @@ io_uring_cmd_buffer_select(struct io_uring_cmd *ioucmd, unsigned buf_group, return (struct io_br_sel) { .va...
d5fe2fec6c40dda03df8cc9b4a97de0b7e39f984
Analyze and fix the following issue in the Linux kernel code: EDAC: Add a driver for the AMD Versal NET DDR controller
Problem Details: Add a driver for the AMD Versal NET DDR memory controller which supports single bit error correction, double bit error detection and other system errors from various IP subsystems (e.g., RPU, NOCs, HNICX, PL). The driver listens for notifications from the NMC (Network management controller) using RPMs...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index ac20587a3e98..23254e89a1f8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -27631,6 +27631,13 @@ S: Maintained F: Documentation/devicetree/bindings/memory-controllers/xlnx,versal-ddrmc-edac.yaml F: drivers/edac/versal_edac.c +XILINX VERSALNET EDAC DRIVER +M: Shubhr...
86169b00f89633e255048feb5dde438dd3522fd4
Analyze and fix the following issue in the Linux kernel code: slab: wrap debug slab validation in validate_slab_ptr()
Problem Details: This will make it clear where we currently cast struct slab to folio only to check the slab type, and allow to change the implementation later with memdesc conversion. For now use a struct page based implementation instead of struct folio to be compatible with further upcoming changes. Reviewed-by: H...
```diff diff --git a/mm/slub.c b/mm/slub.c index 56143bfd1ae3..75e4388d507d 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -821,6 +821,15 @@ static inline unsigned int get_orig_size(struct kmem_cache *s, void *object) return *(unsigned int *)p; } +/* + * For debugging context when we want to check if the struct slab po...
f99b3917789d83ea89b24b722d784956f8289f45
Analyze and fix the following issue in the Linux kernel code: fs: rename generic_delete_inode() and generic_drop_inode()
Problem Details: generic_delete_inode() is rather misleading for what the routine is doing. inode_just_drop() should be much clearer. The new naming is inconsistent with generic_drop_inode(), so rename that one as well with inode_ as the suffix. No functional changes. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>...
```diff diff --git a/Documentation/filesystems/porting.rst b/Documentation/filesystems/porting.rst index 85f590254f07..b5db45c0094c 100644 --- a/Documentation/filesystems/porting.rst +++ b/Documentation/filesystems/porting.rst @@ -340,8 +340,8 @@ of those. Caller makes sure async writeback cannot be running for the ino...
74792608606a525a0e0df7e8d48acd8000561389
Analyze and fix the following issue in the Linux kernel code: init: INITRAMFS_PRESERVE_MTIME should depend on BLK_DEV_INITRD
Problem Details: INITRAMFS_PRESERVE_MTIME is only used in init/initramfs.c and init/initramfs_test.c. Hence add a dependency on BLK_DEV_INITRD, to prevent asking the user about this feature when configuring a kernel without initramfs support. Fixes: 1274aea127b2e8c9 ("initramfs: add INITRAMFS_PRESERVE_MTIME Kconfig o...
```diff diff --git a/init/Kconfig b/init/Kconfig index 836320251219..096726e9c95c 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1497,6 +1497,7 @@ config BOOT_CONFIG_EMBED_FILE config INITRAMFS_PRESERVE_MTIME bool "Preserve cpio archive mtimes in initramfs" + depends on BLK_DEV_INITRD default y help Each...
75cc23ffe5b422bc3cbd5cf0956b8b86e4b0e162
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()
Problem Details: The xe_preempt_fence_create() function returns error pointers. It never returns NULL. Update the error checking to match. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Matthew Brost <matthew.brost@intel....
```diff diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 7b04b392b729..0cacab20ff85 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -224,8 +224,8 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q) pfence = xe_preempt_fence_create(q, q...
6d5674090543b89aac0c177d67e5fb32ddc53804
Analyze and fix the following issue in the Linux kernel code: m68k: bitops: Fix find_*_bit() signatures
Problem Details: The function signatures of the m68k-optimized implementations of the find_{first,next}_{,zero_}bit() helpers do not match the generic variants. Fix this by changing all non-pointer inputs and outputs to "unsigned long", and updating a few local variables. Reported-by: kernel test robot <lkp@intel.com...
```diff diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h index 14c64a6f1217..50ec92651d5a 100644 --- a/arch/m68k/include/asm/bitops.h +++ b/arch/m68k/include/asm/bitops.h @@ -350,12 +350,12 @@ static inline bool xor_unlock_is_negative_byte(unsigned long mask, #include <asm-generic/bitops/ff...
84f1766bdba5a6394618a45b34a320f336b02d95
Analyze and fix the following issue in the Linux kernel code: initrd: Fix unused variable warning in rd_load_image() on s390
Problem Details: The local variables 'rotator' and 'rotate' (used for the progress indicator) aren't used on s390. Building the kernel with W=1 generates the following warning: init/do_mounts_rd.c:192:17: warning: variable 'rotate' set but not used [-Wunused-but-set-variable] 192 | unsigned short rotate = 0; ...
```diff diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index ac021ae6e6fa..3cbdf43a42df 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -191,9 +191,7 @@ int __init rd_load_image(char *from) char *buf = NULL; unsigned short rotate = 0; decompress_fn decompressor = NULL; -#if !defined(CONFIG_S...
fef8b64e48e836344574b85132a1c317f4260022
Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Drop rounddown_pow_of_two fair LMEM limitation
Problem Details: This effectively reverts commit 4c3fe5eae46b ("drm/xe/pf: Limit fair VF LMEM provisioning") since we don't need it any more after non-contig VRAM allocations were fixed. This allows larger LMEM auto-provisioning for VFs, so instead: [ ] GT0: PF: LMEM available(14096M) fair(1 x 8192M) [ ] GT0: PF: VF...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c index 494909f74eb2..d84831a03610 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c @@ -1632,7 +1632,6 @@ static u64 pf_estimate_fair_lmem(struct xe_gt *gt, ...
013e484dbd687a9174acf8f4450217bdb86ad788
Analyze and fix the following issue in the Linux kernel code: drm/xe/tile: Release kobject for the failure path
Problem Details: Call kobject_put() for the failure path to release the kobject v2: remove extra newline. (Matt) Fixes: e3d0839aa501 ("drm/xe/tile: Abort driver load for sysfs creation failure") Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off...
```diff diff --git a/drivers/gpu/drm/xe/xe_tile_sysfs.c b/drivers/gpu/drm/xe/xe_tile_sysfs.c index b804234a6551..9e1236a9ec67 100644 --- a/drivers/gpu/drm/xe/xe_tile_sysfs.c +++ b/drivers/gpu/drm/xe/xe_tile_sysfs.c @@ -44,16 +44,18 @@ int xe_tile_sysfs_init(struct xe_tile *tile) kt->tile = tile; err = kobject_add...
e6a43aeb71852a39432332dcc3a6d11bb464b075
Analyze and fix the following issue in the Linux kernel code: srcu/tiny: Remove preempt_disable/enable() in srcu_gp_start_if_needed()
Problem Details: Currently, the srcu_gp_start_if_needed() is always be invoked in preempt disable's critical section, this commit therefore remove redundant preempt_disable/enable() in srcu_gp_start_if_needed() and adds a call to lockdep_assert_preemption_disabled() in order to enable lockdep to diagnose mistaken invoc...
```diff diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c index 6e9fe2ce1075..e3b64a5e0ec7 100644 --- a/kernel/rcu/srcutiny.c +++ b/kernel/rcu/srcutiny.c @@ -176,10 +176,9 @@ static void srcu_gp_start_if_needed(struct srcu_struct *ssp) { unsigned long cookie; - preempt_disable(); // Needed for PREEMPT_LA...
be975448a45cd024e2b98598eefc0e164ad93f09
Analyze and fix the following issue in the Linux kernel code: srcu: Document __srcu_read_{,un}lock_fast() implicit RCU readers
Problem Details: This commit documents the implicit RCU readers that are implied by the this_cpu_inc() and atomic_long_inc() operations in __srcu_read_lock_fast() and __srcu_read_unlock_fast(). While in the area, fix the documentation of the memory pairing of atomic_long_inc() in __srcu_read_lock_fast(). [ paulmck: A...
```diff diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h index 4d2fee4d3828..42098e0fa0b7 100644 --- a/include/linux/srcutree.h +++ b/include/linux/srcutree.h @@ -232,9 +232,27 @@ static inline struct srcu_ctr __percpu *__srcu_ctr_to_ptr(struct srcu_struct *ss * srcu_read_unlock_fast(). * * Note t...
92b7624fe052ffb0b7b70d96cd514e02e91664a8
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Dump instruction on hyp panic
Problem Details: Similar to the kernel panic, where the instruction code is printed, we can do the same for hypervisor panics. This patch does that only in case of “CONFIG_NVHE_EL2_DEBUG” or nvhe. The next patch adds support for pKVM. Also, remove the hardcoded argument dump_kernel_instr(). Signed-off-by: Mostafa S...
```diff diff --git a/arch/arm64/include/asm/traps.h b/arch/arm64/include/asm/traps.h index e3e8944a71c3..e92e4a0e48fc 100644 --- a/arch/arm64/include/asm/traps.h +++ b/arch/arm64/include/asm/traps.h @@ -36,6 +36,7 @@ int kasan_brk_handler(struct pt_regs *regs, unsigned long esr); int ubsan_brk_handler(struct pt_regs *...