id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
baa18bc5353fcb99bc49944c51c6c7829cb1da55
Analyze and fix the following issue in the Linux kernel code: net: devmem: ksft: upgrade rx test to send 1K data
Problem Details: The current test just sends "hello\nworld" and verifies that is the string received on the RX side. That is fine, but improve the test a bit by sending 1K data. The test should be improved further to send more data, but for now this should be a welcome improvement. The test will send a repeating patte...
```diff diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools/testing/selftests/drivers/net/hw/devmem.py index 52ee52c51029..7947650210a0 100755 --- a/tools/testing/selftests/drivers/net/hw/devmem.py +++ b/tools/testing/selftests/drivers/net/hw/devmem.py @@ -24,13 +24,15 @@ def check_rx(cfg) -> None: ...
243d47a5e1e47b2b72d654d7278fc8bff0199b0c
Analyze and fix the following issue in the Linux kernel code: net: devmem: ksft: add 5 tuple FS support
Problem Details: ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple FS support, but the ksft is currently 3-tuple only. Support drivers that have 5-tuple FS supported by adding a ksft arg. Signed-off-by: Mina Almasry <almasrymina@google.com> fix 5-tuple fix 5-tuple Acked-by: Stanislav Fomichev <...
```diff diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools/testing/selftests/drivers/net/hw/devmem.py index 6c743bc2ab39..52ee52c51029 100755 --- a/tools/testing/selftests/drivers/net/hw/devmem.py +++ b/tools/testing/selftests/drivers/net/hw/devmem.py @@ -24,11 +24,11 @@ def check_rx(cfg) -> None: ...
170ebc60b79a5745addf7b408bce9b86bbd7c29d
Analyze and fix the following issue in the Linux kernel code: page_pool: fix ugly page_pool formatting
Problem Details: Minor cleanup; this line is badly formatted. Signed-off-by: Mina Almasry <almasrymina@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20250523230524.1107879-3-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 974f3eef2efa..4011eb305cee 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -867,8 +867,8 @@ void page_pool_put_unrefed_netmem(struct page_pool *pool, netmem_ref netmem, if (!allow_direct) allow_direct = page_pool_napi_local(pool...
429d410bf9eff7bc930e5850277c87ed47ceaeea
Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: nft_queue.sh: include file transfer duration in log message
Problem Details: Paolo Abeni says: Recently the nipa CI infra went through some tuning, and the mentioned self-test now often fails. The failing test is the sctp+nfqueue one, where the file transfer takes too long and hits the timeout (1 minute). Because SCTP nfqueue tests had timeout related issues before (esp. on...
```diff diff --git a/tools/testing/selftests/net/netfilter/nft_queue.sh b/tools/testing/selftests/net/netfilter/nft_queue.sh index 784d1b46912b..6136ceec45e0 100755 --- a/tools/testing/selftests/net/netfilter/nft_queue.sh +++ b/tools/testing/selftests/net/netfilter/nft_queue.sh @@ -10,6 +10,8 @@ source lib.sh ret=0 t...
7831003165d37ecb7b33843fcee05cada0359a82
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: qcom: Prevent calling phy_exit() before phy_init()
Problem Details: Prevent calling phy_exit() before phy_init() to avoid abnormal power count and the following warning during boot up. [5.146763] phy phy-1d80000.phy.0: phy_power_on was called before phy_init Fixes: 7bac65687510 ("scsi: ufs: qcom: Power off the PHY if it was already powered on in ufs_qcom_power_up_seq...
```diff diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index d23ff912fda4..dddc87e08739 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -508,10 +508,9 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba) if (ret) return ret; - if (phy->power_count) {...
846992645b25ec4253167e3f931e4597eb84af56
Analyze and fix the following issue in the Linux kernel code: net: phy: mscc: Fix memory leak when using one step timestamping
Problem Details: Fix memory leak when running one-step timestamping. When running one-step sync timestamping, the HW is configured to insert the TX time into the frame, so there is no reason to keep the skb anymore. As in this case the HW will never generate an interrupt to say that the frame was timestamped, then the ...
```diff diff --git a/drivers/net/phy/mscc/mscc_ptp.c b/drivers/net/phy/mscc/mscc_ptp.c index ed8fb14a7f21..6f96f2679f0b 100644 --- a/drivers/net/phy/mscc/mscc_ptp.c +++ b/drivers/net/phy/mscc/mscc_ptp.c @@ -1166,18 +1166,24 @@ static void vsc85xx_txtstamp(struct mii_timestamper *mii_ts, container_of(mii_ts, struct v...
8c5bcb3daeef9bc54c9939c36dca9a626126eb59
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: qcom: Map devfreq OPP freq to UniPro Core Clock freq
Problem Details: On some platforms, the devfreq OPP freq may be different than the unipro core clock freq. Implement ufs_qcom_opp_freq_to_clk_freq() and use it to find the unipro core clk freq. Fixes: c02fe9e222d1 ("scsi: ufs: qcom: Implement the freq_to_gear_speed() vop") Signed-off-by: Can Guo <quic_cang@quicinc.com...
```diff diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 654d970b6dec..6c054727c3bc 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -122,7 +122,9 @@ static const struct { }; static void ufs_qcom_get_default_testbus_cfg(struct ufs_qcom_host *host); -static in...
663d0c19f3acc0d697f623d34b8eb3b438bf2bda
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: qcom: Check gear against max gear in vop freq_to_gear()
Problem Details: The vop freq_to_gear() may return a gear greater than the negotiated max gear. Return the negotiated max gear if the mapped gear is greater. Fixes: c02fe9e222d1 ("scsi: ufs: qcom: Implement the freq_to_gear_speed() vop") Signed-off-by: Ziqi Chen <quic_ziqichen@quicinc.com> Link: https://lore.kernel.or...
```diff diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 790da25cbaf3..654d970b6dec 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -2083,7 +2083,7 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba) static u32 ufs_qcom_freq_to_gear_speed(struct ufs_hba *h...
c8426f258a0aa4c2fa0fb87806b73592b03dacac
Analyze and fix the following issue in the Linux kernel code: scsi: core: devinfo: Fix typo in comment
Problem Details: Correct a minor typo in a comment within scsi_devinfo.c, replacing "compatibile" with the correct spelling "compatible". Signed-off-by: mrigendrachaubey <mrigendra.chaubey@gmail.com> Link: https://lore.kernel.org/r/20250524035516.27341-1-mrigendra.chaubey@gmail.com Signed-off-by: Martin K. Petersen <m...
```diff diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index a348df895dca..8ff679e67bbf 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -836,7 +836,7 @@ int __init scsi_init_devinfo(void) goto out; for (i = 0; scsi_static_device_list[i].vendor; i++) { - erro...
06ac0776d549d93adf23c823b810118980265ad9
Analyze and fix the following issue in the Linux kernel code: net: libwx: Fix statistics of multicast packets
Problem Details: When SR-IOV is enabled, the number of multicast packets is mistakenly counted starting from queue 0. It would be a wrong count that includes the packets received on VF. Fix it to count from the correct offset. Fixes: c52d4b898901 ("net: libwx: Redesign flow when sriov is enabled") Signed-off-by: Jiawe...
```diff diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c index c6744a363e97..0f4be72116b8 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c @@ -2778,7 +2778,8 @@ void wx_update_stats(struct wx *wx) hwstats->fdi...
1d887d6f810dbf908da9709393c95ae1a649d587
Analyze and fix the following issue in the Linux kernel code: ipe: add errno field to IPE policy load auditing
Problem Details: Users of IPE require a way to identify when and why an operation fails, allowing them to both respond to violations of policy and be notified of potentially malicious actions on their systems with respect to IPE. This patch introduces a new error field to the AUDIT_IPE_POLICY_LOAD event to log policy ...
```diff diff --git a/Documentation/admin-guide/LSM/ipe.rst b/Documentation/admin-guide/LSM/ipe.rst index f93a467db628..dc7088451f9d 100644 --- a/Documentation/admin-guide/LSM/ipe.rst +++ b/Documentation/admin-guide/LSM/ipe.rst @@ -423,7 +423,7 @@ Field descriptions: Event Example:: - type=1422 audit(1653425529.9...
82d1096ca8b5dbb3158d707e6fb3ad21c3403a49
Analyze and fix the following issue in the Linux kernel code: net: lan743x: Fix PHY reset handling during initialization and WOL
Problem Details: Remove lan743x_phy_init from lan743x_hardware_init as it resets the PHY registers, causing WOL to fail on subsequent attempts. Add a call to lan743x_hw_reset_phy in the probe function to ensure the PHY is reset during device initialization. Fixes: 23f0703c125be ("lan743x: Add main source files for new...
```diff diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c index da5bd54208dd..7f36443832ad 100644 --- a/drivers/net/ethernet/microchip/lan743x_main.c +++ b/drivers/net/ethernet/microchip/lan743x_main.c @@ -1346,11 +1346,6 @@ static int lan743x_hw_reset_phy(struct...
68927eb52d0af04863584930db06075d2610e194
Analyze and fix the following issue in the Linux kernel code: net: lan743x: rename lan743x_reset_phy to lan743x_hw_reset_phy
Problem Details: rename the function to lan743x_hw_reset_phy to better describe it operation. Fixes: 23f0703c125be ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/202505260...
```diff diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c index a70b88037a20..da5bd54208dd 100644 --- a/drivers/net/ethernet/microchip/lan743x_main.c +++ b/drivers/net/ethernet/microchip/lan743x_main.c @@ -1330,7 +1330,7 @@ static int lan743x_mac_set_mtu(struct l...
e9cb929670a1e98b592b30f03f06e9e20110f318
Analyze and fix the following issue in the Linux kernel code: net: phy: fix up const issues in to_mdio_device() and to_phy_device()
Problem Details: Both to_mdio_device() and to_phy_device() "throw away" the const pointer attribute passed to them and return a non-const pointer, which generally is not a good thing overall. Fix this up by using container_of_const() which was designed for this very problem. Cc: Alexander Lobakin <alobakin@pm.me> Cc:...
```diff diff --git a/include/linux/mdio.h b/include/linux/mdio.h index 3c3deac57894..e43ff9f980a4 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -45,10 +45,7 @@ struct mdio_device { unsigned int reset_deassert_delay; }; -static inline struct mdio_device *to_mdio_device(const struct device *dev) -{...
a540ee75945a96f606c6ac955bfed5410d318f7d
Analyze and fix the following issue in the Linux kernel code: net/mlx5: HWS, Fix an error code in mlx5hws_bwc_rule_create_complex()
Problem Details: This was intended to be negative -ENOMEM but the '-' character was left off accidentally. This typo doesn't affect runtime because the caller treats all non-zero returns the same. Fixes: 17e0accac577 ("net/mlx5: HWS, support complex matchers") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> R...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c index 5d30c5b094fc..70768953a4f6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/stee...
126cd7852a62c6fab11a4a4cb6fa96421929ab69
Analyze and fix the following issue in the Linux kernel code: net: mctp: start tx queue on netdev open
Problem Details: We stop queues in ndo_stop, so they need to be restarted in ndo_open. This allows us to resume tx after a link down/up cycle. Suggested-by: Nitin Singh <nitsingh@nvidia.com> Fixes: 0791c0327a6e ("net: mctp: Add MCTP USB transport driver") Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: http...
```diff diff --git a/drivers/net/mctp/mctp-usb.c b/drivers/net/mctp/mctp-usb.c index e8d4b01c3f34..775a386d0aca 100644 --- a/drivers/net/mctp/mctp-usb.c +++ b/drivers/net/mctp/mctp-usb.c @@ -257,6 +257,8 @@ static int mctp_usb_open(struct net_device *dev) WRITE_ONCE(mctp_usb->stopped, false); + netif_start_queue(...
c6bb8a21cdad8c975a3a646b9e5c8df01ad29783
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Add error handling in mlx5_query_nic_vport_node_guid()
Problem Details: The function mlx5_query_nic_vport_node_guid() calls the function mlx5_query_nic_vport_context() but does not check its return value. A proper implementation can be found in mlx5_nic_vport_query_local_lb(). Add error handling for mlx5_query_nic_vport_context(). If it fails, free the out buffer via kvfr...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c index a3c57bb8b521..da5c24fc7b30 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c @@ -465,19 +465,22 @@ int mlx5_query_nic_vport_node_g...
c59783780c8ad66f6076a9a7c74df3e006e29519
Analyze and fix the following issue in the Linux kernel code: net: airoha: Fix an error handling path in airoha_alloc_gdm_port()
Problem Details: If register_netdev() fails, the error handling path of the probe will not free the memory allocated by the previous airoha_metadata_dst_alloc() call because port->dev->reg_state will not be NETREG_REGISTERED. So, an explicit airoha_metadata_dst_free() call is needed in this case to avoid a memory leak...
```diff diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c index 1e9ab65218ff..c169b8b411b4 100644 --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c @@ -2541,7 +2541,15 @@ static int airoha_alloc_gdm_port(struct airoha_eth *eth, ...
0795b05a59b1371b18ffbf09d385296b12e9f5d5
Analyze and fix the following issue in the Linux kernel code: net: phy: clear phydev->devlink when the link is deleted
Problem Details: There is a potential crash issue when disabling and re-enabling the network port. When disabling the network port, phy_detach() calls device_link_del() to remove the device link, but it does not clear phydev->devlink, so phydev->devlink is not a NULL pointer. Then the network port is re-enabled, but if...
```diff diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index cc1bfd22fb81..7d5e76a3db0e 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1727,8 +1727,10 @@ void phy_detach(struct phy_device *phydev) struct module *ndev_owner = NULL; struct mii_bus *bus; - ...
5827e3c720e5a881bf97451e3c280445f67cba04
Analyze and fix the following issue in the Linux kernel code: f2fs: add f2fs_bug_on() in f2fs_quota_read()
Problem Details: mapping_read_folio_gfp() will return a folio, it should always be uptodate, let's check folio uptodate status to detect any potenial bug. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
```diff diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index bd37139d0d9e..7654f2beabdd 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2734,6 +2734,12 @@ repeat: goto repeat; } + /* + * should never happen, just leave f2fs_bug_on() here to catch + * any potential bug. + */ + f2fs_bug_on(F2FS_SB...
9b6fc9888e03dbe69768ace00091173b169aec39
Analyze and fix the following issue in the Linux kernel code: f2fs: add f2fs_bug_on() to detect potential bug
Problem Details: Add f2fs_bug_on() to check whether memory preallocation will fail or not after radix_tree_preload(GFP_NOFS | __GFP_NOFAIL). Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
```diff diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 39ee75321d14..164b7719f365 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -504,6 +504,7 @@ static void __add_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, { struct inode_management *im = &sbi->im[type]; struct ino_entry *e = N...
550ccb178de2f379f5e1a1833dd6f4bdafef4b68
Analyze and fix the following issue in the Linux kernel code: Make 'cc-option' work correctly for the -Wno-xyzzy pattern
Problem Details: This is the follow-up to commit a79be02bba5c ("Fix mis-uses of 'cc-option' for warning disablement") where I mentioned that the best fix would be to just make 'cc-option' a bit smarter, and work for all compiler options, including the '-Wno-xyzzy' pattern that it used to accept unknown options for. It...
```diff diff --git a/scripts/Makefile.compiler b/scripts/Makefile.compiler index f4fcc1eaaeae..65cfa72e376b 100644 --- a/scripts/Makefile.compiler +++ b/scripts/Makefile.compiler @@ -43,7 +43,7 @@ as-instr = $(call try-run,\ # __cc-option # Usage: MY_CFLAGS += $(call __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-...
e2d2115e56c4a02377189bfc3a9a7933552a7b0f
Analyze and fix the following issue in the Linux kernel code: bpf: Do not include stack ptr register in precision backtracking bookkeeping
Problem Details: Yi Lai reported an issue ([1]) where the following warning appears in kernel dmesg: [ 60.643604] verifier backtracking bug [ 60.643635] WARNING: CPU: 10 PID: 2315 at kernel/bpf/verifier.c:4302 __mark_chain_precision+0x3a6c/0x3e10 [ 60.648428] Modules linked in: bpf_testmod(OE) [ 60.6504...
```diff diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 78c97e12ea4e..256274acb1d8 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -356,7 +356,11 @@ enum { INSN_F_SPI_MASK = 0x3f, /* 6 bits */ INSN_F_SPI_SHIFT = 3, /* shifted 3 bits to the left */ - I...
6579a03e68ffa5feb2d2823dea16ca7466f6de16
Analyze and fix the following issue in the Linux kernel code: drm/bridge: analogix_dp: Remove the unnecessary calls to clk_disable_unprepare() during probing
Problem Details: With the commit f37952339cc2 ("drm/bridge: analogix_dp: handle clock via runtime PM"), the PM operations can help enable/disable the clock. The err_disable_clk label and clk_disable_unprepare() operations are no longer necessary because the analogix_dp_resume() will not be called during probing. Fixes...
```diff diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index a761941bc3c2..01201fff59a6 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1531,10 +1531,8 @@ analogix_dp_probe(...
be9b3f9a54101c19226c25ba7163d291183777a0
Analyze and fix the following issue in the Linux kernel code: drm/connector: only call HDMI audio helper plugged cb if non-null
Problem Details: On driver remove, sound/soc/codecs/hdmi-codec.c calls the plugged_cb with NULL as the callback function and codec_dev, as seen in its hdmi_remove function. The HDMI audio helper then happily tries calling said null function pointer, and produces an Oops as a result. Fix this by only executing the cal...
```diff diff --git a/drivers/gpu/drm/display/drm_hdmi_audio_helper.c b/drivers/gpu/drm/display/drm_hdmi_audio_helper.c index 05afc9f0bdd6..ae8a0cf595fc 100644 --- a/drivers/gpu/drm/display/drm_hdmi_audio_helper.c +++ b/drivers/gpu/drm/display/drm_hdmi_audio_helper.c @@ -103,7 +103,8 @@ static int drm_connector_hdmi_aud...
c98cc9797b7009308fff73d41bc1d08642dab77a
Analyze and fix the following issue in the Linux kernel code: ring-buffer: Move cpus_read_lock() outside of buffer->mutex
Problem Details: Running a modified trace-cmd record --nosplice where it does a mmap of the ring buffer when '--nosplice' is set, caused the following lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 6.15.0-rc7-test-00002-gfb7d03d8a82f #551...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 3f9bf562beea..ca1a8e706004 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -2849,6 +2849,12 @@ int ring_buffer_resize(struct trace_buffer *buffer, unsigned long size, if (nr_pages < 2) nr_pages = 2; + /...
368556dd234dc4a506a35a0c99c0eee2ab475c77
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: Work around Clang loop unrolling bug
Problem Details: The nested loop in iwl_mld_send_proto_offload() confuses Clang into thinking there could be a final loop iteration past the end of the "nsc" array (which is only 4 entries). The FORTIFY checking in memcmp() (via ipv6_addr_cmp()) notices this (due to the available bytes in the out-of-bounds position of ...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/d3.c b/drivers/net/wireless/intel/iwlwifi/mld/d3.c index ee99298eebf5..7ce01ad3608e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/d3.c @@ -1757,7 +1757,7 @@ iwl_mld_send_proto_offload(struct iwl_mld *mld,...
39578fa40420fb11dbe4f42225a347e945d8fd0e
Analyze and fix the following issue in the Linux kernel code: drm/xe: Add missing documentation of rpa_freq
Problem Details: While at it, already adjust the rpe_freq frequency, to highlight that both are calculated by PCODE at runtime. Fixes: c6aac2fa77a3 ("drm/xe: Introduce the RPa information") Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Lucas De Marchi <lu...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_freq.c b/drivers/gpu/drm/xe/xe_gt_freq.c index 3293d89f1386..60d9354e7dbf 100644 --- a/drivers/gpu/drm/xe/xe_gt_freq.c +++ b/drivers/gpu/drm/xe/xe_gt_freq.c @@ -36,7 +36,10 @@ * - act_freq: The actual resolved frequency decided by PCODE. * - cur_freq: The current one re...
af53f0fd99c3bbb3afd29f1612c9e88c5a92cc01
Analyze and fix the following issue in the Linux kernel code: drm/xe: Make xe_gt_freq part of the Documentation
Problem Details: The documentation was created with the creation of the component, however it has never been actually shown in the actual Documentation. While doing this, fixes the identation style, to avoid new warnings while building htmldocs. Fixes: bef52b5c7a19 ("drm/xe: Create a xe_gt_freq component for raw mana...
```diff diff --git a/Documentation/gpu/xe/index.rst b/Documentation/gpu/xe/index.rst index b2369561f24e..42ba6c263cd0 100644 --- a/Documentation/gpu/xe/index.rst +++ b/Documentation/gpu/xe/index.rst @@ -16,6 +16,7 @@ DG2, etc is provided to prototype the driver. xe_migrate xe_cs xe_pm + xe_gt_freq xe_...
1da7a06d9ce4edea3370945af8bfcc71b7744788
Analyze and fix the following issue in the Linux kernel code: mm/filemap: unify read/write dropbehind naming
Problem Details: The read side is filemap_end_dropbehind_read(), while the write side used folio_ as the prefix rather than filemap_. The read side makes more sense, unify the naming such that the write side follows that. Signed-off-by: Jens Axboe <axboe@kernel.dk> Link: https://lore.kernel.org/20250527133255.452431-5...
```diff diff --git a/mm/filemap.c b/mm/filemap.c index 6af6d8f2929c..2ba1ed116103 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1604,7 +1604,7 @@ static void filemap_end_dropbehind(struct folio *folio) * completes. Do that now. If we fail, it's likely because of a big folio - * just reset dropbehind for that cas...
25b065a744ff0c1099bb357be1c40030b5a14c07
Analyze and fix the following issue in the Linux kernel code: mm/filemap: use filemap_end_dropbehind() for read invalidation
Problem Details: Use the filemap_end_dropbehind() helper rather than calling folio_unmap_invalidate() directly, as we need to check if the folio has been redirtied or marked for writeback once the folio lock has been re-acquired. Cc: stable@vger.kernel.org Reported-by: Trond Myklebust <trondmy@hammerspace.com> Fixes: ...
```diff diff --git a/mm/filemap.c b/mm/filemap.c index 008a55290f34..6af6d8f2929c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2644,8 +2644,7 @@ static inline bool pos_same_folio(loff_t pos1, loff_t pos2, struct folio *folio) return (pos1 >> shift == pos2 >> shift); } -static void filemap_end_dropbehind_read(s...
095f627add86a6ddda2c2cfd563b0ee05d0172b2
Analyze and fix the following issue in the Linux kernel code: mm/filemap: gate dropbehind invalidate on folio !dirty && !writeback
Problem Details: It's possible for the folio to either get marked for writeback or redirtied. Add a helper, filemap_end_dropbehind(), which guards the folio_unmap_invalidate() call behind check for the folio being both non-dirty and not under writeback AFTER the folio lock has been acquired. Use this helper folio_end_d...
```diff diff --git a/mm/filemap.c b/mm/filemap.c index 7b90cbeb4a1a..008a55290f34 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1589,6 +1589,16 @@ int folio_wait_private_2_killable(struct folio *folio) } EXPORT_SYMBOL(folio_wait_private_2_killable); +static void filemap_end_dropbehind(struct folio *folio) +{ + s...
0ec33c81d9c7342f03864101ddb2e717a0cce03e
Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: fix area release on registration failure
Problem Details: On area registration failure there might be no ifq set and it's not safe to access area->ifq in the release path without checking it first. Cc: stable@vger.kernel.org Fixes: f12ecf5e1c5ec ("io_uring/zcrx: fix late dma unmap for a dead dev") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: ...
```diff diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index 0c5b7d8f8d67..21c816c3bfe0 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -366,7 +366,8 @@ static void io_free_rbuf_ring(struct io_zcrx_ifq *ifq) static void io_zcrx_free_area(struct io_zcrx_area *area) { - io_zcrx_unmap_area(area->ifq, area); + if...
d4965578267e2e81f67c86e2608481e77e9c8569
Analyze and fix the following issue in the Linux kernel code: bpf: Check rcu_read_lock_trace_held() in bpf_map_lookup_percpu_elem()
Problem Details: bpf_map_lookup_percpu_elem() helper is also available for sleepable bpf program. When BPF JIT is disabled or under 32-bit host, bpf_map_lookup_percpu_elem() will not be inlined. Using it in a sleepable bpf program will trigger the warning in bpf_map_lookup_percpu_elem(), because the bpf program only ho...
```diff diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 376403707a85..b71e428ad936 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -130,7 +130,8 @@ const struct bpf_func_proto bpf_map_peek_elem_proto = { BPF_CALL_3(bpf_map_lookup_percpu_elem, struct bpf_map *, map, void *, key, u32, cp...
86bc9c742426a16b52a10ef61f5b721aecca2344
Analyze and fix the following issue in the Linux kernel code: bpf: Avoid __bpf_prog_ret0_warn when jit fails
Problem Details: syzkaller reported an issue: WARNING: CPU: 3 PID: 217 at kernel/bpf/core.c:2357 __bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/core.c:2357 Modules linked in: CPU: 3 UID: 0 PID: 217 Comm: kworker/u32:6 Not tainted 6.15.0-rc4-syzkaller-00040-g8bac8898fe39 RIP: 0010:__bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/cor...
```diff diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index a3e571688421..c20babbf998f 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c @@ -2474,7 +2474,7 @@ struct bpf_prog *bpf_prog_select_runtime(struct bpf_prog *fp, int *err) /* In case of BPF to BPF calls, verifier did all the prep * work with rega...
f95695f2c46592b4260032736a9bfc6e2a01c77c
Analyze and fix the following issue in the Linux kernel code: bpf: Warn with __bpf_trap() kfunc maybe due to uninitialized variable
Problem Details: Marc Suñé (Isovalent, part of Cisco) reported an issue where an uninitialized variable caused generating bpf prog binary code not working as expected. The reproducer is in [1] where the flags “-Wall -Werror” are enabled, but there is no warning as the compiler takes advantage of uninitialized variable ...
```diff diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index bd17ed5bfc4b..376403707a85 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -3273,6 +3273,10 @@ __bpf_kfunc void bpf_local_irq_restore(unsigned long *flags__irq_flag) local_irq_restore(*flags__irq_flag); } +__bpf_kfunc void __bpf...
b586c5d21954f203ba40c6120307d2e370c668d7
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: use kvm_trylock_all_vcpus when locking all vCPUs
Problem Details: Use kvm_trylock_all_vcpus instead of a custom implementation when locking all vCPUs of a VM, to avoid triggering a lockdep warning, in the case in which the VM is configured to have more than MAX_LOCK_DEPTH vCPUs. This fixes the following false lockdep warning: [ 328.171264] BUG: MAX_LOCK_DEPTH too ...
```diff diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index d941abc6b5ee..6ce2c5173482 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -1320,9 +1320,6 @@ int __init populate_sysreg_config(const struct sys_reg_desc *sr, unsigned int id...
c5b6ababd21ab6bb251e5a2b4db110e76fb00a26
Analyze and fix the following issue in the Linux kernel code: locking/mutex: implement mutex_trylock_nested
Problem Details: Despite the fact that several lockdep-related checks are skipped when calling trylock* versions of the locking primitives, for example mutex_trylock, each time the mutex is acquired, a held_lock is still placed onto the lockdep stack by __lock_acquire() which is called regardless of whether the trylock...
```diff diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 2143d05116be..da4518cfd59c 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -193,7 +193,22 @@ extern void mutex_lock_io(struct mutex *lock); * * Returns 1 if the mutex has been acquired successfully, and 0 on contention. */ ...
39d86db34e41b96bd86f1955cd0ce6cd9c5fca4c
Analyze and fix the following issue in the Linux kernel code: loop: add file_start_write() and file_end_write()
Problem Details: file_start_write() and file_end_write() should be added around ->write_iter(). Recently we switch to ->write_iter() from vfs_iter_write(), and the implied file_start_write() and file_end_write() are lost. Also we never add them for dio code path, so add them back for covering both. Cc: Jeff Moyer <j...
```diff diff --git a/drivers/block/loop.c b/drivers/block/loop.c index e2b1f377f585..f8d136684109 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -308,11 +308,14 @@ end_io: static void lo_rw_aio_do_completion(struct loop_cmd *cmd) { struct request *rq = blk_mq_rq_from_pdu(cmd); + struct loop_device ...
cd1be30b44d930d8082618cd8f8c57e87758fe33
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: use __always_inline for is_td_vcpu and is_td
Problem Details: is_td() and is_td_vcpu() are used in no-instrumentation sections; use __always_inline instead of inline. vmlinux.o: error: objtool: vmx_handle_nmi+0x47: call to is_td_vcpu.isra.0() leaves .noinstr.text section Fixes: 7172c753c26a ("KVM: VMX: Move common fields of struct vcpu_{vmx,tdx} to a st...
```diff diff --git a/arch/x86/kvm/vmx/common.h b/arch/x86/kvm/vmx/common.h index 8f46a06e2c44..a0c5e8781c33 100644 --- a/arch/x86/kvm/vmx/common.h +++ b/arch/x86/kvm/vmx/common.h @@ -71,8 +71,8 @@ static __always_inline bool is_td_vcpu(struct kvm_vcpu *vcpu) #else -static inline bool is_td(struct kvm *kvm) { retur...
eda4623cf989d033c07355be1469e44f321ce8ae
Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: init id for xa_find
Problem Details: xa_find() interprets id as the lower bound and thus expects it initialised. Reported-by: syzbot+c3ff04150c30d3df0f57@syzkaller.appspotmail.com Fixes: 76f1cc98b23ce ("io_uring/zcrx: add support for multiple ifqs") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/fa...
```diff diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index 9a568d049204..0c5b7d8f8d67 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -630,12 +630,13 @@ ifq_free: void io_unregister_zcrx_ifqs(struct io_ring_ctx *ctx) { struct io_zcrx_ifq *ifq; - unsigned long id; lockdep_assert_held(&ctx->uring_lock); ...
8b3f9967b1fd481ed932f453c38aec99f3c90d95
Analyze and fix the following issue in the Linux kernel code: vhost: vringh: Use matching allocation type in resize_iovec()
Problem Details: In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned t...
```diff diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c index 73e153f9b449..93735fc5c5b4 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c @@ -225,10 +225,9 @@ static int resize_iovec(struct vringh_kiov *iov, gfp_t gfp) flag = (iov->max_num & VRINGH_IOV_ALLOCATED); if (flag) - new = k...
9ef41ebf787fcbde99ac404ae473f8467641f983
Analyze and fix the following issue in the Linux kernel code: virtio-pci: Fix result size returned for the admin command completion
Problem Details: The result size returned by virtio_pci_admin_dev_parts_get() is 8 bytes larger than the actual result data size. This occurs because the result_sg_size field of the command is filled with the result length from virtqueue_get_buf(), which includes both the data size and an additional 8 bytes of status. ...
```diff diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index d50fe030d825..7182f43ed055 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -48,6 +48,7 @@ void vp_modern_avq_done(struct virtqueue *vq) { struct virtio_pci_device *vp_dev = t...
ed5915cfce2abb9a553c3737badebd4a11d6c9c7
Analyze and fix the following issue in the Linux kernel code: Revert "drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1"
Problem Details: This reverts commit d6e020819612a4a06207af858e0978be4d3e3140. The IS_DGFX check was put in place because error capture of buffer objects is expected to be broken on devices with VRAM. Userspace fix[1] to the impacted media driver has been submitted, merged and a new driver release is out as 25.2.3 wh...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index ea9d5063ce78..ca7e9216934a 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -2013,7 +2013,7 @@ static int eb_capture_stage(struct ...
25eeba495b2fc16037647c1a51bcdf6fc157af5c
Analyze and fix the following issue in the Linux kernel code: drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1
Problem Details: The intel-media-driver is currently broken on DG1 because it uses EXEC_CAPTURE with recovarable contexts. Relax the check to allow that. I've also submitted a fix for the intel-media-driver: https://github.com/intel/media-driver/pull/1920 Cc: stable@vger.kernel.org # v6.0+ Cc: Matthew Auld <matthew.a...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index ca7e9216934a..ea9d5063ce78 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -2013,7 +2013,7 @@ static int eb_capture_stage(struct ...
208c1559c5b18894e3380b3807b6364bd14f7584
Analyze and fix the following issue in the Linux kernel code: bcache: reserve more RESERVE_BTREE buckets to prevent allocator hang
Problem Details: Reported an IO hang and unrecoverable error in our testing environment. After careful research, we found that bch_allocator_thread is stuck, the call stack is as follows: [<0>] __switch_to+0xbc/0x108 [<0>] __closure_sync+0x7c/0xbc [bcache] [<0>] bch_prio_write+0x430/0x448 [bcache] [<0>] bch_allocator_...
```diff diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 9e6dfe2ec147..12fb3e557fb1 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -2237,15 +2237,47 @@ static int cache_alloc(struct cache *ca) bio_init(&ca->journal.bio, NULL, ca->journal.bio.bi_inline_vecs, 8, 0); ...
1e46ed947ec658f89f1a910d880cd05e42d3763e
Analyze and fix the following issue in the Linux kernel code: bcache: fix NULL pointer in cache_set_flush()
Problem Details: 1. LINE#1794 - LINE#1887 is some codes about function of bch_cache_set_alloc(). 2. LINE#2078 - LINE#2142 is some codes about function of register_cache_set(). 3. register_cache_set() will call bch_cache_set_alloc() in LINE#2098. 1794 struct cache_set *bch_cache_set_alloc(struct cache_sb *sb) 1...
```diff diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index c40db9c161c1..9e6dfe2ec147 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1732,7 +1732,12 @@ static CLOSURE_CALLBACK(cache_set_flush) mutex_unlock(&b->write_lock); } - if (ca->alloc_thread) + /* + * If...
e3de7984e45155888eebbca5a32c1cc5f29fa859
Analyze and fix the following issue in the Linux kernel code: ASoC: tas571x: add separate tas5733 controls
Problem Details: The controls between the tas5717 and tas5733 should not be shared since the biquad and register setup is not identical. For example, writing to 0x5c on the tas5717 modifies ch2_bq[10] while on the tas5733 this is ch1_cross_bq[3]. see https://www.ti.com/lit/ds/symlink/tas5733l.pdf and https://www.ti.co...
```diff diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c index 6c6e7ae07d80..00b131294547 100644 --- a/sound/soc/codecs/tas571x.c +++ b/sound/soc/codecs/tas571x.c @@ -718,6 +718,69 @@ static const struct regmap_config tas5721_regmap_config = { .volatile_table = &tas571x_volatile_regs, }; +sta...
39cdf87a97fdab067e82138ad4611b764f3eae15
Analyze and fix the following issue in the Linux kernel code: cpuidle: psci: Fix uninitialized variable in dt_idle_state_present()
Problem Details: If the first cpu_node = of_cpu_device_node_get() fails then the cleanup.h code will try to free "state_node" but it hasn't been initialized yet. Declare the device_nodes where they are initialized to fix this. Fixes: 5836ebeb4a2b ("cpuidle: psci: Avoid initializing faux device if no DT idle states are...
```diff diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c index 40f378c1dc9f..eef70b5259bc 100644 --- a/drivers/cpuidle/cpuidle-psci.c +++ b/drivers/cpuidle/cpuidle-psci.c @@ -440,14 +440,13 @@ static struct faux_device_ops psci_cpuidle_ops = { static bool __init dt_idle_state_present(void...
9375e5e3557bf98e9c293aa32a9d2985eed16b5e
Analyze and fix the following issue in the Linux kernel code: ACPI: MRRM: Silence error code static checker warning
Problem Details: The error code is not set correctly on if kasprintf() fails. On the first iteration it would return -EINVAL and subsequent iterations would return success. Set it to -ENOMEM. In real life, this allocation will not fail and if it did the system will not boot so this change is mostly to silence static...
```diff diff --git a/drivers/acpi/acpi_mrrm.c b/drivers/acpi/acpi_mrrm.c index 26c1a4e6b6ec..47ea3ccc2142 100644 --- a/drivers/acpi/acpi_mrrm.c +++ b/drivers/acpi/acpi_mrrm.c @@ -157,8 +157,10 @@ static __init int add_boot_memory_ranges(void) for (int i = 0; i < mrrm_mem_entry_num; i++) { name = kasprintf(GFP_KE...
ce57cc1269c580abfca5b79cb40243b01aac357c
Analyze and fix the following issue in the Linux kernel code: ACPI: APEI: EINJ: Clean up on error in einj_probe()
Problem Details: Call acpi_put_table() before returning the error code. Fixes: e54b1dc1c4f0 ("ACPI: APEI: EINJ: Remove redundant calls to einj_get_available_error_type()") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aDVRBok33LZhXcId@stanley.mountain Signed-off-by: Rafael J. W...
```diff diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index ca3484dac5c4..fea11a35eea3 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -766,7 +766,7 @@ static int __init einj_probe(struct faux_device *fdev) rc = einj_get_available_error_type(&available_...
b83825a8f56a34e7352e424aae64ffe6b88247d1
Analyze and fix the following issue in the Linux kernel code: btrfs: don't drop a reference if btrfs_check_write_meta_pointer() fails
Problem Details: In the zoned mode there's a bug in the extent buffer tree conversion to xarray. The reference for eb is dropped and code continues but the references get dropped by releasing the batch. Reported-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reported-by: kernel test robot <oliver.sang@intel.com> ...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index e43f6280f954..849199768664 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2189,7 +2189,6 @@ retry: done = 1; break; } - free_extent_buffer(eb); continue; } ```
4db7384ce55c4d7bfb9876fabd8d8778b2ff90ff
Analyze and fix the following issue in the Linux kernel code: btrfs: don't drop a reference if btrfs_check_write_meta_pointer() fails
Problem Details: In the zoned mode there's a bug in the extent buffer tree conversion to xarray. The reference for eb is dropped and code continues but the references get dropped by releasing the batch. Reported-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Fixes: 19d7f65f032f ("btrfs: convert the buffer_radix t...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index e43f6280f954..849199768664 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2189,7 +2189,6 @@ retry: done = 1; break; } - free_extent_buffer(eb); continue; } ```
b4608e944177531334a79f3df2cd14275b47808c
Analyze and fix the following issue in the Linux kernel code: spi: spi-pci1xxxx: Fix Probe failure with Dual SPI instance with INTx interrupts
Problem Details: Fixes a probe failure that occurs when dual SPI controllers are enabled and INTx interrupts are used. Reduces the minimum required number of interrupt vectors to 1 and registers a shared ISR when the allocated vectors are fewer than the number of controllers. This change ensures that the probe succeeds...
```diff diff --git a/drivers/spi/spi-pci1xxxx.c b/drivers/spi/spi-pci1xxxx.c index 330078b1d50f..c6489e90b8b9 100644 --- a/drivers/spi/spi-pci1xxxx.c +++ b/drivers/spi/spi-pci1xxxx.c @@ -685,6 +685,17 @@ static irqreturn_t pci1xxxx_spi_isr(int irq, void *dev) return pci1xxxx_spi_isr_io(irq, dev); } +static irqret...
16719d48197bbd8cff121b32acec67d954335437
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: fix out-of-bounds access on invalid clock config
Problem Details: get_coeff() returns –EINVAL when no table entry matches. The driver then uses that value as an index into coeff_div[], causing an OOB access. To fix lets abort the hw_params call instead. Fixes: de2b3119f9f7 ("ASoC: codecs: add support for ES8375") Signed-off-by: Qasim Ijaz <qasdev00@gmail.com> Link:...
```diff diff --git a/sound/soc/codecs/es8375.c b/sound/soc/codecs/es8375.c index decc86c92427..009259632107 100644 --- a/sound/soc/codecs/es8375.c +++ b/sound/soc/codecs/es8375.c @@ -319,6 +319,7 @@ static int es8375_hw_params(struct snd_pcm_substream *substream, coeff = get_coeff(es8375->vddd, dmic_enable, es8375->m...
63fe298652d4eda07d738bfcbbc59d1343a675ef
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wcd9375: Fix double free of regulator supplies
Problem Details: Driver gets regulator supplies in probe path with devm_regulator_bulk_get(), so should not call regulator_bulk_free() in error and remove paths to avoid double free. Fixes: 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply") Cc: stable@vger.kernel.org Signed-off-by: Kr...
```diff diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c index a3a4b1f53e88..b9df58b86ce9 100644 --- a/sound/soc/codecs/wcd937x.c +++ b/sound/soc/codecs/wcd937x.c @@ -2944,10 +2944,8 @@ static int wcd937x_probe(struct platform_device *pdev) return dev_err_probe(dev, ret, "Failed to get supplies\n...
dc59189d32fc3dbddcf418fd4b418fb61f24ade6
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wcd937x: Drop unused buck_supply
Problem Details: Last user of wcd937x_priv->buck_supply was removed in commit 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply"). Fixes: 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <...
```diff diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c index 3b1a1518e764..a3a4b1f53e88 100644 --- a/sound/soc/codecs/wcd937x.c +++ b/sound/soc/codecs/wcd937x.c @@ -91,7 +91,6 @@ struct wcd937x_priv { struct regmap_irq_chip *wcd_regmap_irq_chip; struct regmap_irq_chip_data *irq_chip; struct ...
9079db287fc3e38e040b0edeb0a25770bb679c8e
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wcd9335: Fix missing free of regulator supplies
Problem Details: Driver gets and enables all regulator supplies in probe path (wcd9335_parse_dt() and wcd9335_power_on_reset()), but does not cleanup in final error paths and in unbind (missing remove() callback). This leads to leaked memory and unbalanced regulator enable count during probe errors or unbind. Fix thi...
```diff diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 8ee4360aff92..5e19e813748d 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -332,7 +332,6 @@ struct wcd9335_codec { int intr1; struct gpio_desc *reset_gpio; - struct regulator_bulk_data supplies[WCD9335_M...
d2dc30e0aa252830f908c8e793d3139d51321370
Analyze and fix the following issue in the Linux kernel code: Revert "drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1"
Problem Details: This reverts commit d6e020819612a4a06207af858e0978be4d3e3140. The IS_DGFX check was put in place because error capture of buffer objects is expected to be broken on devices with VRAM. Userspace fix[1] to the impacted media driver has been submitted, merged and a new driver release is out as 25.2.3 wh...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index 7d44aadcd5a5..02c59808cbe4 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -2013,7 +2013,7 @@ static int eb_capture_stage(struct ...
6682bfc1b227fecedc6dad064ef240ec8abfe32d
Analyze and fix the following issue in the Linux kernel code: Doc: networking: Fix various typos in rds.rst
Problem Details: Corrected "sages" to "messages" in the bitmap allocation description. Fixed "competed" to "completed" in the recv path datagram handling section. Corrected "privatee" to "private" in the multipath RDS section. Fixed "mutlipath" to "multipath" in the transport capabilities description. These changes im...
```diff diff --git a/Documentation/networking/rds.rst b/Documentation/networking/rds.rst index 498395f5fbcb..41b0a6182fe4 100644 --- a/Documentation/networking/rds.rst +++ b/Documentation/networking/rds.rst @@ -265,7 +265,7 @@ RDS Protocol The bitmaps are allocated as connections are brought up. This a...
28fcb4b56f929f4627f3c4c6c6dc61b292b8e55d
Analyze and fix the following issue in the Linux kernel code: xsk: add missing virtual address conversion for page
Problem Details: In commit 7ead4405e06f ("xsk: convert xdp_copy_frags_from_zc() to use page_pool_dev_alloc()"), when converting from netmem to page, I missed a call to page_address() around skb_frag_page(frag) to get the virtual address of the page. This commit uses skb_frag_address() helper to fix the issue. Fixes: 7...
```diff diff --git a/net/core/xdp.c b/net/core/xdp.c index e6f22ba61c1e..491334b9b8be 100644 --- a/net/core/xdp.c +++ b/net/core/xdp.c @@ -709,8 +709,7 @@ static noinline bool xdp_copy_frags_from_zc(struct sk_buff *skb, return false; } - memcpy(page_address(page) + offset, - skb_frag_page(frag) + skb_...
d8d85ef0a631df9127f202e6371bb33a0b589952
Analyze and fix the following issue in the Linux kernel code: af_packet: move notifier's packet_dev_mc out of rcu critical section
Problem Details: Syzkaller reports the following issue: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:578 __mutex_lock+0x106/0xe80 kernel/locking/mutex.c:746 team_change_rx_flags+0x38/0x220 drivers/net/team/team_core.c:1781 dev_change_rx_flags net/core/dev.c:9145 [inline] __dev_set_...
```diff diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index d4dba06297c3..20be2c47cf41 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -3713,15 +3713,15 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i, } static void packet_dev_mclist_delete(struct net_d...
a3f7d26dfce9e2d547a58f4941881843a391a6cc
Analyze and fix the following issue in the Linux kernel code: drm/sitronix: Remove broken backwards-compatibility layer
Problem Details: When moving the Sitronix DRM drivers and renaming their Kconfig symbols, the old symbols were kept, aiming to provide a seamless migration path when running "make olddefconfig" or "make oldconfig". However, the old compatibility symbols are not visible. Hence unless they are selected by another symbo...
```diff diff --git a/drivers/gpu/drm/sitronix/Kconfig b/drivers/gpu/drm/sitronix/Kconfig index c069d0d41775..25cae32e5c3e 100644 --- a/drivers/gpu/drm/sitronix/Kconfig +++ b/drivers/gpu/drm/sitronix/Kconfig @@ -10,10 +10,6 @@ config DRM_ST7571_I2C if M is selected the module will be called st7571-i2c. -config T...
ba3d7b93dbe3202bf8ead473d75885af773068bc
Analyze and fix the following issue in the Linux kernel code: wireguard: allowedips: add WGALLOWEDIP_F_REMOVE_ME flag
Problem Details: The current netlink API for WireGuard does not directly support removal of allowed ips from a peer. A user can remove an allowed ip from a peer in one of two ways: 1. By using the WGPEER_F_REPLACE_ALLOWEDIPS flag and providing a new list of allowed ips which omits the allowed ip that is to be remov...
```diff diff --git a/drivers/net/wireguard/allowedips.c b/drivers/net/wireguard/allowedips.c index 4b8528206cc8..09f7fcd7da78 100644 --- a/drivers/net/wireguard/allowedips.c +++ b/drivers/net/wireguard/allowedips.c @@ -249,6 +249,52 @@ static int add(struct allowedips_node __rcu **trie, u8 bits, const u8 *key, return...
71e5da46e78c1cd24e2feed251a2845327447ad8
Analyze and fix the following issue in the Linux kernel code: wireguard: global: add __nonstring annotations for unterminated strings
Problem Details: When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to correctly identify the char array as "not a C string" and thereby elimin...
```diff diff --git a/drivers/net/wireguard/cookie.c b/drivers/net/wireguard/cookie.c index f89581b5e8cb..94d0a7206084 100644 --- a/drivers/net/wireguard/cookie.c +++ b/drivers/net/wireguard/cookie.c @@ -26,8 +26,8 @@ void wg_cookie_checker_init(struct cookie_checker *checker, } enum { COOKIE_KEY_LABEL_LEN = 8 }; -s...
32374234ab0101881e7d0c6a8ef7ebce566c46c9
Analyze and fix the following issue in the Linux kernel code: net: xilinx: axienet: Fix Tx skb circular buffer occupancy check in dmaengine xmit
Problem Details: In Dmaengine flow, driver maintains struct skbuf_dma_descriptor rings each element of which corresponds to a skb. In Tx datapath, compare available space in skb ring with number of skbs instead of skb fragments. Replace x * (MAX_SKB_FRAGS) in netif_txq_completed_wake() and netif_txq_maybe_stop() with x...
```diff diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 054abf283ab3..5f912b27bfd7 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -880,7 +880,7 @@ static void axienet_dma_t...
0a84874c7e7dde5cdddc80a82093120e924a348b
Analyze and fix the following issue in the Linux kernel code: crypto: shash - Fix buffer overrun in import function
Problem Details: Only set the partial block length to zero if the algorithm is block-only. Otherwise the descriptor context could be empty, e.g., for digest_null. Reported-by: syzbot+4851c19615d35f0e4d68@syzkaller.appspotmail.com Fixes: 7650f826f7b2 ("crypto: shash - Handle partial blocks in API") Signed-off-by: Herb...
```diff diff --git a/crypto/shash.c b/crypto/shash.c index 37537d7995c7..4721f5f134f4 100644 --- a/crypto/shash.c +++ b/crypto/shash.c @@ -257,12 +257,13 @@ static int __crypto_shash_import(struct shash_desc *desc, const void *in, if (crypto_shash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY) return -ENOKEY; - plen = cr...
72ab5136e86fcbccebb4a423d83332f41a7bd697
Analyze and fix the following issue in the Linux kernel code: bcachefs: Don't rewind to run a recovery pass we already ran
Problem Details: Fix a small regression from the "run recovery passes" rewrite, which enabled async recovery passes. This fixes getting stuck in a loop in recovery. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/recovery_passes.c b/fs/bcachefs/recovery_passes.c index dabb29b08ad0..212658cb97dd 100644 --- a/fs/bcachefs/recovery_passes.c +++ b/fs/bcachefs/recovery_passes.c @@ -315,7 +315,9 @@ int __bch2_run_explicit_recovery_pass(struct bch_fs *c, goto out; bool in_recovery = test_bit(BCH_...
1cda5b88e6d13ebf42078253abbb2ed0efe9ab0a
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix missing commit in check_dirents
Problem Details: Other repair code seems to be doing commits themselves, but check_key_has_snapshot() does not. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 49f46df8340e..8e07a365b24c 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -2312,9 +2312,10 @@ int bch2_check_dirents(struct bch_fs *c) snapshots_seen_init(&s); int ret = bch2_trans_run(c, - for_each_btree_key(trans, iter, BTREE_ID_di...
9e2c3c2ed4772cb0e2ad5b0def08c2c943483445
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix lost rebalance wakeups
Problem Details: Fix a missing wakeup in 'bcachefs set-file-option' -> xattr option update -> inode_write this was missing because the wakeup needs to happen after transaction commit. Also, add a 'kick' counter, to make sure we don't miss a wakeup that occured right after we finished checking the rebalance_work btree...
```diff diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index ddfe89d84966..adae43223bce 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -124,8 +124,9 @@ retry: goto err; struct bch_extent_rebalance new_r = bch2_inode_rebalance_opts_get(c, &inode_u); + bool rebalance_changed = memcmp(&old_r, &new_r, siz...
3b5260d12b1fe76b566fe182de8abc586b827ed0
Analyze and fix the following issue in the Linux kernel code: Don't propagate mounts into detached trees
Problem Details: All versions up to 6.14 did not propagate mount events into detached tree. Shortly after 6.14 a merge of vfs-6.15-rc1.mount.namespace (130e696aa68b) has changed that. Unfortunately, that has caused userland regressions (reported in https://lore.kernel.org/all/CAOYeF9WQhFDe+BGW=Dp5fK8oRy5AgZ6zokVyTj1W...
```diff diff --git a/fs/mount.h b/fs/mount.h index 7aecf2a60472..ad7173037924 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -7,10 +7,6 @@ extern struct list_head notify_list; -typedef __u32 __bitwise mntns_flags_t; - -#define MNTNS_PROPAGATING ((__force mntns_flags_t)(1 << 0)) - struct mnt_namespace { struct ns_c...
9fcebcb37c3e0a4b6eb40768cc5a5faebf166fbe
Analyze and fix the following issue in the Linux kernel code: mailbox: mtk-cmdq: Refine GCE_GCTL_VALUE setting
Problem Details: Add cmdq_gctl_value_toggle() to configure GCE_CTRL_BY_SW and GCE_DDR_EN together in the same GCE_GCTL_VALUE register. For the SoCs whose GCE is located in MMINFRA and uses MMINFRA_AO power, this allows it to be written without enabling the clocks. Otherwise, all GCE registers should be written after t...
```diff diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index d186865b8dce..ab4e8d1954a1 100644 --- a/drivers/mailbox/mtk-cmdq-mailbox.c +++ b/drivers/mailbox/mtk-cmdq-mailbox.c @@ -92,18 +92,6 @@ struct gce_plat { u32 gce_num; }; -static void cmdq_sw_ddr_enable(struct cmdq *cm...
f5cb07ec6aabd1bb56adbdeb5f0d70cb524db2cd
Analyze and fix the following issue in the Linux kernel code: mailbox: imx: Fix TXDB_V2 sending
Problem Details: i.MX95 features several processing domains, Cortex-M7, Cortex-A55 secure, Cortex-A55 non-secure. Each domain could communicate with SCMI firmware with a dedicated MU. But the current NXP SCMI firmware is not a RTOS, all processing logic codes are in interrupt context. So if high priority Cortex-M7 is c...
```diff diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 6ef8338add0d..6778afc64a04 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -226,7 +226,7 @@ static int imx_mu_generic_tx(struct imx_mu_priv *priv, { u32 *arg = data; u32 val; - int ret; + int ...
d635ba4207c31940398c41caa0cedd80f3b9c9c7
Analyze and fix the following issue in the Linux kernel code: mailbox: mchp-ipc-sbi: Fix COMPILE_TEST build error
Problem Details: If COMPILE_TEST is y but RISCV_SBI is n, build fails: drivers/mailbox/mailbox-mchp-ipc-sbi.c: In function 'mchp_ipc_sbi_chan_send': drivers/mailbox/mailbox-mchp-ipc-sbi.c:119:23: error: storage size of 'ret' isn't known struct sbiret ret; ^~~ CC drivers/nvmem/lpc18xx_otp.o drive...
```diff diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index ed52db272f4d..e8445cda7c61 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -191,8 +191,8 @@ config POLARFIRE_SOC_MAILBOX config MCHP_SBI_IPC_MBOX tristate "Microchip Inter-processor Communication (IPC) SBI driver" - ...
f0b50730bdd8f2734e548de541e845c0d40dceb6
Analyze and fix the following issue in the Linux kernel code: net/mlx5_core: Add error handling inmlx5_query_nic_vport_qkey_viol_cntr()
Problem Details: The function mlx5_query_nic_vport_qkey_viol_cntr() calls the function mlx5_query_nic_vport_context() but does not check its return value. This could lead to undefined behavior if the query fails. A proper implementation can be found in mlx5_nic_vport_query_local_lb(). Add error handling for mlx5_query...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c index d10d4c396040..a3c57bb8b521 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c @@ -519,19 +519,22 @@ int mlx5_query_nic_vport_qkey_v...
57ee9584fd8606deef66d7b65fa4dcf94f6843aa
Analyze and fix the following issue in the Linux kernel code: net: lan966x: Fix 1-step timestamping over ipv4 or ipv6
Problem Details: When enabling 1-step timestamping for ptp frames that are over udpv4 or udpv6 then the inserted timestamp is added at the wrong offset in the frame, meaning that will modify the frame at the wrong place, so the frame will be malformed. To fix this, the HW needs to know which kind of frame it is to know...
```diff diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c index 0af143ec0f86..427bdc0e4908 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c @@ -353,6 +353,11 @@ static v...
92a251c3df8ea1991cd9fe00f1ab0cfce18d7711
Analyze and fix the following issue in the Linux kernel code: RDMA/cma: Fix hang when cma_netevent_callback fails to queue_work
Problem Details: The cited commit fixed a crash when cma_netevent_callback was called for a cma_id while work on that id from a previous call had not yet started. The work item was re-initialized in the second call, which corrupted the work item currently in the work queue. However, it left a problem when queue_work f...
```diff diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index ce942d300f1e..9b471548e7ae 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -5231,7 +5231,8 @@ static int cma_netevent_callback(struct notifier_block *self, neigh->ha, ETH_ALEN)) continue...
45ca7e9f0730ae36fc610e675b990e9cc9ca0714
Analyze and fix the following issue in the Linux kernel code: vsock/virtio: fix `rx_bytes` accounting for stream sockets
Problem Details: In `struct virtio_vsock_sock`, we maintain two counters: - `rx_bytes`: used internally to track how many bytes have been read. This supports mechanisms like .stream_has_data() and sock_rcvlowat(). - `fwd_cnt`: used for the credit mechanism to inform available receive buffer space to the remote peer...
```diff diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h index 0387d64e2c66..36fb3edfa403 100644 --- a/include/linux/virtio_vsock.h +++ b/include/linux/virtio_vsock.h @@ -140,6 +140,7 @@ struct virtio_vsock_sock { u32 last_fwd_cnt; u32 rx_bytes; u32 buf_alloc; + u32 buf_used; struct sk_b...
ba5cb47b56e5d89f0a5eb5163ffbfda1e3e7cef0
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: Send Link events one by one
Problem Details: Send link events one after another otherwise new message is overwriting the message which is being processed by PF. Fixes: a88e0f936ba9 ("octeontx2: Detect the mbox up or down message via register") Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-by: Michal Swiatkowski <michal.swiatkow...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c index 655dd4726d36..0277d226293e 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c @@ -143,6 +143,8 @@ stati...
eb71feaacaaca227ae8f91c8578cf831553c5ab5
Analyze and fix the following issue in the Linux kernel code: rust: list: fix path of `assert_pinned!`
Problem Details: Commit dbd5058ba60c ("rust: make pin-init its own crate") moved all items from pin-init into the pin-init crate, including the `assert_pinned!` macro. Thus fix the path of the sole user of the `assert_pinned!` macro. This occurrence was missed in the commit above, since it is in a macro rule that has...
```diff diff --git a/rust/kernel/list/arc.rs b/rust/kernel/list/arc.rs index 13c50df37b89..a88a2dc65aa7 100644 --- a/rust/kernel/list/arc.rs +++ b/rust/kernel/list/arc.rs @@ -96,7 +96,7 @@ macro_rules! impl_list_arc_safe { } $($rest:tt)*) => { impl$(<$($generics)*>)? $crate::list::ListArcSafe<$num> for $t...
405b0d610745fb5e84fc2961d9b960abb9f3d107
Analyze and fix the following issue in the Linux kernel code: net: usb: aqc111: fix error handling of usbnet read calls
Problem Details: Syzkaller, courtesy of syzbot, identified an error (see report [1]) in aqc111 driver, caused by incomplete sanitation of usb read calls' results. This problem is quite similar to the one fixed in commit 920a9fa27e78 ("net: asix: add proper error handling of usb read errors"). For instance, usbnet_read...
```diff diff --git a/drivers/net/usb/aqc111.c b/drivers/net/usb/aqc111.c index ff5be2cbf17b..453a2cf82753 100644 --- a/drivers/net/usb/aqc111.c +++ b/drivers/net/usb/aqc111.c @@ -30,10 +30,13 @@ static int aqc111_read_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value, ret = usbnet_read_cmd_nopm(dev, cmd, USB_DIR_IN | US...
65271f868cb1dca709ff69e45939bbef8d6d0b70
Analyze and fix the following issue in the Linux kernel code: regulator: max14577: Add error check for max14577_read_reg()
Problem Details: The function max14577_reg_get_current_limit() calls the function max14577_read_reg(), but does not check its return value. A proper implementation can be found in max14577_get_online(). Add a error check for the max14577_read_reg() and return error code if the function fails. Fixes: b0902bbeb768 ("re...
```diff diff --git a/drivers/regulator/max14577-regulator.c b/drivers/regulator/max14577-regulator.c index 5e7171b9065a..41fd15adfd1f 100644 --- a/drivers/regulator/max14577-regulator.c +++ b/drivers/regulator/max14577-regulator.c @@ -40,11 +40,14 @@ static int max14577_reg_get_current_limit(struct regulator_dev *rdev)...
1f3d9724e16d62c7d42c67d6613b8512f2887c22
Analyze and fix the following issue in the Linux kernel code: exfat: fix double free in delayed_free
Problem Details: The double free could happen in the following path. exfat_create_upcase_table() exfat_create_upcase_table() : return error exfat_free_upcase_table() : free ->vol_utbl exfat_load_default_upcase_table : return error exfat_kill_sb() delayed_free() ...
```diff diff --git a/fs/exfat/nls.c b/fs/exfat/nls.c index d47896a89596..1729bf42eb51 100644 --- a/fs/exfat/nls.c +++ b/fs/exfat/nls.c @@ -801,4 +801,5 @@ load_default: void exfat_free_upcase_table(struct exfat_sb_info *sbi) { kvfree(sbi->vol_utbl); + sbi->vol_utbl = NULL; } ```
7d476f18abeba3241cd3a2b712b2666a23b6f6dd
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix the enabling/disabling of audio SDP splitting
Problem Details: Adjust the enabling/disabling steps of the DP audio SDP splitting according to a recent Bspec update. This moves the enabling to the audio codec enable sequence after the transcoder is enabled and disables SDP splitting explicitly during the audio disable sequence. Bspec requires waiting for a vblank ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c index 40d8bbd8107d..55af3a553c58 100644 --- a/drivers/gpu/drm/i915/display/intel_audio.c +++ b/drivers/gpu/drm/i915/display/intel_audio.c @@ -397,6 +397,19 @@ hsw_audio_config_update(struct intel_encoder *encode...
21d8a6857bc11f3fa14b19768d840cf6d1f3fccd
Analyze and fix the following issue in the Linux kernel code: rust: opp: Make the doctest example depend on CONFIG_OF
Problem Details: The doctest example uses a function only available for CONFIG_OF and so the build with doc tests fails when it isn't enabled. error[E0599]: no function or associated item named `from_of_cpumask` found for struct `rust_doctest_kernel_alloc_kbox_rs_4::kernel::opp::Table` in the current scope Fix ...
```diff diff --git a/rust/kernel/opp.rs b/rust/kernel/opp.rs index 212555dacd45..c2bdc11f3999 100644 --- a/rust/kernel/opp.rs +++ b/rust/kernel/opp.rs @@ -582,6 +582,7 @@ impl<T: ConfigOps + Default> Config<T> { /// use kernel::opp::Table; /// use kernel::types::ARef; /// +/// #[cfg(CONFIG_OF)] /// fn get_table(dev...
f4ba2ea57da51d616b689c4b8826c517ff5a8523
Analyze and fix the following issue in the Linux kernel code: firmware: cs_dsp: Fix OOB memory read access in KUnit test (ctl cache)
Problem Details: KASAN reported out of bounds access - cs_dsp_ctl_cache_init_multiple_offsets(). The code uses mock_coeff_template.length_bytes (4 bytes) for register value allocations. But later, this length is set to 8 bytes which causes test code failures. As fix, just remove the lenght override, keeping the origin...
```diff diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c b/drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c index 83386cc978e3..ebca3a4ab0f1 100644 --- a/drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c +++ b/drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c @@ -776,7 +776,6 ...
d979b783d61f7f1f95664031b71a33afc74627b2
Analyze and fix the following issue in the Linux kernel code: firmware: cs_dsp: Fix OOB memory read access in KUnit test (wmfw info)
Problem Details: KASAN reported out of bounds access - cs_dsp_mock_wmfw_add_info(), because the source string length was rounded up to the allocation size. Cc: Simon Trimmer <simont@opensource.cirrus.com> Cc: Charles Keepax <ckeepax@opensource.cirrus.com> Cc: Richard Fitzgerald <rf@opensource.cirrus.com> Cc: patches@o...
```diff diff --git a/drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c b/drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c index 934d40a4d709..5e1d5a810afe 100644 --- a/drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c +++ b/drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c @@ -133,10 +133,11 @@ void cs_dsp_mock_wmfw_add_info(...
f62bb41740462bf9fde4b110df5c7d3bc223fb3c
Analyze and fix the following issue in the Linux kernel code: arm64: dts: renesas: rzg3e-smarc-som: Reduce I2C2 clock frequency
Problem Details: Lower the I2C2 bus clock frequency on the RZ/G3E SMARC SoM from 1MHz to 400kHz to improve compatibility with a wider range of I2C peripherals. As the GreenPAK device is programmed to operate at 400kHz, the previous 1MHz setting was too aggressive, causing it to experience timing issues. Fixes: f7a98e2...
```diff diff --git a/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi index 43d79158d81a..ecea29a76b14 100644 --- a/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi @@ -85,7 +85,7 @@ &i2c2 { pinctrl-0 = <&i2c2_p...
3bfb22cecfe6b6f0d8ee56ef4b533cf68599c5d9
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: brcmnand: legacy exec_op implementation
Problem Details: Commit 3c8260ce7663 ("mtd: rawnand: brcmnand: exec_op implementation") removed legacy interface functions, breaking < v5.0 controllers support. In order to fix older controllers we need to add an alternative exec_op implementation which doesn't rely on low level registers. Fixes: 3c8260ce7663 ("mtd: r...
```diff diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index b43281b8204f..62bdda3be92f 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -65,6 +65,7 @@ module_param(wp_on, int, 0444); #define CMD_PARAMETER_READ 0x...
44ed1f5ff73e9e115b6f5411744d5a22ea1c855b
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk
Problem Details: The function sunxi_nfc_hw_ecc_write_chunk() calls the sunxi_nfc_hw_ecc_write_chunk(), but does not call the configuration function sunxi_nfc_randomizer_config(). Consequently, the randomization might not conduct correctly, which will affect the lifespan of NAND flash. A proper implementation can be fou...
```diff diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 9179719f639e..162cd5f4f234 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -1050,6 +1050,7 @@ static int sunxi_nfc_hw_ecc_write_chunk(struct nand_chip *nand, if (ret) return re...
384492c48e6a88c9a7f0376d8e8ac7f557988e92
Analyze and fix the following issue in the Linux kernel code: net: devmem: support single IOV with sendmsg
Problem Details: sendmsg() with a single iov becomes ITER_UBUF, sendmsg() with multiple iovs becomes ITER_IOVEC. iter_iov_len does not return correct value for UBUF, so teach to treat UBUF differently. Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Pavel Begunkov <asml.silence@gmail.com> Cc: Mina Almasry <almasrymina@googl...
```diff diff --git a/include/linux/uio.h b/include/linux/uio.h index 49ece9e1888f..393d0622cc28 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -99,7 +99,13 @@ static inline const struct iovec *iter_iov(const struct iov_iter *iter) } #define iter_iov_addr(iter) (iter_iov(iter)->iov_base + (iter)->iov_...
b0e0369bca338bb6a07466838cef6c6e5a1a55b9
Analyze and fix the following issue in the Linux kernel code: drm/i915/display: use GOSUB to program double buffered LUT registers
Problem Details: With addition of double buffered GAMMA registers in PTL, we can now program them in the active region. Use GOSUB instruction of DSB to program them. It is done in the following steps: 1. intel_color_prepare_commit() - If the platform supports, prepare a dsb instance (dsb_color) hooked to DSB0. ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c index bb2da3a53e9c..ac00b86798fb 100644 --- a/drivers/gpu/drm/i915/display/intel_color.c +++ b/drivers/gpu/drm/i915/display/intel_color.c @@ -1965,6 +1965,25 @@ void intel_color_modeset(const struct intel_crtc_s...
2c41d62f6fb16d591df17b29edaa81ea56569bb3
Analyze and fix the following issue in the Linux kernel code: drm/i915/dsb: Implement intel_dsb_gosub()
Problem Details: Add support for the new GOSUB DSB instruction (available on ptl+), which instructs the DSB to jump to a different buffer, execute the commands there, and then return execution to the next instruction in the original buffer. There are a few alignment related workarounds that need to be dealt with when ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c index 9b2de4e7e681..cd32b59adf18 100644 --- a/drivers/gpu/drm/i915/display/intel_dsb.c +++ b/drivers/gpu/drm/i915/display/intel_dsb.c @@ -93,6 +93,10 @@ struct intel_dsb { /* see DSB_REG_VALUE_MASK */ #define DSB_...
03bcbbb3995ba5df43af9aba45334e35f2dfe27b
Analyze and fix the following issue in the Linux kernel code: dummycon: Trigger redraw when switching consoles with deferred takeover
Problem Details: Signal vt subsystem to redraw console when switching to dummycon with deferred takeover enabled. Makes the console switch to fbcon and displays the available output. With deferred takeover enabled, dummycon acts as the placeholder until the first output to the console happens. At that point, fbcon tak...
```diff diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index 139049368fdc..7d02470f19b9 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -85,6 +85,15 @@ static bool dummycon_blank(struct vc_data *vc, enum vesa_blank_mode blank, /* Redraw, so tha...
a4871e6201c46c8e1d04308265b4b4c5753c8209
Analyze and fix the following issue in the Linux kernel code: drm/ofdrm: Use helpers for programming gamma ramps
Problem Details: Replace ofdrm's code for programming the hardware gamma LUT with DRM helpers. Either load a provided gamma ramp or program a default. Set the individual entries with a callback. Each gamma value is given as 3 individual 16-bit values for red, green and blue. The driver reduces them to 8 bit to make th...
```diff diff --git a/drivers/gpu/drm/sysfb/ofdrm.c b/drivers/gpu/drm/sysfb/ofdrm.c index fddfe8bea9f7..c9415f0cb3ed 100644 --- a/drivers/gpu/drm/sysfb/ofdrm.c +++ b/drivers/gpu/drm/sysfb/ofdrm.c @@ -8,6 +8,7 @@ #include <drm/clients/drm_client_setup.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_state_helpe...
1bdb883d6574408e81caac6a09f86955687680a2
Analyze and fix the following issue in the Linux kernel code: drm/mgag200: Use helpers for programming gamma ramps
Problem Details: Replace mgag200's code for programming the hardware gamma LUT with DRM helpers. Either load a provided gamma ramp or program a default. Set the individual entries with a callback. Each gamma value is given as 3 individual 16-bit values for red, green and blue. The driver reduces them to 8 bit to make ...
```diff diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h index 819a7e9381e3..f4bf40cd7c88 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.h +++ b/drivers/gpu/drm/mgag200/mgag200_drv.h @@ -382,10 +382,10 @@ int mgag200_primary_plane_helper_get_scanout_buffer(struct drm_plane *p...
067ae3a7056c6288940da52ad32b6d96bfeebf07
Analyze and fix the following issue in the Linux kernel code: drm/ast: Use helpers for programming gamma ramps and palettes
Problem Details: Replace ast's code for programming the hardware gamma/palette LUT with DRM helpers. Either load provided data or program a default. Set the individual entries with a callback. Each gamma/palette value is given as 3 individual 16-bit values for red, green and blue. The driver reduces them to 8 bit to m...
```diff diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 1de832964e92..7908087bcb5a 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -34,6 +34,7 @@ #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> +#include <drm/drm_color_mgmt.h> #i...
e64693248f9054dee1283d67dc010eab8d172f23
Analyze and fix the following issue in the Linux kernel code: drm: Add helpers for programming hardware gamma LUTs
Problem Details: Provide helpers that program hardware gamma LUTs. Tha gamma ramp is either provided by the driver or generated by the helper. The DRM driver exports the GAMMA_LUT property with a fixed number of entries per color component, such as 256 on 8-bit-wide components. The entries describe the gamma ramp of e...
```diff diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c index 3969dc548cff..dd3e06605180 100644 --- a/drivers/gpu/drm/drm_color_mgmt.c +++ b/drivers/gpu/drm/drm_color_mgmt.c @@ -630,3 +630,209 @@ int drm_color_lut_check(const struct drm_property_blob *lut, u32 tests) return 0; } EXP...
a88db916b8c77552f49f7d9f8744095ea01a268f
Analyze and fix the following issue in the Linux kernel code: apparmor: fix loop detection used in conflicting attachment resolution
Problem Details: Conflicting attachment resolution is based on the number of states traversed to reach an accepting state in the attachment DFA, accounting for DFA loops traversed during the matching process. However, the loop counting logic had multiple bugs: - The inc_wb_pos macro increments both position and lengt...
```diff diff --git a/security/apparmor/include/match.h b/security/apparmor/include/match.h index 21e049b40824..1fbe82f5021b 100644 --- a/security/apparmor/include/match.h +++ b/security/apparmor/include/match.h @@ -140,15 +140,12 @@ void aa_dfa_free_kref(struct kref *kref); /* This needs to be a power of 2 */ #define...
2297554f01df6d3d4e98a3915c183ce3e491740a
Analyze and fix the following issue in the Linux kernel code: x86/fpu: Fix irq_fpu_usable() to return false during CPU onlining
Problem Details: irq_fpu_usable() incorrectly returned true before the FPU is initialized. The x86 CPU onlining code can call sha256() to checksum AMD microcode images, before the FPU is initialized. Since sha256() recently gained a kernel-mode FPU optimized code path, a crash occurred in kernel_fpu_begin_mask() duri...
```diff diff --git a/arch/x86/include/asm/fpu/api.h b/arch/x86/include/asm/fpu/api.h index f42de5f05e7e..3ebeee2644de 100644 --- a/arch/x86/include/asm/fpu/api.h +++ b/arch/x86/include/asm/fpu/api.h @@ -126,6 +126,7 @@ static inline void fpstate_init_soft(struct swregs_state *soft) {} #endif /* State tracking */ +D...