id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
3bd9b9abdf1563a22041b7255baea6d449902f1a
Analyze and fix the following issue in the Linux kernel code: net: ethtool: Avoid thousands of -Wflex-array-member-not-at-end warnings
Problem Details: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Change the type of the middle struct member currently causing trouble from `struct ethtool_link_settings` to `struct ethtool_link_settings_hdr`. Additionally, update the type of some variables in...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index f71cc8188b4e..e0ebe69110bf 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -2781,7 +2781,7 @@ u32 bnxt_fw_to_ethtool_...
43d3487035e9a86fad952de4240a518614240d43
Analyze and fix the following issue in the Linux kernel code: UAPI: ethtool: Use __struct_group() in struct ethtool_link_settings
Problem Details: Use the `__struct_group()` helper to create a new tagged `struct ethtool_link_settings_hdr`. This structure groups together all the members of the flexible `struct ethtool_link_settings` except the flexible array. As a result, the array is effectively separated from the rest of the members without modi...
```diff diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index c405ed63acfa..fc1f54b065f9 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -2511,21 +2511,24 @@ enum ethtool_reset_flags { * autonegotiation; 0 if unknown or not applicable. Read-only. */ struct ...
0ead60804b64f5bd6999eec88e503c6a1a242d41
Analyze and fix the following issue in the Linux kernel code: sctp: properly validate chunk size in sctp_sf_ootb()
Problem Details: A size validation fix similar to that in Commit 50619dbf8db7 ("sctp: add size validation when walking chunks") is also required in sctp_sf_ootb() to address a crash reported by syzbot: BUG: KMSAN: uninit-value in sctp_sf_ootb+0x7f5/0xce0 net/sctp/sm_statefuns.c:3712 sctp_sf_ootb+0x7f5/0xce0 net/sc...
```diff diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 7d315a18612b..a0524ba8d787 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -3751,7 +3751,7 @@ enum sctp_disposition sctp_sf_ootb(struct net *net, } ch = (struct sctp_chunkhdr *)ch_end; - } while (ch_end < skb_tail...
1d4832becdc2cdb2cffe2a6050c9d9fd8ff1c58c
Analyze and fix the following issue in the Linux kernel code: mm: multi-gen LRU: use {ptep,pmdp}_clear_young_notify()
Problem Details: When the MM_WALK capability is enabled, memory that is mostly accessed by a VM appears younger than it really is, therefore this memory will be less likely to be evicted. Therefore, the presence of a running VM can significantly increase swap-outs for non-VM memory, regressing the performance for the ...
```diff diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 9342e5692dab..5b1c984daf45 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -555,7 +555,7 @@ struct lru_gen_memcg { void lru_gen_init_pgdat(struct pglist_data *pgdat); void lru_gen_init_lruvec(struct lruvec *lruvec); -void...
ddd6d8e975b171ea3f63a011a75820883ff0d479
Analyze and fix the following issue in the Linux kernel code: mm: multi-gen LRU: remove MM_LEAF_OLD and MM_NONLEAF_TOTAL stats
Problem Details: Patch series "mm: multi-gen LRU: Have secondary MMUs participate in MM_WALK". Today, the MM_WALK capability causes MGLRU to clear the young bit from PMDs and PTEs during the page table walk before eviction, but MGLRU does not call the clear_young() MMU notifier in this case. By not calling this notif...
```diff diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 17506e4a2835..9342e5692dab 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -458,9 +458,7 @@ struct lru_gen_folio { enum { MM_LEAF_TOTAL, /* total leaf entries */ - MM_LEAF_OLD, /* old leaf entries */ MM_LEAF_YOUNG, ...
cf90a4d1b9ff9e09442226bdb18fec45f013db9d
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Fix some error handling paths in bnxt_re_probe()
Problem Details: If bnxt_re_add_device() fails, 'en_info' still needs to be freed, as already done in the .remove() function. The commit in Fixes incorrectly removed this call, certainly because it was expecting the .remove() function was called anyway. But if the probe fails, the remove function is not called. There...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 6715c96a3eee..465cec4a1bd4 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -2025,7 +2025,15 @@ static int bnxt_re_probe(struct auxiliary_device *adev, auxiliary_set_dr...
3b557be89fc688dbd9ccf704a70f7600a094f13a
Analyze and fix the following issue in the Linux kernel code: net: wwan: t7xx: Fix off-by-one error in t7xx_dpmaif_rx_buf_alloc()
Problem Details: The error path in t7xx_dpmaif_rx_buf_alloc(), free and unmap the already allocated and mapped skb in a loop, but the loop condition terminates when the index reaches zero, which fails to free the first allocated skb at index zero. Check with i-- so that skb at index 0 is freed as well. Cc: stable@vge...
```diff diff --git a/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c b/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c index 210d84c67ef9..7a9c09cd4fdc 100644 --- a/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c +++ b/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c @@ -226,7 +226,7 @@ int t7xx_dpmaif_rx_buf_alloc(struct dpmaif_ctrl *dpma...
77dc55a978e69625f9718460012e5ef0172dc4de
Analyze and fix the following issue in the Linux kernel code: modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host
Problem Details: When building a 64-bit kernel on a 32-bit build host, incorrect input MODULE_ALIAS() entries may be generated. For example, when compiling a 64-bit kernel with CONFIG_INPUT_MOUSEDEV=m on a 64-bit build machine, you will get the correct output: $ grep MODULE_ALIAS drivers/input/mousedev.mod.c MODU...
```diff diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 16154449dde1..c4cc11aa558f 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -743,7 +743,7 @@ static void do_input(char *alias, for (i = min / BITS_PER_LONG; i < max / BITS_PER_LONG + 1; i++) arr[i] = TO_NATIVE(arr...
2e766a1f5f94a142d9a906c9411d0f6101c4c721
Analyze and fix the following issue in the Linux kernel code: modpost: fix acpi MODULE_DEVICE_TABLE built with mismatched endianness
Problem Details: When CONFIG_SATA_AHCI_PLATFORM=m, modpost outputs incorect acpi MODULE_ALIAS() if the endianness of the target and the build machine do not match. When the endianness of the target kernel and the build machine match, the output is correct: $ grep 'MODULE_ALIAS("acpi' drivers/ata/ahci_platform.mod.c...
```diff diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 99dce93a4188..16154449dde1 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -567,12 +567,12 @@ static int do_acpi_entry(const char *filename, void *symval, char *alias) { DEF_FIELD_ADDR(symval, acpi_device_id, i...
9cc926e3fab42dd292219796cfc94e41f4ab749d
Analyze and fix the following issue in the Linux kernel code: arm64: dts: renesas: hihope: Drop #sound-dai-cells
Problem Details: "#sound-dai-cells" is required if the board is using "simple-card". However, the HiHope board uses "audio-graph", thus remove the unneeded `#sound-dai-cells`. Commit 9e72606cd2db ("arm64: dts: renesas: #sound-dai-cells is used when simple-card") updated the comment regarding usage of "#sound-dai-cells...
```diff diff --git a/arch/arm64/boot/dts/renesas/hihope-rev2.dtsi b/arch/arm64/boot/dts/renesas/hihope-rev2.dtsi index 8e2db1d6ca81..25c55b32aafe 100644 --- a/arch/arm64/boot/dts/renesas/hihope-rev2.dtsi +++ b/arch/arm64/boot/dts/renesas/hihope-rev2.dtsi @@ -69,9 +69,6 @@ status = "okay"; - /* Single DAI */ - #so...
dabf72b85f298970e86891b5218459c17b57b26a
Analyze and fix the following issue in the Linux kernel code: clk: renesas: rzg2l: Fix FOUTPOSTDIV clk
Problem Details: While computing foutpostdiv_rate, the value of params->pl5_fracin is discarded, which results in the wrong refresh rate. Fix the formula for computing foutpostdiv_rate. Fixes: 1561380ee72f ("clk: renesas: rzg2l: Add FOUTPOSTDIV clk support") Signed-off-by: Hien Huynh <hien.huynh.px@renesas.com> Signed...
```diff diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c index 85dad87f2318..ddf722ca79eb 100644 --- a/drivers/clk/renesas/rzg2l-cpg.c +++ b/drivers/clk/renesas/rzg2l-cpg.c @@ -548,7 +548,7 @@ static unsigned long rzg2l_cpg_get_foutpostdiv_rate(struct rzg2l_pll5_param *params, ...
40e2125381dc11379112485e3eefdd25c6df5375
Analyze and fix the following issue in the Linux kernel code: PCI: tegra194: Move controller cleanups to pex_ep_event_pex_rst_deassert()
Problem Details: Currently, the endpoint cleanup function dw_pcie_ep_cleanup() and EPF deinit notify function pci_epc_deinit_notify() are called during the execution of pex_ep_event_pex_rst_assert() i.e., when the host has asserted PERST#. But quickly after this step, refclk will also be disabled by the host. All of t...
```diff diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index c1394f2ab63f..ced3b7e7bdad 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -1704,9 +1704,6 @@ static void pex_ep_event_pex_rst_assert(struct tegr...
7d7cf89b119af433354f865fc01017b9f8aa411a
Analyze and fix the following issue in the Linux kernel code: PCI: qcom-ep: Move controller cleanups to qcom_pcie_perst_deassert()
Problem Details: Currently, the endpoint cleanup function dw_pcie_ep_cleanup() and EPF deinit notify function pci_epc_deinit_notify() are called during the execution of qcom_pcie_perst_assert() i.e., when the host has asserted PERST#. But quickly after this step, refclk will also be disabled by the host. All of the Qc...
```diff diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c index e588fcc54589..b5ca5260f904 100644 --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c @@ -396,6 +396,10 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci)...
53c0a58beb60b76e105a61aae518fd780eec03d9
Analyze and fix the following issue in the Linux kernel code: net/socket.c: switch to CLASS(fd)
Problem Details: The important part in sockfd_lookup_light() is avoiding needless file refcount operations, not the marginal reduction of the register pressure from not keeping a struct file pointer in the caller. Switch to use fdget()/fdpu(); with sane use of CLASS(fd) we can get a better code generation... Would ...
```diff diff --git a/include/linux/file.h b/include/linux/file.h index f98de143245a..b49a92295b3f 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -30,12 +30,6 @@ extern struct file *alloc_file_pseudo_noaccount(struct inode *, struct vfsmount extern struct file *alloc_file_clone(struct file *, int flags...
071b24b54d2d05fbf39ddbb27dee08abd1d713f3
Analyze and fix the following issue in the Linux kernel code: Input: fix regression when re-registering input handlers
Problem Details: Commit d469647bafd9 ("Input: simplify event handling logic") introduced code that would set handler->events() method to either input_handler_events_filter() or input_handler_events_default() or input_handler_events_null(), depending on the kind of input handler (a filter or a regular one) we are dealin...
```diff diff --git a/drivers/input/input.c b/drivers/input/input.c index 3c321671793f..3d2cc13e1f32 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -119,12 +119,12 @@ static void input_pass_values(struct input_dev *dev, handle = rcu_dereference(dev->grab); if (handle) { - count = handle->handle...
eb038363d8e9ae0d9fa31a0600438d19b283dd41
Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: Add cleanup of nvmels_wq after HBA reset
Problem Details: An HBA reset request that is executed when there are outstanding NVME-LS commands can cause delays for the reset process to complete. Fix by introducing a new routine called lpfc_nvmels_flush_cmd() that walks the phba->nvmels_wq list and cancels outstanding submitted NVME-LS requests speeding up the H...
```diff diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index d4e46a08f94d..b1e26a5abe58 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -660,6 +660,7 @@ void lpfc_wqe_cmd_template(void); void lpfc_nvmet_cmd_template(void); void lpfc_nvme_cancel_iocb(struct...
98f8d3588097e321be70f83b844fa67d4828fe5c
Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: Check SLI_ACTIVE flag in FDMI cmpl before submitting follow up FDMI
Problem Details: The lpfc_cmpl_ct_disc_fdmi() routine has incorrect logic that treats an FDMI completion with error LOCAL_REJECT/SLI_ABORTED as a success status. Under the erroneous assumption of successful completion, the routine proceeds to issue follow up FDMI commands, which may never complete if the HBA is in an e...
```diff diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index 134bc96dd134..ce3a1f42713d 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c @@ -2226,6 +2226,11 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, ulp_status, ulp_word4, latt); ...
d35f7672715d1ff3e3ad9bb4ae6ac6cb484200fe
Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: Call lpfc_sli4_queue_unset() in restart and rmmod paths
Problem Details: During initialization, the driver allocates wq->pring in lpfc_wq_create and lpfc_sli4_queue_unset() is the only place where kfree(wq->pring) is called. There is a possible memory leak in lpfc_sli_brdrestart_s4() (restart) and lpfc_pci_remove_one_s4() (rmmod) paths because there are no calls to lpfc_sl...
```diff diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 0dd451009b07..a3658ef1141b 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -13518,6 +13518,8 @@ lpfc_sli4_hba_unset(struct lpfc_hba *phba) /* Disable FW logging to host memory */ lpfc_ras_stop_...
ceef938bbf8b93ba3a218b4adc244cde94b582aa
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: exynos: Fix hibern8 notify callbacks
Problem Details: v1 of the patch which introduced the ufshcd_vops_hibern8_notify() callback used a bool instead of an enum. In v2 this was updated to an enum based on the review feedback in [1]. ufs-exynos hibernate calls have always been broken upstream as it follows the v1 bool implementation. Link: https://patchwo...
```diff diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 5078210b2a5c..9b6c4cfd7665 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1526,12 +1526,12 @@ static void exynos_ufs_dev_hw_reset(struct ufs_hba *hba) hci_writel(ufs, 1 << 0, HCI_GPIO_OUT); } ...
c662cedea14efdcf373d8d886ec18019d50e0772
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: exynos: Add check inside exynos_ufs_config_smu()
Problem Details: Move the EXYNOS_UFS_OPT_UFSPR_SECURE check inside exynos_ufs_config_smu(). This way all call sites will benefit from the check. This fixes a bug currently in the exynos_ufs_resume() path on gs101 as it calls exynos_ufs_config_smu() and we end up accessing registers that can only be accessed from secur...
```diff diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 33de7ff747a2..f4454e89040f 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -719,6 +719,9 @@ static void exynos_ufs_config_smu(struct exynos_ufs *ufs) { u32 reg, val; + if (ufs->opts & EXYNOS_U...
7ce3e6107103214d354a16729a472f588be60572
Analyze and fix the following issue in the Linux kernel code: scsi: sd_zbc: Use kvzalloc() to allocate REPORT ZONES buffer
Problem Details: We have two reports of failed memory allocation in btrfs' code which is calling into report zones. Both of these reports have the following signature coming from __vmalloc_area_node(): kworker/u17:5: vmalloc error: size 0, failed to allocate pages, mode:0x10dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NORETRY...
```diff diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index c8b9654d30f0..a4d17f3da25d 100644 --- a/drivers/scsi/sd_zbc.c +++ b/drivers/scsi/sd_zbc.c @@ -188,8 +188,7 @@ static void *sd_zbc_alloc_report_buffer(struct scsi_disk *sdkp, bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT); ...
25bc99be5fe53853053ceeaa328068c49dc1e799
Analyze and fix the following issue in the Linux kernel code: i3c: master: svc: Modify enabled_events bit 7:0 to act as IBI enable counter
Problem Details: Fix issue where disabling IBI on one device disables the entire IBI interrupt. Modify bit 7:0 of enabled_events to serve as an IBI enable counter, ensuring that the system IBI interrupt is disabled only when all I3C devices have IBI disabled. Cc: stable@kernel.org Fixes: 7ff730ca458e ("i3c: master: sv...
```diff diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index c53f2b27662f..c1ee3828e7ee 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -130,8 +130,8 @@ #define SVC_I3C_PPBAUD_MAX 15 #define SVC_I3C_QUICK_I2C_CLK 4170000 -#define ...
7fa3c36ea2707c495cf31ccab733ac8bf3f9d0c2
Analyze and fix the following issue in the Linux kernel code: x86/vdso: Add missing brackets in switch case
Problem Details: 0-day reported: arch/x86/entry/vdso/vma.c:199:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions] Add the missing brackets. Fixes: e93d2521b27f ("x86/vdso: Split virtual clock pages into dedicated mapping") Reported-by: kernel test robot <lkp@intel.com> Si...
```diff diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c index 7e5921adeed0..bfc7cabf4017 100644 --- a/arch/x86/entry/vdso/vma.c +++ b/arch/x86/entry/vdso/vma.c @@ -196,21 +196,26 @@ static vm_fault_t vvar_vclock_fault(const struct vm_special_mapping *sm, switch (vmf->pgoff) { #ifdef CONFIG_PARAVIR...
a508ef4b1dcc82227edc594ffae583874dd425d7
Analyze and fix the following issue in the Linux kernel code: lib: string_helpers: silence snprintf() output truncation warning
Problem Details: The output of ".%03u" with the unsigned int in range [0, 4294966295] may get truncated if the target buffer is not 12 bytes. This can't really happen here as the 'remainder' variable cannot exceed 999 but the compiler doesn't know it. To make it happy just increase the buffer to where the warning goes ...
```diff diff --git a/lib/string_helpers.c b/lib/string_helpers.c index 4f887aa62fa0..91fa37b5c510 100644 --- a/lib/string_helpers.c +++ b/lib/string_helpers.c @@ -57,7 +57,7 @@ int string_get_size(u64 size, u64 blk_size, const enum string_size_units units, static const unsigned int rounding[] = { 500, 50, 5 }; int ...
ba4a2e2317b9faeca9193ed6d3193ddc3cf2aba3
Analyze and fix the following issue in the Linux kernel code: PCI: qcom: Enable MSI interrupts together with Link up if 'Global IRQ' is supported
Problem Details: Currently, if 'Global IRQ' is supported by the platform, only the Link up interrupt is enabled in the PARF_INT_ALL_MASK register. This masks MSIs on some platforms. The MSI bits in PARF_INT_ALL_MASK register are enabled by default in the hardware, but commit 4581403f6792 ("PCI: qcom: Enumerate endpoint...
```diff diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index ef44a82be058..2b33d03ed054 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -133,6 +133,7 @@ /* PARF_INT_ALL_{STATUS/CLEAR/MASK} register fields */ #define PA...
3993ca4add248f0f853f54f9273a7de850639f33
Analyze and fix the following issue in the Linux kernel code: iio: Fix fwnode_handle in __fwnode_iio_channel_get_by_name()
Problem Details: In the fwnode_iio_channel_get_by_name(), iterating over parent nodes to acquire IIO channels via fwnode_for_each_parent_node(). The variable chan was mistakenly attempted on the original node instead of the current parent node. This patch corrects the logic to ensure that __fwnode_iio_channel_get_by_na...
```diff diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index 151099be2863..3305ebbdbc07 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c @@ -269,7 +269,7 @@ struct iio_channel *fwnode_iio_channel_get_by_name(struct fwnode_handle *fwnode, return ERR_PTR(-ENODEV); } - chan = __fwnode_iio_c...
af2c15920a114a7acea4dcbf9cd4a7b0ff469780
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries/lparcfg: Fix printing of system_active_processors
Problem Details: When printing the information "system_active_processors", the variable partition_potential_processors is used instead of partition_active_processors. The wrong value is displayed. Use partition_active_processors instead. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by:...
```diff diff --git a/arch/powerpc/platforms/pseries/lparcfg.c b/arch/powerpc/platforms/pseries/lparcfg.c index 62da20f9700a..acc640fccca1 100644 --- a/arch/powerpc/platforms/pseries/lparcfg.c +++ b/arch/powerpc/platforms/pseries/lparcfg.c @@ -553,7 +553,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) ...
248b20ed03545656bd1775ed115369854f58f55c
Analyze and fix the following issue in the Linux kernel code: arm64: dts: allwinner: A100: Add PMU mode
Problem Details: Add the Performance Monitoring Unit (PMU) device tree node to the A100 .dtsi, which tells DT users which interrupts are triggered by PMU overflow events on each core. Signed-off-by: Yangtao Li <frank@allwinnertech.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Cody Eksal <mas...
```diff diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi index a3dccf193765..1eca7c220ede 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi @@ -25,21 +25,21 @@ enable-method = "psci"; }; -...
e0f253a52ccee3cf3eb987e99756e20c68a1aac9
Analyze and fix the following issue in the Linux kernel code: clk: sunxi-ng: d1: Fix PLL_AUDIO0 preset
Problem Details: To work around a limitation in our clock modelling, we try to force two bits in the AUDIO0 PLL to 0, in the CCU probe routine. However the ~ operator only applies to the first expression, and does not cover the second bit, so we end up clearing only bit 1. Group the bit-ORing with parentheses, to make...
```diff diff --git a/drivers/clk/sunxi-ng/ccu-sun20i-d1.c b/drivers/clk/sunxi-ng/ccu-sun20i-d1.c index 9633d4506891..c80ac2dfbb60 100644 --- a/drivers/clk/sunxi-ng/ccu-sun20i-d1.c +++ b/drivers/clk/sunxi-ng/ccu-sun20i-d1.c @@ -1371,7 +1371,7 @@ static int sun20i_d1_ccu_probe(struct platform_device *pdev) /* Enforce...
44196383a26fcacbd6dcf5a1ab2dd8bf8e4132c0
Analyze and fix the following issue in the Linux kernel code: riscv: dts: sophgo: fix pinctrl base-address
Problem Details: Fix the base-address of the pinctrl controller to match its register address. Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com> Reviewed-by: Inochi Amaoto <inochiama@gmail.com> Fixes: 93b61555f509 ("riscv: dts: sophgo: Add initial SG2002 SoC device tree") Link: https://lore.kernel.org/r...
```diff diff --git a/arch/riscv/boot/dts/sophgo/sg2002.dtsi b/arch/riscv/boot/dts/sophgo/sg2002.dtsi index 242fde84443f..6616f578d190 100644 --- a/arch/riscv/boot/dts/sophgo/sg2002.dtsi +++ b/arch/riscv/boot/dts/sophgo/sg2002.dtsi @@ -16,7 +16,7 @@ }; soc { - pinctrl: pinctrl@3008000 { + pinctrl: pinctrl@300100...
c418ba6baca3ae10ffaf47b0803d2a9e6bf1af96
Analyze and fix the following issue in the Linux kernel code: crypto: hisilicon/qm - disable same error report before resetting
Problem Details: If an error indicating that the device needs to be reset is reported, disable the error reporting before device reset is complete, enable the error reporting after the reset is complete to prevent the same error from being reported repeatedly. Fixes: eaebf4c3b103 ("crypto: hisilicon - Unify hardware e...
```diff diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c index c5de1f6b6d3b..96fde9437b4b 100644 --- a/drivers/crypto/hisilicon/hpre/hpre_main.c +++ b/drivers/crypto/hisilicon/hpre/hpre_main.c @@ -1353,11 +1353,15 @@ static u32 hpre_get_hw_err_status(struct hisi_qm *qm)...
c163e40af9b2331b2c629fd4ec8b703ed4d4ae39
Analyze and fix the following issue in the Linux kernel code: timekeeping: Always check for negative motion
Problem Details: clocksource_delta() has two variants. One with a check for negative motion, which is only selected by x86. This is a historic leftover as this function was previously used in the time getter hot paths. Since 135225a363ae timekeeping_cycles_to_ns() has unconditional protection against this as a by-prod...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 2852fcd82cbd..53a5eda8219c 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -145,7 +145,6 @@ config X86 select ARCH_HAS_PARANOID_L1D_FLUSH select BUILDTIME_TABLE_SORT select CLKEVT_I8253 - select CLOCKSOURCE_VALIDATE_LAST_CYCLE select CLOCKSO...
d44d26987bb3df6d76556827097fc9ce17565cb8
Analyze and fix the following issue in the Linux kernel code: timekeeping: Remove CONFIG_DEBUG_TIMEKEEPING
Problem Details: Since 135225a363ae timekeeping_cycles_to_ns() handles large offsets which would lead to 64bit multiplication overflows correctly. It's also protected against negative motion of the clocksource unconditionally, which was exclusive to x86 before. timekeeping_advance() handles large offsets already corre...
```diff diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig index 2341393cfac1..26c01b9e3434 100644 --- a/arch/riscv/configs/defconfig +++ b/arch/riscv/configs/defconfig @@ -301,7 +301,6 @@ CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DEBUG_PER_CPU_MAPS=y CONFIG_SOFTLOCKUP_DETECTOR=y CONFIG_WQ_WATCHDOG=y -...
272fad470b6548d8f9fb293a3fc6918c9d053d91
Analyze and fix the following issue in the Linux kernel code: kdb: Fix breakpoint enable to be silent if already enabled
Problem Details: Fix the breakpoint enable command (be) to a logic that is inline with the breakpoint disable command (bd) in which if the breakpoint is already in an enabled state, do not print the message of enabled again to the user. Also a small nit fix of the new line in a separate print. Signed-off-by: Nir Lich...
```diff diff --git a/kernel/debug/kdb/kdb_bp.c b/kernel/debug/kdb/kdb_bp.c index 372025cf1ca3..c0c2072f5452 100644 --- a/kernel/debug/kdb/kdb_bp.c +++ b/kernel/debug/kdb/kdb_bp.c @@ -460,13 +460,15 @@ static int kdb_bc(int argc, const char **argv) break; case KDBCMD_BE: + if (bp->bp_enabled) + break; + ...
9131d6a7a726d7a372bc35d27df9ebe3f011508e
Analyze and fix the following issue in the Linux kernel code: kdb: Remove fallback interpretation of arbitrary numbers as hex
Problem Details: Remove logic that enables a fallback of interpreting numbers supplied in KDB CLI to be interpreted as hex without explicit "0x" prefix as this can be confusing for the end users. Suggested-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by:...
```diff diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index f8703ab760d9..5f4be507d79f 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -402,23 +402,15 @@ static void kdb_printenv(void) */ int kdbgetularg(const char *arg, unsigned long *value) { - /* - * If the...
0c10cc2435115c36dcb611f8e1ed99ba6de6f17f
Analyze and fix the following issue in the Linux kernel code: trace: kdb: Replace simple_strtoul with kstrtoul in kdb_ftdump
Problem Details: The function simple_strtoul performs no error checking in scenarios where the input value overflows the intended output variable. This results in this function successfully returning, even when the output does not match the input string (aka the function returns successfully even when the result is wro...
```diff diff --git a/kernel/trace/trace_kdb.c b/kernel/trace/trace_kdb.c index 59857a1ee44c..1e72d20b3c2f 100644 --- a/kernel/trace/trace_kdb.c +++ b/kernel/trace/trace_kdb.c @@ -96,22 +96,19 @@ static int kdb_ftdump(int argc, const char **argv) { int skip_entries = 0; long cpu_file; - char *cp; + int err; int c...
120fb87ced8eb95531ff69ec269fcbcc5be24e9c
Analyze and fix the following issue in the Linux kernel code: kdb: Replace the use of simple_strto with safer kstrto in kdb_main
Problem Details: The simple_str* family of functions perform no error checking in scenarios where the input value overflows the intended output variable. This results in these functions successfully returning even when the output does not match the input string. Or as it was mentioned [1], "...simple_strtol(), simple_...
```diff diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index f5f7d7fb5936..f8703ab760d9 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -306,8 +306,8 @@ static int kdbgetulenv(const char *match, unsigned long *value) return KDB_NOTENV; if (strlen(ep) == 0) r...
0ceb2745283fb722957f0678b83b6e139bc7bce1
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sll: Improve gpc description
Problem Details: According to fsl,imx-gpc.yaml, 'clocks', 'clock-names', and 'pgc' are required properties. Describe them to fix the following dt-schema warnings: interrupt-controller@20dc000: 'clocks' is a required property interrupt-controller@20dc000: 'clock-names' is a required property interrupt-controller@20dc0...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi index 27019c750167..8c5ca4f9b87f 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi @@ -599,6 +599,18 @@ #interrupt-cells = <3>; interrupts = <GIC_SPI 89 IRQ_TYPE_...
4e57a0c056e5532bb5c73adf66ac9b48ce39779b
Analyze and fix the following issue in the Linux kernel code: dt-bindings: power: fsl,imx-gpc: Document fsl,imx6sll-gpc
Problem Details: Document the existing fsl,imx6sll-gpc compatible used with fsl,imx6q-gpc fallback. This fixes the following dt-schema warning: ['fsl,imx6sll-gpc', 'fsl,imx6q-gpc'] is too long Signed-off-by: Fabio Estevam <festevam@denx.de> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by...
```diff diff --git a/Documentation/devicetree/bindings/power/fsl,imx-gpc.yaml b/Documentation/devicetree/bindings/power/fsl,imx-gpc.yaml index c21a66422d4f..9de3fe73c1eb 100644 --- a/Documentation/devicetree/bindings/power/fsl,imx-gpc.yaml +++ b/Documentation/devicetree/bindings/power/fsl,imx-gpc.yaml @@ -30,6 +30,7 @@...
82cec771fb4378960cc373df1793fc94fb2caff0
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sl: Pass tempmon #thermal-sensor-cells
Problem Details: According to fsl,imx-anatop.yaml, #thermal-sensor-cells is a required property. Add it to fix the following dt-schema warning: tempmon: '#thermal-sensor-cells' is a required property Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi index 1676d689c355..941a2f185056 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi @@ -631,6 +631,7 @@ nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>; nvmem-...
e6ae4506ab70a7c0ca23f0cca3dfeb9e198aa6b4
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sx: Fix tempmon description
Problem Details: According to imx-thermal.yaml, the valid compatible string for i.MX6SX is just: compatible = "fsl,imx6sx-tempmon". Also pass #thermal-sensor-cells = <0> as it is a required property. Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi index a94bebaa858a..a9550f115f82 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi @@ -715,13 +715,14 @@ }; tempmon: tempmon { - compatible = "fsl,imx6sx-tempmo...
644cb51e923ef296aef356dd6a5485c9546b486f
Analyze and fix the following issue in the Linux kernel code: dt-bindings: soc: imx: fsl,imx-anatop: Fix the i.MX7 irq number
Problem Details: Unlike the other i.MX devices, i.MX7 has only two anatop interrupts. Add logic that contemplates such case to fix the following dt-schema warning: anatop@30360000: interrupts: [[0, 49, 4], [0, 51, 4]] is too short Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Alexander Stein <alexande...
```diff diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml index c4ae4f28422b..ae708a658d52 100644 --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.ya...
56ead702150bb8086e3cc7e80696e701ee4dcc02
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sll: Fix the last SPDIF clock name
Problem Details: The last SPDIF clock is IMX6SLL_CLK_SPBA, so change the last clock-name entry to 'spba' as expected by fsl,spdif.yaml. This fixes the following dt-schema warning: spdif@2004000: clock-names:9: 'spba' was expected Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Shawn Guo <shawnguo@kern...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi index 5cab9bf577c1..080d3fb14adf 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi @@ -173,7 +173,7 @@ "rxtx1", "rxtx2", "rxtx3", "rxtx4", ...
341468e0ab4bb1b26ad0b0cee7c6db4bf283043a
Analyze and fix the following issue in the Linux kernel code: lib/iov_iter: fix bvec iterator setup
Problem Details: .bi_size of bvec iterator should be initialized as real max size for walking, and .bi_bvec_done just counts how many bytes need to be skipped in the 1st bvec, so .bi_size isn't related with .bi_bvec_done. This patch fixes bvec iterator initialization, and the inner `size` check isn't needed any more, ...
```diff diff --git a/lib/iov_iter.c b/lib/iov_iter.c index c761f6db3cb4..4a54c7af62c0 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -1700,7 +1700,7 @@ static ssize_t iov_iter_extract_bvec_pages(struct iov_iter *i, skip = 0; } bi.bi_idx = 0; - bi.bi_size = maxsize + skip; + bi.bi_size = maxsize; bi.bi_bve...
b2183187c5fd30659b9caccb92f7e5e680301769
Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: xlnx,axi-ethernet: Correct phy-mode property value
Problem Details: Correct phy-mode property value to 1000base-x. Fixes: cbb1ca6d5f9a ("dt-bindings: net: xlnx,axi-ethernet: convert bindings document to yaml") Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked...
```diff diff --git a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml index e95c21628281..fb02e579463c 100644 --- a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml +++ b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml @...
0053892ff7d4bab5efdb4def0fd211ec36e26f69
Analyze and fix the following issue in the Linux kernel code: irqchip/mips-gic: Fix selection of GENERIC_IRQ_EFFECTIVE_AFF_MASK
Problem Details: Without SMP enabled (such as in allnoconfig), there is a Kconfig warning because CONFIG_IRQ_EFFECTIVE_AFF_MASK is unconditionally selected by CONFIG_MIPS_GIC: WARNING: unmet direct dependencies detected for GENERIC_IRQ_EFFECTIVE_AFF_MASK Depends on [n]: SMP [=n] Selected by [y]: - MIPS_G...
```diff diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index f20adf759d40..ef0fa6975dab 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -352,7 +352,7 @@ config KEYSTONE_IRQ config MIPS_GIC bool - select GENERIC_IRQ_EFFECTIVE_AFF_MASK + select GENERIC_IRQ_EFFECTIVE_AFF_MASK if ...
7e06561fcd9636b6483c5fcd8fe935475f4944f8
Analyze and fix the following issue in the Linux kernel code: rust: macros: enable paste! use from macro_rules!
Problem Details: According to the rustdoc for the proc_macro crate[1], tokens captured from a "macro variable" (e.g. from within macro_rules!) may be delimited by invisible tokens and be contained within a proc_macro::Group. Previously, this scenario was not handled by macros::paste, which caused a proc-macro panic wh...
```diff diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs index 114a5f7fc645..83a041570e1e 100644 --- a/rust/macros/lib.rs +++ b/rust/macros/lib.rs @@ -304,12 +304,25 @@ pub fn pinned_drop(args: TokenStream, input: TokenStream) -> TokenStream { /// /// # Example /// -/// ```ignore -/// use kernel::macro::paste; -...
4d99e509c161f8610de125202c648fa4acd00541
Analyze and fix the following issue in the Linux kernel code: bpf, bpftool: Fix incorrect disasm pc
Problem Details: This patch addresses the bpftool issue "Wrong callq address displayed"[0]. The issue stemmed from an incorrect program counter (PC) value used during disassembly with LLVM or libbfd. For LLVM: The PC argument must represent the actual address in the kernel to compute the correct relative address. Fo...
```diff diff --git a/tools/bpf/bpftool/jit_disasm.c b/tools/bpf/bpftool/jit_disasm.c index 7b8d9ec89ebd..c032d2c6ab6d 100644 --- a/tools/bpf/bpftool/jit_disasm.c +++ b/tools/bpf/bpftool/jit_disasm.c @@ -80,7 +80,8 @@ symbol_lookup_callback(__maybe_unused void *disasm_info, static int init_context(disasm_ctx_t *ctx, c...
953e549471cabc9d4980f1da2e9fa79f4c23da06
Analyze and fix the following issue in the Linux kernel code: regmap: irq: Set lockdep class for hierarchical IRQ domains
Problem Details: Lockdep gives a false positive splat as it can't distinguish the lock which is taken by different IRQ descriptors from different IRQ chips that are organized in a way of a hierarchy: ====================================================== WARNING: possible circular locking dependency detected ...
```diff diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 33ec28e3a802..0bcd81389a29 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -511,12 +511,16 @@ exit: return IRQ_NONE; } +static struct lock_class_key regmap_irq_lock_class; +static...
24507ce81eaf0c34d91f3d1acaa73ee2f796190a
Analyze and fix the following issue in the Linux kernel code: bpf: ensure RCU Tasks Trace GP for sleepable raw tracepoint BPF links
Problem Details: Now that kernel supports sleepable tracepoints, the fact that bpf_probe_unregister() is asynchronous, i.e., that it doesn't wait for any in-flight tracepoints to conclude before returning, we now need to delay BPF raw tp link's deallocation and bpf_prog_put() of its underlying BPF program (regardless o...
```diff diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 0f5540627911..db2a987504b2 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -35,6 +35,7 @@ #include <linux/rcupdate_trace.h> #include <linux/memcontrol.h> #include <linux/trace_events.h> +#include <linux/tracepoint.h> #include <...
f44ec8733a8469143fde1984b5e6931b2e2f6f3f
Analyze and fix the following issue in the Linux kernel code: bpf: put bpf_link's program when link is safe to be deallocated
Problem Details: In general, BPF link's underlying BPF program should be considered to be reachable through attach hook -> link -> prog chain, and, pessimistically, we have to assume that as long as link's memory is not safe to free, attach hook's code might hold a pointer to BPF program and use it. As such, it's not ...
```diff diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index a8f1808a1ca5..aa7246a399f3 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -2976,12 +2976,24 @@ void bpf_link_inc(struct bpf_link *link) atomic64_inc(&link->refcnt); } +static void bpf_link_dealloc(struct bpf_link *link) +{ + /*...
2e8a12b82c40466204a832cf1a3ae9e9080710dc
Analyze and fix the following issue in the Linux kernel code: tracing: Fix syscall tracepoint use-after-free
Problem Details: The grace period used internally within tracepoint.c:release_probes() uses call_rcu() to batch waiting for quiescence of old probe arrays, rather than using the tracepoint_synchronize_unregister() which blocks while waiting for quiescence. With the introduction of faultable syscall tracepoints, this c...
```diff diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index 5658dc92f5b5..1848ce7e2976 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c @@ -106,13 +106,16 @@ static void rcu_free_old_probes(struct rcu_head *head) kfree(container_of(head, struct tp_probes, rcu)); } -static inline void release_pro...
69c0d824779843b51ca2339b2163db4d3b40c54c
Analyze and fix the following issue in the Linux kernel code: kselftest/arm64: Fix encoding for SVE B16B16 test
Problem Details: The test for SVE_B16B16 had a cut'n'paste of a SME instruction, fix it with a relevant SVE instruction. Fixes: 44d10c27bd75 ("kselftest/arm64: Add 2023 DPISA hwcap test coverage") Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241028-arm64-b16b16-test-v1-1-59a4a7449bd...
```diff diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c index 7e95ba5fd496..265654ec48b9 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -361,8 +361,8 @@ static void sveaes_sigill(void) static void sveb16b16_...
2287a4c1e11822d05a70d22f28b26bd810dd204e
Analyze and fix the following issue in the Linux kernel code: arm64: Expose ID_AA64ISAR1_EL1.XS to sanitised feature consumers
Problem Details: Despite KVM now being able to deal with XS-tagged TLBIs, we still don't expose these feature bits to KVM. Plumb in the feature in ID_AA64ISAR1_EL1. Fixes: 0feec7769a63 ("KVM: arm64: nv: Add handling of NXS-flavoured TLBI operations") Signed-off-by: Marc Zyngier <maz@kernel.org> Acked-by: Catalin Mari...
```diff diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 718728a85430..db994d1fd97e 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -228,6 +228,7 @@ static const struct arm64_ftr_bits ftr_id_aa64isar0[] = { }; static const struct arm64_ftr_bits f...
1caeda5ef2510e8af57b75edb74bd1daa6364c1e
Analyze and fix the following issue in the Linux kernel code: arm64/gcs: Fix outdated ptrace documentation
Problem Details: The ptrace documentation for GCS was written prior to the implementation of clone3() when we still blocked enabling of GCS via ptrace. This restriction was relaxed as part of implementing clone3() support since we implemented support for the GCS not being managed by the kernel but the documentation sti...
```diff diff --git a/Documentation/arch/arm64/gcs.rst b/Documentation/arch/arm64/gcs.rst index af58d9151cb7..1f65a3193e77 100644 --- a/Documentation/arch/arm64/gcs.rst +++ b/Documentation/arch/arm64/gcs.rst @@ -204,11 +204,8 @@ When returning from a signal handler: * A new regset NT_ARM_GCS is defined for use with PTR...
90a877216e6bd4cc336ecd85ad4e95cf7a1aa1c8
Analyze and fix the following issue in the Linux kernel code: KVM: nVMX: fix canonical check of vmcs12 HOST_RIP
Problem Details: HOST_RIP canonical check should check the L1 of CR4.LA57 stored in the vmcs12 rather than the current L1's because it is legal to change the CR4.LA57 value during VM exit from L2 to L1. This is a theoretical bug though, because it is highly unlikely that a VM exit will change the CR4.LA57 from the val...
```diff diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index 7ce44437394d..66c6d29fa5ec 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -2996,6 +2996,17 @@ static int nested_vmx_check_address_space_size(struct kvm_vcpu *vcpu, return 0; } +static bool is_l1_noncanonical...
e52ad1ddd0a3b07777141ec9406d5dc2c9a0de17
Analyze and fix the following issue in the Linux kernel code: KVM: x86: drop x86.h include from cpuid.h
Problem Details: Drop x86.h include from cpuid.h to allow the x86.h to include the cpuid.h instead. Also fix various places where x86.h was implicitly included via cpuid.h Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20240906221824.491834-2-mlevitsk@redhat.com [sean: fixup a mis...
```diff diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h index 41697cca354e..c8dc66eddefd 100644 --- a/arch/x86/kvm/cpuid.h +++ b/arch/x86/kvm/cpuid.h @@ -2,7 +2,6 @@ #ifndef ARCH_X86_KVM_CPUID_H #define ARCH_X86_KVM_CPUID_H -#include "x86.h" #include "reverse_cpuid.h" #include <asm/cpu.h> #include <asm/...
f0e7012c4b938606c7ca230154f181f8eed683eb
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Bypass register cache when querying CPL from kvm_sched_out()
Problem Details: When querying guest CPL to determine if a vCPU was preempted while in kernel mode, bypass the register cache, i.e. always read SS.AR_BYTES from the VMCS on Intel CPUs. If the kernel is running with full preemption enabled, using the register cache in the preemption path can result in stale and/or unin...
```diff diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h index 861d080ed4c6..5aff7222e40f 100644 --- a/arch/x86/include/asm/kvm-x86-ops.h +++ b/arch/x86/include/asm/kvm-x86-ops.h @@ -34,6 +34,7 @@ KVM_X86_OP(set_msr) KVM_X86_OP(get_segment_base) KVM_X86_OP(get_segment) KVM_X86_OP(...
de572491a97567c6aeb25ab620d2f9e6635bd50e
Analyze and fix the following issue in the Linux kernel code: KVM: x86: AMD's IBPB is not equivalent to Intel's IBPB
Problem Details: From Intel's documentation [1], "CPUID.(EAX=07H,ECX=0):EDX[26] enumerates support for indirect branch restricted speculation (IBRS) and the indirect branch predictor barrier (IBPB)." Further, from [2], "Software that executed before the IBPB command cannot control the predicted targets of indirect bran...
```diff diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 53112669be00..d695e7bc41ed 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -690,7 +690,9 @@ void kvm_set_cpu_caps(void) kvm_cpu_cap_set(X86_FEATURE_TSC_ADJUST); kvm_cpu_cap_set(X86_FEATURE_ARCH_CAPABILITIES); - if (boot_cpu_has...
6e44d2427b70911514663989963a114d466ca79d
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Fix a comment inside __kvm_set_or_clear_apicv_inhibit()
Problem Details: Change svm_vcpu_run() to vcpu_enter_guest() in the comment of __kvm_set_or_clear_apicv_inhibit() to make it reflect the fact. When one thread updates VM's APICv state due to updating the APICv inhibit reasons, it kicks off all vCPUs and makes them wait until the new reason has been updated and can be ...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index afd70c274692..7b347e564d10 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -10606,11 +10606,11 @@ void __kvm_set_or_clear_apicv_inhibit(struct kvm *kvm, if (!!old != !!new) { /* * Kick all vCPUs before setting apicv_inhibit_reasons ...
ef86fe036d0a98569b39131b343738baf5198985
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Fix a comment inside kvm_vcpu_update_apicv()
Problem Details: The sentence "... so that KVM can the AVIC doorbell to ..." doesn't have a verb. Fix it. After adding the verb 'use', that line exceeds 80 characters. Thus wrap the 'to' to the next line. Signed-off-by: Kai Huang <kai.huang@intel.com> Link: https://lore.kernel.org/r/666e991edf81e1fccfba9466f3fe6596...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 83fe0a78146f..afd70c274692 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -10576,8 +10576,8 @@ static void kvm_vcpu_update_apicv(struct kvm_vcpu *vcpu) * deleted if any vCPU has xAPIC virtualization and x2APIC enabled, but * and hardw...
9b15062cc05dbfec8092f5f08ac734fd29ed7b5a
Analyze and fix the following issue in the Linux kernel code: mfd: rtc: bd7xxxx Drop IC name from IRQ
Problem Details: A few ROHM PMICs have an RTC block which can be controlled by the rtc-bd70528 driver. The RTC driver needs the alarm interrupt information from the parent MFD driver. The MFD driver provides the interrupt information as a set of named interrupts, where the name is of form: <PMIC model>-rtc-alm-<x>, whe...
```diff diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c index 39f7514aa3d8..738d8b3b9ffe 100644 --- a/drivers/mfd/rohm-bd71828.c +++ b/drivers/mfd/rohm-bd71828.c @@ -32,15 +32,15 @@ static struct gpio_keys_platform_data bd71828_powerkey_data = { }; static const struct resource bd71815_rtc_irqs[...
bfa335f18d91c52fa0f8ba3e4d49afebbd9ee792
Analyze and fix the following issue in the Linux kernel code: iio: accel: adxl380: fix raw sample read
Problem Details: The adxl380_read_chn function returns either a negative value in case an error occurs or the actual sample. Check only for negative values after a channel is read. Fixes: df36de13677a ("iio: accel: add ADXL380 driver") Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Link: https://patch.ms...
```diff diff --git a/drivers/iio/accel/adxl380.c b/drivers/iio/accel/adxl380.c index f80527d899be..b19ee37df7f1 100644 --- a/drivers/iio/accel/adxl380.c +++ b/drivers/iio/accel/adxl380.c @@ -1181,7 +1181,7 @@ static int adxl380_read_raw(struct iio_dev *indio_dev, ret = adxl380_read_chn(st, chan->address); iio_d...
869aa5e847696bcda8966be9d03de2560226bcc3
Analyze and fix the following issue in the Linux kernel code: iio: adc: pac1921: Check for error code from devm_mutex_init() call
Problem Details: Even if it's not critical, the avoidance of checking the error code from devm_mutex_init() call today diminishes the point of using devm variant of it. Tomorrow it may even leak something. Add the missed check. Fixes: 371f778b83cd ("iio: adc: add support for pac1921") Signed-off-by: Andy Shevchenko <a...
```diff diff --git a/drivers/iio/adc/pac1921.c b/drivers/iio/adc/pac1921.c index a96fae546bc1..43a3dd321a50 100644 --- a/drivers/iio/adc/pac1921.c +++ b/drivers/iio/adc/pac1921.c @@ -1170,7 +1170,9 @@ static int pac1921_probe(struct i2c_client *client) return dev_err_probe(dev, PTR_ERR(priv->regmap), "Cann...
8ebfd09255219ae55f8a101f6aeb0f64dd780d88
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad4000: Check for error code from devm_mutex_init() call
Problem Details: Even if it's not critical, the avoidance of checking the error code from devm_mutex_init() call today diminishes the point of using devm variant of it. Tomorrow it may even leak something. Add the missed check. Fixes: 938fd562b974 ("iio: adc: Add support for AD4000") Signed-off-by: Andy Shevchenko <an...
```diff diff --git a/drivers/iio/adc/ad4000.c b/drivers/iio/adc/ad4000.c index 6ea491245084..b4a23c97ee52 100644 --- a/drivers/iio/adc/ad4000.c +++ b/drivers/iio/adc/ad4000.c @@ -637,7 +637,9 @@ static int ad4000_probe(struct spi_device *spi) indio_dev->name = chip->dev_name; indio_dev->num_channels = 1; - devm_m...
7adfc3484c03c8c79465bf5dc11bb5b1fca24da7
Analyze and fix the following issue in the Linux kernel code: iio: chemical: bme680: Fix indentation and unnecessary spaces
Problem Details: Fix indentation issues, line breaking and unnecessary spaces reported by checkpatch.pl. Reduce type casts by defining constants to be LL. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241021195316.58911-7-vassilisamir@gmail.com Signed-off-by: Jonathan Cam...
```diff diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c index 9e1b79fc580f..af16009170ea 100644 --- a/drivers/iio/chemical/bme680_core.c +++ b/drivers/iio/chemical/bme680_core.c @@ -224,7 +224,7 @@ static int bme680_read_calib(struct bme680_data *data, calib->res_heat_val = data->...
eea9a1156cb37dfa2b00a58f47c412f068b1484c
Analyze and fix the following issue in the Linux kernel code: iio: chemical: bme680: avoid using camel case
Problem Details: Rename camel case variable, as checkpatch.pl complains. While at it, fix also the indentation of the array for readability. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241021195316.58911-4-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonatha...
```diff diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c index 0b96534c6867..d228f90b4dc6 100644 --- a/drivers/iio/chemical/bme680_core.c +++ b/drivers/iio/chemical/bme680_core.c @@ -438,15 +438,15 @@ static u32 bme680_compensate_gas(struct bme680_data *data, u16 gas_res_adc, u32 c...
7804363d596a8f9e0f0643155b796b5cd629eea2
Analyze and fix the following issue in the Linux kernel code: iio: light: stk3310: simplify code in write_event_config callback
Problem Details: iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan <jstephan@baylibre.com> Link: https://patch.msgid.link/20241024-iio-fix-wri...
```diff diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index ed20b6714546..c6f950af5afa 100644 --- a/drivers/iio/light/stk3310.c +++ b/drivers/iio/light/stk3310.c @@ -330,9 +330,6 @@ static int stk3310_write_event_config(struct iio_dev *indio_dev, struct stk3310_data *data = iio_priv(indio_dev...
71490e9ef5a902407866df63e1f8c224e1d9d1db
Analyze and fix the following issue in the Linux kernel code: iio: imu: inv_mpu6050: simplify code in write_event_config callback
Problem Details: iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan <jstephan@baylibre.com> Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.man...
```diff diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 5680be153127..21ebf0f7e28f 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -1176,21 +1176,18 @@ static int inv_mpu6050_write_event_config(struct ...
d567ff3603cf256e3434cf325302da5ddf56c69e
Analyze and fix the following issue in the Linux kernel code: iio: light: veml6030: simplify code in write_event_config callback
Problem Details: iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan <jstephan@baylibre.com> Link: https://patch.msgid.link/20241024-iio-fix-wri...
```diff diff --git a/drivers/iio/light/veml6030.c b/drivers/iio/light/veml6030.c index d6f3b104b0e6..95751c101590 100644 --- a/drivers/iio/light/veml6030.c +++ b/drivers/iio/light/veml6030.c @@ -826,9 +826,6 @@ static int veml6030_write_interrupt_config(struct iio_dev *indio_dev, int ret; struct veml6030_data *data...
c9fd4cc90c0f8fb006797a59fecdcd69ce7211e3
Analyze and fix the following issue in the Linux kernel code: iio: light: ltr501: simplify code in write_event_config callback
Problem Details: iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan <jstephan@baylibre.com> Link: https://patch.msgid.link/20241024-iio-fix-wri...
```diff diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 469e05866bef..616dc6921702 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -1082,10 +1082,6 @@ static int ltr501_write_event_config(struct iio_dev *indio_dev, struct ltr501_data *data = iio_priv(indio_dev); ...
e2ce36e04701b616263e1e4faaf127605e02b358
Analyze and fix the following issue in the Linux kernel code: iio: light: bh1745: simplify code in write_event_config callback
Problem Details: iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan <jstephan@baylibre.com> Link: https://patch.msgid.link/20241024-iio-fix-wri...
```diff diff --git a/drivers/iio/light/bh1745.c b/drivers/iio/light/bh1745.c index 2e458e9d5d85..fc6bf062d4f5 100644 --- a/drivers/iio/light/bh1745.c +++ b/drivers/iio/light/bh1745.c @@ -643,41 +643,37 @@ static int bh1745_write_event_config(struct iio_dev *indio_dev, struct bh1745_data *data = iio_priv(indio_dev); ...
2219576883e709737f3100aa9ded84976be49bd7
Analyze and fix the following issue in the Linux kernel code: spi: zynqmp-gqspi: Undo runtime PM changes at driver exit time​
Problem Details: It's important to undo pm_runtime_use_autosuspend() with pm_runtime_dont_use_autosuspend() at driver exit time. So, call pm_runtime_dont_use_autosuspend() at driver exit time to fix it. Fixes: 9e3a000362ae ("spi: zynqmp: Add pm runtime support") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Link...
```diff diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c index 84cce78e4f2e..549a6e0c9654 100644 --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -1351,6 +1351,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev) clk_dis_all: pm_runtime_disable(&pd...
25d284715845a465a1a3693a09cf8b6ab8bd9caf
Analyze and fix the following issue in the Linux kernel code: spi: spi-mem: rtl-snand: Correctly handle DMA transfers
Problem Details: The RTL9300 has some limitations on the maximum DMA transfers possible. For reads this is 2080 bytes (520*4) for writes this is 520 bytes. Deal with this by splitting transfers into appropriately sized parts. Fixes: 42d20a6a61b8 ("spi: spi-mem: Add Realtek SPI-NAND controller") Signed-off-by: Chris Pa...
```diff diff --git a/drivers/spi/spi-realtek-rtl-snand.c b/drivers/spi/spi-realtek-rtl-snand.c index 23c42c8469e4..cd0484041147 100644 --- a/drivers/spi/spi-realtek-rtl-snand.c +++ b/drivers/spi/spi-realtek-rtl-snand.c @@ -231,19 +231,22 @@ out_deselect: static int rtl_snand_dma_xfer(struct rtl_snand *snand, int cs,...
f399051ec1ff02e74ae5c2517aed2cc486fd005b
Analyze and fix the following issue in the Linux kernel code: spi: tegra210-quad: Avoid shift-out-of-bounds
Problem Details: A shift-out-of-bounds issue was identified by UBSAN in the tegra_qspi_fill_tx_fifo_from_client_txbuf() function. UBSAN: shift-out-of-bounds in drivers/spi/spi-tegra210-quad.c:345:27 shift exponent 32 is too large for 32-bit type 'u32' (aka 'unsigned int') Call trace: tegra_qspi_start_cpu_base...
```diff diff --git a/drivers/spi/spi-tegra210-quad.c b/drivers/spi/spi-tegra210-quad.c index 40f2afad1899..08e49a876894 100644 --- a/drivers/spi/spi-tegra210-quad.c +++ b/drivers/spi/spi-tegra210-quad.c @@ -341,7 +341,7 @@ tegra_qspi_fill_tx_fifo_from_client_txbuf(struct tegra_qspi *tqspi, struct spi_t for (count = ...
5e53e4a66bc7430dd2d11c18a86410e3a38d2940
Analyze and fix the following issue in the Linux kernel code: regulator: rk808: Add apply_bit for BUCK3 on RK809
Problem Details: Currently, RK809's BUCK3 regulator is modelled in the driver as a configurable regulator with 0.5-2.4V voltage range. But the voltage setting is not actually applied, because when bit 6 of PMIC_POWER_CONFIG register is set to 0 (default), BUCK3 output voltage is determined by the external feedback resi...
```diff diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index 14b60abd6afc..01a8d0487918 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -1379,6 +1379,8 @@ static const struct regulator_desc rk809_reg[] = { .n_linear_ranges = ARRAY_...
e1f6fa55664a0eeb0a641f497e1adfcf6672e995
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout
Problem Details: Flush the g2h worker explicitly if TLB timeout happens which is observed on LNL and that points to the recent scheduling issue with E-cores on LNL. This is similar to the recent fix: commit e51527233804 ("drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout") and should be removed once ther...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c index 773de1f08db9..3cb228c773cd 100644 --- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c @@ -72,6 +72,8 @@ static void xe_gt_tlb_fence_timeout(struct work_str...
38c4c8722bd74452280951edc44c23de47612001
Analyze and fix the following issue in the Linux kernel code: drm/xe/ufence: Flush xe ordered_wq in case of ufence timeout
Problem Details: Flush xe ordered_wq in case of ufence timeout which is observed on LNL and that points to recent scheduling issue with E-cores. This is similar to the recent fix: commit e51527233804 ("drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout") and should be removed once there is a E-core schedu...
```diff diff --git a/drivers/gpu/drm/xe/xe_wait_user_fence.c b/drivers/gpu/drm/xe/xe_wait_user_fence.c index f5deb81eba01..5b4264ea38bd 100644 --- a/drivers/gpu/drm/xe/xe_wait_user_fence.c +++ b/drivers/gpu/drm/xe/xe_wait_user_fence.c @@ -155,6 +155,13 @@ int xe_wait_user_fence_ioctl(struct drm_device *dev, void *data,...
e4d32142d1de8bcafd90ea5f4f557104f0969c41
Analyze and fix the following issue in the Linux kernel code: tracing: Fix tracefs mount options
Problem Details: Commit 78ff64081949 ("vfs: Convert tracefs to use the new mount API") converted tracefs to use the new mount APIs caused mount options (e.g. gid=<gid>) to not take effect. The tracefs superblock can be updated from multiple paths: - on fs_initcall() to init_trace_printk_function_export() - fro...
```diff diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index 1748dff58c3b..cfc614c638da 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -392,6 +392,9 @@ static int tracefs_reconfigure(struct fs_context *fc) struct tracefs_fs_info *sb_opts = sb->s_fs_info; struct tracefs_fs_info *new_opts = fc->s_f...
d68cb6023356af3bd3193983ad4ec03954a0b3e2
Analyze and fix the following issue in the Linux kernel code: alienware-wmi: Fix spelling mistake "requieres" -> "requires"
Problem Details: There is a spelling mistake in a pr_warn message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20241101110230.3303197-1-colin.i.king@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux....
```diff diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c index 62cb81750573..a800c28bb4d5 100644 --- a/drivers/platform/x86/dell/alienware-wmi.c +++ b/drivers/platform/x86/dell/alienware-wmi.c @@ -1090,7 +1090,7 @@ static int __init alienware_wmi_init(void) if (quirk...
1c35f1ed1fe3c649f8c16214d0d3dd828b5265d9
Analyze and fix the following issue in the Linux kernel code: drm/xe: Use the filelist from drm for ccs_mode change
Problem Details: Drop the exclusive client count tracking and use the filelist from the drm to track the active clients. This also ensures the clients created internally by the driver won't block changing the ccs mode. Fixes: ce8c161cbad4 ("drm/xe: Add ref counting for xe_file") Signed-off-by: Balasubramani Vivekanand...
```diff diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 2da4affe4dfd..8487745c8b8b 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -88,10 +88,6 @@ static int xe_file_open(struct drm_device *dev, struct drm_file *file) mutex_init(&xef->exec_queue.l...
f7c7c5aa556378a2c8da72c1f7f238b6648f95fb
Analyze and fix the following issue in the Linux kernel code: pmdomain: imx93-blk-ctrl: correct remove path
Problem Details: The check condition should be 'i < bc->onecell_data.num_domains', not 'bc->onecell_data.num_domains' which will make the look never finish and cause kernel panic. Also disable runtime to address "imx93-blk-ctrl 4ac10000.system-controller: Unbalanced pm_runtime_enable!" Fixes: e9aa77d413c9 ("soc: imx:...
```diff diff --git a/drivers/pmdomain/imx/imx93-blk-ctrl.c b/drivers/pmdomain/imx/imx93-blk-ctrl.c index 904ffa55b8f4..b10348ac10f0 100644 --- a/drivers/pmdomain/imx/imx93-blk-ctrl.c +++ b/drivers/pmdomain/imx/imx93-blk-ctrl.c @@ -313,7 +313,9 @@ static void imx93_blk_ctrl_remove(struct platform_device *pdev) of_ge...
f3b8536c86bde4dcfba5bd7010358d90cacac07a
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx7ulp: Remove incorrect mmc fallback compatible
Problem Details: Per fsl-imx-esdhc.yaml, the correct compatible string for i.MX7ULP is: compatible = "fsl,imx7ulp-usdhc" Remove the undocumented "fsl,imx6sx-usdhc" fallback compatible. This fixes the following dt-schema warnings: mmc@2198000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx6sl-...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi b/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi index b093f2a447ae..3c6ef7bfba60 100644 --- a/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi @@ -218,7 +218,7 @@ }; usdhc0: mmc@40370000 { - compatible = "fsl,imx7ulp-usdhc...
46cccef08bce9e9420eb4b009f96bf2af96c67b3
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sl: Remove incorrect mmc fallback compatible
Problem Details: Per fsl-imx-esdhc.yaml, the correct compatible string for i.MX6SL is: compatible = "fsl,imx6sl-usdhc" Remove the undocumented "fsl,imx6q-usdhc" fallback compatible. This fixes the following dt-schema warnings: mmc@2190000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx6sl-usd...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi index 96f3c6b9e485..1676d689c355 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi @@ -859,7 +859,7 @@ }; usdhc1: mmc@2190000 { - compatible = "fsl,imx6sl-usdhc", ...
5011fd973bd64315a7b3908b0d28349eabf92da2
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sx: Remove incorrect mmc fallback compatible
Problem Details: Per fsl-imx-esdhc.yaml, the correct compatible string for i.MX6SX is: compatible = "fsl,imx6sx-usdhc" Remove the undocumented "fsl,imx6sl-usdhc" fallback compatible. This fixes the following dt-schema warnings: mmc@2198000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx6sl-us...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi index b386448486df..a94bebaa858a 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi @@ -998,7 +998,7 @@ }; usdhc1: mmc@2190000 { - compatible = "fsl,imx6sx-usdhc", ...
627659a62d78cacc4b562509ce5d92a83ac28c84
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sl/sll: Add the "fsl,imx6dl-gpt" fallback
Problem Details: Per fsl,imxgpt.yaml, the i.MX6SL GPT compatible should be described as: compatible = "fsl,imx6sl-gpt", "fsl,imx6dl-gpt"; Do as suggested to fix the following dt-schema warnings: timer@2098000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx6sl-gpt'] is too short 'fsl,imx1-gpt'...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi index 6aa61235e39e..96f3c6b9e485 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sl.dtsi @@ -378,7 +378,7 @@ }; gpt: timer@2098000 { - compatible = "fsl,imx6sl-gpt"; + ...
8a85a9aade360f76c888be34c94fe8374815d39f
Analyze and fix the following issue in the Linux kernel code: dt-bindings: dsp: fsl,dsp: fix power domain count
Problem Details: Per the current binding, QM/QXP DSPs are supposed to have 4 power domains, while the rest just 1. For QM/QXP, the 4 power domains are: DSP, DSP_RAM, MU13A, MU13B. First off, drop MU13A from the count as its already attached to lsio_mu13. This decreases the count to 3. Secondly, drop DSP and DSP_RAM f...
```diff diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml index 9af40da5688e..ab93ffd3d2e5 100644 --- a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml +++ b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml @@ -99,14 +99,35 @@ allOf: con...
bcc3d3120702ce87d0a8bca10278532c0d2e82d6
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sx: Align pin config nodes with bindings
Problem Details: Bindings expect pin configuration nodes in pinctrl to match certain naming and not be part of another fake node: pinctrl@30330000: '...' does not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Drop the wrapping node and adjust the names to have "grp" prefix. Diff looks big but this should have no...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sx-sabreauto.dts b/arch/arm/boot/dts/nxp/imx/imx6sx-sabreauto.dts index dfbfb8119bf3..033700e052b3 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sx-sabreauto.dts +++ b/arch/arm/boot/dts/nxp/imx/imx6sx-sabreauto.dts @@ -333,7 +333,7 @@ >; }; - pinctrl_usdhc3_100mhz:...
fcf19dc53cffc190b821e13c63f2aad0c6567e85
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6qp: Align pin config nodes with bindings
Problem Details: Bindings expect pin configuration nodes in pinctrl to match certain naming and not be part of another fake node: pinctrl@30330000: '...' does not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Drop the wrapping node and adjust the names to have "grp" prefix. Diff looks big but this should have no...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6qp-prtwd3.dts b/arch/arm/boot/dts/nxp/imx/imx6qp-prtwd3.dts index ae00d538a4df..fbe260c9872e 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6qp-prtwd3.dts +++ b/arch/arm/boot/dts/nxp/imx/imx6qp-prtwd3.dts @@ -548,7 +548,7 @@ >; }; - pinctrl_wifi_npd: wifinpd { + pinc...
6346b5b2b2e2f9c2dfa17519bb79f77459e0c259
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx50: Align pin config nodes with bindings
Problem Details: Bindings expect pin configuration nodes in pinctrl to match certain naming and not be part of another fake node: pinctrl@30330000: '...' does not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Drop the wrapping node and adjust the names to have "grp" prefix. Diff looks big but this should have no...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx50-evk.dts b/arch/arm/boot/dts/nxp/imx/imx50-evk.dts index 3f45c01d9cce..f40b0d5fdb85 100644 --- a/arch/arm/boot/dts/nxp/imx/imx50-evk.dts +++ b/arch/arm/boot/dts/nxp/imx/imx50-evk.dts @@ -52,40 +52,38 @@ }; &iomuxc { - imx50-evk { - pinctrl_cspi: cspigrp { - fsl...
4f3a5cbc79896612de84ff20c1dbea96b354f0ce
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx35: Align pin config nodes with bindings
Problem Details: Bindings expect pin configuration nodes in pinctrl to match certain naming and not be part of another fake node: pinctrl@30330000: '...' does not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Drop the wrapping node and adjust the names to have "grp" prefix. Diff looks big but this should have no...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx35-eukrea-cpuimx35.dtsi b/arch/arm/boot/dts/nxp/imx/imx35-eukrea-cpuimx35.dtsi index 17bd2a97609a..ef546525e2ec 100644 --- a/arch/arm/boot/dts/nxp/imx/imx35-eukrea-cpuimx35.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx35-eukrea-cpuimx35.dtsi @@ -44,40 +44,38 @@ }; &iomux...
045fff619312fb013540c80cff18aab3c33048ab
Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Equivalent transition from page to folio
Problem Details: If using the proposed function folio_zero_range(), should one switch from 'start + end' to 'start + length,' or use folio_zero_segment() Fixes: 1da86618bdce ("fs: Convert aops->write_begin to take a folio") Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
```diff diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index e370eaf9bfe2..f704ceef9539 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -222,7 +222,7 @@ static int ntfs_extend_initialized_size(struct file *file, if (err) goto out; - folio_zero_range(folio, zerofrom, folio_size(folio)); + folio_zero_ran...
5fc982fe7eca9d0cf7b25832450ebd4f7c8e1c36
Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Fix case when unmarked clusters intersect with zone
Problem Details: Reported-by: syzbot+7f3761b790fa41d0f3d5@syzkaller.appspotmail.com Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
```diff diff --git a/fs/ntfs3/run.c b/fs/ntfs3/run.c index 58e988cd8049..48566dff0dc9 100644 --- a/fs/ntfs3/run.c +++ b/fs/ntfs3/run.c @@ -1055,8 +1055,8 @@ int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, { int ret, err; CLST next_vcn, lcn, len; - size_t index; - bool ok; + size_t inde...
e2705dd3d16d1000f1fd8193d82447065de8c899
Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Fix warning in ni_fiemap
Problem Details: Use local runs_tree instead of cached. This way excludes rw_semaphore lock. Reported-by: syzbot+1c25748a40fe79b8a119@syzkaller.appspotmail.com Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
```diff diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c index 0763202d00c9..8d789b017fa9 100644 --- a/fs/ntfs3/attrib.c +++ b/fs/ntfs3/attrib.c @@ -977,7 +977,7 @@ int attr_data_get_block(struct ntfs_inode *ni, CLST vcn, CLST clen, CLST *lcn, /* Check for compressed frame. */ err = attr_is_frame_compressed(ni,...
d3fdc7ae2ca9cb93d634e84a2b90ebf340d6e622
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8mm-venice-gw73xx: remove compatible in overlay file
Problem Details: Remove compatible string in overlay file to fix below warning: 'gw,imx8mm-gw73xx-0x' is not one of ['fsl,ls1043a-rdb', 'fsl,ls1043a-qds'] Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-rs232-rts.dtso b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-rs232-rts.dtso index 9bee7159a67b..b1a9f35e1dfa 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-rs232-rts.dtso +++ b/arch/arm64/boot/dts/freescale/imx8mm-v...
e76d3aee909f24c09bc2b7851bab87356e2fe34d
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8qxp: change usbphy1 compatible
Problem Details: Make fsl,imx8qxp-usbphy compatible with fsl,imx7ulp-usbphy to fix below warning: arch/arm64/boot/dts/freescale/imx8qxp-colibri-aster.dtb: usbphy@5b100000: 'nxp,sim' is a required property from schema $id: http://devicetree.org/schemas/phy/fsl,mxs-usbphy.yaml# Signed-off-by: Xu Yang <xu.yang_2...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-conn.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-conn.dtsi index 46da21af3702..4eb48ad48745 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-ss-conn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-conn.dtsi @@ -4,6 +4,10 @@ * Dong Aisheng <aishen...
1531771f375e668661651e11d814be7b02cff1b4
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8qm: change usbphy1 compatible
Problem Details: Make fsl,imx8qm-usbphy compatible with fsl,imx7ulp-usbphy to fix below warning: arch/arm64/boot/dts/freescale/imx8qm-apalis-eval.dtb: usbphy@5b100000: 'nxp,sim' is a required property from schema $id: http://devicetree.org/schemas/phy/fsl,mxs-usbphy.yaml# Signed-off-by: Xu Yang <xu.yang_2@nxp...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi b/arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi index 545e175c88b3..ccf9f510e0f8 100644 --- a/arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi @@ -4,6 +4,10 @@ * Dong Aisheng <aisheng.do...
9358c1fde8f888c26a416ca6146cc576f062c56f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8dxl-ss-conn: change usbphy1 compatible
Problem Details: Make fsl,imx8dxl-usbphy compatible with fsl,imx7ulp-usbphy to fix below warning: arch/arm64/boot/dts/freescale/imx8dxl-evk.dtb: usbphy@5b100000: 'nxp,sim' is a required property from schema $id: http://devicetree.org/schemas/phy/fsl,mxs-usbphy.yaml# Signed-off-by: Xu Yang <xu.yang_2@nxp.com> ...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8dxl-ss-conn.dtsi b/arch/arm64/boot/dts/freescale/imx8dxl-ss-conn.dtsi index 1e02b04494e9..9b114bed084b 100644 --- a/arch/arm64/boot/dts/freescale/imx8dxl-ss-conn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8dxl-ss-conn.dtsi @@ -138,6 +138,10 @@ interrupts = <GIC_...
147359e23e5c9652ff8c5a98a51a7323bd51c94a
Analyze and fix the following issue in the Linux kernel code: counter: stm32-timer-cnt: fix device_node handling in probe_encoder()
Problem Details: Device nodes accessed via of_get_compatible_child() require of_node_put() to be called when the node is no longer required to avoid leaving a reference to the node behind, leaking the resource. In this case, the usage of 'tnode' is straightforward and there are no error paths, allowing for a single of...
```diff diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c index 186e73d6ccb4..0d8206adccb3 100644 --- a/drivers/counter/stm32-timer-cnt.c +++ b/drivers/counter/stm32-timer-cnt.c @@ -694,6 +694,7 @@ static int stm32_timer_cnt_probe_encoder(struct device *dev, } ret = of_property_re...
89115aeecf38bfee3c5e79561b5c34a256e1a06a
Analyze and fix the following issue in the Linux kernel code: drm/mediatek: Drop dependency on ARM
Problem Details: The recent attempt to make the MediaTek DRM driver build for non-ARM compile tests made the driver unbuildable for arm64 platforms. Since this is used on both ARM and arm64 platforms, just drop the dependency on ARM. Fixes: d2db0b8fd70b ("drm/mediatek: Allow build with COMPILE_TEST=y") Reviewed-by: CK...
```diff diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index 2e0e7c4079b6..f496e6cfdfe0 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -2,7 +2,7 @@ config DRM_MEDIATEK tristate "DRM Support for Mediatek SoCs" depends on DRM - depends on (AR...