id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
7b5f775be14ac1532c049022feadcfe44769566d
Analyze and fix the following issue in the Linux kernel code: xfs: fix unmount hang with unflushable inodes stuck in the AIL
Problem Details: Unmount of a shutdown filesystem can hang with stale inode cluster buffers in the AIL like so: [95964.140623] Call Trace: [95964.144641] __schedule+0x699/0xb70 [95964.154003] schedule+0x64/0xd0 [95964.156851] xfs_ail_push_all_sync+0x9b/0xf0 [95964.164816] xfs_unmount_flush_inodes+0x41/0x70 [95964....
```diff diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index c95826863c82..7fc54725c5f6 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -612,43 +612,42 @@ xfs_buf_item_push( * Drop the buffer log item refcount and take appropriate action. This helper * determines whether the bli must b...
d2fe5c4c8d25999862d615f616aea7befdd62799
Analyze and fix the following issue in the Linux kernel code: xfs: rearrange code in xfs_buf_item.c
Problem Details: The code to initialise, release and free items is all the way down the bottom of the file. Upcoming fixes need to these functions earlier in the file, so move them to the top. There is one code change in this move - the parameter to xfs_buf_item_relse() is changed from the xfs_buf to the xfs_buf_log_i...
```diff diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 90139e0f3271..3e3c0f65a25c 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -32,6 +32,61 @@ static inline struct xfs_buf_log_item *BUF_ITEM(struct xfs_log_item *lip) return container_of(lip, struct xfs_buf_log_item, bli_item); ...
fc48627b9c22f4d18651ca72ba171952d7a26004
Analyze and fix the following issue in the Linux kernel code: xfs: add tracepoints for stale pinned inode state debug
Problem Details: I needed more insight into how stale inodes were getting stuck on the AIL after a forced shutdown when running fsstress. These are the tracepoints I added for that purpose. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Carlos Maiol...
```diff diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index c6cb0b6b9e46..285e27ff89e2 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c @@ -758,11 +758,14 @@ xfs_inode_item_push( * completed and items removed from the AIL before the next push * attempt. */ + trace_xfs_ino...
d62016b1a2df24c8608fe83cd3ae8090412881b3
Analyze and fix the following issue in the Linux kernel code: xfs: avoid dquot buffer pin deadlock
Problem Details: On shutdown when quotas are enabled, the shutdown can deadlock trying to unpin the dquot buffer buf_log_item like so: [ 3319.483590] task:kworker/20:0H state:D stack:14360 pid:1962230 tgid:1962230 ppid:2 task_flags:0x4208060 flags:0x00004000 [ 3319.493966] Workqueue: xfs-log/dm-6 xlog_ioend_wor...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 8af83bd161f9..ba5bd6031ece 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -2082,44 +2082,6 @@ xfs_buf_delwri_submit( return error; } -/* - * Push a single buffer on a delwri queue. - * - * The purpose of this function is to submit a single buf...
db6a2274162de615ff74b927d38942fe3134d298
Analyze and fix the following issue in the Linux kernel code: xfs: catch stale AGF/AGF metadata
Problem Details: There is a race condition that can trigger in dmflakey fstests that can result in asserts in xfs_ialloc_read_agi() and xfs_alloc_read_agf() firing. The asserts look like this: XFS: Assertion failed: pag->pagf_freeblks == be32_to_cpu(agf->agf_freeblks), file: fs/xfs/libxfs/xfs_alloc.c, line: 3440 .......
```diff diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index 7839efe050bf..000cc7f4a3ce 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -3444,16 +3444,41 @@ xfs_alloc_read_agf( set_bit(XFS_AGSTATE_AGF_INIT, &pag->pag_opstate); } + #ifdef DEBUG - else if (!xfs_is_shu...
09234a632be42573d9743ac5ff6773622d233ad0
Analyze and fix the following issue in the Linux kernel code: xfs: xfs_ifree_cluster vs xfs_iflush_shutdown_abort deadlock
Problem Details: Lock order of xfs_ifree_cluster() is cluster buffer -> try ILOCK -> IFLUSHING, except for the last inode in the cluster that is triggering the free. In that case, the lock order is ILOCK -> cluster buffer -> IFLUSHING. xfs_iflush_cluster() uses cluster buffer -> try ILOCK -> IFLUSHING, so this can saf...
```diff diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 726e29b837e6..bbc2f2973dcc 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -979,7 +979,15 @@ xfs_reclaim_inode( */ if (xlog_is_shutdown(ip->i_mount->m_log)) { xfs_iunpin_wait(ip); + /* + * Avoid a ABBA deadlock on the inode cl...
7b22e0432981c2fa230f1b493082b7e67112c4aa
Analyze and fix the following issue in the Linux kernel code: x86/sev/vc: Fix EFI runtime instruction emulation
Problem Details: In case efi_mm is active go use the userspace instruction decoder which supports fetching instructions from active_mm. This is needed to make instruction emulation work for EFI runtime code, so it can use CPUID and RDMSR. EFI runtime code uses the CPUID instruction to gather information about the env...
```diff diff --git a/arch/x86/coco/sev/vc-handle.c b/arch/x86/coco/sev/vc-handle.c index 0989d98da130..faf1fce89ed4 100644 --- a/arch/x86/coco/sev/vc-handle.c +++ b/arch/x86/coco/sev/vc-handle.c @@ -17,6 +17,7 @@ #include <linux/mm.h> #include <linux/io.h> #include <linux/psp-sev.h> +#include <linux/efi.h> #include...
0dc6bfb50a5d0759e726cd36a3d3b7529fd2a627
Analyze and fix the following issue in the Linux kernel code: drm/i915/dsi: Fix NULL pointer deref in vlv_dphy_param_init()
Problem Details: Commit 77ba0b856225 ("drm/i915/dsi: convert vlv_dsi.[ch] to struct intel_display") added a to_intel_display(connector) call to vlv_dphy_param_init() but when vlv_dphy_param_init() gets called the connector object has not been initialized yet, so this leads to a NULL pointer deref: BUG: kernel NULL po...
```diff diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c index 3433deb635ef..6d9f3312de7e 100644 --- a/drivers/gpu/drm/i915/display/vlv_dsi.c +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c @@ -1591,8 +1591,8 @@ static void vlv_dsi_add_properties(struct intel_connector *connecto...
5f6e3b720694ad771911f637a51930f511427ce1
Analyze and fix the following issue in the Linux kernel code: x86/mce/amd: Fix threshold limit reset
Problem Details: The MCA threshold limit must be reset after servicing the interrupt. Currently, the restart function doesn't have an explicit check for this. It makes some assumptions based on the current limit and what's in the registers. These assumptions don't always hold, so the limit won't be reset in some case...
```diff diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c index 6820ebce5d46..5c4eb28c3ac9 100644 --- a/arch/x86/kernel/cpu/mce/amd.c +++ b/arch/x86/kernel/cpu/mce/amd.c @@ -350,7 +350,6 @@ static void smca_configure(unsigned int bank, unsigned int cpu) struct thresh_restart { struct thres...
d66e1e90b16055d2f0ee76e5384e3f119c3c2773
Analyze and fix the following issue in the Linux kernel code: x86/mce/amd: Add default names for MCA banks and blocks
Problem Details: Ensure that sysfs init doesn't fail for new/unrecognized bank types or if a bank has additional blocks available. Most MCA banks have a single thresholding block, so the block takes the same name as the bank. Unified Memory Controllers (UMCs) are a special case where there are two blocks and each has...
```diff diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c index 9d852c3b2cb5..6820ebce5d46 100644 --- a/arch/x86/kernel/cpu/mce/amd.c +++ b/arch/x86/kernel/cpu/mce/amd.c @@ -1113,13 +1113,20 @@ static const char *get_name(unsigned int cpu, unsigned int bank, struct threshol } bank_type = ...
00c092de6f28ebd32208aef83b02d61af2229b60
Analyze and fix the following issue in the Linux kernel code: x86/mce: Ensure user polling settings are honored when restarting timer
Problem Details: Users can disable MCA polling by setting the "ignore_ce" parameter or by setting "check_interval=0". This tells the kernel to *not* start the MCE timer on a CPU. If the user did not disable CMCI, then storms can occur. When these happen, the MCE timer will be started with a fixed interval. After the s...
```diff diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index 07d61937427f..4da4eab56c81 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -1740,6 +1740,11 @@ static void mc_poll_banks_default(void) void (*mc_poll_banks)(void) = mc_poll_banks_default; ...
955853cf83657faa58572ef3f08b44f0f88885c1
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Disable updating of "num_cpu" and "feature"
Problem Details: Property "num_cpu" and "feature" are read-only once eiointc is created, which are set with KVM_DEV_LOONGARCH_EXTIOI_GRP_CTRL attr group before device creation. Attr group KVM_DEV_LOONGARCH_EXTIOI_GRP_SW_STATUS is to update register and software state for migration and reset usage, property "num_cpu" a...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index 056a75f7d090..a75f865d6fb9 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -926,9 +926,15 @@ static int kvm_eiointc_sw_status_access(struct kvm_device *dev, data = (void __user *)...
cc8d5b209e09d3b52bca1ffe00045876842d96ae
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Check validity of "num_cpu" from user space
Problem Details: The maximum supported cpu number is EIOINTC_ROUTE_MAX_VCPUS about irqchip EIOINTC, here add validation about cpu number to avoid array pointer overflow. Cc: stable@vger.kernel.org Fixes: 1ad7efa552fd ("LoongArch: KVM: Add EIOINTC user mode read and write functions") Signed-off-by: Bibo Mao <maobibo@lo...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index 644fb7785c07..056a75f7d090 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -805,7 +805,7 @@ static int kvm_eiointc_ctrl_access(struct kvm_device *dev, int ret = 0; unsigned long...
45515c643d0abb75c2cc760a6bc6b235eadafd66
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Check interrupt route from physical CPU
Problem Details: With EIOINTC interrupt controller, physical CPU ID is set for irq route. However the function kvm_get_vcpu() is used to get destination vCPU when delivering irq. With API kvm_get_vcpu(), the logical CPU ID is used. With API kvm_get_vcpu_by_cpuid(), vCPU ID can be searched from physical CPU ID. Cc: st...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index 8d3f48e2a7f0..644fb7785c07 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -9,7 +9,8 @@ static void eiointc_set_sw_coreisr(struct loongarch_eiointc *s) { - int ipnum, cpu, irq_i...
c34bbc2c990700ba07b271fc7c8113b0bc3e4093
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Fix interrupt route update with EIOINTC
Problem Details: With function eiointc_update_sw_coremap(), there is forced assignment like val = *(u64 *)pvalue. Parameter pvalue may be pointer to char type or others, there is problem with forced assignment with u64 type. Here the detailed value is passed rather address pointer. Cc: stable@vger.kernel.org Fixes: 3...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index 236cbf979167..8d3f48e2a7f0 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -66,10 +66,9 @@ static void eiointc_update_irq(struct loongarch_eiointc *s, int irq, int level) } stat...
9159c5e733cfa35ec863fa81960a3e7435f831fb
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Add address alignment check for IOCSR emulation
Problem Details: IOCSR instruction supports 1/2/4/8 bytes access, the address should be naturally aligned with its access size. Here address alignment check is added in the EIOINTC kernel emulation. Cc: stable@vger.kernel.org Fixes: 3956a52bc05b ("LoongArch: KVM: Add EIOINTC read and write functions") Signed-off-by: B...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index 9c47456b805c..236cbf979167 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -305,6 +305,11 @@ static int kvm_eiointc_read(struct kvm_vcpu *vcpu, return -EINVAL; } + if (addr &...
f6faebc11a8a6d9521e5ab00481bd22ed9c7c67d
Analyze and fix the following issue in the Linux kernel code: drm/panel: panel-simple: get rid of panel_dpi hack
Problem Details: The empty panel_dpi struct was only ever used as a discriminant, but it's kind of a hack, and with the reworks done in the previous patches, we shouldn't need it anymore. Let's get rid of it. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Francesco Dolcini <francesco.dolcini@to...
```diff diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 4c831af86414..9f81fa960b46 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -439,8 +439,6 @@ static const struct drm_panel_funcs panel_simple_funcs = { .get_timings = p...
47c08262f34e1cd9c48364431e4d32529029b910
Analyze and fix the following issue in the Linux kernel code: drm/panel: panel-simple: Add function to look panel data up
Problem Details: Commit de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()") moved the call to drm_panel_init into the devm_drm_panel_alloc(), which needs a connector type to initialize properly. In the panel-dpi compatible case, the passed panel_desc structure is an empty one use...
```diff diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index e70ee2d4a538..4c831af86414 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -26,6 +26,7 @@ #include <linux/i2c.h> #include <linux/media-bus-format.h> #include <linux/m...
921c41e509746aabecbbb2595ebf41a9d8fdc4e2
Analyze and fix the following issue in the Linux kernel code: drm/panel: panel-simple: Make panel_simple_probe return its panel
Problem Details: In order to fix the regession introduced by commit de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()"), we need to move the panel_desc lookup into the common panel_simple_probe() function. There's two callers for that function, the probe implementations of the pl...
```diff diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 89188e683822..e70ee2d4a538 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -567,7 +567,7 @@ static int panel_simple_override_nondefault_lvds_datamapping(struct device *d...
073667fce1667eab31d6a62cdd7fb795933ec7e8
Analyze and fix the following issue in the Linux kernel code: drm/panel: panel-simple: make panel_dpi_probe return a panel_desc
Problem Details: If the panel-simple driver is probed from a panel-dpi compatible, the driver will use an empty panel_desc structure as a descriminant. It will then allocate and fill another panel_desc as part of its probe. However, that allocation needs to happen after the panel_simple structure has been allocated, s...
```diff diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 0a3b26bb4d73..89188e683822 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -432,8 +432,7 @@ static const struct drm_panel_funcs panel_simple_funcs = { static struct p...
2d22b63f3a5aae2088708941d08cf0f01f430a58
Analyze and fix the following issue in the Linux kernel code: drm/mipi-dsi: Add dev_is_mipi_dsi function
Problem Details: This will be especially useful for generic panels (like panel-simple) which can take different code path depending on if they are MIPI-DSI devices or platform devices. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com> # Toradex Coli...
```diff diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index e5184a0c2465..21fd647f8ce1 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -91,12 +91,13 @@ static const struct dev_pm_ops mipi_dsi_device_pm_ops = { .restore = pm_generic_restore, }; -sta...
67e3ba978361cb262f8f8981ab88ccb97f1e2bda
Analyze and fix the following issue in the Linux kernel code: net: mdio: Add MDIO bus controller for Airoha AN7583
Problem Details: Airoha AN7583 SoC have 2 dedicated MDIO bus controller in the SCU register map. To driver register an MDIO controller based on the DT reg property and access the register by accessing the parent syscon. The MDIO bus logic is similar to the MT7530 internal MDIO bus but deviates of some setting and some...
```diff diff --git a/drivers/net/mdio/Kconfig b/drivers/net/mdio/Kconfig index 7db40aaa079d..e1e32b687068 100644 --- a/drivers/net/mdio/Kconfig +++ b/drivers/net/mdio/Kconfig @@ -27,6 +27,13 @@ config ACPI_MDIO help ACPI MDIO bus (Ethernet PHY) accessors +config MDIO_AIROHA + tristate "Airoha AN7583 MDIO bus co...
e0a69cf2c03e61bd8069becb97f66c173d0d1fa1
Analyze and fix the following issue in the Linux kernel code: landlock: Fix warning from KUnit tests
Problem Details: get_id_range() expects a positive value as first argument but get_random_u8() can return 0. Fix this by clamping it. Validated by running the test in a for loop for 1000 times. Note that MAX() is wrong as it is only supposed to be used for constants, but max() is good here. [..] ok 9 test_ran...
```diff diff --git a/security/landlock/id.c b/security/landlock/id.c index 56f7cc0fc744..838c3ed7bb82 100644 --- a/security/landlock/id.c +++ b/security/landlock/id.c @@ -119,6 +119,12 @@ static u64 get_id_range(size_t number_of_ids, atomic64_t *const counter, #ifdef CONFIG_SECURITY_LANDLOCK_KUNIT_TEST +static u8 ...
62e062a29ad5133f67c20b333ba0a952a99161ae
Analyze and fix the following issue in the Linux kernel code: iommu/rockchip: prevent iommus dead loop when two masters share one IOMMU
Problem Details: When two masters share an IOMMU, calling ops->of_xlate during the second master's driver init may overwrite iommu->domain set by the first. This causes the check if (iommu->domain == domain) in rk_iommu_attach_device() to fail, resulting in the same iommu->node being added twice to &rk_domain->iommus, ...
```diff diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 22f74ba33a0e..e6bb3c784017 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1157,7 +1157,6 @@ static int rk_iommu_of_xlate(struct device *dev, return -ENOMEM; data->iommu = platform_get_...
de13141516add30adf581561755f3f45d82b50ba
Analyze and fix the following issue in the Linux kernel code: dt-bindings: interrupt-controller: Add arm,armv7m-nvic and fix #interrupt-cells
Problem Details: According to existed dts arch/arm/boot/dts/armv7-m.dtsi and driver drivers/irqchip/irq-nvic.c, compatible string should be arm,armv7m-nvic, Fix below CHECK_DTB warning: arch/arm/boot/dts/nxp/vf/vf610m4-cosmic.dtb: /interrupt-controller@e000e100: failed to match any schema with compatible: ['arm,a...
```diff diff --git a/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml b/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml index d89eca956c5f..32dfa2bf05d8 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml +++ b/Documentation/devicetree/bindings/inte...
304c102cff7382353a28039907a7017bde795db9
Analyze and fix the following issue in the Linux kernel code: phy: qcom: qmp-combo: Add missing PLL (VCO) configuration on SM8750
Problem Details: Add missing DP PHY status and VCO clock configuration registers to fix configuring the VCO rate on SM8750. Without proper VCO rate setting, it works on after-reset half of rate which is not enough for DP over USB to work as seen on logs: [drm:msm_dp_ctrl_link_train_1_2] *ERROR* max v_level reached ...
```diff diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 8b9710a9654a..f07d097b129f 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -228,6 +228,9 @@ static const unsigned int qmp_v8_usb3phy_regs_layout[QPHY...
603bd9808f58009e1f230271f94e1b9e13d506ba
Analyze and fix the following issue in the Linux kernel code: phy: qcom: m31-eusb2: fix match data santity check
Problem Details: The device_get_match_data() helper returns NULL if a new entry is ever added without corresponding match data. Fixes: 9c8504861cc4 ("phy: qcom: Add M31 based eUSB2 PHY driver") Cc: Wesley Cheng <quic_wcheng@quicinc.com> Cc: Melody Olvera <melody.olvera@oss.qualcomm.com> Signed-off-by: Johan Hovold <jo...
```diff diff --git a/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c b/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c index 7b7120e4214f..520eabcc61f7 100644 --- a/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c +++ b/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c @@ -253,7 +253,7 @@ static int m31eusb2_phy_probe(struct platform_device *pde...
11cd0206987205ee05b0abd70a8eafa400ba89e3
Analyze and fix the following issue in the Linux kernel code: net: mana: Fix build errors when CONFIG_NET_SHAPER is disabled
Problem Details: Fix build errors when CONFIG_NET_SHAPER is disabled, including: drivers/net/ethernet/microsoft/mana/mana_en.c:804:10: error: 'const struct net_device_ops' has no member named 'net_shaper_ops' 804 | .net_shaper_ops = &mana_shaper_ops, drivers/net/ethernet/microsoft/mana/mana_en.c...
```diff diff --git a/drivers/net/ethernet/microsoft/Kconfig b/drivers/net/ethernet/microsoft/Kconfig index 901fbffbf718..3f36ee6a8ece 100644 --- a/drivers/net/ethernet/microsoft/Kconfig +++ b/drivers/net/ethernet/microsoft/Kconfig @@ -22,6 +22,7 @@ config MICROSOFT_MANA depends on PCI_HYPERV select AUXILIARY_BUS ...
31bc94de76026c527f82c238f414539a14f0f3e6
Analyze and fix the following issue in the Linux kernel code: phy: qualcomm: phy-qcom-eusb2-repeater: Don't zero-out registers
Problem Details: Zeroing out registers does not happen in the downstream kernel, and will "tune" the repeater in surely unexpected ways since most registers don't have a reset value of 0x0. Stop doing that and instead just set the registers that are in the init sequence (though long term I don't think there's actually...
```diff diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c index 260894b6932c..e0f2acc8109c 100644 --- a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c +++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c @@ -37,32 +37,13 @@ #define EUSB2_TUNE_EUSB_EQU 0x5A #...
05c6f31991300f1c0e5e80eb1f66a580b9b5ca5f
Analyze and fix the following issue in the Linux kernel code: dt-bindings: phy: apm,xgene-phy: Remove trailing whitespace
Problem Details: Remove trailing whitespace which hurts my eyes. Fixes: 65ad0d068c426c2f ("dt-bindings: phy: Convert apm,xgene-phy to DT schema") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/5b8e9b4f645bcac9d50059e513abba4db7e1aaea.1750771156.git.geert+renesas@glider.be S...
```diff diff --git a/Documentation/devicetree/bindings/phy/apm,xgene-phy.yaml b/Documentation/devicetree/bindings/phy/apm,xgene-phy.yaml index d1e6b112b6de..0674391feeae 100644 --- a/Documentation/devicetree/bindings/phy/apm,xgene-phy.yaml +++ b/Documentation/devicetree/bindings/phy/apm,xgene-phy.yaml @@ -8,7 +8,7 @@ t...
ac4c064f67d3cdf9118b9b09c1e3b28b6c10a7ea
Analyze and fix the following issue in the Linux kernel code: spi: dt-bindings: add nxp,lpc3220-spi.yaml
Problem Details: Add lpc3220 spi controller binding doc to fix below CHECK_DTBS warning: arch/arm/boot/dts/nxp/lpc/lpc3250-ea3250.dtb: /ahb/apb/spi@20088000: failed to match any schema with compatible: ['nxp,lpc3220-spi'] Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20250625215255.264053...
```diff diff --git a/Documentation/devicetree/bindings/spi/nxp,lpc3220-spi.yaml b/Documentation/devicetree/bindings/spi/nxp,lpc3220-spi.yaml new file mode 100644 index 000000000000..d5f780912f21 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/nxp,lpc3220-spi.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (...
81a0286cefe6f81744160d3524d70e67479b314b
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Add support to RTT stats
Problem Details: Add support to request RTT stats from firmware through HTT stats type 65 and 66. HTT stats type 65 support RTT response stats, RTT hardware stats, RTT to-be-read self-generated stats and RTT command-result stats and HTT stats type 66 support RTT initiator stats and RTT hardware stats. These stats give ...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index 004ee0688cd7..96c834b987db 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -5133,6 +5133,410 @@ ath12k_htt_pr...
a7f74e782e274e8255808c165cb2cf63ee0876cc
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Add support to TDMA and MLO stats
Problem Details: Add support to request TDMA stats, MLO scheduled stats and MLO IPC stats from firmware through HTT stats type 57, 63 and 64, respectively. These stats give information about TDMA schedules, TDMA slot switches, MLO preferred timeout, delay, MLO IPC ring count, etc. Note: WCN firmware version - WLAN.HMT...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index 0da6c91dd314..004ee0688cd7 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -5046,6 +5046,93 @@ ath12k_htt_pri...
ffc7adb0a121cd72a02095106bd006f44593ee35
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Add support for transmit histogram stats
Problem Details: Add support for transmit histogram stats under HTT stats type 9. These stats give information about drop count, MCS drop rate, histogram count, etc. Note: WCN7850 firmware version - WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 does not support tag HTT_STATS_TX_PDEV_HISTOGRAM_STATS_TAG(144), c...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index aeaf970339d4..0da6c91dd314 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -4720,7 +4720,38 @@ ath12k_htt_pri...
c27bb624b3d789a337df3bbcc020a575680555cc
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Clear auth flag only for actual association in security mode
Problem Details: When setting a new bitrate, WMI peer association command is sent from the host without the peer authentication bit set in peer_flags for security mode, which causes ping failure. The firmware handles peer_flags when the client is associating, as the peer authentication bit in peer_flags is set after t...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 1b9dd3ac280f..f565db7b7b44 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -3250,6 +3250,7 @@ static void ath12k_bss_assoc(struct ath12k *ar, rcu_read_unlock(); ...
ed32169be1ccb9b1a295275ba7746dc6bf103e80
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix dest ring-buffer corruption when ring is full
Problem Details: Add the missing memory barriers to make sure that destination ring descriptors are read before updating the tail pointer (and passing ownership to the device) to avoid memory corruption on weakly ordered architectures like aarch64 when the ring is full. Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-Q...
```diff diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c index d8193d9577bb..6406fcf5d69f 100644 --- a/drivers/net/wireless/ath/ath12k/hal.c +++ b/drivers/net/wireless/ath/ath12k/hal.c @@ -2170,7 +2170,6 @@ void ath12k_hal_srng_access_end(struct ath12k_base *ab, struct hal_srng...
e834da4cbd6fe1d24f89368bf0c80adcad212726
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix source ring-buffer corruption
Problem Details: Add the missing memory barrier to make sure that LMAC source ring descriptors are written before updating the head pointer to avoid passing stale data to the firmware on weakly ordered architectures like aarch64. Note that non-LMAC rings use MMIO write accessors which have the required write memory ba...
```diff diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c index 726969cfcaec..d8193d9577bb 100644 --- a/drivers/net/wireless/ath/ath12k/hal.c +++ b/drivers/net/wireless/ath/ath12k/hal.c @@ -2178,7 +2178,11 @@ void ath12k_hal_srng_access_end(struct ath12k_base *ab, struct hal_srn...
79390f613d639f7ef913377719cc5094357e53bc
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: use plain access for descriptor length
Problem Details: The read memory barrier added by commit 6b67d2cf14ea ("wifi: ath12k: fix ring-buffer corruption") is enough to guarantee ordering also for plain descriptor accesses if the length helper is ever inlined so drop the unnecessary READ_ONCE(). Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_...
```diff diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c index f8bd3837b9dc..726969cfcaec 100644 --- a/drivers/net/wireless/ath/ath12k/hal.c +++ b/drivers/net/wireless/ath/ath12k/hal.c @@ -1950,7 +1950,7 @@ u32 ath12k_hal_ce_dst_status_get_length(struct hal_ce_srng_dst_status_d...
8157ce533a60521f21d466eb4de45d9735b19484
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix dest ring-buffer corruption
Problem Details: Add the missing memory barrier to make sure that destination ring descriptors are read after the head pointers to avoid using stale data on weakly ordered architectures like aarch64. The barrier is added to the ath12k_hal_srng_access_begin() helper for symmetry with follow-on fixes for source ring buf...
```diff diff --git a/drivers/net/wireless/ath/ath12k/ce.c b/drivers/net/wireless/ath/ath12k/ce.c index 3f3439262cf4..f7c15b547504 100644 --- a/drivers/net/wireless/ath/ath12k/ce.c +++ b/drivers/net/wireless/ath/ath12k/ce.c @@ -433,9 +433,6 @@ static int ath12k_ce_completed_recv_next(struct ath12k_ce_pipe *pipe, goto...
aa6956150f820e6a6deba44be325ddfcb5b10f88
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix dest ring-buffer corruption when ring is full
Problem Details: Add the missing memory barriers to make sure that destination ring descriptors are read before updating the tail pointer (and passing ownership to the device) to avoid memory corruption on weakly ordered architectures like aarch64 when the ring is full. Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAH...
```diff diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c index 28f94c36d304..0c3ce7509ab8 100644 --- a/drivers/net/wireless/ath/ath11k/hal.c +++ b/drivers/net/wireless/ath/ath11k/hal.c @@ -856,7 +856,6 @@ void ath11k_hal_srng_access_end(struct ath11k_base *ab, struct hal_srng *...
6efa0df54022c6c9fd4d294b87622c7fcdc418c8
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix source ring-buffer corruption
Problem Details: Add the missing memory barrier to make sure that LMAC source ring descriptors are written before updating the head pointer to avoid passing stale data to the firmware on weakly ordered architectures like aarch64. Note that non-LMAC rings use MMIO write accessors which have the required write memory ba...
```diff diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c index 4a3bdacc5769..28f94c36d304 100644 --- a/drivers/net/wireless/ath/ath11k/hal.c +++ b/drivers/net/wireless/ath/ath11k/hal.c @@ -864,7 +864,11 @@ void ath11k_hal_srng_access_end(struct ath11k_base *ab, struct hal_srng ...
4aba95fb1faed7fe7f6e1edfb60c333e0275dfc1
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: use plain accesses for monitor descriptor
Problem Details: The read memory barrier added by commit ab52e3e44fe9 ("wifi: ath11k: fix rx completion meta data corruption") is enough to guarantee ordering also for plain descriptor accesses so drop the unnecessary READ_ONCE(). Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41 Si...
```diff diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 065fc40e2541..1eec1cc114fe 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -2637,7 +2637,7 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id, ...
3a690e9091ec07f70cedd9a7dcc074c8554f1bed
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: use plain access for descriptor length
Problem Details: The read memory barrier added by commit 6d037a372f81 ("wifi: ath11k: fix ring-buffer corruption") is enough to guarantee ordering also for plain descriptor accesses if the length helper is ever inlined so drop the unnecessary READ_ONCE(). Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SI...
```diff diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c index 0aa73774150c..4a3bdacc5769 100644 --- a/drivers/net/wireless/ath/ath11k/hal.c +++ b/drivers/net/wireless/ath/ath11k/hal.c @@ -601,7 +601,7 @@ u32 ath11k_hal_ce_dst_status_get_length(void *buf) struct hal_ce_srng_d...
8c1ba5091fa9a2d1478da63173b16a701bdf86bb
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix dest ring-buffer corruption
Problem Details: Add the missing memory barrier to make sure that destination ring descriptors are read after the head pointers to avoid using stale data on weakly ordered architectures like aarch64. The barrier is added to the ath11k_hal_srng_access_begin() helper for symmetry with follow-on fixes for source ring buf...
```diff diff --git a/drivers/net/wireless/ath/ath11k/ce.c b/drivers/net/wireless/ath/ath11k/ce.c index be9395f2ed8b..878ce30b307c 100644 --- a/drivers/net/wireless/ath/ath11k/ce.c +++ b/drivers/net/wireless/ath/ath11k/ce.c @@ -395,9 +395,6 @@ static int ath11k_ce_completed_recv_next(struct ath11k_ce_pipe *pipe, goto...
ce7c93d196bfd2190dc4a0b86deee04e82042ed1
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix beacon reception for sta associated to Non-TX AP
Problem Details: Currently, when a station is associated with a Non-Transmitting BSS of an MBSSID set, beacons are not frequently received from the firmware. This results in missing events via beacons, such as channel switches, leading to the station not switching to new channel as the AP does, eventually causing a kic...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 42036658cf71..4496002a17a0 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -602,6 +602,33 @@ ath12k_mac_get_tx_arvif(struct ath12k_link_vif *arvif, return NULL; }...
70eeacc1a92a444f4b5777ab19e1c378a5edc8dd
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix station association with MBSSID Non-TX BSS
Problem Details: ath12k station is unable to associate with non-transmitting BSSes in a Multiple BSS set because the user-space does not receive information about the non-transmitting BSSes from mac80211's scan results. The ath12k driver does not advertise its MBSSID capability to mac80211, resulting in wiphy->support...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index ab184c5c7da1..42036658cf71 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -12719,6 +12719,7 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah) wiphy->mb...
8f9480451514c065dc8296c0db6e26d6c467fafe
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix suspend use-after-free after probe failure
Problem Details: Make sure to deregister the PM notifier to avoid a use-after-free on suspend in case core initialisation fails (e.g. due to missing firmware). Tested-on: WCN6855 hw2.0 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41 Fixes: 32d93b51bc7e ("wifi: ath11k: choose default PM policy for hibernat...
```diff diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index 48d81b82f895..ad942fad01e9 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -2583,10 +2583,15 @@ int ath11k_core_init(struct ath11k_base *ab) ret = ath11k_core_...
a5b46aa7cf5f05c213316a018e49a8e086efd98e
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: clear initialized flag for deinit-ed srng lists
Problem Details: In a number of cases we see kernel panics on resume due to ath11k kernel page fault, which happens under the following circumstances: 1) First ath11k_hal_dump_srng_stats() call Last interrupt received for each group: ath11k_pci 0000:01:00.0: group_id 0 22511ms before ath11k_pci 0000:01:00.0: group...
```diff diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c index f1d76839a87b..a6513aa6fbfa 100644 --- a/drivers/net/wireless/ath/ath11k/hal.c +++ b/drivers/net/wireless/ath/ath11k/hal.c @@ -1348,6 +1348,10 @@ EXPORT_SYMBOL(ath11k_hal_srng_init); void ath11k_hal_srng_deinit(stru...
2fa490c0d7591918bed267059700f1c9e505e881
Analyze and fix the following issue in the Linux kernel code: wifi: ath9k: ahb: replace id_table with of
Problem Details: Since 2b0996c7646 , all of this platform code became no-op with no OF replacement. Not only that, there are no users of AHB here. Add an OF match table that mostly mirrors the original platform device id table. Use a qca prefix as is done for the only other property: qca,no-eeprom. Also used qca prefix...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c index 1ffec827ed87..802e6596a6a8 100644 --- a/drivers/net/wireless/ath/ath9k/ahb.c +++ b/drivers/net/wireless/ath/ath9k/ahb.c @@ -19,35 +19,18 @@ #include <linux/mod_devicetable.h> #include <linux/module.h> #include <lin...
720fa0cb59e411eca6b274f78073b6d2fe68eb45
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: qcom : Fix NULL pointer dereference in ufs_qcom_setup_clocks
Problem Details: Fix a NULL pointer dereference in ufs_qcom_setup_clocks due to an uninitialized 'host' variable. The variable 'phy' is now assigned after confirming 'host' is not NULL. Call Stack: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 ufs_qcom_setup_clocks+0x28/0x148 u...
```diff diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index ba4b2880279c..318dca7fe3d7 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -1124,7 +1124,7 @@ static int ufs_qcom_setup_clocks(struct ufs_hba *hba, bool on, enum ufs_notify_change_status status) { ...
06f77ff9d852c9f2764659ea81489364d8a69a9c
Analyze and fix the following issue in the Linux kernel code: soundwire: debugfs: move debug statement outside of error handling
Problem Details: The start_t and finish_t variables are not properly initialized if errors happens over request_firmware actions. This was also detected by smatch: drivers/soundwire/debugfs.c:301 cmd_go() error: uninitialized symbol 'finish_t'. drivers/soundwire/debugfs.c:301 cmd_go() error: uninitialized symbol 'star...
```diff diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c index 3099ea074f10..230a51489486 100644 --- a/drivers/soundwire/debugfs.c +++ b/drivers/soundwire/debugfs.c @@ -291,6 +291,9 @@ static int cmd_go(void *data, u64 value) finish_t = ktime_get(); + dev_dbg(&slave->dev, "command completed,...
3529cb5ab16b4f1f8bbc31dc39a1076a94bd1e38
Analyze and fix the following issue in the Linux kernel code: drm/fourcc: Add 32b float formats
Problem Details: Add 1, 2, 3, and 4 component 32b float formats, so that buffers with these formats can be imported/exported with fourcc+modifier, and/or created by gbm. These correspond to PIPE_FORMAT_{R32,R32G32,R32G32B32,R32G32B32A32}_FLOAT in mesa. v2: Fix comment describing float32 layout [Sima] Signed-off-by: ...
```diff diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index 89a82d02b7e8..0d375c5bfc9d 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -232,6 +232,16 @@ extern "C" { #define DRM_FORMAT_GR1616F fourcc_code('G', 'R', ' ', 'H') /* [31:0] G:R 16:16 littl...
8c2442663f683f4fabadb3c491821169da6c89a8
Analyze and fix the following issue in the Linux kernel code: dmaengine: idxd: Fix warning for deadcode.deadstore
Problem Details: Deletes the second initialization as the value stored to 'dev' during its initialization (struct device *dev = &idxd->pdev->dev;) is sufficient. ../drivers/dma/idxd/init.c:988:17: warning: Value stored to 'dev' during its initialization is never read [deadcode.DeadStores] 988 | struct devic...
```diff diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c index 80355d03004d..35bdefd3728b 100644 --- a/drivers/dma/idxd/init.c +++ b/drivers/dma/idxd/init.c @@ -1036,7 +1036,6 @@ static void idxd_reset_prepare(struct pci_dev *pdev) const char *idxd_name; int rc; - dev = &idxd->pdev->dev; idxd_name...
a0b1589b62e2fcfb112996e0f4d5593bd2edf069
Analyze and fix the following issue in the Linux kernel code: dmaengine: mmp: Fix again Wvoid-pointer-to-enum-cast warning
Problem Details: This was fixed and re-introduced. 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: mmp_tdma.c:644:9: error: cast to smaller integer type 'enum mmp_tdma_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Fixes: a67ba97dfb30 ("dmaengine: Use device_get_mat...
```diff diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index c8dc504510f1..b7fb843c67a6 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c @@ -641,7 +641,7 @@ static int mmp_tdma_probe(struct platform_device *pdev) int chan_num = TDMA_CHANNEL_NUM; struct gen_pool *pool = NULL; - type =...
85a4ca2902c1d3b8ccea03837b10e178405192c5
Analyze and fix the following issue in the Linux kernel code: dmaengine: fsl-qdma: Add missing fsl_qdma_format kerneldoc
Problem Details: Document '__reserved2' and 'cmd' fields of 'struct fsl_qdma_format' to fix W=1 warnings: fsl-qdma.c:169 struct member '__reserved2' not described in 'fsl_qdma_format' fsl-qdma.c:169 struct member 'cmd' not described in 'fsl_qdma_format' Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@lina...
```diff diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c index 823f5c6bc2e1..21e13f1207cb 100644 --- a/drivers/dma/fsl-qdma.c +++ b/drivers/dma/fsl-qdma.c @@ -148,6 +148,9 @@ * @__reserved1: Reserved field. * @cfg8b_w1: Compound descriptor command queue origin produced * by qDMA and dyn...
24c13df655ca1fad5fc6fa4fbacb828f4a6d4f2b
Analyze and fix the following issue in the Linux kernel code: dmaengine: qcom: gpi: Drop unused gpi_write_reg_field()
Problem Details: Static function gpi_write_reg_field() is not used, W=1 build: gpi.c:573:20: error: unused function 'gpi_write_reg_field' [-Werror,-Wunused-function] Fixes: 5d0c3533a19f ("dmaengine: qcom: Add GPI dma driver") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.ker...
```diff diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index b1f0001cc99c..8e87738086b2 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -569,17 +569,6 @@ static inline void gpi_write_reg(struct gpii *gpii, void __iomem *addr, u32 val) writel_relaxed(val, addr); } -/* gpi_write_reg...
f0368c23caba175e07062a3f24e58a2b4ec5bb1c
Analyze and fix the following issue in the Linux kernel code: dmaengine: fsl-dpaa2-qdma: Drop unused mc_enc()
Problem Details: Static function mc_enc() is not used, W=1 build: dpdmai.c:51:19: error: unused function 'mc_enc' [-Werror,-Wunused-function] Fixes: 26a4d2aedac2 ("dmaengine: fsl-dpaa2-qdma: Remove unused function dpdmai_create()") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lo...
```diff diff --git a/drivers/dma/fsl-dpaa2-qdma/dpdmai.c b/drivers/dma/fsl-dpaa2-qdma/dpdmai.c index b4323d243d6d..4be81db24a19 100644 --- a/drivers/dma/fsl-dpaa2-qdma/dpdmai.c +++ b/drivers/dma/fsl-dpaa2-qdma/dpdmai.c @@ -48,11 +48,6 @@ struct dpdmai_cmd_destroy { __le32 dpdmai_id; } __packed; -static inline u64 ...
06b80ad4ffa5e614e89f04dffc44b85377c7ee24
Analyze and fix the following issue in the Linux kernel code: dmaengine: dw-edma: Drop unused dchan2dev() and chan2dev()
Problem Details: Static functions dchan2dev() and chan2dev() are not used, W=1 build: dw-edma-core.c:27:16: error: unused function 'dchan2dev' [-Werror,-Wunused-function] dw-edma-core.c:33:16: error: unused function 'chan2dev' [-Werror,-Wunused-function] Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core ...
```diff diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c index c2b88cc99e5d..b43255f914f3 100644 --- a/drivers/dma/dw-edma/dw-edma-core.c +++ b/drivers/dma/dw-edma/dw-edma-core.c @@ -23,18 +23,6 @@ #include "../dmaengine.h" #include "../virt-dma.h" -static inline -struct device *...
e19bdbaa31082b43dab1d936e20efcebc30aa73d
Analyze and fix the following issue in the Linux kernel code: dmaengine: stm32-dma: configure next sg only if there are more than 2 sgs
Problem Details: DMA operates in Double Buffer Mode (DBM) when the transfer is cyclic and there are at least two periods. When DBM is enabled, the DMA toggles between two memory targets (SxM0AR and SxM1AR), indicated by the SxSCR.CT bit (Current Target). There is no need to update the next memory address if two periods...
```diff diff --git a/drivers/dma/stm32/stm32-dma.c b/drivers/dma/stm32/stm32-dma.c index 917f8e922373..0e39f99bce8b 100644 --- a/drivers/dma/stm32/stm32-dma.c +++ b/drivers/dma/stm32/stm32-dma.c @@ -744,7 +744,7 @@ static void stm32_dma_handle_chan_done(struct stm32_dma_chan *chan, u32 scr) /* cyclic while CIRC/DBM ...
e201757f7a0a901e313d638c545ed6cd0dc6870e
Analyze and fix the following issue in the Linux kernel code: perf annotate: Fix source code annotate with objdump
Problem Details: Recently it uses llvm and capstone to speed up annotation or disassembly of instructions. But they don't support source code view yet. Until it fixed, we can force to use objdump for source code annotation. To prevent performance loss, it's disabled by default and turned it on when user requests it ...
```diff diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index ab776b1ed2d5..183902dac042 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c @@ -345,6 +345,23 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser, browser->...
8eba2187391e5ab49940cd02d6bd45a5617f4daf
Analyze and fix the following issue in the Linux kernel code: dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status()
Problem Details: Fixed a flag reuse bug in the mtk_cqdma_tx_status() function. Fixes: 157ae5ffd76a ("dmaengine: mediatek: Fix a possible deadlock error in mtk_cqdma_tx_status()") Cc: stable@vger.kernel.org Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202505270641.MStzJUf...
```diff diff --git a/drivers/dma/mediatek/mtk-cqdma.c b/drivers/dma/mediatek/mtk-cqdma.c index 47c8adfdc155..9f0c41ca7770 100644 --- a/drivers/dma/mediatek/mtk-cqdma.c +++ b/drivers/dma/mediatek/mtk-cqdma.c @@ -449,9 +449,9 @@ static enum dma_status mtk_cqdma_tx_status(struct dma_chan *c, return ret; spin_lock_i...
7a5cb145a9ce844be41ca5ed26e7d8d7c41dec7d
Analyze and fix the following issue in the Linux kernel code: rust: driver: Add ACPI id table support to Adapter trait
Problem Details: Extend the `Adapter` trait to support ACPI device identification. This mirrors the existing Open Firmware (OF) support (`of_id_table`) and enables Rust drivers to match and retrieve ACPI-specific device data when `CONFIG_ACPI` is enabled. To avoid breaking compilation, a stub implementation of `acpi_...
```diff diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index 8cbb660e2ec2..7e8f22850647 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -28,6 +28,7 @@ */ #include <linux/hrtimer_types.h> +#include <linux/acpi.h> #include <drm/drm_device.h> #in...
0f549d25858dfef9decd0b99a82ff4bc9095a51f
Analyze and fix the following issue in the Linux kernel code: rust: driver: Consolidate `Adapter::of_id_info` methods using `#[cfg]`
Problem Details: Refactor the `of_id_info` methods in the `Adapter` trait to reduce duplication. Previously, the method had two versions selected via `#[cfg(...)]` and `#[cfg(not(...))]`. This change merges them into a single method by using `#[cfg]` blocks within the method body. Suggested-by: Benno Lossin <lossin@ke...
```diff diff --git a/rust/kernel/driver.rs b/rust/kernel/driver.rs index ec9166cedfa7..b072b88e7cc1 100644 --- a/rust/kernel/driver.rs +++ b/rust/kernel/driver.rs @@ -147,30 +147,32 @@ pub trait Adapter { /// Returns the driver's private data from the matching entry in the [`of::IdTable`], if any. /// //...
c038bdba98c9f6a36378044a9d4385531a194d3e
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix out-of-bounds field write in MI_STORE_DATA_IMM
Problem Details: According to Bspec, bits 0~9 of MI_STORE_DATA_IMM must not exceed 0x3FE. The macro MI_SDI_NUM_QW(x) evaluates to 2 * x + 1, which means the condition 2 * x + 1 <= 0x3FE must be satisfied. Therefore, the maximum valid value for x is 0x1FE, not 0x1FF. v2 - Replace 0x1fe with macro MAX_PTE_PER_SDI (Auld...
```diff diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c index 8f8e9fdfb2a8..7acdc4c78866 100644 --- a/drivers/gpu/drm/xe/xe_migrate.c +++ b/drivers/gpu/drm/xe/xe_migrate.c @@ -82,7 +82,7 @@ struct xe_migrate { * of the instruction. Subtracting the instruction header (1 dword) and * a...
a628e69b6412dc02757a6a23f7f16ce0c14d71f1
Analyze and fix the following issue in the Linux kernel code: soundwire: amd: fix for clearing command status register
Problem Details: To clear the valid result status, 1 should be written to ACP_SDW_IMM_CMD_STS register. Update the ACP_SW_IMM_CMD_STS register value as 1. Fixes: d8f48fbdfd9a ("soundwire: amd: Add support for AMD Manager driver") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/...
```diff diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c index a9a57cb6257c..7a671a786197 100644 --- a/drivers/soundwire/amd_manager.c +++ b/drivers/soundwire/amd_manager.c @@ -238,7 +238,7 @@ static u64 amd_sdw_send_cmd_get_resp(struct amd_sdw_manager *amd_manager, u32 lo if (sts & AM...
49918a1c421c4186ff6f05eb7abf892b4ecfecb2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1-asus-zenbook: fixup GPU nodes
Problem Details: It appears not the latest version of the patch was merged. Align with latest upstreamed version by correcting GPU enable location and typo in GPU firmware path for x1p42100 variant. Fixes: 6516961352a1 ("arm64: dts: qcom: Add support for X1-based Asus Zenbook A14") Signed-off-by: Aleksandrs Vinarskis...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi b/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi index 65c41d99c9bf..c8d6d66d05c8 100644 --- a/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi +++ b/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi @@ -645,10 +645,6 @@ }; }; -&gpu { - sta...
ae6a0f5b8a5b0ca2e4bf1c0380267ad83aca8401
Analyze and fix the following issue in the Linux kernel code: soundwire: Correct some property names
Problem Details: The DisCo properties should be mipi-sdw-paging-supported and mipi-sdw-bank-delay-supported, with an 'ed' on the end. Correct the property names used in sdw_slave_read_prop(). The internal flag bank_delay_support is currently unimplemented, so that being read wrong does not currently affect anything. T...
```diff diff --git a/drivers/soundwire/mipi_disco.c b/drivers/soundwire/mipi_disco.c index 65afb28ef8fa..c69b78cd0b62 100644 --- a/drivers/soundwire/mipi_disco.c +++ b/drivers/soundwire/mipi_disco.c @@ -451,10 +451,10 @@ int sdw_slave_read_prop(struct sdw_slave *slave) "mipi-sdw-highPHY-capable"); prop->paging_...
934eee0ce35cde5ea8a570de94cf5903cb44518d
Analyze and fix the following issue in the Linux kernel code: ACPI: proc: Remove unused header
Problem Details: With `make W=1` build we get a warning: drivers/acpi/proc.c: warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present Fix it by removing unused inclusion. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250612201321.3536493-4-...
```diff diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c index 48215ba09193..8ae85b06c422 100644 --- a/drivers/acpi/proc.c +++ b/drivers/acpi/proc.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/proc_fs.h> #include <linux/seq_file.h> -#include <linux/export.h> #include <linux/suspend.h> ...
bb4049c9fe94f6b257cf4c211b6df398487da6bf
Analyze and fix the following issue in the Linux kernel code: ACPI: wakeup: Drop unneeded casting for sleep_state
Problem Details: Back to the original patch [1] sleep_state was defined as a custom acpi_integer type variable. Nowadays it's plain u64. No need to have casting for it anymore. Link: https://bugzilla.kernel.org/show_bug.cgi?id=1415 [1] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://pa...
```diff diff --git a/drivers/acpi/wakeup.c b/drivers/acpi/wakeup.c index b02bf770aead..ff6dc957bc11 100644 --- a/drivers/acpi/wakeup.c +++ b/drivers/acpi/wakeup.c @@ -42,7 +42,7 @@ void acpi_enable_wakeup_devices(u8 sleep_state) list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_list, wakeup_list) { if (...
ef4af870be41a2a741109b99bbf780c769dcdc30
Analyze and fix the following issue in the Linux kernel code: ACPICA: Decrease `AcpiExTracePoint` verbosity
Problem Details: Early in kernel boot pointers can't be used and so %p shows up incorrectly: ``` extrace-0138 ex_trace_point : Method Begin [0x(____ptrval____):\M460] execution. ``` Later in the boot %p works, but it's not really actually useful when the pathname can resolve properly. Adjust the debug print s...
```diff diff --git a/drivers/acpi/acpica/extrace.c b/drivers/acpi/acpica/extrace.c index d34497f3576a..36934d4f26fb 100644 --- a/drivers/acpi/acpica/extrace.c +++ b/drivers/acpi/acpica/extrace.c @@ -136,9 +136,9 @@ acpi_ex_trace_point(acpi_trace_event_type type, if (pathname) { ACPI_DEBUG_PRINT((ACPI_DB_TRACE_PO...
0fd0541b6770b190afa9534c9208c0aa774d533c
Analyze and fix the following issue in the Linux kernel code: ACPI: APEI: EINJ: Fix check and iounmap of uninitialized pointer p
Problem Details: In the case where a request_mem_region call fails and pointer r is null the error exit path via label 'out' will check for a non-null pointer p and try to iounmap it. However, pointer p has not been assigned a value at this point, so it may potentially contain any garbage value. Fix this by ensuring po...
```diff diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index 59777a292ffc..3d37978418e8 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -401,7 +401,7 @@ static int __einj_error_trigger(u64 trigger_paddr, u32 type, u32 table_size; int rc = -EIO; struct ...
c13d38bc9b00eaab19ba4d7608677371d2d2f480
Analyze and fix the following issue in the Linux kernel code: ACPI: APEI: EINJ: Fix less than zero comparison on a size_t variable
Problem Details: The check for c < 0 is always false because variable c is a size_t which is not a signed type. Fix this by making c a ssize_t. Fixes: 90711f7bdf76 ("ACPI: APEI: EINJ: Create debugfs files to enter device id and syndrome") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Ira Weiny <i...
```diff diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index f5cfa6310f0e..59777a292ffc 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -913,7 +913,7 @@ static ssize_t u128_write(struct file *f, const char __user *buf, size_t count, u8 tmp[COMPONENT_LEN]; ...
80744a3bed8ce65071ca6e970a5f8b7c12213d3d
Analyze and fix the following issue in the Linux kernel code: ACPI: APEI: EINJ: prevent memory corruption in error_type_set()
Problem Details: The "einj_buf" buffer is 32 chars. If "count" is larger than that it results in memory corruption. Cap it at 31 so that we leave the last character as a NUL terminator. By the way, the highest reasonable value for "count" is 24. Fixes: 0c6176e1e186 ("ACPI: APEI: EINJ: Enable the discovery of EINJv2...
```diff diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index d6d7e36e3647..f5cfa6310f0e 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -826,6 +826,10 @@ static ssize_t error_type_set(struct file *file, const char __user *buf, int rc; u64 val; + /* Lea...
d657e251d9d48057b27e1aa175d5440653b20c54
Analyze and fix the following issue in the Linux kernel code: iio: trigger: stm32-lptimer: Fix build warnings about export.h
Problem Details: After commit a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1") and commit 7d95680d64ac ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1") we get the build warning with W=1: drivers/iio/trigger/stm32-lptimer-trigger.c: warning: EXPORT_SYMBOL...
```diff diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c b/drivers/iio/trigger/stm32-lptimer-trigger.c index 2505ace440b4..c7bab18221c7 100644 --- a/drivers/iio/trigger/stm32-lptimer-trigger.c +++ b/drivers/iio/trigger/stm32-lptimer-trigger.c @@ -9,6 +9,7 @@ * Inspired by Benjamin Gaignard's stm32-timer-trigg...
2628736bd4880fd29b6ec8f6064a8a8c7ce1fbcf
Analyze and fix the following issue in the Linux kernel code: iio: trigger: stm32-timer: Fix build warnings about export.h
Problem Details: After commit a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1") and commit 7d95680d64ac ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1") we get the build warning with W=1: drivers/iio/trigger/stm32-timer-trigger.c: warning: EXPORT_SYMBOL()...
```diff diff --git a/drivers/iio/trigger/stm32-timer-trigger.c b/drivers/iio/trigger/stm32-timer-trigger.c index 925b864facca..3b9a3a6cbb25 100644 --- a/drivers/iio/trigger/stm32-timer-trigger.c +++ b/drivers/iio/trigger/stm32-timer-trigger.c @@ -6,6 +6,7 @@ * */ +#include <linux/export.h> #include <linux/iio/ii...
86c4903bb219271af46bfc9b7b7146430eeb89a4
Analyze and fix the following issue in the Linux kernel code: iio: adc: stm32-dfsdm: Fix build warnings about export.h
Problem Details: After commit a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1") and commit 7d95680d64ac ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1") we get the build warnings with W=1: drivers/iio/adc/stm32-dfsdm-adc.c: warning: EXPORT_SYMBOL() is use...
```diff diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c index f583924eb16b..c2d21eecafe7 100644 --- a/drivers/iio/adc/stm32-dfsdm-adc.c +++ b/drivers/iio/adc/stm32-dfsdm-adc.c @@ -8,6 +8,7 @@ #include <linux/dmaengine.h> #include <linux/dma-mapping.h> +#include <linux/export.h> #...
7b20d517b9e508527f51fdd3be817f4670bf18cc
Analyze and fix the following issue in the Linux kernel code: iio: accel: adxl313: add debug register
Problem Details: Add IIO debug register for general sensor debugging. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Link: https://patch.msgid.link/20250601172139.59156-2-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
```diff diff --git a/drivers/iio/accel/adxl313_core.c b/drivers/iio/accel/adxl313_core.c index 46cca10e776f..8996180f1e18 100644 --- a/drivers/iio/accel/adxl313_core.c +++ b/drivers/iio/accel/adxl313_core.c @@ -321,10 +321,21 @@ static int adxl313_write_raw(struct iio_dev *indio_dev, } } +static int adxl313_reg_ac...
f0fdb01df208edb6478ee83b1e4137b2655eaac2
Analyze and fix the following issue in the Linux kernel code: iio: adc: ti-ads131e08: Fix spelling mistake "tweek" -> "tweak"
Problem Details: There is a spelling mistake in variable tweek_offset and in comment blocks. Fix these. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250603165706.126031-1-colin.i.king@gmail.com Signed-off-by: Jonathan Cameron <Jo...
```diff diff --git a/drivers/iio/adc/ti-ads131e08.c b/drivers/iio/adc/ti-ads131e08.c index 085f0d6fb39e..b18f30d3fdbe 100644 --- a/drivers/iio/adc/ti-ads131e08.c +++ b/drivers/iio/adc/ti-ads131e08.c @@ -625,7 +625,7 @@ static irqreturn_t ads131e08_trigger_handler(int irq, void *private) * 16 bits of data into the bu...
178b8ff66ff827c41b4fa105e9aabb99a0b5c537
Analyze and fix the following issue in the Linux kernel code: io_uring/kbuf: flag partial buffer mappings
Problem Details: A previous commit aborted mapping more for a non-incremental ring for bundle peeking, but depending on where in the process this peeking happened, it would not necessarily prevent a retry by the user. That can create gaps in the received/read data. Add struct buf_sel_arg->partial_map, which can pass t...
```diff diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c index ce95e3af44a9..f2d2cc319faa 100644 --- a/io_uring/kbuf.c +++ b/io_uring/kbuf.c @@ -271,6 +271,7 @@ static int io_ring_buffers_peek(struct io_kiocb *req, struct buf_sel_arg *arg, if (len > arg->max_len) { len = arg->max_len; if (!(bl->flags & IOBL_IN...
c72bf82f96019216bb0a291d39c244977603661f
Analyze and fix the following issue in the Linux kernel code: perf top: populate PMU capabilities data in perf_env
Problem Details: Calling perf top with branch filters enabled on Intel CPU's with branch counters logging (A.K.A LBR event logging [1]) support results in a segfault. $ perf top -e '{cpu_core/cpu-cycles/,cpu_core/event=0xc6,umask=0x3,frontend=0x11,name=frontend_retired_dsb_miss/}' -j any,counter ... Thread 27 "perf" ...
```diff diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 051ded5ba9ba..c77e195ea786 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1734,6 +1734,14 @@ int cmd_top(int argc, const char **argv) if (opts->branch_stack && callchain_param.enabled) symbol_conf.show_branchfl...
38074de35b015df5623f524d6f2b49a0cd395c40
Analyze and fix the following issue in the Linux kernel code: NFSv4/flexfiles: Fix handling of NFS level errors in I/O
Problem Details: Allow the flexfiles error handling to recognise NFS level errors (as opposed to RPC level errors) and handle them separately. The main motivator is the NFSERR_PERM errors that get returned if the NFS client connects to the data server through a port number that is lower than 1024. In that case, the cli...
```diff diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index df4807460596..4bea008dbebd 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1105,6 +1105,7 @@ static void ff_layout_reset_read(struct nfs_pgio_header *hdr) } ...
2f5d370dec3f800b44bbf7b68875d521e0af43cd
Analyze and fix the following issue in the Linux kernel code: perf test: Change all remaining #!/bin/sh to #!/bin/bash
Problem Details: There are 43 instances of posix shell tests and 35 instances of bash. To give us a single consistent language for testing in, replace all #!/bin/sh to #!/bin/bash. Common sources that are included in both different shells will now work as expected. And we no longer have to fix up bashisms that appear t...
```diff diff --git a/tools/perf/tests/perf-targz-src-pkg b/tools/perf/tests/perf-targz-src-pkg index b3075c168cb2..52a90e6bd8af 100755 --- a/tools/perf/tests/perf-targz-src-pkg +++ b/tools/perf/tests/perf-targz-src-pkg @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # Test one of the main k...
a55b7d39328bc6de1131cb5496816129cab2728b
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Allow macros in __retval
Problem Details: Allow macro expansion for values passed to the `__retval` and `__retval_unpriv` attributes. This is especially useful for testing programs which return various error codes. With this change, the code for parsing special literals can be made simpler, as the literals are defined via macros. The only exc...
```diff diff --git a/tools/testing/selftests/bpf/progs/bpf_misc.h b/tools/testing/selftests/bpf/progs/bpf_misc.h index a678463e972c..20dce508d8e0 100644 --- a/tools/testing/selftests/bpf/progs/bpf_misc.h +++ b/tools/testing/selftests/bpf/progs/bpf_misc.h @@ -83,9 +83,11 @@ * expect return value to m...
e91370550f1fe6fa3b02e8bf9762e3dc0a02fcad
Analyze and fix the following issue in the Linux kernel code: bpf: Add kfuncs for read-only string operations
Problem Details: String operations are commonly used so this exposes the most common ones to BPF programs. For now, we limit ourselves to operations which do not copy memory around. Unfortunately, most in-kernel implementations assume that strings are %NUL-terminated, which is not necessarily true, and therefore we ca...
```diff diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index b71e428ad936..2cdcf7b2c91e 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -24,6 +24,7 @@ #include <linux/bpf_mem_alloc.h> #include <linux/kasan.h> #include <linux/bpf_verifier.h> +#include <linux/uaccess.h> #include "../../lib...
618c810a7b2163517ab1875bd56b633ca3cb3328
Analyze and fix the following issue in the Linux kernel code: interconnect: icc-clk: destroy nodes in case of memory allocation failures
Problem Details: When memory allocation fails during creating the name of the nodes in icc_clk_register(), the code continues on the error path and it calls icc_nodes_remove() to destroy the already created nodes. However that function only destroys the nodes which were already added to the provider and the newly creat...
```diff diff --git a/drivers/interconnect/icc-clk.c b/drivers/interconnect/icc-clk.c index 88f311c11020..93c030608d3e 100644 --- a/drivers/interconnect/icc-clk.c +++ b/drivers/interconnect/icc-clk.c @@ -117,6 +117,7 @@ struct icc_provider *icc_clk_register(struct device *dev, node->name = devm_kasprintf(dev, GFP_K...
1809db75bd1fa71e27e199e4c5cc9072741f6052
Analyze and fix the following issue in the Linux kernel code: interconnect: increase ICC_DYN_ID_START
Problem Details: Since commit d30f83d278a9 ("interconnect: core: Add dynamic id allocation support"), interconnect node ids greater than or equal to ICC_DYN_ID_START are reserved for dynamic id allocation. Yet the icc_node_create_nolock() function allows to directly use such ids for creating nodes. This can cause probl...
```diff diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index 1a41e59c77f8..3a41b2717edd 100644 --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -20,7 +20,7 @@ #include "internal.h" -#define ICC_DYN_ID_START 10000 +#define ICC_DYN_ID_START 100000 #define CREATE_TRACE...
263debecb4aa7cec0a86487e6f409814f6194a21
Analyze and fix the following issue in the Linux kernel code: cifs: Fix reading into an ITER_FOLIOQ from the smbdirect code
Problem Details: When performing a file read from RDMA, smbd_recv() prints an "Invalid msg type 4" error and fails the I/O. This is due to the switch-statement there not handling the ITER_FOLIOQ handed down from netfslib. Fix this by collapsing smbd_recv_buf() and smbd_recv_page() into smbd_recv() and just using copy...
```diff diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 0a9fd6c399f6..754e94a0e07f 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -1778,35 +1778,39 @@ try_again: } /* - * Receive data from receive reassembly queue + * Receive data from the transport's receive reas...
43e7e284fc77b710d899569360ea46fa3374ae22
Analyze and fix the following issue in the Linux kernel code: cifs: Fix the smbd_response slab to allow usercopy
Problem Details: The handling of received data in the smbdirect client code involves using copy_to_iter() to copy data from the smbd_reponse struct's packet trailer to a folioq buffer provided by netfslib that encapsulates a chunk of pagecache. If, however, CONFIG_HARDENED_USERCOPY=y, this will result in the checks th...
```diff diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index a976bcf61226..0a9fd6c399f6 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -1475,6 +1475,9 @@ static int allocate_caches_and_workqueue(struct smbd_connection *info) char name[MAX_NAME_LEN]; int rc; + if (WAR...
711741f94ac3cf9f4e3aa73aa171e76d188c0819
Analyze and fix the following issue in the Linux kernel code: smb: client: fix potential deadlock when reconnecting channels
Problem Details: Fix cifs_signal_cifsd_for_reconnect() to take the correct lock order and prevent the following deadlock from happening ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc3-build2+ #1301 Tainted: G S W ----------------------------...
```diff diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 45e94e18f4d5..318a8405d475 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -709,6 +709,7 @@ inc_rfc1001_len(void *buf, int count) struct TCP_Server_Info { struct list_head tcp_ses_list; struct list_head smb_ses_l...
b5870168783168f670bd55ebb00fd8207cb42479
Analyze and fix the following issue in the Linux kernel code: drm/xe: Implement and use the drm_pagemap populate_mm op
Problem Details: Add runtime PM since we might call populate_mm on a foreign device. v3: - Fix a kerneldoc failure (Matt Brost) - Revert the bo type change from device to kernel (Matt Brost) v4: - Add an assert in xe_svm_alloc_vram (Matt Brost) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Review...
```diff diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c index 13e1519aa6d6..1da55322af12 100644 --- a/drivers/gpu/drm/drm_pagemap.c +++ b/drivers/gpu/drm/drm_pagemap.c @@ -835,3 +835,4 @@ int drm_pagemap_populate_mm(struct drm_pagemap *dpagemap, return err; } +EXPORT_SYMBOL(drm_pagemap_p...
2ef19be2a545a63310c5c0fae0e173fc0c33bb6a
Analyze and fix the following issue in the Linux kernel code: drm/pagemap: Add a populate_mm op
Problem Details: Add an operation to populate a part of a drm_mm with device private memory. Clarify how migration using it is intended to work. v3: - Kerneldoc fixes and updates (Matt Brost). v4: - More kerneldoc fixes. Rebase. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew B...
```diff diff --git a/drivers/gpu/drm/drm_gpusvm.c b/drivers/gpu/drm/drm_gpusvm.c index e454bb806c72..5bb4c77db2c3 100644 --- a/drivers/gpu/drm/drm_gpusvm.c +++ b/drivers/gpu/drm/drm_gpusvm.c @@ -176,12 +176,9 @@ * } * * if (driver_migration_policy(range)) { - * mmap_read_lock(mm); - * devmem = driver_alloc_...
38f742df9fcfc91a681d650fc5b622276b6c61b5
Analyze and fix the following issue in the Linux kernel code: ice: read TSPLL registers again before reporting status
Problem Details: After programming the TSPLL, re-read the registers before reporting status. This ensures the debug log message will show what was actually programmed, rather than relying on a cached value. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_tspll.c b/drivers/net/ethernet/intel/ice/ice_tspll.c index e2f07d60fcdc..440aba817b9c 100644 --- a/drivers/net/ethernet/intel/ice/ice_tspll.c +++ b/drivers/net/ethernet/intel/ice/ice_tspll.c @@ -239,8 +239,15 @@ static int ice_tspll_cfg_e82x(struct ice_hw *hw, enu...
bb8aa27eff6f3376242da37c2d02b9dcc66934b1
Analyze and fix the following issue in the Linux kernel code: drm/ttm, drm_xe, Implement ttm_lru_walk_for_evict() using the guarded LRU iteration
Problem Details: To avoid duplicating the tricky bo locking implementation, Implement ttm_lru_walk_for_evict() using the guarded bo LRU iteration. To facilitate this, support ticketlocking from the guarded bo LRU iteration. v2: - Clean up some static function interfaces (Christian König) - Fix Handling -EALREADY from...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 6de1f0c432c2..250675d56b1c 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -773,16 +773,15 @@ error_destroy_tt: return ret; } -static bool ttm_lru_walk_trylock(struct ttm_lru_w...
cf0b812500e64a7d5e2957abed38c3a97917b34f
Analyze and fix the following issue in the Linux kernel code: platform/x86: wmi: Fix WMI event enablement
Problem Details: It turns out that the Windows WMI-ACPI driver always enables/disables WMI events regardless of whether they are marked as expensive or not. This finding is further reinforced when reading the documentation of the WMI_FUNCTION_CONTROL_CALLBACK callback used by Windows drivers for enabling/disabling WMI ...
```diff diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index e46453750d5f..03aecf8bb7f8 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -177,16 +177,22 @@ static int wmi_device_enable(struct wmi_device *wdev, bool enable) acpi_handle handle; acpi_status status; - ...
c8e3d6d77507c42cc1a02783f70e1e4e85e3c80f
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Use a struct for the common part of struct ttm_lru_walk and struct ttm_bo_lru_cursor
Problem Details: Let the locking functions take the new struct ttm_lru_walk_arg as argument in order for them to be easily used from both types of walk. v2: - Whitespace fix Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://lore.ke...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index bb9c5c8e16b5..f4d9e68b21e7 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -526,11 +526,11 @@ static s64 ttm_bo_evict_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object * return 0; if (bo->d...
a49e1e2e785fb3621f2d748581881b23a364998a
Analyze and fix the following issue in the Linux kernel code: usb: hub: Fix flushing and scheduling of delayed work that tunes runtime pm
Problem Details: Delayed work to prevent USB3 hubs from runtime-suspending immediately after resume was added in commit 8f5b7e2bec1c ("usb: hub: fix detection of high tier USB3 devices behind suspended hubs"). This delayed work needs be flushed if system suspends, or hub needs to be quiesced for other reasons right af...
```diff diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 6bb6e92cb0a4..08562711dcf2 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1359,11 +1359,12 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) if (type == HUB_RESUME && hub_is_superspeed(hub-...
778fa8ad5f0f23397d045c7ebca048ce8def1c43
Analyze and fix the following issue in the Linux kernel code: drm/i915/selftests: Change mock_request() to return error pointers
Problem Details: There was an error pointer vs NULL bug in __igt_breadcrumbs_smoketest(). The __mock_request_alloc() function implements the smoketest->request_alloc() function pointer. It was supposed to return error pointers, but it propogates the NULL return from mock_request() so in the event of a failure, it woul...
```diff diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c index 88870844b5bd..2fb7a9e7efec 100644 --- a/drivers/gpu/drm/i915/selftests/i915_request.c +++ b/drivers/gpu/drm/i915/selftests/i915_request.c @@ -73,8 +73,8 @@ static int igt_add_request(void *arg) /* ...
b7c26cbd5b704a350b3176669f47047153903bc9
Analyze and fix the following issue in the Linux kernel code: clk: renesas: rzv2h: Add missing include file
Problem Details: File `rzv2h-cpg.h' makes use of data types defined in `linux/types.h', but it does not include the latter, which could lead to build errors. Include `linux/types.h' to fix this problem. Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glid...
```diff diff --git a/drivers/clk/renesas/rzv2h-cpg.h b/drivers/clk/renesas/rzv2h-cpg.h index 7321b085f937..25e0a9e5761b 100644 --- a/drivers/clk/renesas/rzv2h-cpg.h +++ b/drivers/clk/renesas/rzv2h-cpg.h @@ -9,6 +9,7 @@ #define __RENESAS_RZV2H_CPG_H__ #include <linux/bitfield.h> +#include <linux/types.h> /** * ...
815703e2ecdf091a724c16671aadd8c55de24878
Analyze and fix the following issue in the Linux kernel code: EDAC/mem_repair: Reduce stack usage in edac_mem_repair_get_desc()
Problem Details: Constructing an array on the stack adds complexity and can exceed the warning limit for per-function stack usage: drivers/edac/mem_repair.c:361:5: error: stack frame size (1296) exceeds limit (1280) in 'edac_mem_repair_get_desc' [-Werror,-Wframe-larger-than] Change this to have the actual attribu...
```diff diff --git a/drivers/edac/mem_repair.c b/drivers/edac/mem_repair.c index d1a8caa85369..2e4e790e0ffe 100755 --- a/drivers/edac/mem_repair.c +++ b/drivers/edac/mem_repair.c @@ -286,17 +286,26 @@ static umode_t mem_repair_attr_visible(struct kobject *kobj, struct attribute *a return 0; } -#define MR_ATTR_RO(_...
d07143b507c51c04c091081627c5a130e9d3c517
Analyze and fix the following issue in the Linux kernel code: platform/mellanox: nvsw-sn2201: Fix bus number in adapter error message
Problem Details: change error log to use correct bus number from main_mux_devs instead of cpld_devs. Fixes: 662f24826f95 ("platform/mellanox: Add support for new SN2201 system") Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/202506...
```diff diff --git a/drivers/platform/mellanox/nvsw-sn2201.c b/drivers/platform/mellanox/nvsw-sn2201.c index db31c8bf2255..51504113c17e 100644 --- a/drivers/platform/mellanox/nvsw-sn2201.c +++ b/drivers/platform/mellanox/nvsw-sn2201.c @@ -1181,7 +1181,7 @@ static int nvsw_sn2201_i2c_completion_notify(void *handle, int ...