id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c46c5a54443440ce0f71de9f4df9dd860f5c2afd
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8mp-edm-g: Correct PAD settings for PMIC_nINT
Problem Details: With commit 5d0efaf47ee90 ("regulator: pca9450: Correct interrupt type"), there might be interrupt storm for this board. Need to set PAD PUE and PU together to make pull up work properly. Fixes: 95e882c021c8b ("arm64: dts: imx8mp: Add TechNexion EDM-G-IMX8M-PLUS SOM on WB-EDM-G carrier board") Signed-...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mp-edm-g.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-edm-g.dtsi index 3f1e0837f349..91b87a7248dd 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-edm-g.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-edm-g.dtsi @@ -563,7 +563,7 @@ pinctrl_pmic: pmicirqgrp { ...
ea8c90f5c7ceeb6657a8fe564aa7b190dce298a6
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8mp-icore-mx8mp: Correct PAD settings for PMIC_nINT
Problem Details: With commit 5d0efaf47ee90 ("regulator: pca9450: Correct interrupt type"), there might be interrupt storm for this board. Need to set PAD PUE and PU together to make pull up work properly. Fixes: eefe06b295087 ("arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus SoM") Signed-off-by: Peng Fan <peng.fan@nx...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp.dtsi index a6319824ea2e..69558ffefa9a 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp.dtsi @@ -132,7 +132,7 @@ pinct...
741d6ac1a2a2e0f3e2cae5eef3516cdd75119e83
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8mp-navqp: Correct PAD settings for PMIC_nINT
Problem Details: With commit 5d0efaf47ee90 ("regulator: pca9450: Correct interrupt type"), there will be interrupt storm for i.MX8MP NAVQP. Per schematic, there is no on board PULL-UP resistors for GPIO1_IO03, so need to set PAD PUE and PU together to make pull up work properly. Fixes: 682729a9d506d ("arm64: dts: free...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mp-navqp.dts b/arch/arm64/boot/dts/freescale/imx8mp-navqp.dts index 4a4f7c1adc23..9dedb9f11145 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-navqp.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-navqp.dts @@ -356,7 +356,7 @@ pinctrl_pmic: pmicgrp { fsl,pi...
2ea7872048a179b0ea8dadc67771961df3f0fc4a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8mp-debix-som-a: Correct PAD settings for PMIC_nINT
Problem Details: With commit 5d0efaf47ee90 ("regulator: pca9450: Correct interrupt type"), there is interrupt storm for i.MX8MP DEBIX SOM A. Need to set PAD PUE and PU together to make pull up work properly. Fixes: 21baf0b47f81b ("arm64: dts: freescale: Add DEBIX SOM A and SOM A I/O Board support") Reported-by: Lauren...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mp-debix-som-a-bmb-08.dts b/arch/arm64/boot/dts/freescale/imx8mp-debix-som-a-bmb-08.dts index 04619a722906..1471ff361b54 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-debix-som-a-bmb-08.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-debix-som-a-bmb-08.dts @@ -4...
3b778178997aee24537b521a8cb60970bc1ce01c
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8mp-debix-model-a: Correct PAD settings for PMIC_nINT
Problem Details: With commit 5d0efaf47ee90 ("regulator: pca9450: Correct interrupt type"), there is interrupt storm for i.MX8MP DEBIX Model A. Per schematic, there is no on board PULL-UP resistors for GPIO1_IO03, so need to set PAD PUE and PU together to make pull up work properly. Fixes: c86d350aae68e ("arm64: dts: A...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts b/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts index 9422beee30b2..201cf7f5eb0e 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts @@ -440,7 +440,7 @@ p...
b7c958d7c1eb1cb9b2be7b5ee4129fcd66cec978
Analyze and fix the following issue in the Linux kernel code: riscv: kvm: fix vector context allocation leak
Problem Details: When the second kzalloc (host_context.vector.datap) fails in kvm_riscv_vcpu_alloc_vector_context, the first allocation (guest_context.vector.datap) is leaked. Free it before returning. Fixes: 0f4b82579716 ("riscv: KVM: Add vector lazy save/restore support") Cc: stable@vger.kernel.org Signed-off-by: Os...
```diff diff --git a/arch/riscv/kvm/vcpu_vector.c b/arch/riscv/kvm/vcpu_vector.c index 05f3cc2d8e31..5b6ad82d47be 100644 --- a/arch/riscv/kvm/vcpu_vector.c +++ b/arch/riscv/kvm/vcpu_vector.c @@ -80,8 +80,11 @@ int kvm_riscv_vcpu_alloc_vector_context(struct kvm_vcpu *vcpu) return -ENOMEM; vcpu->arch.host_context....
743677a8cb30b09f16a7f167f497c2c927891b5a
Analyze and fix the following issue in the Linux kernel code: HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
Problem Details: When sensor discovery fails on systems without AMD SFH sensors, the code already emits a warning via dev_warn() in amd_sfh_hid_client_init(). The subsequent dev_err() in sfh_init_work() for the same -EOPNOTSUPP return value is redundant and causes unnecessary alarm. Suppress the dev_err() for -EOPNOTS...
```diff diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c index 1d9f955573aa..4b81cebdc335 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c @@ -413,7 +413,8 @@ static void sfh_init_work(struct work_struct *work) rc = amd_sfh_hi...
aa35bcf2e76234fef7bbca9bf364039692a27661
Analyze and fix the following issue in the Linux kernel code: RISC-V: KVM: fix PMU snapshot_set_shmem on 32-bit hosts
Problem Details: When saddr_high != 0 on RV32, the goto out was unconditional, causing valid 64-bit addresses to be rejected. Only goto out when the address is invalid (64-bit host with saddr_high != 0). Fixes: c2f41ddbcdd7 ("RISC-V: KVM: Implement SBI PMU Snapshot feature") Signed-off-by: Osama Abdelkader <osama.abde...
```diff diff --git a/arch/riscv/kvm/vcpu_pmu.c b/arch/riscv/kvm/vcpu_pmu.c index e873430e596b..f3bf985dcf43 100644 --- a/arch/riscv/kvm/vcpu_pmu.c +++ b/arch/riscv/kvm/vcpu_pmu.c @@ -427,11 +427,12 @@ int kvm_riscv_vcpu_pmu_snapshot_set_shmem(struct kvm_vcpu *vcpu, unsigned long s saddr = saddr_low; if (saddr_hig...
e2f1ada8e089dd5a331bcd8b88125ae2af8d188f
Analyze and fix the following issue in the Linux kernel code: i2c: designware: amdisp: Fix resume-probe race condition issue
Problem Details: Identified resume-probe race condition in kernel v7.0 with the commit 38fa29b01a6a ("i2c: designware: Combine the init functions"),but this issue existed from the beginning though not detected. The amdisp i2c device requires ISP to be in power-on state for probe to succeed. To meet this requirement, t...
```diff diff --git a/drivers/i2c/busses/i2c-designware-amdisp.c b/drivers/i2c/busses/i2c-designware-amdisp.c index c48728ad9f6f..9f0ec0fae6f2 100644 --- a/drivers/i2c/busses/i2c-designware-amdisp.c +++ b/drivers/i2c/busses/i2c-designware-amdisp.c @@ -7,6 +7,7 @@ #include <linux/module.h> #include <linux/platform_de...
13101db735bdb29c5f60e95fb578690bd178b30f
Analyze and fix the following issue in the Linux kernel code: i2c: imx: ensure no clock is generated after last read
Problem Details: When reading from the I2DR register, right after releasing the bus by clearing MSTA and MTX, the I2C controller might still generate an additional clock cycle which can cause devices to misbehave. Ensure to only read from I2DR after the bus is not busy anymore. Because this requires polling, the read o...
```diff diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 56e2a14495a9..452d120a210b 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1018,8 +1018,9 @@ static inline int i2c_imx_isr_read(struct imx_i2c_struct *i2c_imx) return 0; } -static inline void i2c...
f88e2e748a1fc3cb4b8d163a9be790812f578850
Analyze and fix the following issue in the Linux kernel code: i2c: imx: fix i2c issue when reading multiple messages
Problem Details: When reading multiple messages, meaning a repeated start is required, polling the bus busy bit must be avoided. This must only be done for the last message. Otherwise, the driver will timeout. Here an example of such a sequence that fails with an error: i2ctransfer -y -a 0 w1@0x00 0x02 r1 w1@0x00 0x02...
```diff diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 85f554044cf1..56e2a14495a9 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1522,7 +1522,7 @@ static int i2c_imx_read(struct imx_i2c_struct *i2c_imx, struct i2c_msg *msgs, dev_err(&i2c_imx->adapter....
8889b289ce1bd11a5102b9617742a1b93bb4843e
Analyze and fix the following issue in the Linux kernel code: reset: rzv2h-usb2phy: Keep PHY clock enabled for entire device lifetime
Problem Details: The driver was disabling the USB2 PHY clock immediately after register initialization in probe() and after each reset operation. This left the PHY unclocked even though it must remain active for USB functionality. The behavior appeared to work only when another driver (e.g., USB controller) had alread...
```diff diff --git a/drivers/reset/reset-rzv2h-usb2phy.c b/drivers/reset/reset-rzv2h-usb2phy.c index ae643575b067..5bdd39274612 100644 --- a/drivers/reset/reset-rzv2h-usb2phy.c +++ b/drivers/reset/reset-rzv2h-usb2phy.c @@ -49,9 +49,10 @@ static inline struct rzv2h_usb2phy_reset_priv return container_of(rcdev, struct ...
e4cf6087cab382c7031e6b436ec55202fa9f2d7b
Analyze and fix the following issue in the Linux kernel code: net: qrtr: fix endian handling of confirm_rx field
Problem Details: Convert confirm_rx to little endian when enqueueing and convert it back on receive. This fixes control flow on big endian hosts, little endian is unaffected. On transmit, store confirm_rx as __le32 using cpu_to_le32(). On receive, apply le32_to_cpu() before using the value. !! ensures the value is 0 o...
```diff diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c index 55fd2dd37588..bea1f1720e7f 100644 --- a/net/qrtr/af_qrtr.c +++ b/net/qrtr/af_qrtr.c @@ -365,7 +365,7 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb, } hdr->size = cpu_to_le32(len); - hdr->confirm_rx = !!confirm_rx; + h...
5597dd284ff8c556c0b00f6a34473677426e3f81
Analyze and fix the following issue in the Linux kernel code: net: ti: icssg-prueth: fix missing data copy and wrong recycle in ZC RX dispatch
Problem Details: emac_dispatch_skb_zc() allocates a new skb via napi_alloc_skb() but never copies the packet data from the XDP buffer into it. The skb is passed up the stack containing uninitialized heap memory instead of the actual received packet, leaking kernel heap contents to userspace. Copy the received packet d...
```diff diff --git a/drivers/net/ethernet/ti/icssg/icssg_common.c b/drivers/net/ethernet/ti/icssg/icssg_common.c index fd4e7622f123..a28a608f9bf4 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_common.c +++ b/drivers/net/ethernet/ti/icssg/icssg_common.c @@ -902,6 +902,7 @@ static void emac_dispatch_skb_zc(struct pruet...
bb417456c7814d1493d98b7dd9c040bf3ce3b4ed
Analyze and fix the following issue in the Linux kernel code: tg3: Fix race for querying speed/duplex
Problem Details: When driver signals carrier up via netif_carrier_on() its internal link_up state isn't updated immediately. This leads to inconsistent speed/duplex in /proc/net/bonding/bondX where the speed and duplex is shown as unknown while ethtool shows correct values. Fix this by using netif_carrier_ok() for link...
```diff diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 21a5dd342724..73a4b569b03e 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -12299,7 +12299,7 @@ static int tg3_get_link_ksettings(struct net_device *dev, ethtool_convert_l...
5e67ba9bb531e1ec6599a82a065dea9040b9ce50
Analyze and fix the following issue in the Linux kernel code: net/ipv6: ioam6: prevent schema length wraparound in trace fill
Problem Details: ioam6_fill_trace_data() stores the schema contribution to the trace length in a u8. With bit 22 enabled and the largest schema payload, sclen becomes 1 + 1020 / 4, wraps from 256 to 0, and bypasses the remaining-space check. __ioam6_fill_trace_data() then positions the write cursor without reserving th...
```diff diff --git a/net/ipv6/ioam6.c b/net/ipv6/ioam6.c index b76f89d92e7b..3978773bec42 100644 --- a/net/ipv6/ioam6.c +++ b/net/ipv6/ioam6.c @@ -708,7 +708,7 @@ static void __ioam6_fill_trace_data(struct sk_buff *skb, struct ioam6_namespace *ns, struct ioam6_trace_hdr *trace, struct ioam6_s...
1f6ee9be92f8df85a8c9a5a78c20fd39c0c21a95
Analyze and fix the following issue in the Linux kernel code: ovl: make fsync after metadata copy-up opt-in mount option
Problem Details: Commit 7d6899fb69d25 ("ovl: fsync after metadata copy-up") was done to fix durability of overlayfs copy up on an upper filesystem which does not enforce ordering on storing of metadata changes (e.g. ubifs). In an earlier revision of the regressing commit by Lei Lv, the metadata fsync behavior was opt-...
```diff diff --git a/Documentation/filesystems/overlayfs.rst b/Documentation/filesystems/overlayfs.rst index af5a69f87da4..eb846518e6ac 100644 --- a/Documentation/filesystems/overlayfs.rst +++ b/Documentation/filesystems/overlayfs.rst @@ -783,6 +783,56 @@ controlled by the "uuid" mount option, which supports these valu...
1a9452c428a6b76f0b797bae21daa454fccef1a2
Analyze and fix the following issue in the Linux kernel code: platform/x86/amd: pmc: Add Thinkpad L14 Gen3 to quirk_s2idle_bug
Problem Details: This platform is a similar vintage of platforms that had a BIOS bug leading to a 10s delay at resume from s0i3. Add a quirk for it. Reported-by: Imrane <ihalim.me@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221273 Tested-by: Imrane <ihalim.me@gmail.com> Signed-off-by: Mario Limonci...
```diff diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c index ed285afaf9b0..24506e342943 100644 --- a/drivers/platform/x86/amd/pmc/pmc-quirks.c +++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c @@ -203,6 +203,15 @@ static const struct dmi_system_id fwbug_list[] = { D...
9bf32bc60cb2561f8e27fea2cb24c86d5ab99997
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: add `.rustfmt.toml` to "RUST" entry
Problem Details: `.rustfmt.toml` is not covered by `MAINTAINERS`, so tools like `scripts/get_maintainer.pl` do not report it properly, e.g.: $ scripts/get_maintainer.pl -f .rustfmt.toml linux-kernel@vger.kernel.org (open list) It should have been there since the beginning, and while it is not a big deal since...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 77fdfcb55f06..a62f6af55c3a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -23146,6 +23146,7 @@ C: zulip://rust-for-linux.zulipchat.com P: https://rust-for-linux.com/contributing T: git https://github.com/Rust-for-Linux/linux.git rust-next F: .clippy.toml +F: .rustf...
4ab604b3f3aa8dcccc7505f5d310016682a99d5f
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel-uncore-freq: Handle autonomous UFS status bit
Problem Details: When the AUTONOMOUS_UFS_DISABLED bit is set in the header, the ELC (Efficiency Latency Control) feature is non-functional. Hence, return error for read or write to ELC attributes. Fixes: bb516dc79c4a ("platform/x86/intel-uncore-freq: Add support for efficiency latency control") Signed-off-by: Srinivas...
```diff diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c index 1237d9570886..4c7e64db478c 100644 --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c +++ b/drivers/platform/x86/intel/uncore-frequen...
e012fa31f90de0928d85ab22d9cc5fc8fe84c5b0
Analyze and fix the following issue in the Linux kernel code: drm/i915/uncore: Do GT FIFO checks in early sanitize and forcewake get
Problem Details: We're mixing up the GT FIFO debug checks (overflows and such) with RMbus unclaimed register checks. The two are quite different things as RMbus is only relevant for display registers, and the GT FIFO only relevant for GT registers. Split the GT FIFO debugs out from the unclaimed register logic and jus...
```diff diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 5b698d4d7a7f..170e83a8c9fc 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -399,6 +399,35 @@ static void fw_domains_get_with_thread_status(struct intel_uncore *uncore, __g...
fde38b106d50f59f904c72544aa34e41adb14fcb
Analyze and fix the following issue in the Linux kernel code: drm/i915/selftests: Nuke live_forcewake_domains selftest
Problem Details: The live_forcewake_domains selftest doesn't really test anything particularly sensible. It only runs on platforms that have RMbus unclaimer error detection, but that only catches display registers which the test doesn't even access. I suppose if we really wanted to we might try to make the test exerci...
```diff diff --git a/drivers/gpu/drm/i915/selftests/intel_uncore.c b/drivers/gpu/drm/i915/selftests/intel_uncore.c index 507bf42a1aaf..514d2200751b 100644 --- a/drivers/gpu/drm/i915/selftests/intel_uncore.c +++ b/drivers/gpu/drm/i915/selftests/intel_uncore.c @@ -272,67 +272,6 @@ out_rpm: return err; } -static int ...
8c58be287604da91a4da6b0b1af866c1c193576c
Analyze and fix the following issue in the Linux kernel code: HID: core: use __free(kfree) and __free(kvfree) to clean up temporary buffers
Problem Details: This simplifies error handling and protects against memory leaks. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
```diff diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 2c8c9d05e450..49775e3624ef 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -924,7 +924,6 @@ static int hid_scan_main(struct hid_parser *parser, struct hid_item *item) */ static int hid_scan_report(struct hid_device *hid) ...
e1415b9418eb22b4a7a1ef4b4aec9dd0a49e3fa7
Analyze and fix the following issue in the Linux kernel code: platform/x86: ISST: Reset core count to 0
Problem Details: Based on feature revision, number of buckets can be less than the TRL_MAX_BUCKETS. In that case core counts in the remaining buckets can be set to some invalid values. Hence reset core count to 0 for all buckets before assigning correct values. Fixes: 885d1c2a30b7 ("platform/x86: ISST: Support SST-TF...
```diff diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c index e238c3105c78..63f08d66703a 100644 --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c @@ -1...
81ec9556ad69444899e8255652ec80972c09df14
Analyze and fix the following issue in the Linux kernel code: drm/i915/dsi: Make 'clock_stop' boolean
Problem Details: The DSI 'clock_stop' parameter is a boolean, so use a real 'bool' for it. And pimp the debug print while at it. Note that we also remove the incorrect negation of the value in the debug print. That has been there since the code was introduced in commit 2ab8b458c6a1 ("drm/i915: Add support for Generic ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dsi.h b/drivers/gpu/drm/i915/display/intel_dsi.h index 8e39d2b52c54..0023ac341aa0 100644 --- a/drivers/gpu/drm/i915/display/intel_dsi.h +++ b/drivers/gpu/drm/i915/display/intel_dsi.h @@ -81,7 +81,7 @@ struct intel_dsi { int video_mode; bool eot_pkt; - u8 clo...
0b475e91ecc2313207196c6d7fd5c53e1a878525
Analyze and fix the following issue in the Linux kernel code: drm/i915/dsi: Don't do DSC horizontal timing adjustments in command mode
Problem Details: Stop adjusting the horizontal timing values based on the compression ratio in command mode. Bspec seems to be telling us to do this only in video mode, and this is also how the Windows driver does things. This should also fix a div-by-zero on some machines because the adjusted htotal ends up being so ...
```diff diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c index c04327979678..a763f2b13ff2 100644 --- a/drivers/gpu/drm/i915/display/icl_dsi.c +++ b/drivers/gpu/drm/i915/display/icl_dsi.c @@ -888,7 +888,7 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder, * ...
19acad732afbfb23bd0d4d5830d7553889e739f8
Analyze and fix the following issue in the Linux kernel code: HID: hid-lenovo-go: fix LEDS dependencies
Problem Details: The newly added hid-lenovo-go and hid-lenovo-go-s drivers attempt to 'select LEDS_CLASS', which has a dependency on NEW_LEDS, causing a build failure when NEW_LEDS itself it disabled: WARNING: unmet direct dependencies detected for LEDS_CLASS Depends on [n]: NEW_LEDS [=n] Selected by [m]: - HID_...
```diff diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 10c12d8e6557..f658ed0168ea 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -610,8 +610,7 @@ config HID_LED config HID_LENOVO tristate "Lenovo / Thinkpad devices" - select NEW_LEDS - select LEDS_CLASS + depends on LEDS_CLASS help ...
d802d848308b35220f21a8025352f0c0aba15c12
Analyze and fix the following issue in the Linux kernel code: HID: roccat: fix use-after-free in roccat_report_event
Problem Details: roccat_report_event() iterates over the device->readers list without holding the readers_lock. This allows a concurrent roccat_release() to remove and free a reader while it's still being accessed, leading to a use-after-free. Protect the readers list traversal with the readers_lock mutex. Signed-off...
```diff diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c index c7f7562e22e5..e413662f7508 100644 --- a/drivers/hid/hid-roccat.c +++ b/drivers/hid/hid-roccat.c @@ -257,6 +257,7 @@ int roccat_report_event(int minor, u8 const *data) if (!new_value) return -ENOMEM; + mutex_lock(&device->readers_lock)...
83084bb36847cbd2b13743f7333aaca12613a72b
Analyze and fix the following issue in the Linux kernel code: drm/tidss: Fix missing drm_bridge_add() call
Problem Details: tidss encoder-bridge is not added with drm_bridge_add() call, which leads to: [drm] Missing drm_bridge_add() before attach Add the missing call, using devm_drm_bridge_add() variant to get the drm_bridge_remove() handled automatically. The commit marked with the Fixes tag (from v6.6) is the commit th...
```diff diff --git a/drivers/gpu/drm/tidss/tidss_encoder.c b/drivers/gpu/drm/tidss/tidss_encoder.c index 81a04f767770..db467bbcdb77 100644 --- a/drivers/gpu/drm/tidss/tidss_encoder.c +++ b/drivers/gpu/drm/tidss/tidss_encoder.c @@ -106,6 +106,8 @@ int tidss_encoder_create(struct tidss_device *tidss, enc = &t_enc->enco...
f468fef38716f667e805e0fa2c497c6b9c325bb9
Analyze and fix the following issue in the Linux kernel code: drm/tidss: Drop extra drm_mode_config_reset() call
Problem Details: We are calling drm_mode_config_reset() twice at probe time. There's no reason for this and the second call can be removed, reducing work at probe time slightly. Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Acked-by: Maxime Ripard <mripard@kernel.org> Link: h...
```diff diff --git a/drivers/gpu/drm/tidss/tidss_kms.c b/drivers/gpu/drm/tidss/tidss_kms.c index 8bb93194e5ac..b4779c09a1bf 100644 --- a/drivers/gpu/drm/tidss/tidss_kms.c +++ b/drivers/gpu/drm/tidss/tidss_kms.c @@ -287,8 +287,6 @@ int tidss_modeset_init(struct tidss_device *tidss) if (ret) return ret; - drm_mode...
da2c4f332a0504d9c284e7626a561d343c8d6f57
Analyze and fix the following issue in the Linux kernel code: thermal/drivers/spear: Fix error condition for reading st,thermal-flags
Problem Details: of_property_read_u32 returns 0 on success. The current check returns -EINVAL if the property is read successfully. Fix the check by removing ! from of_property_read_u32 Fixes: b9c7aff481f1 ("drivers/thermal/spear_thermal.c: add Device Tree probing capability") Signed-off-by: Gopi Krishna Menon <krish...
```diff diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c index 603dadcd3df5..5e3e9c1f32f8 100644 --- a/drivers/thermal/spear_thermal.c +++ b/drivers/thermal/spear_thermal.c @@ -93,7 +93,7 @@ static int spear_thermal_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.o...
08643a8760e81fe0bf91c58f7ee9e19b4db3a24f
Analyze and fix the following issue in the Linux kernel code: coresight: cti: fix the check condition in inout_sel_store
Problem Details: Correct the upper bound from CTIINOUTEN_MAX to config->nr_trig_max, since nr_trig_max varies across CTI devices. An out-of-bounds issue occurs when a value greater than config->nr_trig_max is provided, leading to unexpected errors. Fixes: b5213376c240 ("coresight: cti: Add sysfs access to program func...
```diff diff --git a/drivers/hwtracing/coresight/coresight-cti-sysfs.c b/drivers/hwtracing/coresight/coresight-cti-sysfs.c index 4c0a60840efb..bf3c73607c1c 100644 --- a/drivers/hwtracing/coresight/coresight-cti-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-cti-sysfs.c @@ -337,10 +337,11 @@ static ssize_t inout_se...
ed4da361bf943b9041fc63e5cb6af01b3c0de978
Analyze and fix the following issue in the Linux kernel code: Revert "ALSA: hda/intel: Add MSI X870E Tomahawk to denylist"
Problem Details: commit 30b3211aa2416 ("ALSA: hda/intel: Add MSI X870E Tomahawk to denylist") was added to silence a warning, but this effectively reintroduced commit df42ee7e22f03 ("ALSA: hda: Add ASRock X670E Taichi to denylist") which was already reported to cause problems and reverted in commit ee8f1613596ad ("Reve...
```diff diff --git a/sound/hda/controllers/intel.c b/sound/hda/controllers/intel.c index 3f434994c18d..2edbcab597c8 100644 --- a/sound/hda/controllers/intel.c +++ b/sound/hda/controllers/intel.c @@ -2077,7 +2077,6 @@ static const struct pci_device_id driver_denylist[] = { { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1043, 0x87...
67b53a660e6bf0da2fa8d8872e897a14d8059eaf
Analyze and fix the following issue in the Linux kernel code: crypto: hisilicon/sec2 - prevent req used-after-free for sec
Problem Details: During packet transmission, if the system is under heavy load, the hardware might complete processing the packet and free the request memory (req) before the transmission function finishes. If the software subsequently accesses this req, a use-after-free error will occur. The qp_ctx memory exists throu...
```diff diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c b/drivers/crypto/hisilicon/sec2/sec_crypto.c index 15174216d8c4..2471a4dd0b50 100644 --- a/drivers/crypto/hisilicon/sec2/sec_crypto.c +++ b/drivers/crypto/hisilicon/sec2/sec_crypto.c @@ -230,7 +230,7 @@ static int qp_send_message(struct sec_req *req) s...
177730a273b18e195263ed953853273e901b5064
Analyze and fix the following issue in the Linux kernel code: crypto: caam - guard HMAC key hex dumps in hash_digest_key
Problem Details: Use print_hex_dump_devel() for dumping sensitive HMAC key bytes in hash_digest_key() to avoid leaking secrets at runtime when CONFIG_DYNAMIC_DEBUG is enabled. Fixes: 045e36780f11 ("crypto: caam - ahash hmac support") Fixes: 3f16f6c9d632 ("crypto: caam/qi2 - add support for ahash algorithms") Cc: stabl...
```diff diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c index 553994228a17..854200850830 100644 --- a/drivers/crypto/caam/caamalg_qi2.c +++ b/drivers/crypto/caam/caamalg_qi2.c @@ -3270,7 +3270,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key, dpaa2_fl_...
d134feeb5df33fbf77f482f52a366a44642dba09
Analyze and fix the following issue in the Linux kernel code: printk: add print_hex_dump_devel()
Problem Details: Add print_hex_dump_devel() as the hex dump equivalent of pr_devel(), which emits output only when DEBUG is enabled, but keeps call sites compiled otherwise. Suggested-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: John Ogness <john.ogne...
```diff diff --git a/include/linux/printk.h b/include/linux/printk.h index 63d516c873b4..54e3c621fec3 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -801,6 +801,19 @@ static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type, } #endif +#if defined(DEBUG) +#define print_hex...
b0bfa49c03e3c65737eafa73d8a698eaf55379a6
Analyze and fix the following issue in the Linux kernel code: crypto: nx - Fix packed layout in struct nx842_crypto_header
Problem Details: struct nx842_crypto_header is declared with the __packed attribute, however the fields grouped with struct_group_tagged() were not packed. This caused the grouped header portion of the structure to lose the packed layout guarantees of the containing structure. Fix this by replacing struct_group_tagged...
```diff diff --git a/drivers/crypto/nx/nx-842.h b/drivers/crypto/nx/nx-842.h index a04e85e9f78e..c401cdf1a453 100644 --- a/drivers/crypto/nx/nx-842.h +++ b/drivers/crypto/nx/nx-842.h @@ -159,7 +159,7 @@ struct nx842_crypto_header_group { struct nx842_crypto_header { /* New members MUST be added within the struct_g...
990a8b0732cf899d4a0f847b0a67efeb9a384c82
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Exclude Scarlett 2i4 1st Gen from SKIP_IFACE_SETUP
Problem Details: Same issue that the Scarlett 2i2 1st Gen had: QUIRK_FLAG_SKIP_IFACE_SETUP causes distorted/flanging audio on the Scarlett 2i4 1st Gen (1235:800a). Fixes: 38c322068a26 ("ALSA: usb-audio: Add QUIRK_FLAG_SKIP_IFACE_SETUP") Reported-by: dcferreira [https://github.com/geoffreybennett/linux-fcp/issues/54] S...
```diff diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index cd3a9fe8edf2..125230464ab5 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -2430,6 +2430,7 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { VENDOR_FLG(0x07fd, /* MOTU */ QUIRK_FLAG_VALIDATE_RATES), DEVICE_...
d3be95efc6a1e03230ef646b498050152efe2888
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - Fixed Speaker Mute LED for HP EliteBoard G1a platform
Problem Details: On the HP EliteBoard G1a platform (models without a headphone jack). the speaker mute LED failed to function. The Sysfs ctl-led info showed empty values because the standard LED registration couldn't correctly bind to the master switch. Adding this patch will fix and enable the speaker mute LED feature...
```diff diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 327f4dc1b09f..9106498eb19f 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -3725,22 +3725,42 @@ static void alc245_tas2781_spi_hp_fixup_muteled(struct hda_codec *codec, alc_fixup_...
3c3b759be1e11868a1224623657fad8761d91640
Analyze and fix the following issue in the Linux kernel code: mmc: core: Remove legacy 'enable-sdio-wakeup' DT property support
Problem Details: The 'enable-sdio-wakeup' device tree property was marked as legacy and superseded by the standard 'wakeup-source' property in commit 71a0151c5c82 ("Documentation: devicetree: fix reference to legacy wakeup properties") back in 2015. Since it has been a decade and the migration to the standard property...
```diff diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index a457c88fdcbc..4e1514bda65b 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -379,8 +379,7 @@ int mmc_of_parse(struct mmc_host *host) host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND; if (device_property_read_bool(dev...
7f138de156b20d9f9da6f72f90b63c01941d97d3
Analyze and fix the following issue in the Linux kernel code: auxdisplay: line-display: fix NULL dereference in linedisp_release
Problem Details: linedisp_release() currently retrieves the enclosing struct linedisp via to_linedisp(). That lookup depends on the attachment list, but the attachment may already have been removed before put_device() invokes the release callback. This can happen in linedisp_unregister(), and can also be reached from s...
```diff diff --git a/drivers/auxdisplay/line-display.c b/drivers/auxdisplay/line-display.c index 81b4aac65807..fb6d9294140d 100644 --- a/drivers/auxdisplay/line-display.c +++ b/drivers/auxdisplay/line-display.c @@ -365,7 +365,7 @@ static DEFINE_IDA(linedisp_id); static void linedisp_release(struct device *dev) { - ...
8b72aa5704c77380742346d4ac755b074b7f9eaa
Analyze and fix the following issue in the Linux kernel code: iommupt/amdv1: mark amdv1pt_install_leaf_entry as __always_inline
Problem Details: After enabling CONFIG_GCOV_KERNEL and CONFIG_GCOV_PROFILE_ALL, following build failure is observed under GCC 14.2.1: In function 'amdv1pt_install_leaf_entry', inlined from '__do_map_single_page' at drivers/iommu/generic_pt/fmt/../iommu_pt.h:650:3, inlined from '__map_single_page0' at drivers/i...
```diff diff --git a/drivers/iommu/generic_pt/fmt/amdv1.h b/drivers/iommu/generic_pt/fmt/amdv1.h index 3b2c41d9654d..8d11b08291d7 100644 --- a/drivers/iommu/generic_pt/fmt/amdv1.h +++ b/drivers/iommu/generic_pt/fmt/amdv1.h @@ -191,7 +191,7 @@ static inline enum pt_entry_type amdv1pt_load_entry_raw(struct pt_state *pts)...
0e59645683b7b6fa20eceb21a6f420e4f7412943
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix illegal cap/mmio access in IOMMU debugfs
Problem Details: In the current AMD IOMMU debugfs, when multiple processes simultaneously access the IOMMU mmio/cap registers using the IOMMU debugfs, illegal access issues can occur in the following execution flow: 1. CPU1: Sets a valid access address using iommu_mmio/capability_write, and verifies the access address...
```diff diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c index 0b03e0622f67..4e66473d7cea 100644 --- a/drivers/iommu/amd/debugfs.c +++ b/drivers/iommu/amd/debugfs.c @@ -26,22 +26,19 @@ static ssize_t iommu_mmio_write(struct file *filp, const char __user *ubuf, { struct seq_file *m = filp->priva...
e4172c5b53fba04fa48b13bc3afde809d0087a7f
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix illegal device-id access in IOMMU debugfs
Problem Details: In the current AMD IOMMU debugFS, when multiple processes use the IOMMU debugFS process simultaneously, illegal access issues can occur in the following execution flow: 1. CPU1: Sets a valid sbdf via devid_write, then checks the sbdf's validity in execution flows such as devid_show, iommu_devtbl_show,...
```diff diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c index 20b04996441d..0b03e0622f67 100644 --- a/drivers/iommu/amd/debugfs.c +++ b/drivers/iommu/amd/debugfs.c @@ -197,10 +197,11 @@ static ssize_t devid_write(struct file *filp, const char __user *ubuf, static int devid_show(struct seq_file *...
ee6e69d032550687a3422504bfca3f834c7b5061
Analyze and fix the following issue in the Linux kernel code: iommupt: Fix short gather if the unmap goes into a large mapping
Problem Details: unmap has the odd behavior that it can unmap more than requested if the ending point lands within the middle of a large or contiguous IOPTE. In this case the gather should flush everything unmapped which can be larger than what was requested to be unmapped. The gather was only flushing the range reque...
```diff diff --git a/drivers/iommu/generic_pt/iommu_pt.h b/drivers/iommu/generic_pt/iommu_pt.h index 3e33fe64feab..7e7a6e7abdee 100644 --- a/drivers/iommu/generic_pt/iommu_pt.h +++ b/drivers/iommu/generic_pt/iommu_pt.h @@ -1057,7 +1057,7 @@ size_t DOMAIN_NS(unmap_pages)(struct iommu_domain *domain, unsigned long iova, ...
d2a4ec19d2a2e54c23b5180e939994d3da4a6b91
Analyze and fix the following issue in the Linux kernel code: Docs: iio: ad7191 Correct clock configuration
Problem Details: Correct the ad7191 documentation to match the datasheet: - Fix inverted CLKSEL pin logic: device uses external clock when pin is inactive, and internal CMOS/crystal when high. - Correct CMOS-compatible clock pin from MCLK2 to MCLK1. Signed-off-by: Ammar Mustafa <ammarmustafa34@gmail.com> Signed-off-...
```diff diff --git a/Documentation/iio/ad7191.rst b/Documentation/iio/ad7191.rst index 977d4fea14b0..fd6a23ad44fd 100644 --- a/Documentation/iio/ad7191.rst +++ b/Documentation/iio/ad7191.rst @@ -63,11 +63,11 @@ Clock Configuration The AD7191 supports both internal and external clock sources: -- When CLKSEL pin is ...
f17d7a0f8ff6f9864d8f82e99c46cee1088e945b
Analyze and fix the following issue in the Linux kernel code: arm64: dts: hisilicon: Rename dwmmc nodes to mmc
Problem Details: The core mmc devicetree schema expects mmc controller nodes to be named using '^mmc(@.*)?$' pattern. The legacy Hisilicon SoC files (hi3660, hi3670, and hi6220) previously used the 'dwmmc' prefix for their nodes. This caused warnings during dtbs_check. Rename the 'dwmmc' nodes to 'mmc' to comply with...
```diff diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi index 957a1b41f19b..374aa173bec6 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi @@ -1057,7 +1057,7 @@ }; /* SD */ - dwmmc1: dwmmc1@ff37f000 { + dwm...
944dffaec1ef0f21c203728de77b5618ed70df6e
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62-verdin: Fix SPI_1 GPIO CS pinctrl label
Problem Details: Fix SPI_1_CS GPIO pinmux label, this is spi1_cs, not qspi1_io4. There are no user of this label yet, therefore this change does not create any compatibility issue. Fixes: fcb335934c51 ("arm64: dts: ti: verdin-am62: Improve spi1 chip-select pinctrl") Signed-off-by: Francesco Dolcini <francesco.dolcini...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi index 09840a3b9fe7..20dbfa3001ea 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi @@ -278,7 +278,7 @@ }; /* Verdin SPI_1 CS as GPIO */ - pinctrl_qspi...
552994294fe27b42a6a735b0388029b45d776b38
Analyze and fix the following issue in the Linux kernel code: tcp: Fix inconsistent indenting warning
Problem Details: Suppress such warning reported by test robot: include/net/tcp.h:1449 tcp_ca_event() warn: inconsistent indenting Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202603251430.gQ3VuiKV-lkp@intel.com/ Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev> Re...
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index 39ff4cf3c810..565943c34b7e 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1444,7 +1444,7 @@ static inline void tcp_ca_event(struct sock *sk, const enum tcp_ca_event event) const struct inet_connection_sock *icsk = inet_csk(sk); if (event...
ae05340ccaa9d347fe85415609e075545bec589f
Analyze and fix the following issue in the Linux kernel code: net: ipv6: ndisc: fix ndisc_ra_useropt to initialize nduseropt_padX fields to zero to prevent an info-leak
Problem Details: When processing Router Advertisements with user options the kernel builds an RTM_NEWNDUSEROPT netlink message. The nduseroptmsg struct has three padding fields that are never zeroed and can leak kernel data The fix is simple, just zeroes the padding fields. Fixes: 31910575a9de ("[IPv6]: Export userla...
```diff diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index f6a5d8c73af9..186e60c79214 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1209,6 +1209,9 @@ static void ndisc_ra_useropt(struct sk_buff *ra, struct nd_opt_hdr *opt) ndmsg->nduseropt_icmp_type = icmp6h->icmp6_type; ndmsg->nduseropt_icmp_code = ...
2428083101f6883f979cceffa76cd8440751ffe6
Analyze and fix the following issue in the Linux kernel code: net: qrtr: replace qrtr_tx_flow radix_tree with xarray to fix memory leak
Problem Details: __radix_tree_create() allocates and links intermediate nodes into the tree one by one. If a subsequent allocation fails, the already-linked nodes remain in the tree with no corresponding leaf entry. These orphaned internal nodes are never reclaimed because radix_tree_for_each_slot() only visits slots c...
```diff diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c index 55fd2dd37588..d77e9c8212da 100644 --- a/net/qrtr/af_qrtr.c +++ b/net/qrtr/af_qrtr.c @@ -118,7 +118,7 @@ static DEFINE_XARRAY_ALLOC(qrtr_ports); * @ep: endpoint * @ref: reference count for node * @nid: node id - * @qrtr_tx_flow: tree of qrtr_tx_flo...
f2df9567b123145a07ee4ea7440e233f5d0232cc
Analyze and fix the following issue in the Linux kernel code: net: enetc: do not access non-existent registers on pseudo MAC
Problem Details: The ENETC4_PM_IEVENT and ENETC4_PM_CMD_CFG registers do not exist on the ENETC pseudo MAC, so the driver should prevent from accessing them. Fixes: 5175c1e4adca ("net: enetc: add basic support for the ENETC with pseudo MAC for i.MX94") Signed-off-by: Wei Fang <wei.fang@nxp.com> Tested-by: Claudiu Mano...
```diff diff --git a/drivers/net/ethernet/freescale/enetc/enetc4_pf.c b/drivers/net/ethernet/freescale/enetc/enetc4_pf.c index 53cecbb23a97..56899f2254aa 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc4_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc4_pf.c @@ -814,6 +814,9 @@ static void enetc4_mac_tx_gra...
2725d84efe2582c0a4b907e74a689d26b2dbd382
Analyze and fix the following issue in the Linux kernel code: net: enetc: add graceful stop to safely reinitialize the TX Ring
Problem Details: For ENETC v4, the PIR and CIR will be reset if they are not equal when reinitializing the TX BD ring. However, resetting the PIR and CIR alone is insufficient. When a link-down event occurs while the TX BD ring is transmitting frames, subsequent reinitialization of the TX BD ring may cause it to malfun...
```diff diff --git a/drivers/net/ethernet/freescale/enetc/enetc4_hw.h b/drivers/net/ethernet/freescale/enetc/enetc4_hw.h index 3ed0f7a02767..719c88ceb801 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc4_hw.h +++ b/drivers/net/ethernet/freescale/enetc/enetc4_hw.h @@ -134,6 +134,12 @@ /* Port operational regis...
0239fd701d33475a39428daa3dc627407cd417a6
Analyze and fix the following issue in the Linux kernel code: net: enetc: reset PIR and CIR if they are not equal when initializing TX ring
Problem Details: Currently the driver does not reset the producer index register (PIR) and consumer index register (CIR) when initializing a TX BD ring. The driver only reads the PIR and CIR and initializes the software indexes. If the TX BD ring is reinitialized when it still contains unsent frames, its PIR and CIR wi...
```diff diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c index a146ceaf2ed6..aa8a87124b10 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c @@ -2578,6 +2578,7 @@ EXPORT_SYMBOL_GPL(enetc_free_si_resources);...
6a539eee855cbfe9c32507c70003b7710604fcfb
Analyze and fix the following issue in the Linux kernel code: tcp: tcp_vegas: use tcp_vegas_cwnd_event_tx_start()
Problem Details: While net/ipv4/tcp_yeah.c is correctly setting .cwnd_event_tx_start to tcp_vegas_cwnd_event_tx_start(), I forgot to do the same in tcp_vegas.c Fixes: d1e59a469737 ("tcp: add cwnd_event_tx_start to tcp_congestion_ops") Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <ku...
```diff diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c index cf12fb6be079..950a66966059 100644 --- a/net/ipv4/tcp_vegas.c +++ b/net/ipv4/tcp_vegas.c @@ -319,6 +319,7 @@ static struct tcp_congestion_ops tcp_vegas __read_mostly = { .pkts_acked = tcp_vegas_pkts_acked, .set_state = tcp_vegas_state, .cwnd_ev...
e8e44c98f789dee45cfd24ffb9d4936e0606d7c6
Analyze and fix the following issue in the Linux kernel code: net: fec: fix the PTP periodic output sysfs interface
Problem Details: When the PPS channel configuration was implemented, the channel index for the periodic outputs was configured as the hardware channel number. The sysfs interface uses a logical channel index, and rejects numbers greater than `n_per_out` (see period_store() in ptp_sysfs.c). That property was left at 1,...
```diff diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c index 4b7bad9a485d..56801c2009d5 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -545,9 +545,6 @@ static int fec_ptp_enable(struct ptp_clock_info *ptp, if (...
57a04a13aac1f247d171c3f3aef93efc69e6979e
Analyze and fix the following issue in the Linux kernel code: netdevsim: fix build if SKB_EXTENSIONS=n
Problem Details: __skb_ext_put() is not declared if SKB_EXTENSIONS is not enabled, which causes a build error: drivers/net/netdevsim/netdev.c: In function 'nsim_forward_skb': drivers/net/netdevsim/netdev.c:114:25: error: implicit declaration of function '__skb_ext_put'; did you mean 'skb_ext_put'? [-Werror=implicit-fu...
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index daa4e4944ce3..2f278ce376b7 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -5097,6 +5097,7 @@ static inline bool skb_has_extensions(struct sk_buff *skb) return unlikely(skb->active_extensions); } #else +static inline void...
fe3e54253f0b04ec9e85d46e10aadbdbb31d29b2
Analyze and fix the following issue in the Linux kernel code: virtio_net: sync RX buffer before reading the header
Problem Details: receive_buf() reads the virtio header through buf before page_pool_dma_sync_for_cpu() runs in receive_small() or receive_mergeable(). The header buffer is thus unsynchronized at the point where flags and, for mergeable buffers, num_buffers are consumed. Omar Elghoul reported that on s390x Secure Execu...
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index bce885dc234b..9cf240afe81e 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1956,13 +1956,6 @@ static struct sk_buff *receive_small(struct net_device *dev, */ buf -= VIRTNET_RX_PAD + xdp_headroom; - if (rq->use...
05c8b1cdc54036465ea457a0501a8c2f9409fce7
Analyze and fix the following issue in the Linux kernel code: drm/xe/madvise: Accept canonical GPU addresses in xe_vm_madvise_ioctl
Problem Details: Userspace passes canonical (sign-extended) GPU addresses where bits 63:48 mirror bit 47. The internal GPUVM uses non-canonical form (upper bits zeroed), so passing raw canonical addresses into GPUVM lookups causes mismatches for addresses above 128TiB. Strip the sign extension with xe_device_uncanonic...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm_madvise.c b/drivers/gpu/drm/xe/xe_vm_madvise.c index a169cb3f3591..66f00d3f5c07 100644 --- a/drivers/gpu/drm/xe/xe_vm_madvise.c +++ b/drivers/gpu/drm/xe/xe_vm_madvise.c @@ -672,8 +672,15 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *fil s...
5bfb7e6a7fc0056a974ce13a81c95602a2cae859
Analyze and fix the following issue in the Linux kernel code: drm/xe/madvise: Implement per-VMA purgeable state tracking
Problem Details: Track purgeable state per-VMA instead of using a coarse shared BO check. This prevents purging shared BOs until all VMAs across all VMs are marked DONTNEED. Add xe_bo_all_vmas_dontneed() to check all VMAs before marking a BO purgeable. Add xe_bo_recheck_purgeable_on_vma_unbind() to handle state transi...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 0251098650af..5b627eed1eab 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -322,6 +322,7 @@ static void xe_vma_set_default_attributes(struct xe_vma *vma) .preferred_loc.migration_policy = DRM_XE_MIGRATE...
5170efd9c344c68a8075dcb8ed38d3f8a60e7ed4
Analyze and fix the following issue in the Linux kernel code: io_uring/fdinfo: fix OOB read in SQE_MIXED wrap check
Problem Details: __io_uring_show_fdinfo() iterates over pending SQEs and, for 128-byte SQEs on an IORING_SETUP_SQE_MIXED ring, needs to detect when the second half of the SQE would be past the end of the sq_sqes array. The current check tests (++sq_head & sq_mask) == 0, but sq_head is only incremented when a 128-byte S...
```diff diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c index 25c92ace18bd..c2d3e45544bb 100644 --- a/io_uring/fdinfo.c +++ b/io_uring/fdinfo.c @@ -119,12 +119,13 @@ static void __io_uring_show_fdinfo(struct io_ring_ctx *ctx, struct seq_file *m) sq_idx); break; } - if ((++sq_head & sq_mask) == 0) { ...
ee2a9d9c9e6c9643fb7e45febcaedfbc038e483a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62-lp-sk: Enable internal pulls for MMC0 data pins
Problem Details: AM62 LP SK board does not have external pullups on MMC0 DAT1-DAT7 pins [0]. Enable internal pullups on DAT1-DAT7 considering: - without a host-side pullup, these lines rely solely on the eMMC device's internal pullup (R_int, 10-150K per JEDEC), which may exceed the recommended 50K max for 1.8V VCCQ...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts index 3e2d8f669535..8a556fbbe08b 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts @@ -88,13 +88,13 @@ AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (V3) MMC0_CMD */ ...
02532ba56362907b6aca3e8289c4a9247ef83325
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62l3-evm: Disable MMC1 internal pulls on data pins
Problem Details: AM62L EVM has external 47K pullups on MMC1 DAT1-DAT3 pins [0]. Disable internal pullups on DAT1-DAT3 so that each line has a single pullup source: - with both pullups enabled, the effective parallel resistance on DAT1-3 (~24.2K) creates a ~2x mismatch vs DAT0 (47K external only). Removing internal ...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-am62l3-evm.dts b/arch/arm64/boot/dts/ti/k3-am62l3-evm.dts index 9d0506d85bae..a1af4571a815 100644 --- a/arch/arm64/boot/dts/ti/k3-am62l3-evm.dts +++ b/arch/arm64/boot/dts/ti/k3-am62l3-evm.dts @@ -272,9 +272,9 @@ AM62LX_IOPAD(0x0230, PIN_INPUT, 0) /* (Y3) MMC1_CMD */ ...
6d4441be969bea89bb9702781f5dfb3a8f2a02a4
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62p5-sk: Disable MMC1 internal pulls on data pins
Problem Details: AM62P SK has external 10K pullups on MMC1 DAT1-DAT3 pins [0]. Disable internal pullups on DAT1-DAT3 so that each line has a single pullup source: - with both pullups enabled, the effective parallel resistance on DAT1-3 (~8.33K) drops below the 10K minimum pullup requirement for data lines (per SD P...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts index fd323a648809..b770ed82be9d 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts @@ -271,9 +271,9 @@ AM62PX_IOPAD(0x023c, PIN_INPUT, 0) /* (H20) MMC1_CMD */ A...
976ff48c2ac6e6b25b01428c9d7997bcd0fb2949
Analyze and fix the following issue in the Linux kernel code: net: ethernet: mtk_ppe: avoid NULL deref when gmac0 is disabled
Problem Details: If the gmac0 is disabled, the precheck for a valid ingress device will cause a NULL pointer deref and crash the system. This happens because eth->netdev[0] will be NULL but the code will directly try to access netdev_ops. Instead of just checking for the first net_device, it must be checked if any of ...
```diff diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c index cb30108f2bf6..cc8c4ef8038f 100644 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c @@ -244,6 +244,25 @@ out: return 0; } +static bo...
f73896b4197ed53cf0894657c899265ef7c86b7a
Analyze and fix the following issue in the Linux kernel code: net: mana: Fix RX skb truesize accounting
Problem Details: MANA passes rxq->alloc_size to napi_build_skb() for all RX buffers. It is correct for fragment-backed RX buffers, where alloc_size matches the actual backing allocation used for each packet buffer. However, in the non-fragment RX path mana allocates a full page, or a higher-order page, per RX buffer. I...
```diff diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index dca62fb9a3a9..09a53c977545 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -766,6 +766,13 @@ static void mana_get_rxbuf_cfg(struct ma...
5f70b0aa08ada1004259902dbee3b401ac2f7dcb
Analyze and fix the following issue in the Linux kernel code: selftests: net: Remove unnecessary backslashes in fq_band_pktlimit.sh
Problem Details: Address "grep: warning: stray \ before white space" warning from GNU grep 3.12. This warns the misplaced backslashes before whitespaces (e.g. \\' ' or '\ ') which leads to unspecified behavior [1]. We can just remove the backslashes before whitespaces as POSIX says: Enclosing characters in single-q...
```diff diff --git a/tools/testing/selftests/net/fq_band_pktlimit.sh b/tools/testing/selftests/net/fq_band_pktlimit.sh index 977070ed42b3..223f9efe4090 100755 --- a/tools/testing/selftests/net/fq_band_pktlimit.sh +++ b/tools/testing/selftests/net/fq_band_pktlimit.sh @@ -32,19 +32,19 @@ tc qdisc replace dev dummy0 root ...
629ec78ef8608d955ce217880cdc3e1873af3a15
Analyze and fix the following issue in the Linux kernel code: mpls: add seqcount to protect the platform_label{,s} pair
Problem Details: The RCU-protected codepaths (mpls_forward, mpls_dump_routes) can have an inconsistent view of platform_labels vs platform_label in case of a concurrent resize (resize_platform_label_table, under platform_mutex). This can lead to OOB accesses. This patch adds a seqcount, so that we get a consistent sna...
```diff diff --git a/include/net/netns/mpls.h b/include/net/netns/mpls.h index 6682e51513ef..2073cbac2afb 100644 --- a/include/net/netns/mpls.h +++ b/include/net/netns/mpls.h @@ -17,6 +17,7 @@ struct netns_mpls { size_t platform_labels; struct mpls_route __rcu * __rcu *platform_label; struct mutex platform_mutex;...
ed8edcd47529d9ad6558ca2c00dccf21fc0abc08
Analyze and fix the following issue in the Linux kernel code: docs/mlx5: Fix typo subfuction
Problem Details: Fix two typos: - 'Subfunctons' -> 'Subfunctions' - 'subfuction' -> 'subfunction' Reviewed-by: Joe Damato <joe@dama.to> Signed-off-by: Ryohei Kinugawa <ryohei.kinugawa@gmail.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://patch.msgid.lin...
```diff diff --git a/Documentation/networking/device_drivers/ethernet/mellanox/mlx5/kconfig.rst b/Documentation/networking/device_drivers/ethernet/mellanox/mlx5/kconfig.rst index 34e911480108..b45d6871492c 100644 --- a/Documentation/networking/device_drivers/ethernet/mellanox/mlx5/kconfig.rst +++ b/Documentation/networ...
1f51b42bf9784dd012b8f0c135140b047eb5c6bf
Analyze and fix the following issue in the Linux kernel code: Revert "docs: Raise minimum pahole version to 1.26 for KF_IMPLICIT_ARGS kfuncs"
Problem Details: This reverts commit 9edd04c4189e047d4b4f6efd1255e2a32cb167b8. The doc-only change is insufficient. The actual fix requires bumping the minimum pahole version to 1.27 with proper Kconfig and Makefile.btf changes, and should be routed through the BPF tree. Link: https://lore.kernel.org/all/e0ca748d-320...
```diff diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst index 02068d72a101..6b373e193548 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst @@ -38,7 +38,7 @@ bash 4.2 bash --version binutils 2.30 ...
2b31e86387e60b3689339f0f0fbb4d3623d9d494
Analyze and fix the following issue in the Linux kernel code: drbd: Balance RCU calls in drbd_adm_dump_devices()
Problem Details: Make drbd_adm_dump_devices() call rcu_read_lock() before rcu_read_unlock() is called. This has been detected by the Clang thread-safety analyzer. Tested-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Andreas Gruenbacher <agruenba@redhat.com>...
```diff diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index e18fa260a662..1f8ffdf9b24e 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -3443,8 +3443,10 @@ int drbd_adm_dump_devices(struct sk_buff *skb, struct netlink_callback *cb) if (resource_filter) { ...
44311ae84ad9177fb311aee856027861c22f17b2
Analyze and fix the following issue in the Linux kernel code: perf stat: Fix opt->value type for parse_cache_level
Problem Details: Commit f5803651b4a4 ("perf stat: Choose the most disaggregate command line option") changed aggregation option handling for `perf stat` but not `perf stat report` leading to parse_cache_level being passed a struct in the `perf stat` case but erroneously an aggr_mode enum value for `perf stat report`. C...
```diff diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 73c2ba7e3076..2eb76d7476b7 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -164,7 +164,7 @@ struct opt_aggr_mode { }; /* Turn command line option into most generic aggregation mode setting. */ -static enum agg...
cfaade34b52aa1ec553044255702c4b31b57c005
Analyze and fix the following issue in the Linux kernel code: perf lock: Fix option value type in parse_max_stack
Problem Details: The value is a void* and the address of an int, max_stack_depth, is set up in the perf lock options. The parse_max_stack function treats the int* as a long*, make this more correct by declaring the value to be an int*. Fixes: 0a277b622670 ("perf lock contention: Check --max-stack option") Signed-off-b...
```diff diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index e8962c985d34..5585aeb97684 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -2250,7 +2250,7 @@ static int parse_map_entry(const struct option *opt, const char *str, static int parse_max_stack(const struct option *...
5c980ab238c8a9e2b24221603f11eadc98a7f45e
Analyze and fix the following issue in the Linux kernel code: tools build: Correct link flags for libopenssl
Problem Details: The perf static build reports that the BPF skeleton is disabled due to the missing libopenssl feature. Use PKG_CONFIG to determine the link flags for libopenssl. Add "--static" to the PKG_CONFIG command for static linking. Fixes: 7678523109d1 ("tools/build: Add a feature test for libopenssl") Signed...
```diff diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 1fbcb3ce74d2..f163a245837a 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -103,12 +103,18 @@ else endif endif +ifeq ($(findstring -static,${LDFLAGS}),-static) + PKG_CONFIG += --static +endif + ...
b6df77f40c83d02fad6e58f84391417cb7d8f7a5
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix mismatched include guards in header files
Problem Details: Fix include guard macros that don't match their respective file names: - xe_gt_idle_types.h: _XE_GT_IDLE_SYSFS_TYPES_H_ -> _XE_GT_IDLE_TYPES_H_ - xe_guc_exec_queue_types.h: _XE_GUC_ENGINE_TYPES_H_ -> _XE_GUC_EXEC_QUEUE_TYPES_H_ - xe_heci_gsc.h: __XE_HECI_GSC_DEV_H__ -> _XE_HECI_GSC_H_ - xe_hw_engine_c...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_idle_types.h b/drivers/gpu/drm/xe/xe_gt_idle_types.h index a3667c567f8a..5b5d2e835102 100644 --- a/drivers/gpu/drm/xe/xe_gt_idle_types.h +++ b/drivers/gpu/drm/xe/xe_gt_idle_types.h @@ -3,8 +3,8 @@ * Copyright © 2023 Intel Corporation */ -#ifndef _XE_GT_IDLE_SYSFS_TYPE...
f72e77c33e4b5657af35125e75bab249256030f3
Analyze and fix the following issue in the Linux kernel code: device property: Make modifications of fwnode "flags" thread safe
Problem Details: In various places in the kernel, we modify the fwnode "flags" member by doing either: fwnode->flags |= SOME_FLAG; fwnode->flags &= ~SOME_FLAG; This type of modification is not thread-safe. If two threads are both mucking with the flags at the same time then one can clobber the other. While flags ...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index 5933852df837..763e17e9f148 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -182,7 +182,7 @@ void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode) if (fwnode->dev) return; - fwnode->flags |= FWNODE_FLAG_NOT_DEVICE; +...
ea70239320394266ec8ccf43ff3a6415e43b8163
Analyze and fix the following issue in the Linux kernel code: tools/sched_ext: Remove redundant SCX_ENQ_IMMED compat definition
Problem Details: compat.bpf.h defined a fallback SCX_ENQ_IMMED macro using __COMPAT_ENUM_OR_ZERO(). After 6bf36c68b0a2 ("tools/sched_ext: Regenerate autogen enum headers") added SCX_ENQ_IMMED to the autogen headers, including both triggers -Wmacro-redefined warnings. The autogen definition through const volatile __wea...
```diff diff --git a/tools/sched_ext/include/scx/compat.bpf.h b/tools/sched_ext/include/scx/compat.bpf.h index 654b566bd94a..8977b5a2caa1 100644 --- a/tools/sched_ext/include/scx/compat.bpf.h +++ b/tools/sched_ext/include/scx/compat.bpf.h @@ -422,11 +422,6 @@ static inline void scx_bpf_dsq_reenq(u64 dsq_id, u64 reenq_f...
88bdac5443e5269bb39c4968d5ee0becbffe3f82
Analyze and fix the following issue in the Linux kernel code: dt-bindings: display/msm: qcm2290-mdss: Fix missing ranges in example
Problem Details: Device node has children with MMIO addressing, so must have ranges: msm/qcom,qcm2290-mdss.example.dtb: display-subsystem@5e00000 (qcom,qcm2290-mdss): 'ranges' is a required property Fixes: 966a08c293cb ("dt-bindings: display: msm: qcm2290-mdss: Fix iommus property") Signed-off-by: Krzysztof Kozlows...
```diff diff --git a/Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml index 2772cdec7e42..bb09ecd1a5b4 100644 --- a/Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml +++ b/Documentation/devicetree/bindings/disp...
1ee4716a5a28eaef81ae1f280d983258bee49623
Analyze and fix the following issue in the Linux kernel code: PCI: Fix premature removal from realloc_head list during resource assignment
Problem Details: reassign_resources_sorted() checks for two things: a) Resource assignment failures for mandatory resources by checking if the resource remains unassigned, which are known to always repeat, and does not attempt to assign them again. b) That resource is not among the ones being processed/assigned...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 1f87b018799f..9506845c112c 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -434,6 +434,10 @@ static void reassign_resources_sorted(struct list_head *realloc_head, dev = add_res->dev; idx = pci_resource_num(dev, res)...
46c31e1604d121221167cb09380de8c7d53290b9
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: cdn-dp: add missing check in cdn_dp_config_video()
Problem Details: The result of cdn_dp_reg_write() is checked everywhere (with the error being logged by the callers) except one place in cdn_dp_config_video(). Add the missing result check, bailing out early on error... Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool. Fixes: ...
```diff diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.c b/drivers/gpu/drm/rockchip/cdn-dp-reg.c index 0dc3804051a9..9b82b27770e5 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-reg.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.c @@ -685,6 +685,8 @@ int cdn_dp_config_video(struct cdn_dp_device *dp) val = div_u64(8 * (sy...
45895f4d4d5f222d07412f90664f88b059627859
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: analogix_dp: Add missing error check for platform_get_resource()
Problem Details: Add missing error check for platform_get_resource() return value to prevent NULL pointer dereference when memory resource is not available. Fixes: 718b3bb9c0ab ("drm/rockchip: analogix_dp: Expand device data to support multiple edp display") Cc: stable@vger.kernel.org Signed-off-by: Chen Ni <nichen@is...
```diff diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 96bd3dd239d2..387fb6259edd 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -461,6 +461,8 @@ static int rockchip_dp_probe(stru...
9fc0da81916250f343599a4dd259f097196bf0fb
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: Test for imported buffers with drm_gem_is_imported()
Problem Details: Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The test itself does not change. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Sandy Huang <hjc@rock-chips.com> Cc: Heiko Stübner <heiko@sntech.de> Cc: Andy Yan <andy.yan@rock-chips.com...
```diff diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index 09d14a072d27..b188539dca0b 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c @@ -334,7 +334,7 @@ void rockchip_gem_free_object(struct drm_gem_obje...
971a6d5d41315f3bfe1e1207f24da9a191c949ff
Analyze and fix the following issue in the Linux kernel code: drm/bridge: synopsys: dw-dp: Drop useless memory allocation
Problem Details: The bridge gets allocated and initialized implicitly via the devm_drm_bridge_alloc() helper in dw_dp_bind(). However, this is preceded by an explicit allocation for the same dw_dp struct, which is never used anywhere as the return from devm_kzalloc() gets immediately overwritten by the aforementioned ...
```diff diff --git a/drivers/gpu/drm/bridge/synopsys/dw-dp.c b/drivers/gpu/drm/bridge/synopsys/dw-dp.c index 45b37885d719..3f4530c117c7 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-dp.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-dp.c @@ -1970,10 +1970,6 @@ struct dw_dp *dw_dp_bind(struct device *dev, struct drm_encode...
e1f7b7cbd74c6561944f5dda345dab59ad391acb
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: dw_hdmi_qp: Switch to drmm_encoder_init()
Problem Details: Simplify encoder initialization and cleanup by making use of drmm_encoder_init(), which takes care of registering drm_encoder_cleanup() with drmm_add_action(). Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid...
```diff diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c index 1a09bcc96c3e..c78db7f8ab6c 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c @@ -21,6 +21,7 @@ #include <drm/bridge/dw_hdmi_qp.h> #i...
31a98842a11fcb52a2db9b1b498d5ac11793e35f
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: dw_dp: Drop unnecessary #include
Problem Details: Included header "rockchip_drm_vop.h" is not directly used, drop it. While at it, ensure #include directives are ordered alphabetically. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/20260310-drm-rk-f...
```diff diff --git a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c index fafefee8370d..22c0911f1896 100644 --- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c @@ -7,8 +7,11 @@ */ #include <linux/component.h> +#include <linux/media-...
26cb3e26efa7cc84289966cab871889f6ca93616
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: dw_dp: Simplify error handling
Problem Details: Make the code a bit more compact by getting rid of the superfluous assignments around PTR_ERR(). While at it, also drop dev assignment in dw_dp_probe(). Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/...
```diff diff --git a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c index 8945a245398c..fafefee8370d 100644 --- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c @@ -104,20 +104,15 @@ static int dw_dp_rockchip_bind(struct device *dev, stru...
9456381d8b60bb7dd42f2f04afe5ee4ce6e0bc12
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove()
Problem Details: Attempting to access driver data in the platform driver ->remove() callback may lead to a null pointer dereference since there is no guaranty that the component ->bind() callback invoking platform_set_drvdata() was executed. A common scenario is when Rockchip DRM driver didn't manage to run component_...
```diff diff --git a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c index 532af476d250..8945a245398c 100644 --- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c @@ -133,9 +133,7 @@ static int dw_dp_probe(struct platform_device *pdev) s...
ed9da8d23020352ad24c528db09b5acdd78b81fd
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: dw_dp: Switch to drmm_kzalloc()
Problem Details: Driver makes use of drmm_encoder_init() to initialize the encoder and automatically handle the cleanup by registering drm_encoder_cleanup() with drmm_add_action(). However, the internal structure containing the encoder part gets allocated with devm_kzalloc(), which happens while component_bind_all() i...
```diff diff --git a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c index dac3d202971e..532af476d250 100644 --- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c @@ -13,6 +13,7 @@ #include <drm/drm_atomic_helper.h> #include <drm/drm_brid...
3cc50e7f73fcf79f28660b9d91566b13cb62e520
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: inno-hdmi: Switch to drmm_kzalloc()
Problem Details: Driver makes use of drmm_encoder_init() to initialize the encoder and automatically handle the cleanup by registering drm_encoder_cleanup() with drmm_add_action(). However, the internal structure containing the encoder part gets allocated with devm_kzalloc(), which happens while component_bind_all() i...
```diff diff --git a/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c index 97c20500f790..28e6fb09aae7 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c @@ -14,6 +14,7 @@ #include <drm/bridge/inno_hdmi.h> #incl...
dc4b4d04e1caa3552f000d84d832779ebe51b093
Analyze and fix the following issue in the Linux kernel code: PCI: Prevent shrinking bridge window from its required size
Problem Details: Steve reported an eGPU (either Radeon Instinct MI50 32GB or NVIDIA 3080 10GB) connected via Thunderbolt was not assigned sufficient BAR space in v6.11, so the amdgpu and nvidia drivers were unable to initialize the device. pci_bridge_distribute_available_resources() -> ... -> adjust_bridge_window() is...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 61f769aaa2f6..1f87b018799f 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -1837,6 +1837,7 @@ static void adjust_bridge_window(struct pci_dev *bridge, struct resource *res, resource_size_t new_size) { resource_si...
34e0e2a8ea9e9e4f4dceb33072103dffaa1366b3
Analyze and fix the following issue in the Linux kernel code: of: reserved_mem: rework fdt_init_reserved_mem_node()
Problem Details: Move the content of fdt_reserved_mem_save_node() to fdt_init_reserved_mem_node() function. Initialization is no longer performed in two steps as it was initially, so fdt_reserved_mem_save_node() name is a bit misleading and that function now performs full initialization of the reserved memory region. ...
```diff diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 037e3d74dde1..8d5777cb5d1b 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -102,36 +102,13 @@ static void __init alloc_reserved_mem_array(void) reserved_mem = new_array; } -static void __init fdt_...
9d5149b3f2e7e80378907a8d3e4f7a94dfbbbdb8
Analyze and fix the following issue in the Linux kernel code: of: reserved_mem: use -ENODEV instead of -ENOENT
Problem Details: When given reserved memory region doesn't really support given node, return -ENODEV instead of -ENOENT. Then fix __reserved_mem_init_node() function to properly propagate error code different from -ENODEV instead of silently ignoring it. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link:...
```diff diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 6705b7afebf0..9aff460a0420 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -488,9 +488,10 @@ static int __init __reserved_mem_init_node(struct reserved_mem *rmem, { extern const struct of_device_id ...
d9a60e367919752a1d398ebeba667f1e200fae1e
Analyze and fix the following issue in the Linux kernel code: pinctrl: renesas: rzg2l: Fix save/restore of {IOLH,IEN,PUPD,SMT} registers
Problem Details: The rzg2l_pinctrl_pm_setup_regs() handles save/restore of {IOLH,IEN,PUPD,SMT} registers during s2ram, but only for ports where all pins share the same pincfg. Extend the code to also support ports with variable pincfg per pin, so that {IOLH,IEN,PUPD,SMT} registers are correctly saved and restored for a...
```diff diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 863e779dda02..55e35f63343c 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -3012,6 +3012,13 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *...
225d02cb46d0e567eb788308168159f61735c8fe
Analyze and fix the following issue in the Linux kernel code: drm/xe: Issue GGTT invalidation under lock in ggtt_node_remove
Problem Details: Async work (e.g., GuC queue teardowns) can call ggtt_node_remove, so the operation must be performed under the GGTT lock to ensure the GGTT online check remains stable. GGTT insertion and removal are heavyweight operations (e.g., queue create/destroy), so the additional serialization cost is negligible...
```diff diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c index 21071b64b09d..a848d1a41b9b 100644 --- a/drivers/gpu/drm/xe/xe_ggtt.c +++ b/drivers/gpu/drm/xe/xe_ggtt.c @@ -481,15 +481,10 @@ static void ggtt_node_remove(struct xe_ggtt_node *node) xe_ggtt_clear(ggtt, xe_ggtt_node_addr(node), xe_...
c8b610341914cb62899e31b41f724b5c4831a645
Analyze and fix the following issue in the Linux kernel code: PCI: of: Remove max-link-speed generation validation
Problem Details: The of_pci_get_max_link_speed() function currently validates the "max-link-speed" DT property to be in the range 1..4 (Gen1..Gen4). This imposes a maintenance burden because each new PCIe generation would require updating this validation. Remove the range check so the function returns the raw property...
```diff diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 9f8eb5df279e..c216701c75dd 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -875,24 +875,19 @@ EXPORT_SYMBOL_GPL(of_pci_supply_present); * of_pci_get_max_link_speed - Find the maximum link speed of the given device node. * @node: Device tree node...
03f920936977b5133a0e57a7c9fdeb4e584eeb06
Analyze and fix the following issue in the Linux kernel code: PCI: controller: Validate max-link-speed
Problem Details: Add validation for the "max-link-speed" DT property in three more drivers, using the pcie_get_link_speed() helper. - brcmstb: If the value is missing or invalid, fall back to no limitation (pcie->gen = 0). Fix the previous incorrect logic. - mediatek-gen3: If the value is missing or invalid, use th...
```diff diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index 062f55690012..714bcab97b60 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1442,7 +1442,7 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie) cls = FIELD_G...
0f34f647f19465b475b13e889dcb33526e166d24
Analyze and fix the following issue in the Linux kernel code: PCI: dwc: Use pcie_get_link_speed() helper for safe array access
Problem Details: Replace direct indexing of pcie_link_speed[] with the new helper pcie_get_link_speed() in all DesignWare core and glue drivers. This ensures that out-of-range generation numbers do not cause out-of-bounds accesses when the helper returns PCI_SPEED_UNKNOWN, and prepares for the removal of the range chec...
```diff diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index 6ae6189e9b8a..0e05c5280344 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -1081,7 +1081,7 @@ static void dw_pcie_pro...
28d20b0d895849ce3fe8c6f77baffc08886c2157
Analyze and fix the following issue in the Linux kernel code: PCI: Add pcie_get_link_speed() helper for safe array access
Problem Details: The pcie_link_speed[] array is indexed by PCIe generation numbers (1 = 2.5 GT/s, 2 = 5 GT/s, ...). Several drivers use it directly, which can lead to out-of-bounds accesses if an invalid generation number is used. Introduce a helper function pcie_get_link_speed() that returns the pci_bus_speed value ...
```diff diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 13d998fbacce..409aca7d737a 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -108,6 +108,8 @@ struct pcie_tlp_log; PCI_EXP_DEVCTL_FERE | PCI_EXP_DEVCTL_URRE) extern const unsigned char pcie_link_speed[]; +unsigned char pcie_get_link_speed...
b8498af901684912bd87a39c7b95ad955d9bc543
Analyze and fix the following issue in the Linux kernel code: interconnect: qcom: drop unused is_on flag
Problem Details: The commit 2e2113c8a64f ("interconnect: qcom: rpm: Handle interface clocks") has added the is_on flag to the qcom_icc_provider, but failed to actually utilize it. Drop the flag. Fixes: 2e2113c8a64f ("interconnect: qcom: rpm: Handle interface clocks") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@o...
```diff diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h index f4883d43eae4..3366531f66fc 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -51,7 +51,6 @@ struct rpm_clk_resource { * @bus_clk: a pointer to a HLOS-owned bus clock * @in...
33a76fc3c3e61386524479b99f35423bd3d9a895
Analyze and fix the following issue in the Linux kernel code: PCI: qcom: Advertise Hotplug Slot Capability with no Command Completion support
Problem Details: Qcom PCIe Root Ports advertise hotplug capability in hardware, but do not support hotplug command completion. As a result, the hotplug commands issued by the pciehp driver never gets completion notification, leading to repeated timeout warnings and multi-second delays during boot and suspend/resume. C...
```diff diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 67a16af69ddc..9fdfc88ac151 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -350,15 +350,20 @@ static void qcom_pcie_clear_aspm_l0s(struct dw_pcie *pci) dw_pcie...