id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
fc61fdfdc4dd03fa5cea784e1969ed3df049c6c8
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx95: Use GPU_CGC as core clock for GPU
Problem Details: The i.MX95 imx-sm introduced new GPU_CGC clock since imx-sm commit ca5e078833fa ("SM-128: Add clock management via CCM LPCG direct control") which are downstream clock of GPU clock. These new GPU_CGC clock gate the existing GPU clock. Currently, without clk_ignore_unused on kernel command line, those n...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx95-clock.h b/arch/arm64/boot/dts/freescale/imx95-clock.h index e1f91203e794..22311612e440 100644 --- a/arch/arm64/boot/dts/freescale/imx95-clock.h +++ b/arch/arm64/boot/dts/freescale/imx95-clock.h @@ -183,5 +183,6 @@ #define IMX95_CLK_SEL_A55P (IMX9...
19bc5f2a6962dfaa0e32d0e0bc2271993d85d414
Analyze and fix the following issue in the Linux kernel code: scsi: qla2xxx: Sanitize payload size to prevent member overflow
Problem Details: In qla27xx_copy_fpin_pkt() and qla27xx_copy_multiple_pkt(), the frame_size reported by firmware is used to calculate the copy length into item->iocb. However, the iocb member is defined as a fixed-size 64-byte array within struct purex_item. If the reported frame_size exceeds 64 bytes, subsequent memc...
```diff diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index a3971afc2dd1..a04a5aa0d005 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -878,6 +878,9 @@ qla27xx_copy_multiple_pkt(struct scsi_qla_host *vha, void **pkt, payload_size = sizeof(purex->els_...
84dc6037390b8607c5551047d3970336cb51ba9a
Analyze and fix the following issue in the Linux kernel code: scsi: target: iscsi: Fix use-after-free in iscsit_dec_session_usage_count()
Problem Details: In iscsit_dec_session_usage_count(), the function calls complete() while holding the sess->session_usage_lock. Similar to the connection usage count logic, the waiter signaled by complete() (e.g., in the session release path) may wake up and free the iscsit_session structure immediately. This creates ...
```diff diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 3319394bf542..c1888c42afdd 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -741,8 +741,11 @@ void iscsit_dec_session_usage_count(struct iscsit_session *s...
9411a89e9e7135cc459178fa77a3f1d6191ae903
Analyze and fix the following issue in the Linux kernel code: scsi: target: iscsi: Fix use-after-free in iscsit_dec_conn_usage_count()
Problem Details: In iscsit_dec_conn_usage_count(), the function calls complete() while holding the conn->conn_usage_lock. As soon as complete() is invoked, the waiter (such as iscsit_close_connection()) may wake up and proceed to free the iscsit_conn structure. If the waiter frees the memory before the current thread ...
```diff diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 5e6cf34929b5..3319394bf542 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -810,8 +810,11 @@ void iscsit_dec_conn_usage_count(struct iscsit_conn *conn) ...
fe2f8ad6f0999db3b318359a01ee0108c703a8c3
Analyze and fix the following issue in the Linux kernel code: scsi: core: Wake up the error handler when final completions race against each other
Problem Details: The fragile ordering between marking commands completed or failed so that the error handler only wakes when the last running command completes or times out has race conditions. These race conditions can cause the SCSI layer to fail to wake the error handler, leaving I/O through the SCSI host stuck as t...
```diff diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index eebca96c1fc1..b6e8730e049e 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -282,11 +282,20 @@ static void scsi_eh_inc_host_failed(struct rcu_head *head) { struct scsi_cmnd *scmd = container_of(head, typeof(*scm...
9eacec5d18f98f89be520eeeef4b377acee3e4b8
Analyze and fix the following issue in the Linux kernel code: scsi: storvsc: Process unsupported MODE_SENSE_10
Problem Details: The Hyper-V host does not support MODE_SENSE_10 and MODE_SENSE. The driver handles MODE_SENSE as unsupported command, but not for MODE_SENSE_10. Add MODE_SENSE_10 to the same handling logic and return correct code to SCSI layer. Fixes: 89ae7d709357 ("Staging: hv: storvsc: Move the storage driver out ...
```diff diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 6e4112143c76..b43d876747b7 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1144,7 +1144,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device, * The current SCSI handling on the host...
1cf342a7c3adc5877837b53bbceb5cc9eff60bbf
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Fix kvm_device leak in kvm_pch_pic_destroy()
Problem Details: In kvm_ioctl_create_device(), kvm_device has allocated memory, kvm_device->destroy() seems to be supposed to free its kvm_device struct, but kvm_pch_pic_destroy() is not currently doing this, that would lead to a memory leak. So, fix it. Cc: stable@vger.kernel.org Reviewed-by: Bibo Mao <maobibo@loong...
```diff diff --git a/arch/loongarch/kvm/intc/pch_pic.c b/arch/loongarch/kvm/intc/pch_pic.c index a698a73de399..4addb34bf432 100644 --- a/arch/loongarch/kvm/intc/pch_pic.c +++ b/arch/loongarch/kvm/intc/pch_pic.c @@ -475,6 +475,7 @@ static void kvm_pch_pic_destroy(struct kvm_device *dev) /* unregister pch pic device an...
7d8553fc75aefa7ec936af0cf8443ff90b51732e
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Fix kvm_device leak in kvm_eiointc_destroy()
Problem Details: In kvm_ioctl_create_device(), kvm_device has allocated memory, kvm_device->destroy() seems to be supposed to free its kvm_device struct, but kvm_eiointc_destroy() is not currently doing this, that would lead to a memory leak. So, fix it. Cc: stable@vger.kernel.org Reviewed-by: Bibo Mao <maobibo@loong...
```diff diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c index 29886876143f..dfaf6ccfdd8b 100644 --- a/arch/loongarch/kvm/intc/eiointc.c +++ b/arch/loongarch/kvm/intc/eiointc.c @@ -679,6 +679,7 @@ static void kvm_eiointc_destroy(struct kvm_device *dev) kvm_io_bus_unregister_dev(kvm, ...
0bf58cb7288a4d3de6d8ecbb3a65928a9362bf21
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Fix kvm_device leak in kvm_ipi_destroy()
Problem Details: In kvm_ioctl_create_device(), kvm_device has allocated memory, kvm_device->destroy() seems to be supposed to free its kvm_device struct, but kvm_ipi_destroy() is not currently doing this, that would lead to a memory leak. So, fix it. Cc: stable@vger.kernel.org Reviewed-by: Bibo Mao <maobibo@loongson....
```diff diff --git a/arch/loongarch/kvm/intc/ipi.c b/arch/loongarch/kvm/intc/ipi.c index 05cefd29282e..1058c13dba7f 100644 --- a/arch/loongarch/kvm/intc/ipi.c +++ b/arch/loongarch/kvm/intc/ipi.c @@ -459,6 +459,7 @@ static void kvm_ipi_destroy(struct kvm_device *dev) ipi = kvm->arch.ipi; kvm_io_bus_unregister_dev(kv...
14ea5a3625881d79f75418c66e3a7d98db8518e1
Analyze and fix the following issue in the Linux kernel code: LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
Problem Details: The binding wants the node to be named "i2c-number", but those are named "i2c-gpio-number" instead. Thus rename those to i2c-0, i2c-1 to adhere to the binding and suppress dtbs_check warnings. Cc: stable@vger.kernel.org Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-of...
```diff diff --git a/arch/loongarch/boot/dts/loongson-2k1000.dtsi b/arch/loongarch/boot/dts/loongson-2k1000.dtsi index 440a8f3c01f4..be4f7d119660 100644 --- a/arch/loongarch/boot/dts/loongson-2k1000.dtsi +++ b/arch/loongarch/boot/dts/loongson-2k1000.dtsi @@ -46,7 +46,7 @@ }; /* i2c of the dvi eeprom edid */ - i2c...
762cf75bec2ad9d17899087899a34336b1757238
Analyze and fix the following issue in the Linux kernel code: LoongArch: dts: Describe PCI sideband IRQ through interrupt-extended
Problem Details: SoC integrated peripherals on LS2K1000 and LS2K2000 could be discovered as PCI devices, but require sideband interrupts to function, which are previously described by interrupts and interrupt-parent properties. However, pci/pci-device.yaml allows interrupts property to only specify PCI INTx interrupts...
```diff diff --git a/arch/loongarch/boot/dts/loongson-2k1000.dtsi b/arch/loongarch/boot/dts/loongson-2k1000.dtsi index 60ab425f793f..eee06b84951c 100644 --- a/arch/loongarch/boot/dts/loongson-2k1000.dtsi +++ b/arch/loongarch/boot/dts/loongson-2k1000.dtsi @@ -437,54 +437,47 @@ gmac0: ethernet@3,0 { reg = <0x1...
a91f86e27087f250a5d9c89bb4a427b9c30fd815
Analyze and fix the following issue in the Linux kernel code: LoongArch: Fix PMU counter allocation for mixed-type event groups
Problem Details: When validating a perf event group, validate_group() unconditionally attempts to allocate hardware PMU counters for the leader, sibling events and the new event being added. This is incorrect for mixed-type groups. If a PERF_TYPE_SOFTWARE event is part of the group, the current code still tries to all...
```diff diff --git a/arch/loongarch/kernel/perf_event.c b/arch/loongarch/kernel/perf_event.c index 9d257c8519c9..e34a6fb33e11 100644 --- a/arch/loongarch/kernel/perf_event.c +++ b/arch/loongarch/kernel/perf_event.c @@ -626,6 +626,18 @@ static const struct loongarch_perf_event *loongarch_pmu_map_cache_event(u64 conf r...
8124b4a4a96b57d6cc3705a9df9623c52baa047b
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx: move nand related property under nand@0
Problem Details: Add child node nand@0 and move NAND related property under it to align modern nand-controller.yaml. Fix below CHECK_DTBS warnings: arch/arm/boot/dts/nxp/imx/imx6ull-colibri-aster.dtb: nand-controller@1806000 (fsl,imx6q-gpmi-nand): Unevaluated properties are not allowed ('nand-ecc-mode', 'nand-ecc-st...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi b/arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi index 547fb141ec0c..f452764fae00 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi @@ -36,8 +36,12 @@ &gpmi { pinctrl-names = "defaul...
af6c4ea19df9a6612c15f7647d47397e4314d4e7
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sx: update gpmi #size-cells to 0
Problem Details: Update gpmi #size-cells to 0 to fix below CHECK_DTB warnings: arch/arm/boot/dts/nxp/imx/imx6sx-nitrogen6sx.dtb: nand-controller@1806000 (fsl,imx6sx-gpmi-nand): #size-cells: 0 was expected from schema $id: http://devicetree.org/schemas/mtd/gpmi-nand.yaml# Signed-off-by: Frank Li <Frank.Li@nxp...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi index 5132b575b001..1426f357d474 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sx.dtsi @@ -224,7 +224,7 @@ gpmi: nand-controller@1806000 { compatible = "fsl,imx6sx-gpmi-nand...
6cdaa5346d6f3f6116e607e49c92c2401390c267
Analyze and fix the following issue in the Linux kernel code: drm/xe: Add context-based invalidation to GuC TLB invalidation backend
Problem Details: Introduce context-based invalidation support to the GuC TLB invalidation backend. This is implemented by iterating over each exec queue per GT within a VM, skipping inactive queues, and issuing a context-based (GuC ID) H2G TLB invalidation. All H2G messages, except the final one, are sent with an inval...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_tlb_inval.c b/drivers/gpu/drm/xe/xe_guc_tlb_inval.c index 070d2e2cb7c9..ced58f46f846 100644 --- a/drivers/gpu/drm/xe/xe_guc_tlb_inval.c +++ b/drivers/gpu/drm/xe/xe_guc_tlb_inval.c @@ -6,15 +6,19 @@ #include "abi/guc_actions_abi.h" #include "xe_device.h" +#include "xe_e...
bbd36787308413d8564e1b0498fe6c1f765fa6c1
Analyze and fix the following issue in the Linux kernel code: drm/xe: Ban entire multi-queue group on any job timeout
Problem Details: In multi-queue mode, we only have control over the entire group, so we cannot ban individual queues or signal fences until the whole group is removed from hardware. Implement banning of the entire group if any job within it times out. v2: - Fix lock inversion (Niranjana) - Initialize new queues in g...
```diff diff --git a/drivers/gpu/drm/xe/xe_exec_queue_types.h b/drivers/gpu/drm/xe/xe_exec_queue_types.h index 5fc516b0bb77..562ea75891ba 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue_types.h +++ b/drivers/gpu/drm/xe/xe_exec_queue_types.h @@ -66,6 +66,8 @@ struct xe_exec_queue_group { bool sync_pending; /** @banned...
48e6a9c4a20870e09f85ff1a3628275d6bce31c0
Analyze and fix the following issue in the Linux kernel code: of: platform: Use default match table for /firmware
Problem Details: Calling of_platform_populate() without a match table will only populate the immediate child nodes under /firmware. This is usually fine, but in the case of something like a "simple-mfd" node such as "raspberrypi,bcm2835-firmware", those child nodes will not be populated. And subsequent calls won't work...
```diff diff --git a/drivers/of/platform.c b/drivers/of/platform.c index f77cb19973a5..a6dca3a005aa 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -569,7 +569,7 @@ static int __init of_platform_default_populate_init(void) node = of_find_node_by_path("/firmware"); if (node) { - of_platform_p...
01c430b1cfa8a6ce0cbf99edc38dac3bfc51e464
Analyze and fix the following issue in the Linux kernel code: dt-bindings: phy: mediatek,hdmi-phy: Fix clock output names for MT8195
Problem Details: For all of the HDMI PHYs compatible with the one found on MT8195 the output clock has a different datasheet name and specifically it is called "hdmi_txpll", differently from the older HDMI PHYs which output block is called "hdmitx_dig_cts". Replace clock output name string check by max item number one...
```diff diff --git a/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml b/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml index f3a8b0b745d1..10f1d9326f18 100644 --- a/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml +++ b/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml @...
6142b726e6e64870ab0c7ffb158bffa141f83bb6
Analyze and fix the following issue in the Linux kernel code: tools/power/x86/intel-speed-select: v1.25 release
Problem Details: This version includes the following changes: - Allow read only commands for non root users when permitted - Fix file descriptor leak in isolate_cpus() - Replace hardcoded libnl3 include path Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
```diff diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index 68c9955dd7f4..dd9056ddb016 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -16,7 +16,7 @@ struct process_cmd_struct { i...
56c17ee151c6e1a73d77e15b82a8e2130cd8dd16
Analyze and fix the following issue in the Linux kernel code: tools/power/x86/intel-speed-select: Fix file descriptor leak in isolate_cpus()
Problem Details: The file descriptor opened in isolate_cpus() when (!level) is true was not being closed before returning, causing a file descriptor leak in both the error path and the success path. When write() fails at line 950, the function returns at line 953 without closing the file descriptor. Similarly, on succ...
```diff diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index 807feb17bb81..68c9955dd7f4 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -962,9 +962,11 @@ int isolate_cpus(struct isst...
21adcd5ec99f342489a49e9d237a987b1bd9fab5
Analyze and fix the following issue in the Linux kernel code: tools/power/x86/intel-speed-select: Use pkg-config for libnl-3.0 detection
Problem Details: Replace hardcoded libnl3 include path with pkg-config detection to improve portability across different distributions and build environments. The previous implementation used a fixed path constructed from the compiler's sysroot, which could fail on systems with non-standard library installations. Now ...
```diff diff --git a/tools/power/x86/intel-speed-select/Makefile b/tools/power/x86/intel-speed-select/Makefile index 8d3a02a20f3d..6b299aae2ded 100644 --- a/tools/power/x86/intel-speed-select/Makefile +++ b/tools/power/x86/intel-speed-select/Makefile @@ -13,7 +13,13 @@ endif # Do not use make's built-in rules # (this...
5c145c03188bc9ba1c29e0bc4d527a5978fc47f9
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to avoid mapping wrong physical block for swapfile
Problem Details: Xiaolong Guo reported a f2fs bug in bugzilla [1] [1] https://bugzilla.kernel.org/show_bug.cgi?id=220951 Quoted: "When using stress-ng's swap stress test on F2FS filesystem with kernel 6.6+, the system experiences data corruption leading to either: 1 dm-verity corruption errors and device reboot 2 F2...
```diff diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 3c2af0ef62bb..4e2f10bd2b07 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -4206,6 +4206,7 @@ static int check_swap_activate(struct swap_info_struct *sis, while (cur_lblock < last_lblock && cur_lblock < sis->max) { struct f2fs_map_blocks map; + bool...
d194f112a9e6504ea23bd4a7b350c089fae9defd
Analyze and fix the following issue in the Linux kernel code: f2fs: advance index and offset after zeroing in large folio read
Problem Details: In f2fs_read_data_large_folio(), the block zeroing path calls folio_zero_range() and then continues the loop. However, it fails to advance index and offset before continuing. This can cause the loop to repeatedly process the same subpage of the folio, leading to stalls/hangs and incorrect progress whe...
```diff diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 8ca24206fc68..ef44b8421cd7 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2470,7 +2470,7 @@ next_folio: ffs = NULL; nrpages = folio_nr_pages(folio); - for (; nrpages; nrpages--, max_nr_pages--) { + for (; nrpages; nrpages--, max_nr_pages--, index++,...
50ac3ecd8e05b6bcc350c71a4307d40c030ec7e4
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to do sanity check on node footer in {read,write}_end_io
Problem Details: -----------[ cut here ]------------ kernel BUG at fs/f2fs/data.c:358! Call Trace: <IRQ> blk_update_request+0x5eb/0xe70 block/blk-mq.c:987 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1149 blk_complete_reqs block/blk-mq.c:1224 [inline] blk_done_softirq+0x107/0x160 block/blk-mq.c:1229 handle_softirq...
```diff diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index f461f1318b4c..9b70b6d33703 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -172,6 +172,11 @@ static void f2fs_finish_read_bio(struct bio *bio, bool in_task) while (nr_pages--) dec_page_count(F2FS_F_SB(folio), __read_io_type(folio)); + if (F2FS_F_S...
0a736109c9d29de0c26567e42cb99b27861aa8ba
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to do sanity check on node footer in __write_node_folio()
Problem Details: Add node footer sanity check during node folio's writeback, if sanity check fails, let's shutdown filesystem to avoid looping to redirty and writeback in .writepages. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
```diff diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 00587e783b44..30e26b878af0 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1763,7 +1763,11 @@ static bool __write_node_folio(struct folio *folio, bool atomic, bool *submitted /* get old block addr of this node page */ nid = nid_of_node(folio); - f2fs...
e48e16f3e37fac76e2f0c14c58df2b0398a323b0
Analyze and fix the following issue in the Linux kernel code: f2fs: support non-4KB block size without packed_ssa feature
Problem Details: Currently, F2FS requires the packed_ssa feature to be enabled when utilizing non-4KB block sizes (e.g., 16KB). This restriction limits the flexibility of filesystem formatting options. This patch allows F2FS to support non-4KB block sizes even when the packed_ssa feature is disabled. It adjusts the SS...
```diff diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 579aafb0055f..f82c9c424748 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -545,13 +545,25 @@ struct fsync_inode_entry { #define nats_in_cursum(jnl) (le16_to_cpu((jnl)->n_nats)) #define sits_in_cursum(jnl) (le16_to_cpu((jnl)->n_sits)) -#define nat_in_...
ce2739e482bce8d2c014d76c4531c877f382aa54
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to avoid UAF in f2fs_write_end_io()
Problem Details: As syzbot reported an use-after-free issue in f2fs_write_end_io(). It is caused by below race condition: loop device umount - worker_thread - loop_process_work - do_req_filebacked - lo_rw_aio - lo_rw_aio_complete - blk_mq_end_request - blk_update_request - f2fs_write_en...
```diff diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 2e133a723b99..f461f1318b4c 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -378,14 +378,20 @@ static void f2fs_write_end_io(struct bio *bio) folio->index != nid_of_node(folio)); dec_page_count(sbi, type); + + /* + * we should access sbi before ...
efad162f5a840ae178e7761c176c49f433c7bb68
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix map_kptr test failure
Problem Details: On my arm64 machine, I get the following failure: ... tester_init:PASS:tester_log_buf 0 nsec process_subtest:PASS:obj_open_mem 0 nsec process_subtest:PASS:specs_alloc 0 nsec serial_test_map_kptr:PASS:rcu_tasks_trace_gp__open_and_load 0 nsec ... test_map_kptr_success:PASS:map_kptr__open_an...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/map_kptr.c b/tools/testing/selftests/bpf/prog_tests/map_kptr.c index 8743df599567..f372162c0280 100644 --- a/tools/testing/selftests/bpf/prog_tests/map_kptr.c +++ b/tools/testing/selftests/bpf/prog_tests/map_kptr.c @@ -131,6 +131,25 @@ static int kern_sync_rcu...
47d440d0a5bb822f3f4e4b2479246da5efb765e6
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Support when CONFIG_VXLAN=m
Problem Details: If CONFIG_VXLAN is 'm', struct vxlanhdr will not be in vmlinux.h. Add a ___local variant to support cases where vxlan is a module. Fixes: 8517b1abe5ea ("selftests/bpf: Integrate test_tc_tunnel.sh tests into test_progs") Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Andrii Nakryi...
```diff diff --git a/tools/testing/selftests/bpf/progs/test_tc_tunnel.c b/tools/testing/selftests/bpf/progs/test_tc_tunnel.c index 7330c61b5730..7376df405a6b 100644 --- a/tools/testing/selftests/bpf/progs/test_tc_tunnel.c +++ b/tools/testing/selftests/bpf/progs/test_tc_tunnel.c @@ -23,7 +23,12 @@ static const int cfg_u...
c25d01e1c4f2d43f47af87c00e223f5ca7c71792
Analyze and fix the following issue in the Linux kernel code: virt: vbox: uapi: Mark inner unions in packed structs as packed
Problem Details: The unpacked unions within a packed struct generates alignment warnings on clang for 32-bit ARM: ./usr/include/linux/vbox_vmmdev_types.h:239:4: error: field u within 'struct vmmdev_hgcm_function_parameter32' is less aligned than 'union (unnamed union at ./usr/include/linux/vbox_vmmdev_types.h:223:2)...
```diff diff --git a/include/uapi/linux/vbox_vmmdev_types.h b/include/uapi/linux/vbox_vmmdev_types.h index 6073858d52a2..11f3627c3729 100644 --- a/include/uapi/linux/vbox_vmmdev_types.h +++ b/include/uapi/linux/vbox_vmmdev_types.h @@ -236,7 +236,7 @@ struct vmmdev_hgcm_function_parameter32 { /** Relative to the req...
1e5271393d777f6159d896943b4c44c4f3ecff52
Analyze and fix the following issue in the Linux kernel code: hyper-v: Mark inner union in hv_kvp_exchg_msg_value as packed
Problem Details: The unpacked union within a packed struct generates alignment warnings on clang for 32-bit ARM: ./usr/include/linux/hyperv.h:361:2: error: field within 'struct hv_kvp_exchg_msg_value' is less aligned than 'union hv_kvp_exchg_msg_value::(anonymous at ./usr/include/linux/hyperv.h:361:2)' and is usu...
```diff diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h index aaa502a7bff4..1749b35ab2c2 100644 --- a/include/uapi/linux/hyperv.h +++ b/include/uapi/linux/hyperv.h @@ -362,7 +362,7 @@ struct hv_kvp_exchg_msg_value { __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; __u32 value_u32; __u64 value...
9a19a2c7b2b065d2060a9d95c4cfcc4d4d31b925
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: northstar2: Drop "arm,cci-400-pmu" fallback compatible
Problem Details: The "arm,cci-400-pmu" compatible is not documented as a valid fallback nor is it used, so drop it. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260106-dt-dtbs-broadcom-fixes-v1-13-ba45874e4553@kernel.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom...
```diff diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi index 85d997ab57a1..f0374b90f6aa 100644 --- a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi +++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi @@ -505,8 +505,7 @@ ranges = <0 0x65590000 0x...
172711e80a70d2ee267958062428c471ed7e77f2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: northstar2: Drop QSPI "clock-names"
Problem Details: The "clock-names" property is not documented for the "brcm,spi-bcm-qspi" binding nor in use by the kernel driver, so drop it. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260106-dt-dtbs-broadcom-fixes-v1-12-ba45874e4553@kernel.org Signed-off-by: Florian Fainelli...
```diff diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi index a187c8e788dd..85d997ab57a1 100644 --- a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi +++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi @@ -813,7 +813,6 @@ interrupts = <GIC_SPI 419...
9c316b5a097304cb65becf0201275fbb1f927e89
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: northstar2: Drop unused and undocumented "brcm,pcie-ob-oarr-size" properties
Problem Details: The "brcm,pcie-ob-oarr-size" property is unused and undocumented, so drop them. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260106-dt-dtbs-broadcom-fixes-v1-11-ba45874e4553@kernel.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
```diff diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi index c9bf77b3566e..a187c8e788dd 100644 --- a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi +++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi @@ -154,7 +154,6 @@ ranges = <0x83000000 0 0x0...
407940f2578e9ab917eab0bf1f0c43200f48881a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: northstar2: Rework clock nodes
Problem Details: The nd2-clocks.dtsi is oddly included in the middle of a bus node and is only included in one place, so collapse it into ns2.dtsi. Move the fixed and fixed-factor clock nodes to the root as they are not part of the bus. Rename the node names to use preferred names. Signed-off-by: Rob Herring (Arm) <ro...
```diff diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2-clock.dtsi b/arch/arm64/boot/dts/broadcom/northstar2/ns2-clock.dtsi deleted file mode 100644 index 99009fdf10a4..000000000000 --- a/arch/arm64/boot/dts/broadcom/northstar2/ns2-clock.dtsi +++ /dev/null @@ -1,105 +0,0 @@ -/* - * BSD LICENSE - * - * Copyri...
b871ac873a82f0ca2b273e454e5e775f562ca021
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: ns2-svk: Use non-deprecated at25 properties
Problem Details: The at25,* properties have been deprecated since 2012. This board wasn't upstream until 2014, so it should be safe to switch over to the "new" properties. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260106-dt-dtbs-broadcom-fixes-v1-9-ba45874e4553@kernel.org Sig...
```diff diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts b/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts index 290759ee0078..de238a9b1845 100644 --- a/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts +++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts @@ -115,9 +115,9 @@ compatible = "...
fcaa61afdfcf3a5ee9a684ac8310b40b13c670b0
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: Use preferred node names
Problem Details: Update various node names to use the documented preferred names. Node names/path aren't considered ABI, so changing them should be safe. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260106-dt-dtbs-broadcom-fixes-v1-8-ba45874e4553@kernel.org Signed-off-by: Floria...
```diff diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts b/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts index f06472edd4a1..290759ee0078 100644 --- a/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts +++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts @@ -111,7 +111,7 @@ &ssp1 { status...
8a4cac07eaf243a33e1256671a1864cdd994138f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: stingray: Move raid nodes out of bus
Problem Details: The 'raid' nodes are not MMIO devices and are not part of a bus, so move them to the root level. Drop the unit-addresses as they don't have any address. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260106-dt-dtbs-broadcom-fixes-v1-7-ba45874e4553@kernel.org Signe...
```diff diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray-fs4.dtsi b/arch/arm64/boot/dts/broadcom/stingray/stingray-fs4.dtsi index cf3cb9199ce4..d704c4ab2147 100644 --- a/arch/arm64/boot/dts/broadcom/stingray/stingray-fs4.dtsi +++ b/arch/arm64/boot/dts/broadcom/stingray/stingray-fs4.dtsi @@ -51,68 +51,68 @@ ...
71220e15f38823dcc21b7297fc9161fd42d08d96
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: stingray: Fix 'simple-bus' node names
Problem Details: Fix 'simple-bus' node names to follow the defined pattern. Nodes with 'reg' or 'ranges' addresses should also have a unit-address. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260106-dt-dtbs-broadcom-fixes-v1-6-ba45874e4553@kernel.org Signed-off-by: Florian Fain...
```diff diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray-fs4.dtsi b/arch/arm64/boot/dts/broadcom/stingray/stingray-fs4.dtsi index 9666969c8c88..cf3cb9199ce4 100644 --- a/arch/arm64/boot/dts/broadcom/stingray/stingray-fs4.dtsi +++ b/arch/arm64/boot/dts/broadcom/stingray/stingray-fs4.dtsi @@ -30,7 +30,7 @@ *...
dd19c37519aa82d615fee53b7f68adc726ab4ae6
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: stingray: Rework clock nodes
Problem Details: The stringray-clocks.dtsi is oddly included in the middle of a bus node and is only included in one place, so collapse it into stingray.dtsi. Move the fixed and fixed-factor clock nodes to the root as they are not part of the bus. Rename the node names to use preferred names. Drop the unnecessary 1:1 ...
```diff diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray-clock.dtsi b/arch/arm64/boot/dts/broadcom/stingray/stingray-clock.dtsi deleted file mode 100644 index 10a106aca229..000000000000 --- a/arch/arm64/boot/dts/broadcom/stingray/stingray-clock.dtsi +++ /dev/null @@ -1,182 +0,0 @@ -/* - * BSD LICENSE - * - ...
ea2b1a4f192d8e3a435a03d8e8ae21cf9ab7e112
Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: Remove unused and undocumented nodes
Problem Details: The "silabs,si3226x" and "brcm,bdc-v0.16" nodes have no documentation and no driver in the kernel, so remove them. They can be added back with proper documentation if there is a need for them. Note that if both USB ports have similar memory maps in relationship to their USB PHY nodes, it looks like th...
```diff diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts b/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts index 5939d342aec7..f06472edd4a1 100644 --- a/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts +++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts @@ -106,22 +106,6 @@ &ssp0 { sta...
db7855c96d4216b2ed45e2781fae9293b323c7ef
Analyze and fix the following issue in the Linux kernel code: x86/entry/vdso/selftest: Update location of vgetrandom-chacha.S
Problem Details: As part of the vdso build restructuring, vgetrandom-chacha.S moved into the vdso/vdso64 subdirectory. Update the selftest #include to match. Closes: https://lore.kernel.org/oe-lkp/202601161608.5cd5af9a-lkp@intel.com Fixes: 693c819fedcd ("x86/entry/vdso: Refactor the vdso build") Reported-by: kernel te...
```diff diff --git a/tools/testing/selftests/vDSO/vgetrandom-chacha.S b/tools/testing/selftests/vDSO/vgetrandom-chacha.S index a4a82e1c28a9..10f982157a1f 100644 --- a/tools/testing/selftests/vDSO/vgetrandom-chacha.S +++ b/tools/testing/selftests/vDSO/vgetrandom-chacha.S @@ -16,5 +16,5 @@ #elif defined(__s390x__) #inc...
a48acbaf99d239e60a09a9e2b7d0f7e9feb62769
Analyze and fix the following issue in the Linux kernel code: x86/entry/vdso: Fix filtering of vdso compiler flags
Problem Details: This fixes several typos in the filtering of compiler flags for vdso, discovered by Chris Mason using an AI script: 1. "-fno-PIE" was written as "fno-PIE". 2. "CC_PLUGINS_FLAGS" was written as "CC_PLUGIN_FLAGS" To the best of my knowledge, none of these actually had any real impact on the build at th...
```diff diff --git a/arch/x86/entry/vdso/common/Makefile.include b/arch/x86/entry/vdso/common/Makefile.include index 3514b4a6869b..687b3d89b40d 100644 --- a/arch/x86/entry/vdso/common/Makefile.include +++ b/arch/x86/entry/vdso/common/Makefile.include @@ -23,9 +23,9 @@ $(obj)/%.lds : KBUILD_CPPFLAGS += $(CPPFLAGS_VDSO_L...
d8300e6e078a3a44ac0c75c6d8ba46d78ab94035
Analyze and fix the following issue in the Linux kernel code: clk: qcom: regmap-divider: convert from divider_round_rate() to divider_determine_rate()
Problem Details: The divider_round_rate() function is now deprecated, so let's migrate to divider_determine_rate() instead so that this deprecated API can be removed. Note that when the main function itself was migrated to use determine_rate, this was mistakenly converted to: req->rate = divider_round_rate(...) ...
```diff diff --git a/drivers/clk/qcom/clk-regmap-divider.c b/drivers/clk/qcom/clk-regmap-divider.c index af9c01dd7853..672e82caf205 100644 --- a/drivers/clk/qcom/clk-regmap-divider.c +++ b/drivers/clk/qcom/clk-regmap-divider.c @@ -34,12 +34,8 @@ static int div_determine_rate(struct clk_hw *hw, struct clk_rate_request *...
349f02c0f5d4ee147c582b89cadd553bd534028a
Analyze and fix the following issue in the Linux kernel code: clk: qcom: regmap-divider: convert from divider_ro_round_rate() to divider_ro_determine_rate()
Problem Details: The divider_ro_round_rate() function is now deprecated, so let's migrate to divider_ro_determine_rate() instead so that this deprecated API can be removed. Note that when the main function itself was migrated to use determine_rate, this was mistakenly converted to: req->rate = divider_round_rate(...
```diff diff --git a/drivers/clk/qcom/clk-regmap-divider.c b/drivers/clk/qcom/clk-regmap-divider.c index 4f5395f0ab6d..af9c01dd7853 100644 --- a/drivers/clk/qcom/clk-regmap-divider.c +++ b/drivers/clk/qcom/clk-regmap-divider.c @@ -26,12 +26,8 @@ static int div_ro_determine_rate(struct clk_hw *hw, val >>= divider->shi...
b3683f3ba079940f91f4a26004250559f170eda9
Analyze and fix the following issue in the Linux kernel code: x86/entry/vdso: Update the object paths for "make vdso_install"
Problem Details: The location of the vdso binary files in the object tree has changed; update "make vdso_install" to match. Closes: https://lore.kernel.org/16ea64d1-2a9b-46f9-9fcc-42958f599eb6@leemhuis.info Fixes: 693c819fedcd ("x86/entry/vdso: Refactor the vdso build") Reported-by: Thorsten Leemhuis <linux@leemhuis.i...
```diff diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 9ab7522ced18..5f881460a8b5 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -318,9 +318,9 @@ PHONY += install install: $(call cmd,install) -vdso-install-$(CONFIG_X86_64) += arch/x86/entry/vdso/vdso64.so.dbg -vdso-install-$(CONFIG_X86_X32_AB...
f7a980b3b8f80fe367f679da376cf76e800f9480
Analyze and fix the following issue in the Linux kernel code: can: usb_8dev: usb_8dev_read_bulk_callback(): fix URB memory leak
Problem Details: Fix similar memory leak as in commit 7352e1d5932a ("can: gs_usb: gs_usb_receive_bulk_callback(): fix URB memory leak"). In usb_8dev_open() -> usb_8dev_start(), the URBs for USB-in transfers are allocated, added to the priv->rx_submitted anchor and submitted. In the complete callback usb_8dev_read_bulk...
```diff diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c index 7449328f7cd7..3125cf59d002 100644 --- a/drivers/net/can/usb/usb_8dev.c +++ b/drivers/net/can/usb/usb_8dev.c @@ -541,11 +541,17 @@ resubmit_urb: urb->transfer_buffer, RX_BUFFER_SIZE, usb_8dev_read_bulk_callback, priv);...
710a7529fb13c5a470258ff5508ed3c498d54729
Analyze and fix the following issue in the Linux kernel code: can: mcba_usb: mcba_usb_read_bulk_callback(): fix URB memory leak
Problem Details: Fix similar memory leak as in commit 7352e1d5932a ("can: gs_usb: gs_usb_receive_bulk_callback(): fix URB memory leak"). In mcba_usb_probe() -> mcba_usb_start(), the URBs for USB-in transfers are allocated, added to the priv->rx_submitted anchor and submitted. In the complete callback mcba_usb_read_bul...
```diff diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c index 41c0a1c399bf..04170326dc7e 100644 --- a/drivers/net/can/usb/mcba_usb.c +++ b/drivers/net/can/usb/mcba_usb.c @@ -608,11 +608,17 @@ resubmit_urb: urb->transfer_buffer, MCBA_USB_RX_BUFF_SIZE, mcba_usb_read_bulk_callback,...
248e8e1a125fa875158df521b30f2cc7e27eeeaa
Analyze and fix the following issue in the Linux kernel code: can: kvaser_usb: kvaser_usb_read_bulk_callback(): fix URB memory leak
Problem Details: Fix similar memory leak as in commit 7352e1d5932a ("can: gs_usb: gs_usb_receive_bulk_callback(): fix URB memory leak"). In kvaser_usb_set_{,data_}bittiming() -> kvaser_usb_setup_rx_urbs(), the URBs for USB-in transfers are allocated, added to the dev->rx_submitted anchor and submitted. In the complete...
```diff diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c index 62701ec34272..d0a2a2a33c1c 100644 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c @@ -361,7 +361,14 @@ resubmit_urb: urb->tra...
5a4391bdc6c8357242f62f22069c865b792406b3
Analyze and fix the following issue in the Linux kernel code: can: esd_usb: esd_usb_read_bulk_callback(): fix URB memory leak
Problem Details: Fix similar memory leak as in commit 7352e1d5932a ("can: gs_usb: gs_usb_receive_bulk_callback(): fix URB memory leak"). In esd_usb_open(), the URBs for USB-in transfers are allocated, added to the dev->rx_submitted anchor and submitted. In the complete callback esd_usb_read_bulk_callback(), the URBs a...
```diff diff --git a/drivers/net/can/usb/esd_usb.c b/drivers/net/can/usb/esd_usb.c index 08da507faef4..8cc924c47042 100644 --- a/drivers/net/can/usb/esd_usb.c +++ b/drivers/net/can/usb/esd_usb.c @@ -541,13 +541,20 @@ resubmit_urb: urb->transfer_buffer, ESD_USB_RX_BUFFER_SIZE, esd_usb_read_bulk_callback, dev...
0ce73a0eb5a27070957b67fd74059b6da89cc516
Analyze and fix the following issue in the Linux kernel code: can: ems_usb: ems_usb_read_bulk_callback(): fix URB memory leak
Problem Details: Fix similar memory leak as in commit 7352e1d5932a ("can: gs_usb: gs_usb_receive_bulk_callback(): fix URB memory leak"). In ems_usb_open(), the URBs for USB-in transfers are allocated, added to the dev->rx_submitted anchor and submitted. In the complete callback ems_usb_read_bulk_callback(), the URBs a...
```diff diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index de8e212a1366..4c219a5b139b 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -486,11 +486,17 @@ resubmit_urb: urb->transfer_buffer, RX_BUFFER_SIZE, ems_usb_read_bulk_callback, dev); + u...
75e8635832a2e45d2a910c247eddd6b65d5ce6e1
Analyze and fix the following issue in the Linux kernel code: drm: Discard pm_runtime_put() return value
Problem Details: Multiple DRM drivers use the pm_runtime_put() return value for printing debug or even error messages and all of those messages are at least somewhat misleading. Returning an error code from pm_runtime_put() merely means that it has not queued up a work item to check whether or not the device can be su...
```diff diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c index d72c22dcf685..e61cf362abdf 100644 --- a/drivers/gpu/drm/arm/malidp_crtc.c +++ b/drivers/gpu/drm/arm/malidp_crtc.c @@ -77,7 +77,6 @@ static void malidp_crtc_atomic_disable(struct drm_crtc *crtc, crtc); struct ma...
b35cf3b6aa1eb08909f58c2d1e2f8ef7d000809a
Analyze and fix the following issue in the Linux kernel code: PCI/pwrctrl: Add APIs to power on/off pwrctrl devices
Problem Details: To fix bridge resource allocation issues when powering PCI bridges with the pwrctrl driver, introduce APIs to explicitly power on and off all related devices simultaneously. Previously, the individual pwrctrl drivers powered on/off the PCI devices autonomously, without any control from the controller ...
```diff diff --git a/drivers/pci/pwrctrl/core.c b/drivers/pci/pwrctrl/core.c index b423768cc477..fef5243d9445 100644 --- a/drivers/pci/pwrctrl/core.c +++ b/drivers/pci/pwrctrl/core.c @@ -65,6 +65,7 @@ void pci_pwrctrl_init(struct pci_pwrctrl *pwrctrl, struct device *dev) { pwrctrl->dev = dev; INIT_WORK(&pwrctrl->w...
99ee5837c63d1000f9ce7508591486a7bd8bdedb
Analyze and fix the following issue in the Linux kernel code: PCI/pwrctrl: tc9563: Use put_device() instead of i2c_put_adapter()
Problem Details: The API comment for of_find_i2c_adapter_by_node() recommends using put_device() to drop the reference count of I2C adapter instead of using i2c_put_adapter(). So replace i2c_put_adapter() with put_device(). Fixes: 4c9c7be47310 ("PCI: pwrctrl: Add power control driver for TC9563") Signed-off-by: Maniva...
```diff diff --git a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c index ec423432ac65..0a63add84d09 100644 --- a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c +++ b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c @@ -533,7 +533,7 @@ static int tc9563_pwrctrl_probe(struct platform_device *pdev)...
7db8c3c738118b6d9e5c3eb54e352fdae1bb0faf
Analyze and fix the following issue in the Linux kernel code: apparmor: replace sprintf with snprintf in aa_new_learning_profile
Problem Details: Replace unbounded sprintf() calls with snprintf() to prevent potential buffer overflows in aa_new_learning_profile(). While the current code works correctly, snprintf() is safer and follows secure coding best practices. No functional changes. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Sig...
```diff diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c index 50d5345ff5cb..b09323867fea 100644 --- a/security/apparmor/policy.c +++ b/security/apparmor/policy.c @@ -697,24 +697,27 @@ struct aa_profile *aa_new_learning_profile(struct aa_profile *parent, bool hat, struct aa_profile *p, *profile; ...
fce0d0bd9c20fefd180ea9e8362d619182f97a1d
Analyze and fix the following issue in the Linux kernel code: clk: tegra: tegra124-emc: Fix potential memory leak in tegra124_clk_register_emc()
Problem Details: If clk_register() fails, call kfree to release "tegra". Fixes: 2db04f16b589 ("clk: tegra: Add EMC clock driver") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
```diff diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c index 2a6db0434281..0f6fb776b229 100644 --- a/drivers/clk/tegra/clk-tegra124-emc.c +++ b/drivers/clk/tegra/clk-tegra124-emc.c @@ -538,8 +538,10 @@ struct clk *tegra124_clk_register_emc(void __iomem *base, struct device_node...
1e2c1af1beb395841743e240a59ab37edc9a7d33
Analyze and fix the following issue in the Linux kernel code: fuse: make sure dentry is evicted if stale
Problem Details: d_dispose_if_unused() may find the dentry with a positive refcount, in which case it won't be put on the dispose list even though it has already timed out. "Reinstall" the d_delete() callback, which was optimized out in fuse_dentry_settime(). This will result in the dentry being evicted as soon as th...
```diff diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index ea90dd682bc3..c9922af79dfa 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -172,6 +172,10 @@ static void fuse_dentry_tree_work(struct work_struct *work) if (time_after64(get_jiffies_64(), fd->time)) { rb_erase(&fd->node, &dentry_hash[i].tree); RB_...
cb8d2bdcb8241b66ca4ac4868f20e12cd6881ebc
Analyze and fix the following issue in the Linux kernel code: fuse: fix race when disposing stale dentries
Problem Details: In fuse_dentry_tree_work() just before d_dispose_if_unused() the dentry could get evicted, resulting in UAF. Move unlocking dentry_hash[i].lock to after the dispose. To do this, fuse_dentry_tree_del_node() needs to be moved from fuse_dentry_prune() to fuse_dentry_release() to prevent an ABBA deadlock...
```diff diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index dbb55bad5476..ea90dd682bc3 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -172,8 +172,8 @@ static void fuse_dentry_tree_work(struct work_struct *work) if (time_after64(get_jiffies_64(), fd->time)) { rb_erase(&fd->node, &dentry_hash[i].tree); RB_C...
8913632998fcda1793d04fd4ae2327b4bee9b106
Analyze and fix the following issue in the Linux kernel code: Documentation: Fix typos and grammatical errors
Problem Details: Fix various typos and grammatical errors across documentation files: - Fix missing preposition 'in' in process/changes.rst - Correct 'result by' to 'result from' in admin-guide/README.rst - Fix 'before hand' to 'beforehand' in cgroup-v1/hugetlb.rst - Correct 'allows to limit' to 'allows limiting' in h...
```diff diff --git a/Documentation/admin-guide/README.rst b/Documentation/admin-guide/README.rst index 05301f03b717..77fec1de6dc8 100644 --- a/Documentation/admin-guide/README.rst +++ b/Documentation/admin-guide/README.rst @@ -53,7 +53,7 @@ Documentation these typically contain kernel-specific installation notes fo...
af9e89d8dd39530c8bd14c33ddf6b502df1071b6
Analyze and fix the following issue in the Linux kernel code: bpf: Preserve id of register in sync_linked_regs()
Problem Details: sync_linked_regs() copies the id of known_reg to reg when propagating bounds of known_reg to reg using the off of known_reg, but when known_reg was linked to reg like: known_reg = reg ; both known_reg and reg get same id known_reg += 4 ; known_reg gets off = 4, and its id gets BPF_ADD...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 7a375f608263..9de0ec0c3ed9 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -16871,6 +16871,7 @@ static void sync_linked_regs(struct bpf_verifier_state *vstate, struct bpf_reg_s } else { s32 saved_subreg_def = reg->subreg_d...
9b323d2f474071cc6c627f73af301ba6f5e2b83f
Analyze and fix the following issue in the Linux kernel code: alpha: switch osf_mount() to strndup_user()
Problem Details: ... same as native mount(2) is doing for devname argument. While we are at it, fix misspelling ufs_args as cdfs_args in osf_ufs_mount() - layouts are identical, so it doesn't change anything, but the current variant is confusing for no reason. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index a08e8edef1a4..7b6543d2cca3 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -454,42 +454,30 @@ static int osf_ufs_mount(const char __user *dirname, struct ufs_args __user *args, int flags) { - int...
d63403d4e31ae537fefc5c0ee9d90f29b4fc532b
Analyze and fix the following issue in the Linux kernel code: iio: pressure: mprls0025pa: fix pressure calculation
Problem Details: A sign change is needed for proper calculation of the pressure. This is a minor fix since it only affects users that might have custom silicon from Honeywell that has honeywell,pmin-pascal != 0. Also due to the fact that raw pressure values can not be lower than output_min (400k-3.3M) there is no nee...
```diff diff --git a/drivers/iio/pressure/mprls0025pa.c b/drivers/iio/pressure/mprls0025pa.c index 6ba45d4c16b3..d4133fef91fa 100644 --- a/drivers/iio/pressure/mprls0025pa.c +++ b/drivers/iio/pressure/mprls0025pa.c @@ -59,7 +59,7 @@ * * Values given to the userspace in sysfs interface: * * raw - press_cnt - * * o...
8a228e036926f7e57421d750c3724e63f11b808a
Analyze and fix the following issue in the Linux kernel code: iio: pressure: mprls0025pa: fix scan_type struct
Problem Details: Fix the scan_type sign and realbits assignment. The pressure is a 24bit unsigned int between output_min and output_max. transfer function A: 10% to 90% of 2^24 transfer function B: 2.5% to 22.5% of 2^24 transfer function C: 20% to 80% of 2^24 [MPR_FUNCTION_A] = { .output_min = 1677722, .o...
```diff diff --git a/drivers/iio/pressure/mprls0025pa.c b/drivers/iio/pressure/mprls0025pa.c index 4b23f87a822b..6ba45d4c16b3 100644 --- a/drivers/iio/pressure/mprls0025pa.c +++ b/drivers/iio/pressure/mprls0025pa.c @@ -160,8 +160,8 @@ static const struct iio_chan_spec mpr_channels[] = { BIT(IIO_CHAN_INFO_OFFSET),...
fff3f1a7d805684e4701a70bfaeba39622b59dbc
Analyze and fix the following issue in the Linux kernel code: iio: pressure: mprls0025pa: fix interrupt flag
Problem Details: Interrupt falling/rising flags should only be defined in the device tree. Fixes: 713337d9143e ("iio: pressure: Honeywell mprls0025pa pressure sensor") Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jo...
```diff diff --git a/drivers/iio/pressure/mprls0025pa.c b/drivers/iio/pressure/mprls0025pa.c index 2336f2760eae..4b23f87a822b 100644 --- a/drivers/iio/pressure/mprls0025pa.c +++ b/drivers/iio/pressure/mprls0025pa.c @@ -418,10 +418,8 @@ int mpr_common_probe(struct device *dev, const struct mpr_ops *ops, int irq) data-...
583fa86ca581595b1f534a8de6d49ba8b3bf7196
Analyze and fix the following issue in the Linux kernel code: iio: pressure: mprls0025pa: fix SPI CS delay violation
Problem Details: Based on the sensor datasheet in chapter 7.6 SPI timing, Table 20, during the SPI transfer there is a minimum time interval requirement between the CS being asserted and the first clock edge (tHDSS). This minimum interval of 2.5us is being violated if two consecutive SPI transfers are queued up. Fixes...
```diff diff --git a/drivers/iio/pressure/mprls0025pa_spi.c b/drivers/iio/pressure/mprls0025pa_spi.c index e6bb75de3411..cf17eb2e7208 100644 --- a/drivers/iio/pressure/mprls0025pa_spi.c +++ b/drivers/iio/pressure/mprls0025pa_spi.c @@ -8,6 +8,7 @@ * https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/...
1e0ac56c92e26115cbc8cfc639843725cb3a7d6a
Analyze and fix the following issue in the Linux kernel code: iio: pressure: mprls0025pa: fix spi_transfer struct initialisation
Problem Details: Make sure that the spi_transfer struct is zeroed out before use. Fixes: a0858f0cd28e ("iio: pressure: mprls0025pa add SPI driver") Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawe...
```diff diff --git a/drivers/iio/pressure/mprls0025pa_spi.c b/drivers/iio/pressure/mprls0025pa_spi.c index d04102f8a4a0..e6bb75de3411 100644 --- a/drivers/iio/pressure/mprls0025pa_spi.c +++ b/drivers/iio/pressure/mprls0025pa_spi.c @@ -40,7 +40,7 @@ static int mpr_spi_xfer(struct mpr_data *data, const u8 cmd, const u8 p...
79a6d1bfe1148bc921b8d7f3371a7fbce44e30f7
Analyze and fix the following issue in the Linux kernel code: can: gs_usb: gs_usb_receive_bulk_callback(): unanchor URL on usb_submit_urb() error
Problem Details: In commit 7352e1d5932a ("can: gs_usb: gs_usb_receive_bulk_callback(): fix URB memory leak"), the URB was re-anchored before usb_submit_urb() in gs_usb_receive_bulk_callback() to prevent a leak of this URB during cleanup. However, this patch did not take into account that usb_submit_urb() could fail. T...
```diff diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c index d093babbc320..192338b481f2 100644 --- a/drivers/net/can/usb/gs_usb.c +++ b/drivers/net/can/usb/gs_usb.c @@ -754,6 +754,10 @@ resubmit_urb: usb_anchor_urb(urb, &parent->rx_submitted); rc = usb_submit_urb(urb, GFP_ATOMIC); + if (...
375629c92fd842bc2a229bb34c4453f62e097169
Analyze and fix the following issue in the Linux kernel code: can: dev: alloc_candev_mqs(): add missing default CAN capabilities
Problem Details: The idea behind series 6c1f5146b214 ("Merge patch series "can: raw: better approach to instantly reject unsupported CAN frames"") is to set the capabilities of a CAN device (CAN-CC, CAN-FD, CAN-XL, and listen only) [1] and, based on these capabilities, reject unsupported CAN frames in the CAN-RAW proto...
```diff diff --git a/drivers/net/can/dev/dev.c b/drivers/net/can/dev/dev.c index 7ab9578f5b89..769745e22a3c 100644 --- a/drivers/net/can/dev/dev.c +++ b/drivers/net/can/dev/dev.c @@ -332,6 +332,7 @@ struct net_device *alloc_candev_mqs(int sizeof_priv, unsigned int echo_skb_max, can_ml = (void *)priv + ALIGN(sizeof_...
eea1a28f93c8c78b961aca2012dedfd5c528fcac
Analyze and fix the following issue in the Linux kernel code: openrisc: Fix IPIs on simple multicore systems
Problem Details: Commit c05671846451 ("openrisc: sleep instead of spin on secondary wait") fixed OpenRISC SMP Linux for QEMU. However, stability was never achieved on FPGA development boards. This is because the above patch has a step to unmask IPIs on non-boot cpu's but on hardware without power management, IPIs rema...
```diff diff --git a/arch/openrisc/include/asm/smp.h b/arch/openrisc/include/asm/smp.h index e21d2f12b5b6..007296f160ef 100644 --- a/arch/openrisc/include/asm/smp.h +++ b/arch/openrisc/include/asm/smp.h @@ -20,7 +20,8 @@ extern void smp_init_cpus(void); extern void arch_send_call_function_single_ipi(int cpu); extern ...
a91cc48246605af9aeef1edd32232976d74d9502
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Test READ=>WRITE dirty logging behavior for shadow MMU
Problem Details: Update the nested dirty log test to validate KVM's handling of READ faults when dirty logging is enabled. Specifically, set the Dirty bit in the guest PTEs used to map L2 GPAs, so that KVM will create writable SPTEs when handling L2 read faults. When handling read faults in the shadow MMU, KVM opport...
```diff diff --git a/tools/testing/selftests/kvm/include/x86/processor.h b/tools/testing/selftests/kvm/include/x86/processor.h index 6bfffc3b0a33..4ebae4269e68 100644 --- a/tools/testing/selftests/kvm/include/x86/processor.h +++ b/tools/testing/selftests/kvm/include/x86/processor.h @@ -1486,6 +1486,7 @@ bool kvm_cpu_ha...
e03b29b55f2b7c345a919a6ee36633b06bf3fb56
Analyze and fix the following issue in the Linux kernel code: comedi: dmm32at: serialize use of paged registers
Problem Details: Some of the hardware registers of the DMM-32-AT board are multiplexed, using the least significant two bits of the Miscellaneous Control register to select the function of registers at offsets 12 to 15: 00 => 8254 timer/counter registers are accessible 01 => 8255 digital I/O registers are accessible...
```diff diff --git a/drivers/comedi/drivers/dmm32at.c b/drivers/comedi/drivers/dmm32at.c index 644e3b643c79..910cd24b1bed 100644 --- a/drivers/comedi/drivers/dmm32at.c +++ b/drivers/comedi/drivers/dmm32at.c @@ -330,6 +330,7 @@ static int dmm32at_ai_cmdtest(struct comedi_device *dev, static void dmm32at_setaitimer(st...
06d5a7afe1d0b47102936d8fba568572c2b4b941
Analyze and fix the following issue in the Linux kernel code: mei: trace: treat reg parameter as string
Problem Details: The commit afd2627f727b ("tracing: Check "%s" dereference via the field and not the TP_printk format") forbids to emit event with a plain char* without a wrapper. The reg parameter always passed as static string and wrapper is not strictly required, contrary to dev parameter. Use the string wrapper an...
```diff diff --git a/drivers/misc/mei/mei-trace.h b/drivers/misc/mei/mei-trace.h index 5312edbf5190..24fa321d88bd 100644 --- a/drivers/misc/mei/mei-trace.h +++ b/drivers/misc/mei/mei-trace.h @@ -21,18 +21,18 @@ TRACE_EVENT(mei_reg_read, TP_ARGS(dev, reg, offs, val), TP_STRUCT__entry( __string(dev, dev_name(dev))...
054e1c0e6114aaf08672c5ad25d796362bc7e76b
Analyze and fix the following issue in the Linux kernel code: uio: pci_sva: correct '-ENODEV' check logic
Problem Details: The current '-ENODEV' check uses '&&', which can lead to a NULL pointer dereference when udev is NULL. Fix the condition to return -ENODEV if either udev or its pdev is NULL. Fixes: 3397c3cd859a ("uio: Add SVA support for PCI devices via uio_pci_generic_sva.c") Signed-off-by: Haiyue Wang <haiyuewa@16...
```diff diff --git a/drivers/uio/uio_pci_generic_sva.c b/drivers/uio/uio_pci_generic_sva.c index 97e9ab9a081a..4a46acd994a8 100644 --- a/drivers/uio/uio_pci_generic_sva.c +++ b/drivers/uio/uio_pci_generic_sva.c @@ -29,7 +29,7 @@ static int uio_pci_sva_open(struct uio_info *info, struct inode *inode) struct uio_pci_sv...
26c08dabe5475d99a13f353d8dd70e518de45663
Analyze and fix the following issue in the Linux kernel code: uacce: ensure safe queue release with state management
Problem Details: Directly calling `put_queue` carries risks since it cannot guarantee that resources of `uacce_queue` have been fully released beforehand. So adding a `stop_queue` operation for the UACCE_CMD_PUT_Q command and leaving the `put_queue` operation to the final resource release ensures safety. Queue states ...
```diff diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index c061c6fa1c5e..6d71355528d3 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -40,20 +40,34 @@ static int uacce_start_queue(struct uacce_queue *q) return 0; } -static int uacce_put_queue(struct uacce_queue *...
02695347be532b628f22488300d40c4eba48b9b7
Analyze and fix the following issue in the Linux kernel code: uacce: implement mremap in uacce_vm_ops to return -EPERM
Problem Details: The current uacce_vm_ops does not support the mremap operation of vm_operations_struct. Implement .mremap to return -EPERM to remind users. The reason we need to explicitly disable mremap is that when the driver does not implement .mremap, it uses the default mremap method. This could lead to a risk s...
```diff diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index b0b3c1562d52..c061c6fa1c5e 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -214,8 +214,14 @@ static void uacce_vma_close(struct vm_area_struct *vma) } } +static int uacce_vma_mremap(struct vm_area_struct ...
98eec349259b1fd876f350b1c600403bcef8f85d
Analyze and fix the following issue in the Linux kernel code: uacce: fix isolate sysfs check condition
Problem Details: uacce supports the device isolation feature. If the driver implements the isolate_err_threshold_read and isolate_err_threshold_write callback functions, uacce will create sysfs files now. Users can read and configure the isolation policy through sysfs. Currently, sysfs files are created as long as eith...
```diff diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 43d215fb8c73..b0b3c1562d52 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -382,6 +382,9 @@ static ssize_t isolate_strategy_show(struct device *dev, struct device_attribute struct uacce_device *uacce = to_ua...
a3bece3678f6c88db1f44c602b2a63e84b4040ac
Analyze and fix the following issue in the Linux kernel code: uacce: fix cdev handling in the cleanup path
Problem Details: When cdev_device_add fails, it internally releases the cdev memory, and if cdev_device_del is then executed, it will cause a hang error. To fix it, we check the return value of cdev_device_add() and clear uacce->cdev to avoid calling cdev_device_del in the uacce_remove. Fixes: 015d239ac014 ("uacce: ad...
```diff diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 42e7d2a2a90c..43d215fb8c73 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -519,6 +519,8 @@ EXPORT_SYMBOL_GPL(uacce_alloc); */ int uacce_register(struct uacce_device *uacce) { + int ret; + if (!uacce) ...
7831f710553dcda6a67b3fe3f7a9d2f9a7233c3f
Analyze and fix the following issue in the Linux kernel code: slimbus: core: fix of_slim_get_device() kernel doc
Problem Details: Unlike slim_get_device() the of_slim_get_device() helper does not allocate and register any slimbus devices in case lookup fails. Update the of_slim_get_device() kernel doc to reflect this and add a comment about the helper taking a reference to the returned device. Fixes: e0772de8a48b ("slimbus: cor...
```diff diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 9402950e7ebd..a2c243e3ad52 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -408,11 +408,13 @@ static struct slim_device *of_find_slim_device(struct slim_controller *ctrl, /** * of_slim_get_device() - get handle to a device...
9391380eb91ea5ac792aae9273535c8da5b9aa01
Analyze and fix the following issue in the Linux kernel code: slimbus: core: fix device reference leak on report present
Problem Details: Slimbus devices can be allocated dynamically upon reception of report-present messages. Make sure to drop the reference taken when looking up already registered devices. Note that this requires taking an extra reference in case the device has not yet been registered and has to be allocated. Fixes: 4...
```diff diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 9f85c4280171..b4ab9a5d44b3 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -379,6 +379,8 @@ struct slim_device *slim_get_device(struct slim_controller *ctrl, sbdev = slim_alloc_device(ctrl, e_addr, NULL); if (!sbdev) ...
0eb4ff6596114aabba1070a66afa2c2f5593739f
Analyze and fix the following issue in the Linux kernel code: slimbus: core: fix runtime PM imbalance on report present
Problem Details: Make sure to balance the runtime PM usage count in case slimbus device or address allocation fails on report present, which would otherwise prevent the controller from suspending. Fixes: 4b14e62ad3c9 ("slimbus: Add support for 'clock-pause' feature") Cc: stable@vger.kernel.org # 4.16 Signed-off-by: Jo...
```diff diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index c808233692ee..9f85c4280171 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -489,21 +489,23 @@ int slim_device_report_present(struct slim_controller *ctrl, if (ctrl->sched.clk_state != SLIM_CLK_ACTIVE) { dev_err(ctrl->dev...
0b52edaeb5c2ae9d9d25476554671014d2a1057b
Analyze and fix the following issue in the Linux kernel code: slimbus: core: fix OF node leak on registration failure
Problem Details: Make sure to drop the OF node reference taken when initialising and registering the slimbus device also on registration failure by releasing it in the destructor as expected. Fixes: 7588a511bdb4 ("slimbus: core: add support to device tree helper") Fixes: 01360857486c ("slimbus: core: Fix mismatch in o...
```diff diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 005fa2ef100f..c808233692ee 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -146,6 +146,7 @@ static void slim_dev_release(struct device *dev) { struct slim_device *sbdev = to_slim_device(dev); + of_node_put(sbdev->dev.of_...
95fc36a234da24bbc5f476f8104a5a15f99ed3e3
Analyze and fix the following issue in the Linux kernel code: intel_th: fix device leak on output open()
Problem Details: Make sure to drop the reference taken when looking up the th device during output device open() on errors and on close(). Note that a recent commit fixed the leak in a couple of open() error paths but not all of them, and the reference is still leaking on successful open(). Fixes: 39f4034693b7 ("inte...
```diff diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c index 591b7c12aae5..d9c17214d3dc 100644 --- a/drivers/hwtracing/intel_th/core.c +++ b/drivers/hwtracing/intel_th/core.c @@ -810,9 +810,12 @@ static int intel_th_output_open(struct inode *inode, struct file *file) int err; d...
10d28cffb3f6ec7ad67f0a4cd32c2afa92909452
Analyze and fix the following issue in the Linux kernel code: comedi: Fix getting range information for subdevices 16 to 255
Problem Details: The `COMEDI_RANGEINFO` ioctl does not work properly for subdevice indices above 15. Currently, the only in-tree COMEDI drivers that support more than 16 subdevices are the "8255" driver and the "comedi_bond" driver. Making the ioctl work for subdevice indices up to 255 is achievable. It needs minor ...
```diff diff --git a/drivers/comedi/comedi_fops.c b/drivers/comedi/comedi_fops.c index 657c98cd723e..2c3eb9e89571 100644 --- a/drivers/comedi/comedi_fops.c +++ b/drivers/comedi/comedi_fops.c @@ -1155,7 +1155,7 @@ static int do_chaninfo_ioctl(struct comedi_device *dev, for (i = 0; i < s->n_chan; i++) { int x; -...
9aeacd2ff31e1520bd302e40f7d2500cb98a2401
Analyze and fix the following issue in the Linux kernel code: mux: mmio: Fix IS_ERR() vs NULL check in probe()
Problem Details: The devm_kmalloc() function never returns error pointers, it returns NULL on error. Fix the error checking. Fixes: 4863cb2b0f50 ("mux: mmio: Add suspend and resume support") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>...
```diff diff --git a/drivers/mux/mmio.c b/drivers/mux/mmio.c index e4ddb1e61923..3409af1ffb80 100644 --- a/drivers/mux/mmio.c +++ b/drivers/mux/mmio.c @@ -101,13 +101,13 @@ static int mux_mmio_probe(struct platform_device *pdev) mux_mmio = mux_chip_priv(mux_chip); mux_mmio->fields = devm_kmalloc(dev, num_fields *...
aced969e9bf3701dc75cfca57c78c031b7875b9d
Analyze and fix the following issue in the Linux kernel code: mmc: rtsx_pci_sdmmc: increase power-on settling delay to 5ms
Problem Details: The existing 1ms delay in sd_power_on is insufficient and causes resume errors around 4% of the time. Increasing the delay to 5ms resolves this issue after testing 300 s2idle cycles. Fixes: 1f311c94aabd ("mmc: rtsx: add 74 Clocks in power on flow") Signed-off-by: Matthew Schwartz <matthew.schwartz@li...
```diff diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index b847d79d4d8c..767816c09491 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -947,7 +947,7 @@ static int sd_power_on(struct realtek_pci_sdmmc *host, unsigned char power_mode) if (er...
ed1613fc18834b5ec38d3534e96e4bc990289aa2
Analyze and fix the following issue in the Linux kernel code: stm class: Kconfig: correct symbol name
Problem Details: Drop the leading "CONFIG_" when referring to Kconfig symbols-- it is supplied by the kconfig software. This make the default values work as (apparently) expected. Fixes: a02509f301c6 ("stm class: Factor out default framing protocol") Fixes: d69d5e83110f ("stm class: Add MIPI SyS-T protocol support") S...
```diff diff --git a/drivers/hwtracing/stm/Kconfig b/drivers/hwtracing/stm/Kconfig index eda6b11d40a1..cd7f0b0f3fbe 100644 --- a/drivers/hwtracing/stm/Kconfig +++ b/drivers/hwtracing/stm/Kconfig @@ -13,7 +13,7 @@ if STM config STM_PROTO_BASIC tristate "Basic STM framing protocol driver" - default CONFIG_STM + defa...
68a9459a5c4e8b978c3eb5d75be5446799e483de
Analyze and fix the following issue in the Linux kernel code: kunit: fix up const mis-match in many assert functions
Problem Details: In many kunit assert functions a const pointer is passed to container_of() and out pops a non-const pointer, which really isn't the correct thing to do at all. Fix this up by correctly marking the casted-to pointer as const to preserve the marking. Cc: Brendan Higgins <brendan.higgins@linux.dev> Cc: ...
```diff diff --git a/lib/kunit/assert.c b/lib/kunit/assert.c index 867aa5c4bccf..4c751ad8506a 100644 --- a/lib/kunit/assert.c +++ b/lib/kunit/assert.c @@ -51,7 +51,7 @@ void kunit_unary_assert_format(const struct kunit_assert *assert, const struct va_format *message, struct string_stream *stream) ...
86b31a2c81817d09cb5cbea9457a9f294ed9bb7d
Analyze and fix the following issue in the Linux kernel code: test_list_sort: fix up const mismatch
Problem Details: In the internal cmp function, a const pointer is cast out to a non-const pointer by using container_of(). This is probably not what is intended at all, so fix up the const marking to properly preserve what is really happening (i.e. the const should flow through the container_of() call) Cc: Jakub Kici...
```diff diff --git a/lib/tests/test_list_sort.c b/lib/tests/test_list_sort.c index 30879abc8a42..28158557b164 100644 --- a/lib/tests/test_list_sort.c +++ b/lib/tests/test_list_sort.c @@ -26,7 +26,7 @@ struct debug_el { unsigned int serial; }; -static void check(struct kunit *test, struct debug_el *ela, struct debu...
bd87458c163820ad8f8c65bb24a0e35f145b8ace
Analyze and fix the following issue in the Linux kernel code: xilinx_hwicap: fifo_icap.c: fix all kernel-doc warnings
Problem Details: Modify comments in fifo_icap.c to prevent all kernel-doc warnings: Warning: fifo_icap.c:51 This comment starts with '/**', but isn't a kernel-doc comment. * HwIcap Device Interrupt Status/Enable Registers Warning: fifo_icap.c:106 No description found for return value of 'fifo_icap_fifo_read' Warnin...
```diff diff --git a/drivers/char/xilinx_hwicap/fifo_icap.c b/drivers/char/xilinx_hwicap/fifo_icap.c index 619f3a30ec55..7bd786fa1be8 100644 --- a/drivers/char/xilinx_hwicap/fifo_icap.c +++ b/drivers/char/xilinx_hwicap/fifo_icap.c @@ -48,7 +48,7 @@ #define XHI_GIER_GIE_MASK 0x80000000 /* Global Interrupt enable Mask...
a2450bddb75f4c0da86ed02adbc9477e49edd311
Analyze and fix the following issue in the Linux kernel code: eeprom_93cx6: fix struct member kernel-doc
Problem Details: Remove the function parameter parts of the struct member descriptions to prevent kernel-doc warnings: Warning: include/linux/eeprom_93cx6.h:64 struct member 'register_read' not described in 'eeprom_93cx6' Warning: ../include/linux/eeprom_93cx6.h:64 struct member 'register_write' not described in 'ee...
```diff diff --git a/include/linux/eeprom_93cx6.h b/include/linux/eeprom_93cx6.h index 3a485cc0e0fa..194a4a49ff1d 100644 --- a/include/linux/eeprom_93cx6.h +++ b/include/linux/eeprom_93cx6.h @@ -31,10 +31,10 @@ * struct eeprom_93cx6 - control structure for setting the commands * for reading the eeprom data. * @da...
d63cf1eea10c904c1b31b22ff3e118033ec7edfb
Analyze and fix the following issue in the Linux kernel code: comedi: don't use mutex for COMEDI_BUFINFO ioctl
Problem Details: The main mutex in a comedi device can get held for quite a while when processing comedi instructions, so for performance reasons, the "read", "write", and "poll" file operations do not use it; they use the `attach_lock` rwsemaphore to protect against the comedi device becoming detached at an inopportun...
```diff diff --git a/drivers/comedi/comedi_fops.c b/drivers/comedi/comedi_fops.c index 657c98cd723e..3fea34e69052 100644 --- a/drivers/comedi/comedi_fops.c +++ b/drivers/comedi/comedi_fops.c @@ -1169,6 +1169,8 @@ static int do_chaninfo_ioctl(struct comedi_device *dev, * COMEDI_BUFINFO ioctl * buffer information *...
45edeece5abe146b1188ef9af3cde0609997493b
Analyze and fix the following issue in the Linux kernel code: bus: fsl-mc: declare fsl_mc_bus_dpdbg_type static
Problem Details: Fix following sparse warning: CHECK drivers/bus/fsl-mc/fsl-mc-bus.c drivers/bus/fsl-mc/fsl-mc-bus.c:435:26: warning: symbol 'fsl_mc_bus_dpdbg_type' was not declared. Should it be static? fsl_mc_bus_dpdbg_type is not used outside of fsl-mc-bus.c Remove the EXPORT_SYMBOL and declare it static. Si...
```diff diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 25845c04e562..d1ab4b0869ca 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -396,10 +396,9 @@ const struct device_type fsl_mc_bus_dpdmai_type = { }; EXPORT_SYMBOL_GPL(fsl_mc_bus_dpdmai_typ...
b89921eed8cf2d97250bac4be38dbcfbf048b586
Analyze and fix the following issue in the Linux kernel code: gpib: Fix memory leak in ni_usb_init()
Problem Details: In ni_usb_init(), if ni_usb_setup_init() fails, the function returns -EFAULT without freeing the allocated writes buffer, leading to a memory leak. Additionally, ni_usb_setup_init() returns 0 on failure, which causes ni_usb_init() to return -EFAULT, an inappropriate error code for this situation. Fix...
```diff diff --git a/drivers/gpib/ni_usb/ni_usb_gpib.c b/drivers/gpib/ni_usb/ni_usb_gpib.c index fdcaa6c00bfe..b6fddb437f55 100644 --- a/drivers/gpib/ni_usb/ni_usb_gpib.c +++ b/drivers/gpib/ni_usb/ni_usb_gpib.c @@ -1780,7 +1780,7 @@ static int ni_usb_setup_init(struct gpib_board *board, struct ni_usb_register *w i++;...
484e62252212c5b5fc62eaee5e4977143cb159c6
Analyze and fix the following issue in the Linux kernel code: gpib: Fix error code in ni_usb_write_registers()
Problem Details: If ni_usb_receive_bulk_msg() succeeds but without reading 16 bytes, then the error code needs to be set. The current code returns success. Fixes: 4e127de14fa7 ("staging: gpib: Add National Instruments USB GPIB driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid....
```diff diff --git a/drivers/gpib/ni_usb/ni_usb_gpib.c b/drivers/gpib/ni_usb/ni_usb_gpib.c index 1f8412de9fa3..fdcaa6c00bfe 100644 --- a/drivers/gpib/ni_usb/ni_usb_gpib.c +++ b/drivers/gpib/ni_usb/ni_usb_gpib.c @@ -566,7 +566,7 @@ static int ni_usb_write_registers(struct ni_usb_priv *ni_priv, retval, bytes_read); ...
96118565d24e7691e423d73be224b3a3fffc4680
Analyze and fix the following issue in the Linux kernel code: gpib: Fix error code in ibonline()
Problem Details: This accidentally returns 1 on error, but it should return negative error codes. Fixes: 9dde4559e939 ("staging: gpib: Add GPIB common core driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aSlMnaT1M104NJb2@stanley.mountain Signed-off-by: Greg Kroah-Hartman...
```diff diff --git a/drivers/gpib/common/iblib.c b/drivers/gpib/common/iblib.c index 7cbb6a467177..b672dd6aad25 100644 --- a/drivers/gpib/common/iblib.c +++ b/drivers/gpib/common/iblib.c @@ -227,11 +227,10 @@ int ibonline(struct gpib_board *board) #ifndef CONFIG_NIOS2 board->autospoll_task = kthread_run(&autospoll_t...
d55c571e4333fac71826e8db3b9753fadfbead6a
Analyze and fix the following issue in the Linux kernel code: x86/uprobes: Fix XOL allocation failure for 32-bit tasks
Problem Details: This script #!/usr/bin/bash echo 0 > /proc/sys/kernel/randomize_va_space echo 'void main(void) {}' > TEST.c # -fcf-protection to ensure that the 1st endbr32 insn can't be emulated gcc -m32 -fcf-protection=branch TEST.c -o test bpftrace -e 'uprobe:./test:main {}' -c ./test "hangs", the probe...
```diff diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c index 7be8e361ca55..619dddf54424 100644 --- a/arch/x86/kernel/uprobes.c +++ b/arch/x86/kernel/uprobes.c @@ -1823,3 +1823,27 @@ bool is_uprobe_at_func_entry(struct pt_regs *regs) return false; } + +#ifdef CONFIG_IA32_EMULATION +unsigned long...
9d4502fef00fa7a798d3c0806d4da4466a7ffc6f
Analyze and fix the following issue in the Linux kernel code: selftests: revocable: Add kselftest cases
Problem Details: Add kselftest cases for the revocable API. The test consists of three parts: - A kernel module (revocable_test.ko) that creates a debugfs interface with `/provider` and `/consumer` files. - A user-space C program (revocable_test) that uses the kselftest harness to interact with the debugfs files. ...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 6762bcffb1aa..6aab211f1630 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22375,6 +22375,7 @@ S: Maintained F: drivers/base/revocable.c F: drivers/base/revocable_test.c F: include/linux/revocable.h +F: tools/testing/selftests/drivers/base/revocable/ RFKILL M: ...
cd7693419bb5abd91ad2f407dab69c480e417a61
Analyze and fix the following issue in the Linux kernel code: revocable: Add Kunit test cases
Problem Details: Add Kunit test cases for the revocable API. The test cases cover the following scenarios: - Basic: Verifies that a consumer can successfully access the resource provided via the provider. - Revocation: Verifies that after the provider revokes the resource, the consumer correctly receives a NULL po...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index f873553d4543..6762bcffb1aa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22373,6 +22373,7 @@ M: Tzung-Bi Shih <tzungbi@kernel.org> L: linux-kernel@vger.kernel.org S: Maintained F: drivers/base/revocable.c +F: drivers/base/revocable_test.c F: include/linux/revoca...
62eb557580eb2177cf16c3fd2b6efadff297b29a
Analyze and fix the following issue in the Linux kernel code: revocable: Revocable resource management
Problem Details: Some resources can be removed asynchronously, for example, resources provided by a hot-pluggable device like USB. When holding a reference to such a resource, it's possible for the resource to be removed and its memory freed, leading to use-after-free errors on subsequent access. The "revocable" mech...
```diff diff --git a/Documentation/driver-api/driver-model/index.rst b/Documentation/driver-api/driver-model/index.rst index 4831bdd92e5c..8e1ee21185df 100644 --- a/Documentation/driver-api/driver-model/index.rst +++ b/Documentation/driver-api/driver-model/index.rst @@ -14,6 +14,7 @@ Driver Model overview platf...
d9c83903be080a6bc25ccabaafe5487836a7e1a7
Analyze and fix the following issue in the Linux kernel code: soc: qcom: fix QMI encoding/decoding for basic elements
Problem Details: Extend the QMI byte encoding and decoding logic to support multiple basic data type sizes (u8, u16, u32, u64) using differnet macros for each type. Ensure correct handling of data sizes and proper byte order conversion on big-endian platforms by consistently applying these macros during encoding and de...
```diff diff --git a/drivers/soc/qcom/qmi_encdec.c b/drivers/soc/qcom/qmi_encdec.c index 1d2d9e515870..030b18fa086a 100644 --- a/drivers/soc/qcom/qmi_encdec.c +++ b/drivers/soc/qcom/qmi_encdec.c @@ -23,18 +23,60 @@ *p_length |= ((u8)*p_src) << 8; \ } while (0) -#define QMI_ENCDEC_ENCODE_N_BYTES(p_dst, p_src, size)...