id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f42b3c053b1554d66af6fe45bb1ef357464c0456
Analyze and fix the following issue in the Linux kernel code: PCI: xilinx: Fix INTx IRQ domain leak in error paths
Problem Details: In xilinx_pcie_init_irq_domain(), if xilinx_allocate_msi_domains() fails after pcie->leg_domain has been successfully created via irq_domain_create_linear(), the function returns directly without cleaning up the allocated IRQ domain, resulting in a resource leak. In xilinx_free_msi_domains(), pcie->leg...
```diff diff --git a/drivers/pci/controller/pcie-xilinx.c b/drivers/pci/controller/pcie-xilinx.c index 937ea6ae1ac4..4aa139abac16 100644 --- a/drivers/pci/controller/pcie-xilinx.c +++ b/drivers/pci/controller/pcie-xilinx.c @@ -302,9 +302,10 @@ static int xilinx_allocate_msi_domains(struct xilinx_pcie *pcie) return 0;...
393e132efcc5e3fc4ef2bd9bbed2a096096c9359
Analyze and fix the following issue in the Linux kernel code: dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings for qcs8300
Problem Details: The gcc_aux_clk is not required by the PCIe PHY on qcs8300 and is not specified in the device tree node. Hence, move the qcs8300 phy compatibility entry into the list of PHYs that require six clocks. Removed the phy_aux clock from the PCIe PHY binding as it is no longer used by any instance. Fixes: e...
```diff diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml index 48bd11410e8c..f5068df20cfe 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml +++ b/Documentation/devicetree/bindings/p...
49ccab4bedd4779899246107dc19fb01c5b6fea3
Analyze and fix the following issue in the Linux kernel code: phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
Problem Details: Currently, the PHY only registers the typec orientation switch when it is built in. If the typec driver is built as a module, the switch registration is skipped due to the preprocessor condition, causing orientation detection to fail. With commit 45fe729be9a6 ("usb: typec: Stub out typec_switch APIs w...
```diff diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c index ad8a55012e42..99d2bdd4bfc8 100644 --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c @@ -126,8 +126,6 @@ struct imx8mq_usb_phy { static void tca_blk_orientat...
00c22b1e84288bf0e17ab1e7e59d75237cf0d0dc
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmt: Fix kobject memory leak on init failure
Problem Details: When kobject_init_and_add() fails in pmt_features_discovery(), the function returns without calling kobject_put(). This violates the kobject API contract where kobject_put() must be called even on initialization failure to properly release allocated resources. Fixes: d9a078809356 ("platform/x86/intel/...
```diff diff --git a/drivers/platform/x86/intel/pmt/discovery.c b/drivers/platform/x86/intel/pmt/discovery.c index 32713a194a55..9c5b4d0e1fae 100644 --- a/drivers/platform/x86/intel/pmt/discovery.c +++ b/drivers/platform/x86/intel/pmt/discovery.c @@ -503,8 +503,10 @@ static int pmt_features_discovery(struct pmt_feature...
b94f11af9d9201426f4d6c8a753493fd58d6ac16
Analyze and fix the following issue in the Linux kernel code: net: wangxun: move PHYLINK dependency
Problem Details: The LIBWX library code is what calls into phylink, so any user of it has to select CONFIG_PHYLINK at the moment, with NGBEVF missing this: x86_64-linux-ld: drivers/net/ethernet/wangxun/libwx/wx_ethtool.o: in function `wx_nway_reset': wx_ethtool.c:(.text+0x613): undefined reference to `phylink_ethtool_...
```diff diff --git a/drivers/net/ethernet/wangxun/Kconfig b/drivers/net/ethernet/wangxun/Kconfig index d138dea7d208..ec278f99d295 100644 --- a/drivers/net/ethernet/wangxun/Kconfig +++ b/drivers/net/ethernet/wangxun/Kconfig @@ -21,6 +21,7 @@ config LIBWX depends on PTP_1588_CLOCK_OPTIONAL select PAGE_POOL select D...
472c5dd6b95c02b3e5d7395acf542150e91165e7
Analyze and fix the following issue in the Linux kernel code: selftests: net: fix "buffer overflow detected" for tap.c
Problem Details: When the selftest 'tap.c' is compiled with '-D_FORTIFY_SOURCE=3', the strcpy() in rtattr_add_strsz() is replaced with a checked version which causes the test to consistently fail when compiled with toolchains for which this option is enabled by default. TAP version 13 1..3 # Starting 3 tests from 1...
```diff diff --git a/tools/testing/selftests/net/tap.c b/tools/testing/selftests/net/tap.c index 9ec1c9b50e77..a0c9418132c8 100644 --- a/tools/testing/selftests/net/tap.c +++ b/tools/testing/selftests/net/tap.c @@ -56,18 +56,12 @@ static void rtattr_end(struct nlmsghdr *nh, struct rtattr *attr) static struct rtattr *r...
c23918bedc74a7809e6fa2fd1d09b860625a90b8
Analyze and fix the following issue in the Linux kernel code: dma: dma-axi-dmac: simplify axi_dmac_parse_dt()
Problem Details: Simplify axi_dmac_parse_dt() by using the cleanup device_node class for automatically releasing the of_node reference when going out of scope. Signed-off-by: Nuno Sá <nuno.sa@analog.com> base-commit: 398035178503bf662281bbffb4bebce1460a4bc5 change-id: 20251104-axi-dmac-fixes-and-improvs-e3ad512a329c A...
```diff diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 15c569449a28..045e9b9a90df 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -8,6 +8,7 @@ #include <linux/adi-axi-common.h> #include <linux/bitfield.h> +#include <linux/cleanup.h> #include <linux/clk.h> #i...
b2440442ccb68479fa6d307917419983f3c87e83
Analyze and fix the following issue in the Linux kernel code: dma: dma-axi-dmac: support bigger than 32bits addresses
Problem Details: In some supported platforms as ARCH_ZYNQMP, part of the memory is mapped above 32bit addresses and since the DMA mask, by default, is set to 32bits, we would need to rely on swiotlb (which incurs a performance penalty) for the DMA mappings. Thus, we can write either the SRC or DEST high addresses with ...
```diff diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 0f25f6d8ae71..15c569449a28 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -69,7 +69,9 @@ #define AXI_DMAC_REG_START_TRANSFER 0x408 #define AXI_DMAC_REG_FLAGS 0x40c #define AXI_DMAC_REG_DEST_ADDRESS 0x410 ...
bbcbafb99df41a1d81403eb4f5bb443b38228b57
Analyze and fix the following issue in the Linux kernel code: dma: dma-axi-dmac: fix HW scatter-gather not looking at the queue
Problem Details: For HW scatter gather transfers we still need to look for the queue. The HW is capable of queueing 3 concurrent transfers and if we try more than that we'll get the submit queue full and should return. Otherwise, if we go ahead and program the new transfer, we end up discarding it. Fixes: e97dc7435972...
```diff diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index e22639822045..0f25f6d8ae71 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -233,11 +233,9 @@ static void axi_dmac_start_transfer(struct axi_dmac_chan *chan) unsigned int flags = 0; unsigned int val; - if...
9bd257181fd5c996d922e9991500ad27987cfbf4
Analyze and fix the following issue in the Linux kernel code: dma: dma-axi-dmac: fix SW cyclic transfers
Problem Details: If 'hw_cyclic' is false we should still be able to do cyclic transfers in "software". That was not working for the case where 'desc->num_sgs' is 1 because 'chan->next_desc' is never set with the current desc which means that the cyclic transfer only runs once and in the next SOT interrupt we do nothing...
```diff diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 5b06b0dc67ee..e22639822045 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -247,6 +247,7 @@ static void axi_dmac_start_transfer(struct axi_dmac_chan *chan) return; list_move_tail(&vdesc->node, &chan->ac...
12cab1191d9890097171156d06bfa8d31f1e39c8
Analyze and fix the following issue in the Linux kernel code: net: usb: rtl8150: fix memory leak on usb_submit_urb() failure
Problem Details: In async_set_registers(), when usb_submit_urb() fails, the allocated async_req structure and URB are not freed, causing a memory leak. The completion callback async_set_reg_cb() is responsible for freeing these allocations, but it is only called after the URB is successfully submitted and comp...
```diff diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index 278e6cb6f4d9..e40b0669d9f4 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c @@ -211,6 +211,8 @@ static int async_set_registers(rtl8150_t *dev, u16 indx, u16 size, u16 reg) if (res == -ENODEV) netif_device_detac...
f0e5126f5e55d4939784ff61b0b7e9f9636d787d
Analyze and fix the following issue in the Linux kernel code: selftests: drv-net: psp: fix test names in ipver_test_builder()
Problem Details: test_case will only take on the formatted name after being called. This does not work with the way ksft_run() currently works. Assign the name after the test_case is created. Fixes: 81236c74dba6 ("selftests: drv-net: psp: add test for auto-adjusting TCP MSS") Signed-off-by: Daniel Zahka <daniel.zahka@...
```diff diff --git a/tools/testing/selftests/drivers/net/psp.py b/tools/testing/selftests/drivers/net/psp.py index 56dee824bb4c..52523bdad240 100755 --- a/tools/testing/selftests/drivers/net/psp.py +++ b/tools/testing/selftests/drivers/net/psp.py @@ -583,8 +583,9 @@ def ipver_test_builder(name, test_func, ipver): ...
d52668cac3f98f86aa1fb238dec1320c80fbefea
Analyze and fix the following issue in the Linux kernel code: selftests: drv-net: psp: fix templated test names in psp_ip_ver_test_builder()
Problem Details: test_case will only take on its formatted name after it is called by the test runner. Move the assignment to test_case.__name__ to when the test_case is constructed, not called. Fixes: 8f90dc6e417a ("selftests: drv-net: psp: add basic data transfer and key rotation tests") Signed-off-by: Daniel Zahka ...
```diff diff --git a/tools/testing/selftests/drivers/net/psp.py b/tools/testing/selftests/drivers/net/psp.py index 06559ef49b9a..56dee824bb4c 100755 --- a/tools/testing/selftests/drivers/net/psp.py +++ b/tools/testing/selftests/drivers/net/psp.py @@ -573,8 +573,9 @@ def psp_ip_ver_test_builder(name, test_func, psp_ver,...
58ab9d7b6651d21e1cff1777529f2d3dd0b4e851
Analyze and fix the following issue in the Linux kernel code: dmaengine: mediatek: uart-apdma: Fix above 4G addressing TX/RX
Problem Details: The VFF_4G_SUPPORT register is named differently in datasheets, and its name is "VFF_ADDR2"; was this named correctly from the beginning it would've been clearer that there was a mistake in the programming sequence. This register is supposed to hold the high bits to support the DMA addressing above 4G...
```diff diff --git a/drivers/dma/mediatek/mtk-uart-apdma.c b/drivers/dma/mediatek/mtk-uart-apdma.c index bbacaa89eb92..820422cd6942 100644 --- a/drivers/dma/mediatek/mtk-uart-apdma.c +++ b/drivers/dma/mediatek/mtk-uart-apdma.c @@ -41,7 +41,7 @@ #define VFF_STOP_CLR_B 0 #define VFF_EN_CLR_B 0 #define VFF_INT_EN_CLR...
1f4c9d8a1021281750c6cda126d6f8a40cc24e71
Analyze and fix the following issue in the Linux kernel code: most: core: fix resource leak in most_register_interface error paths
Problem Details: The function most_register_interface() did not correctly release resources if it failed early (before registering the device). In these cases, it returned an error code immediately, leaking the memory allocated for the interface. Fix this by initializing the device early via device_initialize() and ca...
```diff diff --git a/drivers/most/core.c b/drivers/most/core.c index da319d108ea1..6277e6702ca8 100644 --- a/drivers/most/core.c +++ b/drivers/most/core.c @@ -1286,15 +1286,19 @@ int most_register_interface(struct most_interface *iface) !iface->poison_channel || (iface->num_channels > MAX_CHANNELS)) return -EI...
d67396c9d697041b385d70ff2fd59cb07ae167e8
Analyze and fix the following issue in the Linux kernel code: spi: cadence-quadspi: Prevent lost complete() call during indirect read
Problem Details: A race condition exists between the read loop and IRQ `complete()` call. An interrupt could call the complete() between the inner loop and reinit_completion(), potentially losing the completion event and causing an unnecessary timeout. Moving reinit_completion() before the loop prevents this. A prematu...
```diff diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index f8823e83a622..837dd646481f 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -769,6 +769,7 @@ static int cqspi_indirect_read_execute(struct cqspi_flash_pdata *f_pdata, readl(reg_bas...
aaf3bc0265744adbc2d364964ef409cf118d193d
Analyze and fix the following issue in the Linux kernel code: dmaengine: stm32-mdma: initialize m2m_hw_period and ccr to fix warnings
Problem Details: m2m_hw_period is initialized only when chan_config->m2m_hw is true. This triggers a warning: ‘m2m_hw_period’ may be used uninitialized [-Wmaybe-uninitialized] Although m2m_hw_period is only used when chan_config->m2m_hw is true and ignored otherwise, initialize it unconditionally to 0. ccr is initiali...
```diff diff --git a/drivers/dma/stm32/stm32-mdma.c b/drivers/dma/stm32/stm32-mdma.c index 080c1c725216..b87d41b234df 100644 --- a/drivers/dma/stm32/stm32-mdma.c +++ b/drivers/dma/stm32/stm32-mdma.c @@ -731,7 +731,7 @@ static int stm32_mdma_setup_xfer(struct stm32_mdma_chan *chan, struct stm32_mdma_chan_config *chan_...
267ee93c417e685d9f8e079e41c70ba6ee4df5a5
Analyze and fix the following issue in the Linux kernel code: serial: xilinx_uartps: fix rs485 delay_rts_after_send
Problem Details: RTS line control with delay should be triggered when there is no more bytes in kfifo and hardware buffer is empty. Without this patch RTS control is scheduled right after feeding hardware buffer and this is too early. RTS line may change state before hardware buffer is empty. With this patch delayed ...
```diff diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index c793fc74c26b..c593d20a1b5b 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -428,10 +428,17 @@ static void cdns_uart_handle_tx(void *dev_id) struct tty_port *tport = &port->sta...
c3ca8a0aac832fe8047608bb2ae2cca314c6d717
Analyze and fix the following issue in the Linux kernel code: serial: sh-sci: Check that the DMA cookie is valid
Problem Details: The driver updates struct sci_port::tx_cookie to zero right before the TX work is scheduled, or to -EINVAL when DMA is disabled. dma_async_is_complete(), called through dma_cookie_status() (and possibly through dmaengine_tx_status()), considers cookies valid only if they have values greater than or equ...
```diff diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 53edbf1d8963..fbfe5575bd3c 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1914,7 +1914,7 @@ static void sci_dma_check_tx_occurred(struct sci_port *s) struct dma_tx_state state; enum dma_status status...
0f698d742f628d02ab2a222f8cf5f793443865d0
Analyze and fix the following issue in the Linux kernel code: spi: bcm63xx-hsspi: add support for 1-2-2 read ops
Problem Details: Add support for 1-2-2 read ops by separately calculating the switch from single-bit to multi-bit, and then switching within the prepend data. This allows us to support single-bit write followed by multi-bit write followed by multi-bit read, and we do not need to reject 1-2-2 read operations anymore. ...
```diff diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 18261cbd413b..d9e972ef2abd 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -142,6 +142,7 @@ struct bcm63xx_hsspi { u32 wait_mode; u32 xfer_mode; u32 prepend_cnt; + u32 md_start; u8 ...
f54151148b969fb4b62bec8093d255306d20df30
Analyze and fix the following issue in the Linux kernel code: serial: core: Fix serial device initialization
Problem Details: During restoring sysfs fwnode information the information of_node_reused was dropped. This was previously set by device_set_of_node_from_dev(). Add it back manually Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information") Cc: stable <stable@kernel.org> Suggested-by: Cosmin Tanislav <demo...
```diff diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c index 8e891984cdc0..1e1ad28d83fc 100644 --- a/drivers/tty/serial/serial_base_bus.c +++ b/drivers/tty/serial/serial_base_bus.c @@ -74,6 +74,7 @@ static int serial_base_device_init(struct uart_port *port, dev->parent = pare...
5c9142a8063f71233b25d94ae0d73e7dcf9d2a1d
Analyze and fix the following issue in the Linux kernel code: dmaengine: xilinx_dma: Add support for residue on direct AXIDMA S2MM
Problem Details: AXIDMA IP supports reporting the amount of bytes transferred on the S2MM channel in direct mode (i.e. non-SG), but the driver does not. Thus the driver always reports that all of the buffer was filled. Add xilinx_dma_get_residue_axidma_direct_s2mm() which gets the residue amount for direct AXIDMA for ...
```diff diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index fabff602065f..64b3fba4e44f 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -1021,6 +1021,24 @@ static u32 xilinx_dma_get_residue(struct xilinx_dma_chan *chan, return residue; } +static...
e340663bbf2a75dae5d4fddf90b49281f5c9df3f
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: properly initialize speaker_id for TAS2563
Problem Details: After speaker id retrieval was refactored to happen in tas2781_read_acpi, devices that do not use a speaker id need a negative speaker_id value instead of NULL, but no initialization was added to the TAS2563 code path. This causes the driver to attempt to load a non-existent firmware file name with a s...
```diff diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c index c8619995b1d7..f7a7f216d586 100644 --- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c +++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c @@ -111,8 +111,10 @@ static int tas2781_read_acpi(struct ...
830988b6cf197e6dcffdfe2008c5738e6c6c3c0f
Analyze and fix the following issue in the Linux kernel code: ALSA: ac97: fix a double free in snd_ac97_controller_register()
Problem Details: If ac97_add_adapter() fails, put_device() is the correct way to drop the device reference. kfree() is not required. Add kfree() if idr_alloc() fails and in ac97_adapter_release() to do the cleanup. Found by code review. Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus") Cc: stable@vger.kernel.org Si...
```diff diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index f4254703d29f..bb9b795e0226 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -298,6 +298,7 @@ static void ac97_adapter_release(struct device *dev) idr_remove(&ac97_adapter_idr, ac97_ctrl->nr); dev_dbg(&ac97_ctrl->adap, "adapter unregistered by %s\...
df60c332caf95d70f967aeace826e7e2f0847361
Analyze and fix the following issue in the Linux kernel code: amd-xgbe: reset retries and mode on RX adapt failures
Problem Details: During the stress tests, early RX adaptation handshakes can fail, such as missing the RX_ADAPT ACK or not receiving a coefficient update before block lock is established. Continuing to retry RX adaptation in this state is often ineffective if the current mode selection is not viable. Resetting the RX ...
```diff diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c index a68757e8fd22..c63ddb12237e 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c @@ -1928,6 +1928,7 @@ static void xgbe_set_rx_adap_mode(struct xgbe_p...
a9f96dc59b4a50ffbf86158f315e115969172d48
Analyze and fix the following issue in the Linux kernel code: net: dsa: fix missing put_device() in dsa_tree_find_first_conduit()
Problem Details: of_find_net_device_by_node() searches net devices by their /sys/class/net/, entry. It is documented in its kernel-doc that: * If successful, returns a pointer to the net_device with the embedded * struct device refcount incremented by one, or NULL on failure. The * refcount must be dropped when don...
```diff diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 50b3fceb5c04..99ede37698ac 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -367,16 +367,10 @@ static struct dsa_port *dsa_tree_find_first_cpu(struct dsa_switch_tree *dst) struct net_device *dsa_tree_find_first_conduit(struct dsa_switch_tree *dst) { - struct...
06e219f6a706c367c93051f408ac61417643d2f9
Analyze and fix the following issue in the Linux kernel code: net: dsa: properly keep track of conduit reference
Problem Details: Problem description ------------------- DSA has a mumbo-jumbo of reference handling of the conduit net device and its kobject which, sadly, is just wrong and doesn't make sense. There are two distinct problems. 1. The OF path, which uses of_find_net_device_by_node(), never releases the elevated r...
```diff diff --git a/include/net/dsa.h b/include/net/dsa.h index cced1a866757..6b2b5ed64ea4 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -302,6 +302,7 @@ struct dsa_port { struct devlink_port devlink_port; struct phylink *pl; struct phylink_config pl_config; + netdevice_tracker conduit_tracker; st...
dd0a2d47cfc4c5ffb3e866c94a80c03ff5ecdd70
Analyze and fix the following issue in the Linux kernel code: platform/x86: intel/pmt: Replace sprintf() with sysfs_emit()
Problem Details: Replace sprintf() calls with sysfs_emit() in guid_show(), size_show(), and offset_show() sysfs attribute handlers. The sysfs_emit() function provides automatic buffer bounds checking and is the preferred method for formatting sysfs output per Documentation/filesystems/sysfs.rst. This improves safety b...
```diff diff --git a/drivers/platform/x86/intel/pmt/class.c b/drivers/platform/x86/intel/pmt/class.c index 7c3023d5d91d..be3c8d9e4fff 100644 --- a/drivers/platform/x86/intel/pmt/class.c +++ b/drivers/platform/x86/intel/pmt/class.c @@ -140,7 +140,7 @@ guid_show(struct device *dev, struct device_attribute *attr, char *bu...
754c23238438600e9236719f7e67aff2c4d02093
Analyze and fix the following issue in the Linux kernel code: drm/pagemap, drm/xe: Ensure that the devmem allocation is idle before use
Problem Details: In situations where no system memory is migrated to devmem, and in upcoming patches where another GPU is performing the migration to the newly allocated devmem buffer, there is nothing to ensure any ongoing clear to the devmem allocation or async eviction from the devmem allocation is complete. Addres...
```diff diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c index 37d7cfbbb3e8..06c1bd8fc4d1 100644 --- a/drivers/gpu/drm/drm_pagemap.c +++ b/drivers/gpu/drm/drm_pagemap.c @@ -3,6 +3,7 @@ * Copyright © 2024-2025 Intel Corporation */ +#include <linux/dma-fence.h> #include <linux/dma-mapping...
d2d7f5636f0d752a1e0e7eadbbc1839c29177bba
Analyze and fix the following issue in the Linux kernel code: drm/xe/svm: Fix a debug printout
Problem Details: Avoid spamming the log with drm_info(). Use drm_dbg() instead. Fixes: cc795e041034 ("drm/xe/svm: Make xe_svm_range_needs_migrate_to_vram() public") Cc: Matthew Brost <matthew.brost@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: <stable@vger.kernel.org> # v6.17+ Signed-off-b...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 55c5a0eb82e1..894e8f092e3f 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -941,7 +941,7 @@ bool xe_svm_range_needs_migrate_to_vram(struct xe_svm_range *range, struct xe_vm xe_assert(vm->xe, IS_DGFX(vm->...
0620837490e0401cb4e9965a1e0c462dbff1c97b
Analyze and fix the following issue in the Linux kernel code: drm/xe/svm: Serialize migration to device if racing
Problem Details: Introduce an rw-semaphore to serialize migration to device if it's likely that migration races with another device migration of the same CPU address space range. This is a temporary fix to attempt to mitigate a livelock that might happen if many devices try to migrate a range at the same time, and it a...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 84ff99aa3e49..fa2ee2c08f31 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -1593,10 +1593,12 @@ struct drm_pagemap *xe_vma_resolve_pagemap(struct xe_vma *vma, struct xe_tile *t int xe_svm_alloc_vram(struc...
75af93b3f5d0ab760356365064521d9aa7b7fc49
Analyze and fix the following issue in the Linux kernel code: drm/pagemap, drm/xe: Support destination migration over interconnect
Problem Details: Support destination migration over interconnect when migrating from device-private pages with the same dev_pagemap owner. Since we now also collect device-private pages to migrate, also abort migration if the range to migrate is already fully populated with pages from the desired pagemap. Finally ret...
```diff diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c index d44372a80a90..09356d50b8d1 100644 --- a/drivers/gpu/drm/drm_pagemap.c +++ b/drivers/gpu/drm/drm_pagemap.c @@ -207,10 +207,12 @@ static void drm_pagemap_get_devmem_page(struct page *page, /** * drm_pagemap_migrate_map_pages() - M...
1f430b8d68e6d2cdf8825421d5c1e1caa746b483
Analyze and fix the following issue in the Linux kernel code: drm/xe/svm: Document how xe keeps drm_pagemap references
Problem Details: As an aid to understanding the lifetime of the drm_pagemaps used by the xe driver, document how the xe driver keeps the drm_pagemap references. v3: - Fix formatting (Matt Brost) Suggested-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Re...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 43af813276b8..68f30338abee 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -28,6 +28,27 @@ #define XE_PEER_PAGEMAP ((void *)0ul) #define XE_PEER_VM ((void *)1ul) +/** + * DOC: drm_pagemap reference-cou...
54dc5842a81cacc6833c1f897ca332d2f931df01
Analyze and fix the following issue in the Linux kernel code: drm/xe/vm: Add a couple of VM debug printouts
Problem Details: Add debug printouts that are valueable for pagemap prefetch, migration and page collection. v2: - Add additional debug prinouts around migration and page collection. - Require CONFIG_DRM_XE_DEBUG_VM. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Brost <matthe...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index c4997ab4e029..43af813276b8 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -1271,6 +1271,10 @@ get_pages: if (err) { range_debug(range, "PAGE FAULT - FAIL PAGE COLLECT"); goto out; + } else if (IS_...
238dbc9d9f4a7396e87d357567e09dcd270d9e16
Analyze and fix the following issue in the Linux kernel code: drm/xe: Use the vma attibute drm_pagemap to select where to migrate
Problem Details: Honor the drm_pagemap vma attribute when migrating SVM pages. Ensure that when the desired placement is validated as device memory, that we also check that the requested drm_pagemap is consistent with the current. v2: - Initialize a struct drm_pagemap pointer to NULL that could otherwise be derefere...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 68b214d5e273..df26203b25e2 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -887,13 +887,34 @@ void xe_svm_fini(struct xe_vm *vm) drm_gpusvm_fini(&vm->svm.gpusvm); } +static bool xe_svm_range_has_pagem...
14b60874c90a61ffb9c32787bc5f3fcde93b9cd4
Analyze and fix the following issue in the Linux kernel code: drm/xe: Use the drm_pagemap_util helper to get a svm pagemap owner
Problem Details: Register a driver-wide owner list, provide a callback to identify fast interconnects and use the drm_pagemap_util helper to allocate or reuse a suitable owner struct. For now we consider pagemaps on different tiles on the same device as having fast interconnect and thus the same owner. v2: - Fix up th...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 849ba115e6da..92c04d0e93f1 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -22,8 +22,17 @@ #include "xe_vm_types.h" #include "xe_vram_types.h" +/* Identifies subclasses of struct drm_pagemap_peer */ +#...
16b5ad31952476fb925c401897fc171cd37f536b
Analyze and fix the following issue in the Linux kernel code: drm/pagemap, drm/xe: Ensure that the devmem allocation is idle before use
Problem Details: In situations where no system memory is migrated to devmem, and in upcoming patches where another GPU is performing the migration to the newly allocated devmem buffer, there is nothing to ensure any ongoing clear to the devmem allocation or async eviction from the devmem allocation is complete. Addres...
```diff diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c index 4cf8f54e5a27..ac3832f85190 100644 --- a/drivers/gpu/drm/drm_pagemap.c +++ b/drivers/gpu/drm/drm_pagemap.c @@ -3,6 +3,7 @@ * Copyright © 2024-2025 Intel Corporation */ +#include <linux/dma-fence.h> #include <linux/dma-mapping...
5e7365b5a1ac8f517a7a84442289d7de242deb76
Analyze and fix the following issue in the Linux kernel code: net: airoha: Move net_devs registration in a dedicated routine
Problem Details: Since airoha_probe() is not executed under rtnl lock, there is small race where a given device is configured by user-space while the remaining ones are not completely loaded from the dts yet. This condition will allow a hw device misconfiguration since there are some conditions (e.g. GDM2 check in airo...
```diff diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c index 75893c90a0a1..315d97036ac1 100644 --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c @@ -2924,19 +2924,26 @@ static int airoha_alloc_gdm_port(struct airoha_eth *eth, ...
35ddf66c65eff93fff91406756ba273600bf61a3
Analyze and fix the following issue in the Linux kernel code: erspan: Initialize options_len before referencing options.
Problem Details: The struct ip_tunnel_info has a flexible array member named options that is protected by a counted_by(options_len) attribute. The compiler will use this information to enforce runtime bounds checking deployed by FORTIFY_SOURCE string helpers. As laid out in the GCC documentation, the counter must be ...
```diff diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 761a53c6a89a..8178c44a3cdd 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -330,6 +330,10 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi, if (!tun_dst) return PACKET_REJECT; + /* MUST set options_len before r...
86730ac255b0497a272704de9a1df559f5d6602e
Analyze and fix the following issue in the Linux kernel code: mptcp: ensure context reset on disconnect()
Problem Details: After the blamed commit below, if the MPC subflow is already in TCP_CLOSE status or has fallback to TCP at mptcp_disconnect() time, mptcp_do_fastclose() skips setting the `send_fastclose flag` and the later __mptcp_close_ssk() does not reset anymore the related subflow context. Any later connection wi...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 9b1fafd87cb9..f505b780f713 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2467,10 +2467,10 @@ bool __mptcp_retransmit_pending_data(struct sock *sk) */ static void __mptcp_subflow_disconnect(struct sock *ssk, struct m...
71154bbe49423128c1c8577b6576de1ed6836830
Analyze and fix the following issue in the Linux kernel code: mptcp: fallback earlier on simult connection
Problem Details: Syzkaller reports a simult-connect race leading to inconsistent fallback status: WARNING: CPU: 3 PID: 33 at net/mptcp/subflow.c:1515 subflow_data_ready+0x40b/0x7c0 net/mptcp/subflow.c:1515 Modules linked in: CPU: 3 UID: 0 PID: 33 Comm: ksoftirqd/3 Not tainted syzkaller #0 PREEMPT(full) Hardwar...
```diff diff --git a/net/mptcp/options.c b/net/mptcp/options.c index f24ae7d40e88..43df4293f58b 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -408,6 +408,16 @@ bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb, */ subflow->snd_isn = TCP_SKB_CB(skb)->end_seq; if (subflow->request_m...
72aee5f70ba47b939345a0d3414b51b0639c5b88
Analyze and fix the following issue in the Linux kernel code: drm/xe/svm: Fix a debug printout
Problem Details: Avoid spamming the log with drm_info(). Use drm_dbg() instead. Fixes: cc795e041034 ("drm/xe/svm: Make xe_svm_range_needs_migrate_to_vram() public") Cc: Matthew Brost <matthew.brost@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: <stable@vger.kernel.org> # v6.17+ Signed-off-b...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 93550c7c84ac..bab8e6cbe53d 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -937,7 +937,7 @@ bool xe_svm_range_needs_migrate_to_vram(struct xe_svm_range *range, struct xe_vm xe_assert(vm->xe, IS_DGFX(vm->...
932ac51d9953eaf77a1252f79b656d4ca86163c6
Analyze and fix the following issue in the Linux kernel code: team: fix check for port enabled in team_queue_override_port_prio_changed()
Problem Details: There has been a syzkaller bug reported recently with the following trace: list_del corruption, ffff888058bea080->prev is LIST_POISON2 (dead000000000122) ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:59! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 3 UID: 0 PID: 21246 Com...
```diff diff --git a/drivers/net/team/team_core.c b/drivers/net/team/team_core.c index 4d5c9ae8f221..c08a5c1bd6e4 100644 --- a/drivers/net/team/team_core.c +++ b/drivers/net/team/team_core.c @@ -878,7 +878,7 @@ static void __team_queue_override_enabled_check(struct team *team) static void team_queue_override_port_prio...
7105e968d1f6f6753f8fc3c47b8a705b6dad36d4
Analyze and fix the following issue in the Linux kernel code: dmaengine: sun6i: Add debug messages for cyclic DMA prepare
Problem Details: The driver already has debug messages for memcpy and linear transfers, but is missing them for cyclic transfers. Cyclic transfers are one of the main uses of the DMA controller, used for audio data transfers. And since these are likely the first DMA peripherals to be enabled, it helps to have these de...
```diff diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index f9d876deb1f0..c33f151953eb 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -840,6 +840,11 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_cyclic( v_lli->cfg = lli_cfg; sdev->cfg->set_drq(&v_lli->cfg, ...
7178c3586ab42693b28bb81014320a7783e5c435
Analyze and fix the following issue in the Linux kernel code: dmaengine: sun6i: Choose appropriate burst length under maxburst
Problem Details: maxburst, as provided by the client, specifies the largest amount of data that is allowed to be transferred in one burst. This limit is normally provided to avoid a data burst overflowing the target FIFO. It does not mean that the DMA engine can only do bursts in that size. Let the driver pick the lar...
```diff diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 2215ff877bf7..f9d876deb1f0 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -583,6 +583,22 @@ static irqreturn_t sun6i_dma_interrupt(int irq, void *dev_id) return ret; } +static u32 find_burst_size(const u32 burst_len...
ac1c5bc7c4c7e20e2070e6eaa673fc3e11619dbb
Analyze and fix the following issue in the Linux kernel code: bpf: crypto: replace -EEXIST with -EBUSY
Problem Details: The -EEXIST error code is reserved by the module loading infrastructure to indicate that a module is already loaded. When a module's init function returns -EEXIST, userspace tools like kmod interpret this as "module already loaded" and treat the operation as successful, returning 0 to the user even tho...
```diff diff --git a/kernel/bpf/crypto.c b/kernel/bpf/crypto.c index 83c4d9943084..1ab79a6dec84 100644 --- a/kernel/bpf/crypto.c +++ b/kernel/bpf/crypto.c @@ -60,7 +60,7 @@ struct bpf_crypto_ctx { int bpf_crypto_register_type(const struct bpf_crypto_type *type) { struct bpf_crypto_type_list *node; - int err = -EEXI...
83dd46ecb68ecc03cff23e68490ded5d40d79f66
Analyze and fix the following issue in the Linux kernel code: selftests: bpf: fix tests with raw_tp calling kfuncs
Problem Details: As the previous commit allowed raw_tp programs to call kfuncs, so of the selftests that were expected to fail will now succeed. Signed-off-by: Puranjay Mohan <puranjay@kernel.org> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20251222133250.1890587-3-puranjay@kernel...
```diff diff --git a/tools/testing/selftests/bpf/progs/dynptr_fail.c b/tools/testing/selftests/bpf/progs/dynptr_fail.c index dda6a8dada82..8f2ae9640886 100644 --- a/tools/testing/selftests/bpf/progs/dynptr_fail.c +++ b/tools/testing/selftests/bpf/progs/dynptr_fail.c @@ -1465,7 +1465,7 @@ int xdp_invalid_data_slice2(str...
5904db9891f80f84283648121e2d8c8a506296a8
Analyze and fix the following issue in the Linux kernel code: mm: introduce BPF kfuncs to deal with memcg pointers
Problem Details: To effectively operate with memory cgroups in BPF there is a need to convert css pointers to memcg pointers. A simple container_of cast which is used in the kernel code can't be used in BPF because from the verifier's point of view that's a out-of-bounds memory access. Introduce helper get/put kfuncs ...
```diff diff --git a/mm/Makefile b/mm/Makefile index 2d0570a16e5b..bf46fe31dc14 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -106,6 +106,9 @@ obj-$(CONFIG_MEMCG) += memcontrol.o vmpressure.o ifdef CONFIG_SWAP obj-$(CONFIG_MEMCG) += swap_cgroup.o endif +ifdef CONFIG_BPF_SYSCALL +obj-$(CONFIG_MEMCG) += bpf_memcontrol...
af04c1e8e7a92540ba8649c815c6f35b5a424616
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: fix typo 'received' in comment
Problem Details: Fix typo received -> received by review. Signed-off-by: Rohit Chourasia <chourasiarohit27@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20251211161911.30611-1-chourasiarohit27@gmail.com
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/regd.c b/drivers/net/wireless/realtek/rtlwifi/regd.c index 0bc4afa4fda3..fd967006b3e1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/regd.c +++ b/drivers/net/wireless/realtek/rtlwifi/regd.c @@ -206,7 +206,7 @@ static void _rtl_reg_apply_active_scan_flags(stru...
d3a9e132a4c6273a5254e743da14887502e928c8
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: correct use sequence of driver_data in skb->info
Problem Details: As ieee80211_tx_info is used to assist filling TX descriptor, and layout of IEEE80211_SKB_CB(skb)->driver_data (accessing by RTW89_TX_SKB_CB()) is union, so driver_data must be used by/after rtw89_hci_tx_write() or just before calling rtw89_hci_tx_write(). Otherwise, ieee80211_tx_info::control data is ...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 0824940c91ae..53d32f3137eb 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -1207,7 +1207,7 @@ rtw89_core_tx_update_desc_info(struct rtw89_dev *rtwdev...
269679bdd17cdd4dc3f1f2448f76554932d7de3f
Analyze and fix the following issue in the Linux kernel code: cpuset: remove dead code in cpuset-v1.c
Problem Details: The commit 6e1d31ce495c ("cpuset: separate generate_sched_domains for v1 and v2") introduced dead code that was originally added for cpuset-v2 partition domain generation. Remove the redundant root_load_balance check. Fixes: 6e1d31ce495c ("cpuset: separate generate_sched_domains for v1 and v2") Report...
```diff diff --git a/kernel/cgroup/cpuset-v1.c b/kernel/cgroup/cpuset-v1.c index 7303315fdba7..ecfea7800f0d 100644 --- a/kernel/cgroup/cpuset-v1.c +++ b/kernel/cgroup/cpuset-v1.c @@ -605,7 +605,6 @@ int cpuset1_generate_sched_domains(cpumask_var_t **domains, int ndoms = 0; /* number of sched domains in result */ i...
9f68fdcdc9dbf21be2a48feced90ff7f77d07443
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: fix DTIM period handling when conf->dtim_period is zero
Problem Details: The function rtw_set_dtim_period() accepted an 'int' dtim_period parameter, while mac80211 provides dtim_period as 'u8' in struct ieee80211_bss_conf. In IBSS (ad-hoc) mode mac80211 may set dtim_period to 0. The driver unconditionally wrote (dtim_period - 1) to REG_DTIM_COUNTER_ROOT, which resulted in ...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index fa0ed39cb199..361ce0d40956 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -730,10 +730,10 @@ void rtw_set_rx_freq_band(struct rtw_rx_pkt_stat *pkt_s...
5ec8cbbc54c82c0bdae4dbf0e5aecf9817bde2b9
Analyze and fix the following issue in the Linux kernel code: clk: spacemit: Respect Kconfig setting when building modules
Problem Details: Currently, the SPACEMIT_CCU entry is only a switch for enabling entry SPACEMIT_K1_CCU. It does not guide the build for common clock codes even if it is a tristate entry. This makes this entry useless. Change the Makefile to add a separate build for common clock logic, so the SPACEMIT_CCU entry takes e...
```diff diff --git a/drivers/clk/spacemit/Makefile b/drivers/clk/spacemit/Makefile index 5ec6da61db98..ad2bf315109b 100644 --- a/drivers/clk/spacemit/Makefile +++ b/drivers/clk/spacemit/Makefile @@ -1,5 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_SPACEMIT_K1_CCU) = spacemit-ccu-k1.o -spacemit-ccu-k1-y ...
6fd8a09f48d6fee184207f4e15e939898a3947f9
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix missing struct keywords in nilfs2_api.h kernel-doc
Problem Details: Eliminate the following kernel-doc warnings in nilfs2_api.h: Warning: include/uapi/linux/nilfs2_api.h:65 cannot understand function prototype: 'struct nilfs_suinfo' Warning: include/uapi/linux/nilfs2_api.h:101 cannot understand function prototype: 'struct nilfs_suinfo_update' This ensures that the ...
```diff diff --git a/include/uapi/linux/nilfs2_api.h b/include/uapi/linux/nilfs2_api.h index 8b9b89104f3d..d1b6fcde2fb8 100644 --- a/include/uapi/linux/nilfs2_api.h +++ b/include/uapi/linux/nilfs2_api.h @@ -58,7 +58,7 @@ NILFS_CPINFO_FNS(INVALID, invalid) NILFS_CPINFO_FNS(MINOR, minor) /** - * nilfs_suinfo - segmen...
cb8fe62f87ad21f4c174aec480694c9b4b8b01c4
Analyze and fix the following issue in the Linux kernel code: nilfs2: convert nilfs_super_block to kernel-doc
Problem Details: Eliminate 40+ kernel-doc warnings in nilfs2_ondisk.h by converting all of the struct member comments to kernel-doc comments. Fix one misnamed struct member in nilfs_direct_node. Object files before and after are the same size and content. Examples of warnings: Warning: include/uapi/linux/nilfs2_ondi...
```diff diff --git a/include/uapi/linux/nilfs2_ondisk.h b/include/uapi/linux/nilfs2_ondisk.h index 3196cc44a002..b3442b16ff6a 100644 --- a/include/uapi/linux/nilfs2_ondisk.h +++ b/include/uapi/linux/nilfs2_ondisk.h @@ -133,73 +133,104 @@ struct nilfs_super_root { /** * struct nilfs_super_block - structure of super...
ed527ef0c264e4bed6c7b2a158ddf516b17f5f66
Analyze and fix the following issue in the Linux kernel code: nilfs2: Fix potential block overflow that cause system hang
Problem Details: When a user executes the FITRIM command, an underflow can occur when calculating nblocks if end_block is too small. Since nblocks is of type sector_t, which is u64, a negative nblocks value will become a very large positive integer. This ultimately leads to the block layer function __blkdev_issue_disca...
```diff diff --git a/fs/nilfs2/sufile.c b/fs/nilfs2/sufile.c index 83f93337c01b..eceedca02697 100644 --- a/fs/nilfs2/sufile.c +++ b/fs/nilfs2/sufile.c @@ -1093,6 +1093,9 @@ int nilfs_sufile_trim_fs(struct inode *sufile, struct fstrim_range *range) else end_block = start_block + len - 1; + if (end_block < nilfs->...
135739a2a92f9aa08702f01d7d585b34d0b95b16
Analyze and fix the following issue in the Linux kernel code: Documentation: mailbox: mbox_chan_ops.flush() is optional
Problem Details: When the optional .flush() method was added to the mbox_chan structure, the documentation was not updated. Fixes: a8803d7421cc2be2 ("mailbox: Support blocking transfers in atomic context") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Messa...
```diff diff --git a/Documentation/driver-api/mailbox.rst b/Documentation/driver-api/mailbox.rst index 0ed95009cc30..463dd032b96c 100644 --- a/Documentation/driver-api/mailbox.rst +++ b/Documentation/driver-api/mailbox.rst @@ -27,7 +27,7 @@ Controller Driver (See include/linux/mailbox_controller.h) Allocate mbox_c...
7508b208f1c5df75223883be7dbdbcba23425b6e
Analyze and fix the following issue in the Linux kernel code: Documentation/rv: Fix dead link to monitor_synthesis.rst
Problem Details: The file 'da_monitor_synthesis.rst' was renamed to 'monitor_synthesis.rst' in commit f40a7c06020709 ("Documentation/rv: Prepare monitor synthesis document for LTL inclusion"). Signed-off-by: Soham Metha <sohammetha01@gmail.com> Fixes: f40a7c06020709 ("Documentation/rv: Prepare monitor synthesis docume...
```diff diff --git a/Documentation/trace/rv/da_monitor_instrumentation.rst b/Documentation/trace/rv/da_monitor_instrumentation.rst index 6c67c7b57811..9eff38a4ad1f 100644 --- a/Documentation/trace/rv/da_monitor_instrumentation.rst +++ b/Documentation/trace/rv/da_monitor_instrumentation.rst @@ -162,10 +162,10 @@ For exa...
faa395bcda431961d29c64c9a68645188c76b77f
Analyze and fix the following issue in the Linux kernel code: docs: fix typo in clang-format documentation
Problem Details: The clang-format documentation contains a minor spelling issue where "intended" is used instead of "indented" when describing deeply nested code. This patch corrects the typo to improve the clarity and consistency. Signed-off-by: Addison English <addison.englishw@gmail.com> Acked-by: Randy Dunlap <rdu...
```diff diff --git a/Documentation/dev-tools/clang-format.rst b/Documentation/dev-tools/clang-format.rst index 1d089a847c1b..6c8a0df5a00c 100644 --- a/Documentation/dev-tools/clang-format.rst +++ b/Documentation/dev-tools/clang-format.rst @@ -88,7 +88,7 @@ Reformatting blocks of code By using an integration with you...
aaacd70fb77afe75075e8bdf8e493b0af42eeabd
Analyze and fix the following issue in the Linux kernel code: docs: kernel-doc.rst: Parse DEFINE_ macros without prefixes
Problem Details: Currently, the logic for vars require a type DEFINE_foo(); where type is usually "static". Make the logic more generic. Reported-by: Randy Dunlap <rdunlap@infradead.org> Closes: https://lore.kernel.org/linux-doc/e1dad7e4-a0ca-4be6-a33c-97b75175c12f@infradead.org/ Signed-off-by: Mauro Carvalho Cheha...
```diff diff --git a/tools/lib/python/kdoc/kdoc_parser.py b/tools/lib/python/kdoc/kdoc_parser.py index aaa352855717..e137bd9a7dac 100644 --- a/tools/lib/python/kdoc/kdoc_parser.py +++ b/tools/lib/python/kdoc/kdoc_parser.py @@ -977,17 +977,23 @@ class KernelDoc: # Variable name is at the end of the declaration ...
f089d9b2c229bc5d565c13d333a6c86ae47e0b6c
Analyze and fix the following issue in the Linux kernel code: docs: kbuild: Fix typos in makefiles.rst
Problem Details: The correct command to generate header files is make headers_install. Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20251220125434.2430-1-cp0613@linux.alibaba.com>
```diff diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst index 8aef3650c1f3..24a4708d26e8 100644 --- a/Documentation/kbuild/makefiles.rst +++ b/Documentation/kbuild/makefiles.rst @@ -1264,7 +1264,7 @@ Add prerequisites to archheaders -------------------------------- The archheade...
c31f4aa8fed048fa70e742c4bb49bb48dc489ab3
Analyze and fix the following issue in the Linux kernel code: kunit: Enforce task execution in {soft,hard}irq contexts
Problem Details: The kunit_run_irq_test() helper allows a function to be run in hardirq and softirq contexts (in addition to the task context). It does this by running the user-provided function concurrently in the three contexts, until either a timeout has expired or a number of iterations have completed in the normal...
```diff diff --git a/include/kunit/run-in-irq-context.h b/include/kunit/run-in-irq-context.h index 108e96433ea4..c89b1b1b12dd 100644 --- a/include/kunit/run-in-irq-context.h +++ b/include/kunit/run-in-irq-context.h @@ -20,8 +20,8 @@ struct kunit_irq_test_state { bool task_func_reported_failure; bool hardirq_func_re...
50290b7a0df54f908cdf3eb87f52ee01664f3ef4
Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Initialize scheduler groups
Problem Details: Scheduler groups (a.k.a. Engine Groups Scheduling, or EGS) is a GuC feature that allows the driver to define groups of engines that are independently scheduled across VFs, which allows different VFs to be active on the HW at the same time on different groups. The feature is available for BMG and newer ...
```diff diff --git a/drivers/gpu/drm/xe/abi/guc_scheduler_abi.h b/drivers/gpu/drm/xe/abi/guc_scheduler_abi.h index db9c171f8b64..513b22a87428 100644 --- a/drivers/gpu/drm/xe/abi/guc_scheduler_abi.h +++ b/drivers/gpu/drm/xe/abi/guc_scheduler_abi.h @@ -6,6 +6,8 @@ #ifndef _ABI_GUC_SCHEDULER_ABI_H #define _ABI_GUC_SCHED...
8d87fa19169eece7133db355b50767dcf0386c44
Analyze and fix the following issue in the Linux kernel code: drm/xe/gt: Add engine masks for each class
Problem Details: Follow up patches will need the engine masks for VCS and VECS engines. Since we already have a macro for the CCS engines, just extend the same approach to all classes. To avoid confusion with the XE_HW_ENGINE_*_MASK masks, the new macros use the _INSTANCES suffix instead. For consistency, rename CCS_M...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt.h b/drivers/gpu/drm/xe/xe_gt.h index 94969ddd9d88..a2ba80c954a6 100644 --- a/drivers/gpu/drm/xe/xe_gt.h +++ b/drivers/gpu/drm/xe/xe_gt.h @@ -20,7 +20,14 @@ for_each_if(((hwe__) = (gt__)->hw_engines + (id__)) && \ xe_hw_engine_is_valid((hwe__))) -#define CCS_MASK(...
6c11aa2b4cf767f5ccfe290b2572d53102dbe5ea
Analyze and fix the following issue in the Linux kernel code: ASoC: sun4i-spdif: Add missing kerneldoc fields for sun4i_spdif_quirks
Problem Details: When sun4i_spdif_quirks was recently expanded, the kerneldoc covering the structure was not expanded to match. This ends up causing a warning when the documents are built. Add the missing fields. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501311953...
```diff diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c index 2e7ac8ab71bb..1e755a716c63 100644 --- a/sound/soc/sunxi/sun4i-spdif.c +++ b/sound/soc/sunxi/sun4i-spdif.c @@ -171,6 +171,8 @@ * @reg_dac_txdata: TX FIFO offset for DMA config. * @has_reset: SoC needs reset deasserted. * @val_...
8db50f0fa43efe8799fd40b872dcdd39a90d7549
Analyze and fix the following issue in the Linux kernel code: ASoC: rt1320: fix the warning the string may be truncated
Problem Details: 1488 | "realtek/rt1320/rt1320_%s_%s_%s.dat", vendor, product, sku); | ^~ ~~~~~~ sound/soc/codecs/rt1320-sdw.c:1487:17: note: 'snprintf' output between 29 and 410 bytes into a destination of size 128 1487 | ...
```diff diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c index e1c4a1adacff..2c621d94fcf5 100644 --- a/sound/soc/codecs/rt1320-sdw.c +++ b/sound/soc/codecs/rt1320-sdw.c @@ -1433,7 +1433,7 @@ static int rt1320_rae_load(struct rt1320_sdw_priv *rt1320) const char *dmi_vendor, *dmi_product, *dmi...
51293e589bafb4281a597986b3416471f67a79c2
Analyze and fix the following issue in the Linux kernel code: drm: tyr: replace `kernel::c_str!` with C-Strings
Problem Details: C-String literals were added in Rust 1.77. Replace instances of `kernel::c_str!` with C-String literals where possible. Signed-off-by: Tamir Duberstein <tamird@gmail.com> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Link: https://patch.msgid.link/20251222-cstr-tyr-v1-1-d88ff1a54ae9@gmail...
```diff diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs index 264c2362237a..f0da58932702 100644 --- a/drivers/gpu/drm/tyr/driver.rs +++ b/drivers/gpu/drm/tyr/driver.rs @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 or MIT -use kernel::c_str; use kernel::clk::Clk; use kernel::clk::Op...
ee47c0ab23a041e0a34848488dee1a23c0940f21
Analyze and fix the following issue in the Linux kernel code: gpu: nova: replace `kernel::c_str!` with C-Strings
Problem Details: C-String literals were added in Rust 1.77. Replace instances of `kernel::c_str!` with C-String literals where possible. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <lossin@kernel.org> Reviewed-by: Alexandre Courbot ...
```diff diff --git a/drivers/gpu/drm/nova/driver.rs b/drivers/gpu/drm/nova/driver.rs index 2246d8e104e0..b1af0a099551 100644 --- a/drivers/gpu/drm/nova/driver.rs +++ b/drivers/gpu/drm/nova/driver.rs @@ -1,7 +1,15 @@ // SPDX-License-Identifier: GPL-2.0 use kernel::{ - auxiliary, c_str, device::Core, drm, drm::gem...
b68758e6f4307179247126b7641fa7ba7109c820
Analyze and fix the following issue in the Linux kernel code: modules: moduleparam.h: fix kernel-doc comments
Problem Details: Fix kernel-doc comments to prevent kernel-doc warnings: Warning: include/linux/moduleparam.h:364 function parameter 'arg' not described in '__core_param_cb' Warning: include/linux/moduleparam.h:395 No description found for return value of 'parameq' Warning: include/linux/moduleparam.h:405 No descrip...
```diff diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 915f32f7d888..c03db3c2fd40 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -355,8 +355,8 @@ static inline void kernel_param_unlock(struct module *mod) /** * __core_param_cb - similar like core_param, wi...
ddc54f912a551f6eb0bbcfc3880f45fe27a252cb
Analyze and fix the following issue in the Linux kernel code: gendwarfksyms: Fix build on 32-bit hosts
Problem Details: We have interchangeably used unsigned long for some of the types defined in elfutils, assuming they're always 64-bit. This obviously fails when building gendwarfksyms on 32-bit hosts. Fix the types. Reported-by: Michal Suchánek <msuchanek@suse.de> Closes: https://lore.kernel.org/linux-modules/aRcxzPxt...
```diff diff --git a/scripts/gendwarfksyms/dwarf.c b/scripts/gendwarfksyms/dwarf.c index 3538a7d9cb07..e76d732f5f60 100644 --- a/scripts/gendwarfksyms/dwarf.c +++ b/scripts/gendwarfksyms/dwarf.c @@ -750,6 +750,7 @@ static void process_enumerator_type(struct state *state, struct die *cache, Dwarf_Die *die) { ...
3285c471d0c0b991e5efc96c1a8bcc9ace17b9b8
Analyze and fix the following issue in the Linux kernel code: coresight: Remove misleading definitions
Problem Details: ETM_OPT_* definitions duplicate the PMU format attributes that have always been published in sysfs. Hardcoding them here makes it misleading as to what the 'real' PMU API is and prevents attributes from being rearranged in the future. ETM4_CFG_BIT_* definitions just define what the Arm Architecture is...
```diff diff --git a/include/linux/coresight-pmu.h b/include/linux/coresight-pmu.h index 89b0ac0014b0..2e179abe472a 100644 --- a/include/linux/coresight-pmu.h +++ b/include/linux/coresight-pmu.h @@ -21,30 +21,6 @@ */ #define CORESIGHT_LEGACY_CPU_TRACE_ID(cpu) (0x10 + (cpu * 2)) -/* - * Below are the definition of...
38f4c42734990ddf42ad6d996b14fbff8fdec9d2
Analyze and fix the following issue in the Linux kernel code: coresight: Repack struct etmv4_drvdata
Problem Details: Fix holes and convert the long list of bools to single bits to save some space because there's one of these for each ETM. Reviewed-by: Leo Yan <leo.yan@arm.com> Reviewed-by: Mike Leach <mike.leach@linaro.org> Tested-by: Leo Yan <leo.yan@arm.com> Signed-off-by: James Clark <james.clark@linaro.org> Sign...
```diff diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 0287d19ce12e..d178d79d9827 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -1016,27 +1016,27 @@ struct etmv4_drvdata { u8 ns_ex_...
20e20b147cf7cb6780a5b95da2a0e37c52cd1015
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/vsec: correct kernel-doc comments
Problem Details: Fix kernel-doc warnings in intel_vsec.h to eliminate all kernel-doc warnings: Warning: include/linux/intel_vsec.h:92 struct member 'read_telem' not described in 'pmt_callbacks' Warning: include/linux/intel_vsec.h:146 expecting prototype for struct intel_sec_device. Prototype was for struct intel_vs...
```diff diff --git a/include/linux/intel_vsec.h b/include/linux/intel_vsec.h index 53f6fe88e369..1a0f357c2427 100644 --- a/include/linux/intel_vsec.h +++ b/include/linux/intel_vsec.h @@ -80,13 +80,13 @@ enum intel_vsec_quirks { /** * struct pmt_callbacks - Callback infrastructure for PMT devices - * ->read_telem()...
15dd100349b8526cbdf2de0ce3e72e700eb6c208
Analyze and fix the following issue in the Linux kernel code: platform/x86: ibm_rtl: fix EBDA signature search pointer arithmetic
Problem Details: The ibm_rtl_init() function searches for the signature but has a pointer arithmetic error. The loop counter suggests searching at 4-byte intervals but the implementation only advances by 1 byte per iteration. Fix by properly advancing the pointer by sizeof(unsigned int) bytes each iteration. Reported...
```diff diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c index 231b37909801..139956168cf9 100644 --- a/drivers/platform/x86/ibm_rtl.c +++ b/drivers/platform/x86/ibm_rtl.c @@ -273,7 +273,7 @@ static int __init ibm_rtl_init(void) { /* search for the _RTL_ signature at the start of the table ...
1461209cf813b6ee6d40f29b96b544587df6d2b1
Analyze and fix the following issue in the Linux kernel code: platform/x86: msi-laptop: add missing sysfs_remove_group()
Problem Details: A sysfs group is created in msi_init() when old_ec_model is enabled, but never removed. Remove the msipf_old_attribute_group in that case. Fixes: 03696e51d75a ("msi-laptop: Disable brightness control for new EC") Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Link: https://patch.msgid.link/2...
```diff diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c index c4b150fa093f..ddef6b78d2fa 100644 --- a/drivers/platform/x86/msi-laptop.c +++ b/drivers/platform/x86/msi-laptop.c @@ -1130,6 +1130,9 @@ static void __exit msi_cleanup(void) sysfs_remove_group(&msipf_device->dev.kobj, &msi...
f13bce715d1600698310a4a7832f6a52499d5395
Analyze and fix the following issue in the Linux kernel code: platform/mellanox: mlxbf-pmc: Remove trailing whitespaces from event names
Problem Details: Some event names have trailing whitespaces at the end which causes programming of counters using the name for these specific events to fail and hence need to be removed. Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3") Signed-off-by: Shravan Kumar Ramani <shravankr@nvi...
```diff diff --git a/drivers/platform/mellanox/mlxbf-pmc.c b/drivers/platform/mellanox/mlxbf-pmc.c index 16a2fd9fdd9b..5ec1ad471696 100644 --- a/drivers/platform/mellanox/mlxbf-pmc.c +++ b/drivers/platform/mellanox/mlxbf-pmc.c @@ -801,18 +801,18 @@ static const struct mlxbf_pmc_events mlxbf_pmc_llt_miss_events[] = { ...
9c68a9483e31a9ad25c5399bb5f066b2e4980ad5
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix Bluetooth on the RockPro64 board
Problem Details: The RockPro64 board has an optional BCM4345C5 Bluetooth device on UART0. This patch fixes audio stutters by setting its correct max-speed and compatible properties. Signed-off-by: Raphaël Jakse <raphael.kernel@jakse.fr> Link: https://patch.msgid.link/20251130161259.9828-1-raphael.kernel@jakse.fr Sign...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64-v2.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64-v2.dts index 304e3c51391c..883d9bcfe792 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64-v2.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64-v2.dts @@ -28,3 +28,10 @@ }; }; };...
e05b08d7d0162cf77fff119367fb1a2d5ab3e669
Analyze and fix the following issue in the Linux kernel code: drm/atomic: convert drm_atomic_get_{old, new}_colorop_state() into proper functions
Problem Details: There is no real reason to include drm_colorop.h from drm_atomic.h, as drm_atomic_get_{old,new}_colorop_state() have no real reason to be static inline. Convert the static inlines to proper functions, and drop the include to reduce the include dependencies and improve data hiding. v2: Fix vkms build ...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c index 1dcc79b35225..20a76d81d532 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c @@ -23,6 +23,9 @@ *...
341735d92ff868eb4c46beafb313d66f015809be
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fix hp-det pin for ArmSoM Sige5
Problem Details: Although the hp_det pin is not used, according to the schematic, the headphone detection pin is GPIO4_B0. Fix the incorrect pin. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://patch.msgid.link/20251220100010.26643-2-amadeus...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts index 392ba83ab05a..a0d8f52a706f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts +++ b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts @@ -812,8 +812,8 @@ }; head...
608328ba5b0619cbc28b409296b5e3840bcb97b6
Analyze and fix the following issue in the Linux kernel code: powerpc/32: Restore disabling of interrupts at interrupt/syscall exit
Problem Details: Commit 2997876c4a1a ("powerpc/32: Restore clearing of MSR[RI] at interrupt/syscall exit") delayed clearing of MSR[RI], but missed that both MSR[RI] and MSR[EE] are cleared at the same time, so the commit also delayed the disabling of interrupts, leading to unexpected behaviour. To fix that, mostly rev...
```diff diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index 1078ba88efaf..9cd945f2acaf 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h @@ -90,7 +90,7 @@ static inline void __hard_EE_RI_disable(void) if (IS_ENABLED(CONFIG_BOOKE)) wrtee(0); ...
ce652c98a7bfa0b7c675ef5cd85c44c186db96af
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: remove redundant max-link-speed from nanopi-r4s
Problem Details: This is already the default in rk3399-base.dtsi, remove redundant declaration from rk3399-nanopi-r4s.dtsi. Fixes: db792e9adbf8 ("rockchip: rk3399: Add support for FriendlyARM NanoPi R4S") Cc: stable@vger.kernel.org Reported-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Dragan Simic <dsimic@manjar...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi index 8d94d9f91a5c..3a9a10f531bd 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi @@ -71,7 +71,6 @@ }; &pcie0 { - m...
0368e4afcf20f377c81fa77b1c7d0dee4a625a44
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: remove dangerous max-link-speed from helios64
Problem Details: Shawn Lin from Rockchip strongly discourages attempts to use their RK3399 PCIe core at 5.0 GT/s speed, citing concerns about catastrophic failures that may happen. Even if the odds are low, drop from last user of this non-default property for the RK3399 platform, helios64 board dts. Fixes: 755fff528b1...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts index e7d4a2f9a95e..78a7775c3b22 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts @@ -424,7 +424,6 @@ &p...
cd8967ea3105d30adb878a9fea0e34a9378df610
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fix unit-address for RK3588 NPU's core1 and core2's IOMMU
Problem Details: The Device Tree specification specifies[1] that """ Each node in the devicetree is named according to the following convention: node-name@unit-address [...] The unit-address must match the first address specified in the reg property of the node. """ The first address in the reg property is fdaXa000 ...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi index 2a7921793020..7ab12d1054a7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi @@ -1200,7 +1200,7 @@ status = "disabled"; }; - rknn_m...
87e7f6019097746d1d06f98874a9f179b7a68f3e
Analyze and fix the following issue in the Linux kernel code: software node: Also support referencing non-constant software nodes
Problem Details: Fwnode references are be implemented differently if referenced node is a software node. _Generic() is used to differentiate between the two cases but only const software nodes were present in the selection. Also add non-const software nodes. Reported-by: Kenneth Crudup <kenny@panix.com> Closes: https:...
```diff diff --git a/include/linux/property.h b/include/linux/property.h index 272bfbdea7bf..e30ef23a9af3 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -371,6 +371,7 @@ struct software_node_ref_args { (const struct software_node_ref_args) { \ .swnode = _Generic(_ref_, \ const s...
b94b73567561642323617155bf4ee24ef0d258fe
Analyze and fix the following issue in the Linux kernel code: powerpc: Add reloc_offset() to font bitmap pointer used for bootx_printf()
Problem Details: Since Linux v6.7, booting using BootX on an Old World PowerMac produces an early crash. Stan Johnson writes, "the symptoms are that the screen goes blank and the backlight stays on, and the system freezes (Linux doesn't boot)." Further testing revealed that the failure can be avoided by disabling CONF...
```diff diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index 7f63f1cdc6c3..ca00c4824e31 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c @@ -20,6 +20,7 @@ #include <asm/io.h> #include <asm/processor.h> #include <asm/udbg.h> +#include <asm/setup.h> #define NO_SCROL...
7c6bbcb010b1b8e4e6452de109f0506bb05d6efb
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix wifi interrupts flag on Sakura Pi RK3308B
Problem Details: GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE. Correct the interrupt flags, assuming the author of the code wanted same logical behavior behind t...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts b/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts index e5e6b800c2d1..3473db08b9b2 100644 --- a/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts +++ b/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts @@ -199,7 +199,7 ...
f1164534ad62f0cc247d99650b07bd59ad2a49fd
Analyze and fix the following issue in the Linux kernel code: powerpc/tools: drop `-o pipefail` in gcc check scripts
Problem Details: Fixes: 0f71dcfb4aef ("powerpc/ftrace: Add support for -fpatchable-function-entry") Fixes: b71c9ffb1405 ("powerpc: Add arch/powerpc/tools directory") Reported-by: Joe Lawrence <joe.lawrence@redhat.com> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Jan Stancek <jstancek@redhat.com> Fixe...
```diff diff --git a/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh b/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh index 06706903503b..baed467a016b 100755 --- a/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh +++ b/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh @@ -2,7 +2,6 ...
c2296a1e42418556efbeb5636c4fa6aa6106713a
Analyze and fix the following issue in the Linux kernel code: powerpc/kexec: Enable SMT before waking offline CPUs
Problem Details: If SMT is disabled or a partial SMT state is enabled, when a new kernel image is loaded for kexec, on reboot the following warning is observed: kexec: Waking offline cpu 228. WARNING: CPU: 0 PID: 9062 at arch/powerpc/kexec/core_64.c:223 kexec_prepare_cpus+0x1b0/0x1bc [snip] NIP kexec_prepare_cpus+0x1...
```diff diff --git a/arch/powerpc/kexec/core_64.c b/arch/powerpc/kexec/core_64.c index 222aa326dace..825ab8a88f18 100644 --- a/arch/powerpc/kexec/core_64.c +++ b/arch/powerpc/kexec/core_64.c @@ -202,6 +202,23 @@ static void kexec_prepare_cpus_wait(int wait_state) mb(); } + +/* + * The add_cpu() call in wake_offlin...
eaf9206bf3d68f792ecd5e6f488eab1fb5afe900
Analyze and fix the following issue in the Linux kernel code: clk: samsung: gs101: Enable auto_clock_gate mode for each gs101 CMU
Problem Details: Enable auto clock mode, and define the additional fields which are used when this mode is enabled. /sys/kernel/debug/clk/clk_summary now reports approximately 308 running clocks and 298 disabled clocks. Prior to this commit 586 clocks were running and 17 disabled. Signed-off-by: Peter Griffin <peter....
```diff diff --git a/drivers/clk/samsung/clk-gs101.c b/drivers/clk/samsung/clk-gs101.c index 70b26db9b95a..8551289b46eb 100644 --- a/drivers/clk/samsung/clk-gs101.c +++ b/drivers/clk/samsung/clk-gs101.c @@ -26,6 +26,10 @@ #define CLKS_NR_PERIC0 (CLK_GOUT_PERIC0_SYSREG_PERIC0_PCLK + 1) #define CLKS_NR_PERIC1 (CLK_GOUT...
298fac4f4b96448ce7ef8da525a74fd3dba0035d
Analyze and fix the following issue in the Linux kernel code: clk: samsung: Implement automatic clock gating mode for CMUs
Problem Details: Update exynos_arm64_init_clocks() so that it enables the automatic clock mode bits in the CMU option register if the auto_clock_gate flag and option_offset fields are set for the CMU. To ensure compatibility with older DTs (that specified an incorrect CMU reg size), detect this and fallback to manual c...
```diff diff --git a/drivers/clk/samsung/clk-exynos-arm64.c b/drivers/clk/samsung/clk-exynos-arm64.c index bf7de21f329e..11e4d49f2390 100644 --- a/drivers/clk/samsung/clk-exynos-arm64.c +++ b/drivers/clk/samsung/clk-exynos-arm64.c @@ -24,6 +24,16 @@ #define GATE_MANUAL BIT(20) #define GATE_ENABLE_HWACG BIT(28) +/*...
dabac51b8102e1643d8e297a8e6948dab190aa4c
Analyze and fix the following issue in the Linux kernel code: net/handshake: Fix null-ptr-deref in handshake_complete()
Problem Details: A null pointer dereference in handshake_complete() was observed [1]. When handshake_req_next() return NULL in handshake_nl_accept_doit(), function handshake_complete() will be called unexpectedly which triggers this crash. Fix it by goto out_status when req is NULL. [1] Oops: general protection fault...
```diff diff --git a/net/handshake/netlink.c b/net/handshake/netlink.c index 1d33a4675a48..b989456fc4c5 100644 --- a/net/handshake/netlink.c +++ b/net/handshake/netlink.c @@ -126,7 +126,8 @@ int handshake_nl_accept_doit(struct sk_buff *skb, struct genl_info *info) } out_complete: - handshake_complete(req, -EIO, NU...
db5b4e39c4e63700c68a7e65fc4e1f1375273476
Analyze and fix the following issue in the Linux kernel code: ip6_gre: make ip6gre_header() robust
Problem Details: Over the years, syzbot found many ways to crash the kernel in ip6gre_header() [1]. This involves team or bonding drivers ability to dynamically change their dev->needed_headroom and/or dev->hard_header_len In this particular crash mld_newpack() allocated an skb with a too small reserve/headroom, and ...
```diff diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index c82a75510c0e..8bc3f05f594e 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -1366,9 +1366,16 @@ static int ip6gre_header(struct sk_buff *skb, struct net_device *dev, { struct ip6_tnl *t = netdev_priv(dev); struct ipv6hdr *ipv6h; + int ne...
5498227676303e3ffa9a3a46214af96bc3e81314
Analyze and fix the following issue in the Linux kernel code: net: openvswitch: Avoid needlessly taking the RTNL on vport destroy
Problem Details: The openvswitch teardown code will immediately call ovs_netdev_detach_dev() in response to a NETDEV_UNREGISTER notification. It will then start the dp_notify_work workqueue, which will later end up calling the vport destroy() callback. This callback takes the RTNL to do another ovs_netdev_detach_port()...
```diff diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c index 91a11067e458..6574f9bcdc02 100644 --- a/net/openvswitch/vport-netdev.c +++ b/net/openvswitch/vport-netdev.c @@ -160,10 +160,19 @@ void ovs_netdev_detach_dev(struct vport *vport) static void netdev_destroy(struct vport *vport) ...
1e5a541420b8c6d87d88eb50b6b978cdeafee1c9
Analyze and fix the following issue in the Linux kernel code: net: phy: mediatek: fix nvmem cell reference leak in mt798x_phy_calibration
Problem Details: When nvmem_cell_read() fails in mt798x_phy_calibration(), the function returns without calling nvmem_cell_put(), leaking the cell reference. Move nvmem_cell_put() right after nvmem_cell_read() to ensure the cell reference is always released regardless of the read result. Found via static analysis and...
```diff diff --git a/drivers/net/phy/mediatek/mtk-ge-soc.c b/drivers/net/phy/mediatek/mtk-ge-soc.c index cd09fbf92ef2..2c4bbc236202 100644 --- a/drivers/net/phy/mediatek/mtk-ge-soc.c +++ b/drivers/net/phy/mediatek/mtk-ge-soc.c @@ -1167,9 +1167,9 @@ static int mt798x_phy_calibration(struct phy_device *phydev) } bu...
15ef641a0c6728d25a400df73922e80ab2cf029c
Analyze and fix the following issue in the Linux kernel code: fjes: Add missing iounmap in fjes_hw_init()
Problem Details: In error paths, add fjes_hw_iounmap() to release the resource acquired by fjes_hw_iomap(). Add a goto label to do so. Fixes: 8cdc3f6c5d22 ("fjes: Hardware initialization routine") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Signed-off-by: Simon Horman <horms@ker...
```diff diff --git a/drivers/net/fjes/fjes_hw.c b/drivers/net/fjes/fjes_hw.c index b9b5554ea862..5ad2673f213d 100644 --- a/drivers/net/fjes/fjes_hw.c +++ b/drivers/net/fjes/fjes_hw.c @@ -334,7 +334,7 @@ int fjes_hw_init(struct fjes_hw *hw) ret = fjes_hw_reset(hw); if (ret) - return ret; + goto err_iounmap; ...
d1a1a4bade4b20c0858d0b2f81d2611de055f675
Analyze and fix the following issue in the Linux kernel code: net: mdio: aspeed: add dummy read to avoid read-after-write issue
Problem Details: The Aspeed MDIO controller may return incorrect data when a read operation follows immediately after a write. Due to a controller bug, the subsequent read can latch stale data, causing the polling logic to terminate earlier than expected. To work around this hardware issue, insert a dummy read after e...
```diff diff --git a/drivers/net/mdio/mdio-aspeed.c b/drivers/net/mdio/mdio-aspeed.c index e55be6dc9ae7..d6b9004c61dc 100644 --- a/drivers/net/mdio/mdio-aspeed.c +++ b/drivers/net/mdio/mdio-aspeed.c @@ -63,6 +63,13 @@ static int aspeed_mdio_op(struct mii_bus *bus, u8 st, u8 op, u8 phyad, u8 regad, iowrite32(ctrl, c...
bf4172bd870c3a34d3065cbb39192c22cbd7b18d
Analyze and fix the following issue in the Linux kernel code: net: usb: sr9700: support devices with virtual driver CD
Problem Details: Some SR9700 devices have an SPI flash chip containing a virtual driver CD, in which case they appear as a device with two interfaces and product ID 0x9702. Interface 0 is the driver CD and interface 1 is the Ethernet device. Link: https://github.com/name-kurniawan/usb-lan Link: https://www.draisbergho...
```diff diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c index 091bc2aca7e8..d8ffb59eaf34 100644 --- a/drivers/net/usb/sr9700.c +++ b/drivers/net/usb/sr9700.c @@ -539,6 +539,11 @@ static const struct usb_device_id products[] = { USB_DEVICE(0x0fe6, 0x9700), /* SR9700 device */ .driver_info = (unsig...
9517d76dd160208b7a432301ce7bec8fc1ddc305
Analyze and fix the following issue in the Linux kernel code: counter: 104-quad-8: Fix incorrect return value in IRQ handler
Problem Details: quad8_irq_handler() should return irqreturn_t enum values, but it directly returns negative errno codes from regmap operations on error. Return IRQ_NONE if the interrupt status cannot be read. If clearing the interrupt fails, return IRQ_HANDLED to prevent the kernel from disabling the IRQ line due to ...
```diff diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c index ce81fc4e1ae7..573b2fe93253 100644 --- a/drivers/counter/104-quad-8.c +++ b/drivers/counter/104-quad-8.c @@ -1192,6 +1192,7 @@ static irqreturn_t quad8_irq_handler(int irq, void *private) { struct counter_device *counter = private;...
23f9485510c338476b9735d516c1d4aacb810d46
Analyze and fix the following issue in the Linux kernel code: counter: interrupt-cnt: Drop IRQF_NO_THREAD flag
Problem Details: An IRQ handler can either be IRQF_NO_THREAD or acquire spinlock_t, as CONFIG_PROVE_RAW_LOCK_NESTING warns: ============================= [ BUG: Invalid wait context ] 6.18.0-rc1+git... #1 ----------------------------- some-user-space-process/1251 is trying to lock: (&counter->events_list_lock){....}-{3...
```diff diff --git a/drivers/counter/interrupt-cnt.c b/drivers/counter/interrupt-cnt.c index 6c0c1d2d7027..e6100b5fb082 100644 --- a/drivers/counter/interrupt-cnt.c +++ b/drivers/counter/interrupt-cnt.c @@ -229,8 +229,7 @@ static int interrupt_cnt_probe(struct platform_device *pdev) irq_set_status_flags(priv->irq, ...
c4c6db7ac54649c0cfe7d86b4a5358296dc8d08b
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: Fix a linusw mail address
Problem Details: The patch adding me to the SoC maintainers was in-flight at the time I had to change my mail address. This fixes it up. Signed-off-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20251216-maintainers-fix-v1-1-92f11231b27e@kernel.org Signed-off-by: Krzysztof Kozlowski <krzk@kernel....
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 5b11839cba9d..15c4dacfa5f7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2011,7 +2011,7 @@ ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS) M: Arnd Bergmann <arnd@arndb.de> M: Krzysztof Kozlowski <krzk@kernel.org> M: Alexandre Belloni <alexandre.belloni@bootlin...