id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
77f183d151bda791ac26ee479b6542ccd35acdac
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Avoid multiple -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. So, in order to avoid ending up with flexible-array members in the middle of other structs, we use the `struct_group_tagged()` helper to separate the flexible arrays from the rest of the members i...
```diff diff --git a/drivers/gpu/drm/nouveau/include/nvif/ioctl.h b/drivers/gpu/drm/nouveau/include/nvif/ioctl.h index e825c8a1d9ca..00015412cb3e 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/ioctl.h +++ b/drivers/gpu/drm/nouveau/include/nvif/ioctl.h @@ -3,25 +3,30 @@ #define __NVIF_IOCTL_H__ struct nvif_ioctl_...
eed6bfa8b28230382b797a88569f2c7569a1a419
Analyze and fix the following issue in the Linux kernel code: arm64: hugetlb: Fix flush_hugetlb_tlb_range() invalidation level
Problem Details: commit c910f2b65518 ("arm64/mm: Update tlb invalidation routines for FEAT_LPA2") changed the "invalidation level unknown" hint from 0 to TLBI_TTL_UNKNOWN (INT_MAX). But the fallback "unknown level" path in flush_hugetlb_tlb_range() was not updated. So as it stands, when trying to invalidate CONT_PMD_SI...
```diff diff --git a/arch/arm64/include/asm/hugetlb.h b/arch/arm64/include/asm/hugetlb.h index 03db9cb21ace..07fbf5bf85a7 100644 --- a/arch/arm64/include/asm/hugetlb.h +++ b/arch/arm64/include/asm/hugetlb.h @@ -76,12 +76,22 @@ static inline void flush_hugetlb_tlb_range(struct vm_area_struct *vma, { unsigned long str...
49c87f7677746f3c5bd16c81b23700bb6b88bfd4
Analyze and fix the following issue in the Linux kernel code: arm64: hugetlb: Fix huge_ptep_get_and_clear() for non-present ptes
Problem Details: arm64 supports multiple huge_pte sizes. Some of the sizes are covered by a single pte entry at a particular level (PMD_SIZE, PUD_SIZE), and some are covered by multiple ptes at a particular level (CONT_PTE_SIZE, CONT_PMD_SIZE). So the function has to figure out the size from the huge_pte pointer. This ...
```diff diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c index 06db4649af91..b3a7fafe8892 100644 --- a/arch/arm64/mm/hugetlbpage.c +++ b/arch/arm64/mm/hugetlbpage.c @@ -100,20 +100,11 @@ static int find_num_contig(struct mm_struct *mm, unsigned long addr, static inline int num_contig_ptes(unsig...
02410ac72ac3707936c07ede66e94360d0d65319
Analyze and fix the following issue in the Linux kernel code: mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear()
Problem Details: In order to fix a bug, arm64 needs to be told the size of the huge page for which the huge_pte is being cleared in huge_ptep_get_and_clear(). Provide for this by adding an `unsigned long sz` parameter to the function. This follows the same pattern as huge_pte_clear() and set_huge_pte_at(). This commit...
```diff diff --git a/arch/arm64/include/asm/hugetlb.h b/arch/arm64/include/asm/hugetlb.h index c6dff3e69539..03db9cb21ace 100644 --- a/arch/arm64/include/asm/hugetlb.h +++ b/arch/arm64/include/asm/hugetlb.h @@ -42,8 +42,8 @@ extern int huge_ptep_set_access_flags(struct vm_area_struct *vma, unsigned long addr...
2b90e7ace79774a3540ce569e000388f8d22c9e0
Analyze and fix the following issue in the Linux kernel code: efi: Don't map the entire mokvar table to determine its size
Problem Details: Currently, when validating the mokvar table, we (re)map the entire table on each iteration of the loop, adding space as we discover new entries. If the table grows over a certain size, this fails due to limitations of early_memmap(), and we get a failure and traceback: ------------[ cut here ]------...
```diff diff --git a/drivers/firmware/efi/mokvar-table.c b/drivers/firmware/efi/mokvar-table.c index 5ed0602c2f75..d865cb1dbaad 100644 --- a/drivers/firmware/efi/mokvar-table.c +++ b/drivers/firmware/efi/mokvar-table.c @@ -103,7 +103,6 @@ void __init efi_mokvar_table_init(void) void *va = NULL; unsigned long cur_of...
c4af66a95aa3bc1d4f607ebd4eea524fb58946e3
Analyze and fix the following issue in the Linux kernel code: cgroup/rstat: Fix forceidle time in cpu.stat
Problem Details: The commit b824766504e4 ("cgroup/rstat: add force idle show helper") retrieves forceidle_time outside cgroup_rstat_lock for non-root cgroups which can be potentially inconsistent with other stats. Rather than reverting that commit, fix it in a way that retains the effort of cleaning up the ifdef-messe...
```diff diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index 5877974ece92..c2784c317cdd 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c @@ -613,36 +613,33 @@ static void cgroup_force_idle_show(struct seq_file *seq, struct cgroup_base_stat void cgroup_base_stat_cputime_show(struct seq_file *s...
b43b1e2c52db77c872bd60d30cdcc72c47df70c7
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Clear affinity hint before calling ath12k_pci_free_irq() in error path
Problem Details: If a shared IRQ is used by the driver due to platform limitation, then the IRQ affinity hint is set right after the allocation of IRQ vectors in ath12k_pci_msi_alloc(). This does no harm unless one of the functions requesting the IRQ fails and attempt to free the IRQ. This may end up with a warning fr...
```diff diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c index 7126cc361def..213a0f21d588 100644 --- a/drivers/net/wireless/ath/ath12k/pci.c +++ b/drivers/net/wireless/ath/ath12k/pci.c @@ -1697,6 +1697,8 @@ static int ath12k_pci_probe(struct pci_dev *pdev, return 0; err_fr...
68410c5bd381a81bcc92b808e7dc4e6b9ed25d11
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Clear affinity hint before calling ath11k_pcic_free_irq() in error path
Problem Details: If a shared IRQ is used by the driver due to platform limitation, then the IRQ affinity hint is set right after the allocation of IRQ vectors in ath11k_pci_alloc_msi(). This does no harm unless one of the functions requesting the IRQ fails and attempt to free the IRQ. This results in the below warning:...
```diff diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c index 6565ac1917b7..450ac5313de1 100644 --- a/drivers/net/wireless/ath/ath11k/pci.c +++ b/drivers/net/wireless/ath/ath11k/pci.c @@ -1125,6 +1125,8 @@ unsupported_wcn6855_soc: return 0; err_free_irq: + /* __free_irq()...
2337b7251dd5d3c58af877e6eee85a594c6b51f5
Analyze and fix the following issue in the Linux kernel code: perf trace: Add missing perf_tool__init()
Problem Details: Perf trace on perf.data fails as below: ./perf trace record -- sleep 1 ./perf trace -i perf.data perf: Segmentation fault Segmentation fault (core dumped) Backtrace pointed to : ?? () perf_session.process_user_event () reader.read_event () perf_session.process_events () cmd_trace () run_bui...
```diff diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index f55a8a6481f2..092c5f6404ba 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -4589,6 +4589,7 @@ static int trace__replay(struct trace *trace) struct evsel *evsel; int err = -1; + perf_tool__init(&trace->to...
2c70953b6f535f7698ccbf22c1f5ba26cb6c2816
Analyze and fix the following issue in the Linux kernel code: leds: Fix LED_OFF brightness race
Problem Details: While commit fa15d8c69238 ("leds: Fix set_brightness_delayed() race") successfully forces led_set_brightness() to be called with LED_OFF at least once when switching from blinking to LED on state so that hw-blinking can be disabled, another race remains. Indeed in led_set_brightness(LED_OFF) followed b...
```diff diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index f6c46d2e5276..e3d8ddcff567 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c @@ -159,8 +159,19 @@ static void set_brightness_delayed(struct work_struct *ws) * before this work item runs once. To make sure this works properl...
b214b04df9c8dc7ff7647c0e185cee01baea8451
Analyze and fix the following issue in the Linux kernel code: tools/sched_ext: Provide a compatible helper for scx_bpf_events()
Problem Details: Introduce __COMPAT_scx_bpf_events() to use scx_bpf_events() in a compatible way also with kernels that don't provide this kfunc. This also fixes the following error with scx_qmap when running on a kernel that does not provide scx_bpf_events(): ; scx_bpf_events(&events, sizeof(events)); @ scx_qmap.bp...
```diff diff --git a/tools/sched_ext/include/scx/compat.bpf.h b/tools/sched_ext/include/scx/compat.bpf.h index 266f94fe479b..9252e1a00556 100644 --- a/tools/sched_ext/include/scx/compat.bpf.h +++ b/tools/sched_ext/include/scx/compat.bpf.h @@ -183,7 +183,15 @@ static inline bool __COMPAT_is_enq_cpu_selected(u64 enq_flag...
54e1b4becf5e220be03db4e1be773c1310e8cbbd
Analyze and fix the following issue in the Linux kernel code: net: ti: icss-iep: Reject perout generation request
Problem Details: IEP driver supports both perout and pps signal generation but perout feature is faulty with half-cooked support due to some missing configuration. Remove perout support from the driver and reject perout requests with "not supported" error code. Fixes: c1e0230eeaab2 ("net: ti: icss-iep: Add IEP driver"...
```diff diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c b/drivers/net/ethernet/ti/icssg/icss_iep.c index 768578c0d958..d59c1744840a 100644 --- a/drivers/net/ethernet/ti/icssg/icss_iep.c +++ b/drivers/net/ethernet/ti/icssg/icss_iep.c @@ -474,26 +474,7 @@ static int icss_iep_perout_enable_hw(struct icss_iep *iep, ...
674fcb4f4a7e3e277417a01788cc6daae47c3804
Analyze and fix the following issue in the Linux kernel code: idpf: fix checksums set in idpf_rx_rsc()
Problem Details: idpf_rx_rsc() uses skb_transport_offset(skb) while the transport header is not set yet. This triggers the following warning for CONFIG_DEBUG_NET=y builds. DEBUG_NET_WARN_ON_ONCE(!skb_transport_header_was_set(skb)) [ 69.261620] WARNING: CPU: 7 PID: 0 at ./include/linux/skbuff.h:3020 idpf_vport_spli...
```diff diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c index 9be6a6b59c4e..977741c41498 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c @@ -3013,7 +3013,6 @@ static int idpf_rx_rsc(struct idpf_rx_queue *rx...
1cbddbddee68d17feb6467fc556c144777af91ef
Analyze and fix the following issue in the Linux kernel code: selftests: drv-net: Check if combined-count exists
Problem Details: Some drivers, like tg3, do not set combined-count: $ ethtool -l enp4s0f1 Channel parameters for enp4s0f1: Pre-set maximums: RX: 4 TX: 4 Other: n/a Combined: n/a Current hardware settings: RX: 4 TX: 1 Other: n/a Combined: n/a In the case where combined-count is not set, the ethtool netlink code ...
```diff diff --git a/tools/testing/selftests/drivers/net/queues.py b/tools/testing/selftests/drivers/net/queues.py index 38303da957ee..8a518905a9f9 100755 --- a/tools/testing/selftests/drivers/net/queues.py +++ b/tools/testing/selftests/drivers/net/queues.py @@ -45,10 +45,9 @@ def addremove_queues(cfg, nl) -> None: ...
4afc332bc86c34b74f1211650f748feb6942a9cc
Analyze and fix the following issue in the Linux kernel code: io_uring/net: fix build warning for !CONFIG_COMPAT
Problem Details: A code rework resulted in an uninitialized return code when COMPAT mode is disabled: io_uring/net.c:722:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 722 | if (io_is_compat(req->ctx)) { | ^~~~~~~~~~~~~~~~~...
```diff diff --git a/io_uring/net.c b/io_uring/net.c index 4ef94bf88cb4..6d13d378358b 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -215,7 +215,6 @@ static int io_net_import_vec(struct io_kiocb *req, struct io_async_msghdr *iomsg return 0; } -#ifdef CONFIG_COMPAT static int io_compat_msg_copy_hdr(struct io_...
7a9b0d6925b2b13640a94ca6e72a753bb39526b2
Analyze and fix the following issue in the Linux kernel code: io_uring/rw: open code io_prep_rw_setup()
Problem Details: Open code io_prep_rw_setup() into its only caller, it doesn't provide any meaningful abstraction anymore. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/61ba72e2d46119db71f27ab908018e6a6cd6c064.1740425922.git.asml.silence@gmail.com [axboe: fold in 'ret' being un...
```diff diff --git a/io_uring/rw.c b/io_uring/rw.c index 4f7fa2520820..10a4a95ada02 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -204,17 +204,6 @@ static int io_rw_alloc_async(struct io_kiocb *req) return 0; } -static int io_prep_rw_setup(struct io_kiocb *req, int ddir, bool do_import) -{ - struct io_async_rw...
79ed408b2402e8113aa5a298f3bb9088ede58f6c
Analyze and fix the following issue in the Linux kernel code: ASoC: mediatek: mt8188: avoid uninitialized variable use
Problem Details: The 'msk' variable has no initialization: sound/soc/mediatek/mt8188/mt8188-dai-dmic.c:311:4: error: variable 'msk' is uninitialized when used here [-Werror,-Wuninitialized] 311 | msk |= PWR2_TOP_CON1_DMIC_FIFO_SOFT_RST_EN(i); | ^~~ Set it to zer...
```diff diff --git a/sound/soc/mediatek/mt8188/mt8188-dai-dmic.c b/sound/soc/mediatek/mt8188/mt8188-dai-dmic.c index 4cfbcb71d2d9..adcea7818be2 100644 --- a/sound/soc/mediatek/mt8188/mt8188-dai-dmic.c +++ b/sound/soc/mediatek/mt8188/mt8188-dai-dmic.c @@ -307,6 +307,7 @@ static int mtk_dmic_event(struct snd_soc_dapm_wid...
4444e4d789d64f053435713e5984f0ef31a7633b
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: Fix shutdown when no drm-device is set up
Problem Details: When the drm-driver probes, it mainly creates the component device, where all the sub-drivers (vops, hdmi, etc) hook into. This will cause the shutdown handler to get called on shutdown, even though the drm-device might not have been set up, or the component bind might have failed. So use the new com...
```diff diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 439edc165ff6..180fad5d49ad 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -484,9 +484,11 @@ static void rockchip_drm_platform_remove(struct ...
6864a176140a03cfc108a27b869814140a022053
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Adapt to differences between Orange Pi 5 Max and Ultra
Problem Details: The Orange Pi 5 Plus and Orange Pi 5 Max have 2SK3018s attached to the PWM LEDs. The Orange Pi 5 Ultra does not, and thus needs the PWM polarity inverted. Also remove the model/compatible from the dtsi. It should be at the board level only. Fixes: c600d252dc52 ("arm64: dts: rockchip: Add Orange Pi 5 ...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi index 87090cb98020..6e4dcd8fff26 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi @@ -7...
55de171bba1b8c0e3dd18b800955ac4b46a63d4b
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fix pinmux of UART5 for PX30 Ringneck on Haikou
Problem Details: UART5 uses GPIO0_B5 as UART RTS but muxed in its GPIO function, therefore UART5 must request this pin to be muxed in that function, so let's do that. Fixes: 5963d97aa780 ("arm64: dts: rockchip: add rs485 support on uart5 of px30-ringneck-haikou") Cc: stable@vger.kernel.org Signed-off-by: Quentin Schul...
```diff diff --git a/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts b/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts index 6d45a19413ce..1a59e8b1dc46 100644 --- a/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts @@ -194,6 +194,13 @@ <3...
2db7d29c7b1629ced3cbab3de242511eb3c22066
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fix pinmux of UART0 for PX30 Ringneck on Haikou
Problem Details: UART0 pinmux by default configures GPIO0_B5 in its UART RTS function for UART0. However, by default on Haikou, it is used as GPIO as UART RTS for UART5. Therefore, let's update UART0 pinmux to not configure the pin in that mode, a later commit will make UART5 request the GPIO pinmux. Fixes: c484cf93f...
```diff diff --git a/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts b/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts index eb9470a00e54..6d45a19413ce 100644 --- a/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts @@ -222,6 +222,8 @@ }; &u...
13e55fbaec176119cff68a7e1693b251c8883c5f
Analyze and fix the following issue in the Linux kernel code: net: ipv6: fix dst ref loop on input in rpl lwt
Problem Details: Prevent a dst ref loop on input in rpl_iptunnel. Fixes: a7a29f9c361f ("net: ipv6: add rpl sr tunnel") Cc: Alexander Aring <alex.aring@gmail.com> Cc: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Justin Iurman <justin.iurman@uliege.be> Signed-off-by: Paol...
```diff diff --git a/net/ipv6/rpl_iptunnel.c b/net/ipv6/rpl_iptunnel.c index 0ac4283acdf2..7c05ac846646 100644 --- a/net/ipv6/rpl_iptunnel.c +++ b/net/ipv6/rpl_iptunnel.c @@ -262,10 +262,18 @@ static int rpl_input(struct sk_buff *skb) { struct dst_entry *orig_dst = skb_dst(skb); struct dst_entry *dst = NULL; + str...
c64a0727f9b1cbc63a5538c8c0014e9a175ad864
Analyze and fix the following issue in the Linux kernel code: net: ipv6: fix dst ref loop on input in seg6 lwt
Problem Details: Prevent a dst ref loop on input in seg6_iptunnel. Fixes: af4a2209b134 ("ipv6: sr: use dst_cache in seg6_input") Cc: David Lebrun <dlebrun@google.com> Cc: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Justin Iurman <justin.iurman@uliege.be> Signed-off-by:...
```diff diff --git a/net/ipv6/seg6_iptunnel.c b/net/ipv6/seg6_iptunnel.c index 33833b2064c0..51583461ae29 100644 --- a/net/ipv6/seg6_iptunnel.c +++ b/net/ipv6/seg6_iptunnel.c @@ -472,10 +472,18 @@ static int seg6_input_core(struct net *net, struct sock *sk, { struct dst_entry *orig_dst = skb_dst(skb); struct dst_e...
38f4aa34a5f737ea8588dac320d884cc2e762c03
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fix u2phy1_host status for NanoPi R4S
Problem Details: The u2phy1_host should always have the same status as usb_host1_ehci and usb_host1_ohci, otherwise the EHCI and OHCI drivers may be initialized for a disabled usb port. Per the NanoPi R4S schematic, the phy-supply for u2phy1_host is set to the vdd_5v regulator. Fixes: db792e9adbf8 ("rockchip: rk3399:...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi index b1c9bd0e63ef..8d94d9f91a5c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi @@ -115,7 +115,7 @@ }; &u2phy1_ho...
4a412c70af674198749fd16be695d53e1c41b5f9
Analyze and fix the following issue in the Linux kernel code: x86/cpu: Prefix hexadecimal values with 0x in cpu_debug_show()
Problem Details: The hex values in CPU debug interface are not prefixed with 0x. This may cause misinterpretation of values. Fix it. [ mingo: Restore previous vertical alignment of the output. ] Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Dave...
```diff diff --git a/arch/x86/kernel/cpu/debugfs.c b/arch/x86/kernel/cpu/debugfs.c index cacfd3f6abef..1976fef2dfe5 100644 --- a/arch/x86/kernel/cpu/debugfs.c +++ b/arch/x86/kernel/cpu/debugfs.c @@ -16,8 +16,8 @@ static int cpu_debug_show(struct seq_file *m, void *p) if (!c->initialized) return 0; - seq_printf(m...
49166afbf4ce3b5049295534150886a99b9867ec
Analyze and fix the following issue in the Linux kernel code: phy: exynos5-usbdrd: Do not depend on Type-C
Problem Details: Older Exynos designs, like Exynos5422, do not have USB Type-C and the USB DRD PHY does not really need CONFIG_TYPEC for these devices at all. Incorrectly added optional dependency on CONFIG_TYPEC caused this driver to be missing for exynos_defconfig and as result Exynos5422-based boards like Hardkernel...
```diff diff --git a/drivers/phy/samsung/Kconfig b/drivers/phy/samsung/Kconfig index 7fba571c0e2b..6566100441d6 100644 --- a/drivers/phy/samsung/Kconfig +++ b/drivers/phy/samsung/Kconfig @@ -81,7 +81,7 @@ config PHY_EXYNOS5_USBDRD tristate "Exynos5 SoC series USB DRD PHY driver" depends on (ARCH_EXYNOS && OF) || CO...
6f9669f3634b4e85374676dfdff9181bee14567d
Analyze and fix the following issue in the Linux kernel code: dmaengine: Fix typo in comment
Problem Details: s/consumer/consume/ Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20250219105419.2025-2-thorsten.blum@linux.dev Signed-off-by: Vinod Koul <vkoul@kernel.org>
```diff diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c index fdd41e1c2263..6b4fce453c85 100644 --- a/drivers/dma/sh/shdma-base.c +++ b/drivers/dma/sh/shdma-base.c @@ -725,7 +725,7 @@ static struct dma_async_tx_descriptor *shdma_prep_dma_cyclic( slave_addr = ops->slave_addr(schan); /* - * ...
97aa62ed1e970bf8aa9f57e87c946a95fa3d5bef
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Enable HDMI audio outputs for Rock 5B
Problem Details: HDMI audio is available on the Rock 5B HDMI TX ports. Enable it for both ports. Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> Fixes: 419d1918105e ("ASoC: simple-card-utils: use __free(device_node) for device node") Signed-off-by: ...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts index 5acec6b97a46..ceb6421234ff 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts @@ -231,6 +231,10 @@ }; }; +&hdmi0_sound { + sta...
b8c6c136971c0e9750eec89f367529b2854d3a3c
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Add HDMI audio outputs for rk3588
Problem Details: For hdmi0_sound, use the simple-audio-card driver with the hdmi0 QP node as CODEC and the i2s5 device as CPU. Similarly for hdmi1_sound, the CODEC is the hdmi1 node and the CPU is i2s6, but only added in the rk3588-extra.dtsi device tree as the second TX HDMI port is not available on base versions of ...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi index a59c194c7479..d0b640c2d5f8 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi @@ -377,6 +377,22 @@ }; }; + hdmi0_sound: hdmi0-sound ...
e747104c99fd3a97044e734b0cad9a6227699937
Analyze and fix the following issue in the Linux kernel code: ALSA: opti9xx: fix inconsistent indenting warning in snd_opti9xx_configure()
Problem Details: Fix below inconsistent indenting smatch warning. smatch warnings: sound/isa/opti9xx/opti92x-ad1848.c:489 snd_opti9xx_configure() warn: inconsistent indenting Signed-off-by: Charles Han <hanchunchao@inspur.com> Link: https://patch.msgid.link/20250227091810.18847-1-hanchunchao@inspur.com Signed-off-by: ...
```diff diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 220ea1952c1e..a07a665d93dc 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -486,7 +486,7 @@ __skip_base: #endif /* CS4231 || OPTi93X */ #ifndef OPTi93X - outb(irq_bits << 3...
aeb7cf20285ad322984480086c21bd3a04d419bc
Analyze and fix the following issue in the Linux kernel code: ALSA: emu10k1: fix inconsistent indenting warning in snd_emu10k1_synth_free()
Problem Details: Fix below inconsistent indenting smatch warning. smatch warnings: sound/pci/emu10k1/memory.c:444 snd_emu10k1_synth_free() warn: inconsistent indenting Signed-off-by: Charles Han <hanchunchao@inspur.com> Link: https://patch.msgid.link/20250227085243.18413-1-hanchunchao@inspur.com Signed-off-by: Takashi...
```diff diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c index d29711777161..f6982bc6ff0d 100644 --- a/sound/pci/emu10k1/memory.c +++ b/sound/pci/emu10k1/memory.c @@ -441,7 +441,7 @@ snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *memblk) unmap_memblk(emu, blk); spin_unl...
604a0fe88db0ecef56ac38156a154945f4535ddf
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm: Drop superfluous NULL check in snd_pcm_format_set_silence()
Problem Details: We applied a fix for a KASAN issue for snd_pcm_format_set_silence(), and it introduced a NULL check of pat. But this turned out to be utterly superfluous; it points to pcm_formats[].silence, and this is an array, which can be never NULL. The problem (supposedly) it tried to address at that time was l...
```diff diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c index 4f556211bb56..d3a08e292072 100644 --- a/sound/core/pcm_misc.c +++ b/sound/core/pcm_misc.c @@ -432,9 +432,9 @@ int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int if (samples == 0) return 0; width = pcm_formats[(...
1cf9631d836b289bd5490776551961c883ae8a4f
Analyze and fix the following issue in the Linux kernel code: usbnet: gl620a: fix endpoint checking in genelink_bind()
Problem Details: Syzbot reports [1] a warning in usb_submit_urb() triggered by inconsistencies between expected and actually present endpoints in gl620a driver. Since genelink_bind() does not properly verify whether specified eps are in fact provided by the device, in this case, an artificially manufactured one, one ma...
```diff diff --git a/drivers/net/usb/gl620a.c b/drivers/net/usb/gl620a.c index 46af78caf457..0bfa37c14059 100644 --- a/drivers/net/usb/gl620a.c +++ b/drivers/net/usb/gl620a.c @@ -179,9 +179,7 @@ static int genelink_bind(struct usbnet *dev, struct usb_interface *intf) { dev->hard_mtu = GL_RCV_BUF_SIZE; dev->net->ha...
fc20737d8b85691ecabab3739ed7d06c9b7bc00f
Analyze and fix the following issue in the Linux kernel code: efivarfs: allow creation of zero length files
Problem Details: Temporarily allow the creation of zero length files in efivarfs so the 'fwupd' user space firmware update tool can continue to operate. This hack should be reverted as soon as the fwupd mechanisms for updating firmware have been fixed. fwupd has been coded to open a firmware file, close it, remove the...
```diff diff --git a/fs/efivarfs/file.c b/fs/efivarfs/file.c index cb1b6d0c3454..c294a8fc566d 100644 --- a/fs/efivarfs/file.c +++ b/fs/efivarfs/file.c @@ -57,10 +57,11 @@ static ssize_t efivarfs_file_write(struct file *file, if (bytes == -ENOENT) { /* - * zero size signals to release that the write deleted - ...
29eb839443058e2bf953566c8db99131c1542e0e
Analyze and fix the following issue in the Linux kernel code: drm/i915/dkl: convert intel_dkl_phy.[ch] to struct intel_display
Problem Details: Going forward, struct intel_display is the main display device data pointer. Convert intel_dkl_phy.[ch] to struct intel_display. Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/fce153dbd3a69dc574a66fb97b7c1f441df9726f.1740502116.git.jani.nikula@...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index defe08df9e97..08585962a23b 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -194,7 +194,7 @@ void intel_displa...
976ba8da2f3c2f1e997f4f620da83ae65c0e3728
Analyze and fix the following issue in the Linux kernel code: x86/platform: Only allow CONFIG_EISA for 32-bit
Problem Details: The CONFIG_EISA menu was cleaned up in 2018, but this inadvertently brought the option back on 64-bit machines: ISA remains guarded by a CONFIG_X86_32 check, but EISA no longer depends on ISA. The last Intel machines ith EISA support used a 82375EB PCI/EISA bridge from 1993 that could be paired with t...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 383b145ffe9f..aa90f0355be1 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -233,7 +233,7 @@ config X86 select HAVE_SAMPLE_FTRACE_DIRECT_MULTI if X86_64 select HAVE_EBPF_JIT select HAVE_EFFICIENT_UNALIGNED_ACCESS - select HAVE_EISA + select HAV...
6ac43f2be982ea54b75206dccd33f4cf81bfdc39
Analyze and fix the following issue in the Linux kernel code: x86/Kconfig: Add cmpxchg8b support back to Geode CPUs
Problem Details: An older cleanup of mine inadvertently removed geode-gx1 and geode-lx from the list of CPUs that are known to support a working cmpxchg8b. Fixes: 88a2b4edda3d ("x86/Kconfig: Rework CONFIG_X86_PAE dependency") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc...
```diff diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 2a7279d80460..42e6a40876ea 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -368,7 +368,7 @@ config X86_HAVE_PAE config X86_CMPXCHG64 def_bool y - depends on X86_HAVE_PAE || M586TSC || M586MMX || MK6 || MK7 + depends on X86_HAVE_...
6d48ad04075729519f6baaa1dc9e5a3a39d05f53
Analyze and fix the following issue in the Linux kernel code: MIPS: Ignore relocs against __ex_table for relocatable kernel
Problem Details: Since commit 6f2c2f93a190 ("scripts/sorttable: Remove unneeded Elf_Rel"), sorttable no longer clears relocs against __ex_table, claiming "it was never used." But in fact MIPS relocatable kernel had been implicitly depending on this behavior, so after this commit the MIPS relocatable kernel has started...
```diff diff --git a/arch/mips/boot/tools/relocs.c b/arch/mips/boot/tools/relocs.c index a88d66c46d7f..9863e1d5c62e 100644 --- a/arch/mips/boot/tools/relocs.c +++ b/arch/mips/boot/tools/relocs.c @@ -468,6 +468,8 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel, Elf_Sym *sym, const char *s...
8c4f28cd81fe86033918eec69d5280b532c05842
Analyze and fix the following issue in the Linux kernel code: KVM: nVMX: Always use IBPB to properly virtualize IBRS
Problem Details: On synthesized nested VM-exits in VMX, an IBPB is performed if IBRS is advertised to the guest to properly provide separate prediction domains for L1 and L2. However, this is currently conditional on X86_FEATURE_USE_IBPB, which depends on the host spectre_v2_user mitigation. In short, if spectre_v2_us...
```diff diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index 1df427a822dd..8a7af02d466e 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -5026,8 +5026,7 @@ void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 vm_exit_reason, * doesn't isolate different VMCSs, i.e. in this ca...
bd64e9d6aafd12e5437685d2a06360f86418d277
Analyze and fix the following issue in the Linux kernel code: selftests/x86/xstate: Fix spelling mistake "hader" -> "header"
Problem Details: There is a spelling mistake in a sig_print() message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20250227091533.599213-1-colin.i.king@gmail.com
```diff diff --git a/tools/testing/selftests/x86/xstate.c b/tools/testing/selftests/x86/xstate.c index 875777911d82..23c1d6c964ea 100644 --- a/tools/testing/selftests/x86/xstate.c +++ b/tools/testing/selftests/x86/xstate.c @@ -391,7 +391,7 @@ static void validate_sigfpstate(int sig, siginfo_t *si, void *ctx_void) if ...
a759109b234385b74d2f5f4c86b5f59b3201ec12
Analyze and fix the following issue in the Linux kernel code: MIPS: ds1287: Match ds1287_set_base_clock() function types
Problem Details: Synchronize the declaration of ds1287_set_base_clock() between cevt-ds1287.c and ds1287.h. Fix follow error with gcc-14 when -Werror: arch/mips/kernel/cevt-ds1287.c:21:5: error: conflicting types for ‘ds1287_set_base_clock’; have ‘int(unsigned int)’ 21 | int ds1287_set_base_clock(unsigned int hz) ...
```diff diff --git a/arch/mips/include/asm/ds1287.h b/arch/mips/include/asm/ds1287.h index 46cfb01f9a14..51cb61fd4c03 100644 --- a/arch/mips/include/asm/ds1287.h +++ b/arch/mips/include/asm/ds1287.h @@ -8,7 +8,7 @@ #define __ASM_DS1287_H extern int ds1287_timer_state(void); -extern void ds1287_set_base_clock(unsign...
f3be225f338a578851a7b607a409f476354a8deb
Analyze and fix the following issue in the Linux kernel code: MIPS: cevt-ds1287: Add missing ds1287.h include
Problem Details: Address the issue of cevt-ds1287.c not including the ds1287.h header file. Fix follow errors with gcc-14 when -Werror: arch/mips/kernel/cevt-ds1287.c:15:5: error: no previous prototype for ‘ds1287_timer_state’ [-Werror=missing-prototypes] 15 | int ds1287_timer_state(void) | ^~~~~~~~~~~~~...
```diff diff --git a/arch/mips/kernel/cevt-ds1287.c b/arch/mips/kernel/cevt-ds1287.c index 9a47fbcd4638..de64d6bb7ba3 100644 --- a/arch/mips/kernel/cevt-ds1287.c +++ b/arch/mips/kernel/cevt-ds1287.c @@ -10,6 +10,7 @@ #include <linux/mc146818rtc.h> #include <linux/irq.h> +#include <asm/ds1287.h> #include <asm/time....
55fa5868519bc48a7344a4c070efa2f4468f2167
Analyze and fix the following issue in the Linux kernel code: MIPS: dec: Declare which_prom() as static
Problem Details: Declare which_prom() as static to suppress gcc compiler warning that 'missing-prototypes'. This function is not intended to be called from other parts. Fix follow error with gcc-14 when -Werror: arch/mips/dec/prom/init.c:45:13: error: no previous prototype for ‘which_prom’ [-Werror=missing-prototypes...
```diff diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c index cb12eb211a49..8d74d7d6c05b 100644 --- a/arch/mips/dec/prom/init.c +++ b/arch/mips/dec/prom/init.c @@ -42,7 +42,7 @@ int (*__pmax_close)(int); * Detect which PROM the DECSTATION has, and set the callback vectors * appropriately. */ -v...
29fa7d7934216e0a93102a930ef28e2a6ae852b1
Analyze and fix the following issue in the Linux kernel code: selftests/sysctl: fix wording of help messages
Problem Details: Change wording of test number recommendation to "the recommended number of times". Signed-off-by: Bharadwaj Raju <bharadwaj.raju777@gmail.com> Signed-off-by: Joel Granados <joel.granados@kernel.org>
```diff diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh index f6e129a82ffd..db1616857d89 100755 --- a/tools/testing/selftests/sysctl/sysctl.sh +++ b/tools/testing/selftests/sysctl/sysctl.sh @@ -857,7 +857,7 @@ list_tests() echo echo "TEST_ID x NUM_TEST" echo "TEST_...
3603996432997f7c88da37a97062a46cda01ac9d
Analyze and fix the following issue in the Linux kernel code: drm/fbdev-dma: Add shadow buffering for deferred I/O
Problem Details: DMA areas are not necessarily backed by struct page, so we cannot rely on it for deferred I/O. Allocate a shadow buffer for drivers that require deferred I/O and use it as framebuffer memory. Fixes driver errors about being "Unable to handle kernel NULL pointer dereference at virtual address" or "Unab...
```diff diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c index b14b581c059d..02a516e77192 100644 --- a/drivers/gpu/drm/drm_fbdev_dma.c +++ b/drivers/gpu/drm/drm_fbdev_dma.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT #include <linux/fb.h> +#include <linux/vmalloc.h> #include <dr...
dd8c01e42f4c5c1eaf02f003d7d588ba6706aa71
Analyze and fix the following issue in the Linux kernel code: drm/xe/userptr: properly setup pfn_flags_mask
Problem Details: Currently we just leave it uninitialised, which at first looks harmless, however we also don't zero out the pfn array, and with pfn_flags_mask the idea is to be able set individual flags for a given range of pfn or completely ignore them, outside of default_flags. So here we end up with pfn[i] & pfn_fl...
```diff diff --git a/drivers/gpu/drm/xe/xe_hmm.c b/drivers/gpu/drm/xe/xe_hmm.c index 089834467880..2e4ae61567d8 100644 --- a/drivers/gpu/drm/xe/xe_hmm.c +++ b/drivers/gpu/drm/xe/xe_hmm.c @@ -166,13 +166,20 @@ int xe_hmm_userptr_populate_range(struct xe_userptr_vma *uvma, { unsigned long timeout = jiffies + msecs_...
e521f516716de7895acd1b5b7fac788214a390b9
Analyze and fix the following issue in the Linux kernel code: dmaengine: Revert "dmaengine: qcom: bam_dma: Avoid writing unavailable register"
Problem Details: This commit causes a hard crash on sdm845 and likely other platforms. Revert it until a proper fix is found. This reverts commit 57a7138d0627: ("dmaengine: qcom: bam_dma: Avoid writing unavailable register") Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Fixes: 57a7138d0627 ("dmaengine: qc...
```diff diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index c14557efd577..bbc3276992bb 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -59,9 +59,6 @@ struct bam_desc_hw { #define DESC_FLAG_NWD BIT(12) #define DESC_FLAG_CMD BIT(11) -#define BAM_NDP_REVISION_START 0x...
8a5680bffb2f681688b5788751c767fc380ff9b7
Analyze and fix the following issue in the Linux kernel code: gpiolib: don't double-check the gc->get callback's existence
Problem Details: gpiochip_get() is called only in two places: in gpio_chip_get_value() and in gpiochip_get_multiple() where the existence of the gc->get() callback is already checked. It makes sense to unduplicate the check by moving it one level up the stack. Fixes: 86ef402d805d ("gpiolib: sanitize the return value o...
```diff diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 49bdae208744..d0108cf2ee0b 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -3195,9 +3195,7 @@ static int gpiochip_get(struct gpio_chip *gc, unsigned int offset) lockdep_assert_held(&gc->gpiodev->srcu); - if (!gc->get) -...
cc78604fd4799a8e8e9d23ea4898acd6b605982d
Analyze and fix the following issue in the Linux kernel code: gpiolib: use a more explicit retval logic in gpiochip_get_direction()
Problem Details: We have existing macros for direction settings so we don't need to rely on the magic value of 1 in the retval check. Use readable logic that explicitly says we expect INPUT, OUTPUT or a negative errno and nothing else in gpiochip_get_direction(). Fixes: e623c4303ed1 ("gpiolib: sanitize the return valu...
```diff diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 9de28bc20b20..49bdae208744 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -352,7 +352,10 @@ static int gpiochip_get_direction(struct gpio_chip *gc, unsigned int offset) return -EOPNOTSUPP; ret = gc->get_direction(gc, ...
9becde08f1bc2857cd66f847eca2aaec3fc05c21
Analyze and fix the following issue in the Linux kernel code: gpiolib: don't use gpiochip_get_direction() when registering a chip
Problem Details: During chip registration we should neither check the return value of gc->get_direction() nor hold the SRCU lock when calling it. The former is because pin controllers may have pins set to alternate functions and return errors from their get_direction() callbacks. That's alright - we should default to t...
```diff diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 1b4af0f97e5a..9de28bc20b20 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1087,24 +1087,19 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, desc->gdev = gdev; - if (gc->get_direction && gpiochip_l...
0da30874729baeb01889b0eca16cfda122687503
Analyze and fix the following issue in the Linux kernel code: dmaengine: ti: k3-udma-glue: Drop skip_fdq argument from k3_udma_glue_reset_rx_chn
Problem Details: The user of k3_udma_glue_reset_rx_chn() e.g. ti_am65_cpsw_nuss can run on multiple platforms having different DMA architectures. On some platforms there can be one FDQ for all flows in the RX channel while for others there is a separate FDQ for each flow in the RX channel. So far we have been relying ...
```diff diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c index 7c224c3ab7a0..f87d244cc2d6 100644 --- a/drivers/dma/ti/k3-udma-glue.c +++ b/drivers/dma/ti/k3-udma-glue.c @@ -84,6 +84,7 @@ struct k3_udma_glue_rx_channel { struct k3_udma_glue_rx_flow *flows; u32 flow_num; u32 flows_ready; +...
95032938c7c9b2e5ebb69f0ee10ebe340fa3af53
Analyze and fix the following issue in the Linux kernel code: dmaengine: bcm2835-dma: fix warning when CONFIG_PM=n
Problem Details: The old SET_LATE_SYSTEM_SLEEP_PM_OPS macro cause a build warning when CONFIG_PM is disabled: warning: 'bcm2835_dma_suspend_late' defined but not used [-Wunused-function] Change this to the modern replacement. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-al...
```diff diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index 20b10c15c696..0117bb2e8591 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -893,7 +893,7 @@ static int bcm2835_dma_suspend_late(struct device *dev) } static const struct dev_pm_ops bcm2835_dma_pm_ops = { - SET...
e16acf907a3c66b9996a5df43e177a5edec8e0a5
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: Parse channel from IE to correct invalid hardware reports during scanning
Problem Details: For some packets, we could not get channel information from PPDU status. And this causes wrong frequencies being reported. Parse the channel information from IE if provided by AP to fix this. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link:...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 8d5dc22fb508..4d286182e21d 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -2382,6 +2382,49 @@ static void rtw89_core_validate_rx_signal(struct ieee8...
2f5a6014eb168a97b24153adccfa663d3b282767
Analyze and fix the following issue in the Linux kernel code: net/mlx5: IRQ, Fix null string in debug print
Problem Details: irq_pool_alloc() debug print can print a null string. Fix it by providing a default string to print. Fixes: 71e084e26414 ("net/mlx5: Allocating a pool of MSI-X vectors for SFs") Signed-off-by: Shay Drory <shayd@nvidia.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c index 7db9cab9bedf..d9362eabc6a1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c @@ -572,7 +572,7 @@ irq_pool_alloc(struct mlx...
47bcd9bf3d231bfd4698d7d3013597490fd5e2d6
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Restore missing trace event when enabling vport QoS
Problem Details: Restore the `trace_mlx5_esw_vport_qos_create` event when creating the vport scheduling element. This trace event was lost during refactoring. Fixes: be034baba83e ("net/mlx5: Make vport QoS enablement more flexible for future extensions") Signed-off-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by:...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c index 07a28073a49e..823c1ba456cd 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c @@ -564,6 +564,9 @@ static int esw_qos_vport_...
7f3528f7d2f98b70e19a6bb7b130fc82c079ac54
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Fix vport QoS cleanup on error
Problem Details: When enabling vport QoS fails, the scheduling node was never freed, causing a leak. Add the missing free and reset the vport scheduling node pointer to NULL. Fixes: be034baba83e ("net/mlx5: Make vport QoS enablement more flexible for future extensions") Signed-off-by: Carolina Jubran <cjubran@nvidia....
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c index 8b7c843446e1..07a28073a49e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c @@ -591,8 +591,11 @@ static int mlx5_esw_qos_...
2d253726ff7106b39a44483b6864398bba8a2f74
Analyze and fix the following issue in the Linux kernel code: net: mvpp2: cls: Fixed Non IP flow, with vlan tag flow defination.
Problem Details: Non IP flow, with vlan tag not working as expected while running below command for vlan-priority. fixed that. ethtool -N eth1 flow-type ether vlan 0x8000 vlan-mask 0x1fff action 0 loc 0 Fixes: 1274daede3ef ("net: mvpp2: cls: Add steering based on vlan Id and priority.") Signed-off-by: Harshal Chaudha...
```diff diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c index 1641791a2d5b..8ed83fb98862 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c @@ -324,7 +324,7 @@ static const struct mvpp2_cls_flow cl...
bc23d4e30866011700787bab8563de45d5bf8431
Analyze and fix the following issue in the Linux kernel code: af_unix: Fix memory leak in unix_dgram_sendmsg()
Problem Details: After running the 'sendmsg02' program of Linux Test Project (LTP), kmemleak reports the following memory leak: # cat /sys/kernel/debug/kmemleak unreferenced object 0xffff888243866800 (size 2048): comm "sendmsg02", pid 67, jiffies 4294903166 hex dump (first 32 bytes): 00 00 00 00 00 0...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 34945de1fb1f..f0e613d97664 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2102,6 +2102,7 @@ restart_locked: goto out_sock_put; } + sock_put(other); goto lookup; } ```
77e45145e3039a0fb212556ab3f8c87f54771757
Analyze and fix the following issue in the Linux kernel code: net: Handle napi_schedule() calls from non-interrupt
Problem Details: napi_schedule() is expected to be called either: * From an interrupt, where raised softirqs are handled on IRQ exit * From a softirq disabled section, where raised softirqs are handled on the next call to local_bh_enable(). * From a softirq handler, where raised softirqs are handled on the next ...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 70c01bd1799e..30da277c5a6f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4757,7 +4757,7 @@ use_local_napi: * we have to raise NET_RX_SOFTIRQ. */ if (!sd->in_net_rx_action) - __raise_softirq_irqoff(NET_RX_SOFTIRQ); + raise_softirq_irqoff(NET_RX_...
49806fe6e61b045b5be8610e08b5a3083c109aa0
Analyze and fix the following issue in the Linux kernel code: net: Clear old fragment checksum value in napi_reuse_skb
Problem Details: In certain cases, napi_get_frags() returns an skb that points to an old received fragment, This skb may have its skb->ip_summed, csum, and other fields set from previous fragment handling. Some network drivers set skb->ip_summed to either CHECKSUM_COMPLETE or CHECKSUM_UNNECESSARY when getting skb from...
```diff diff --git a/net/core/gro.c b/net/core/gro.c index 78b320b63174..0ad549b07e03 100644 --- a/net/core/gro.c +++ b/net/core/gro.c @@ -653,6 +653,7 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) skb->pkt_type = PACKET_HOST; skb->encapsulation = 0; + skb->ip_summed = CHECKSUM_NONE...
de70981f295e7eab86325db3bf349fa676f16c42
Analyze and fix the following issue in the Linux kernel code: gve: unlink old napi when stopping a queue using queue API
Problem Details: When a queue is stopped using the ndo queue API, before destroying its page pool, the associated NAPI instance needs to be unlinked to avoid warnings. Handle this by calling page_pool_disable_direct_recycling() when stopping a queue. Cc: stable@vger.kernel.org Fixes: ebdfae0d377b ("gve: adopt page po...
```diff diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c index 8ac0047f1ada..f0674a443567 100644 --- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c +++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c @@ -109,10 +109,12 @@ static void gve_rx_reset_ring_dqo(struct gv...
01c9c123db76357d4373b2e97b760a856d6fe822
Analyze and fix the following issue in the Linux kernel code: net: Use rtnl_net_dev_lock() in register_netdevice_notifier_dev_net().
Problem Details: Breno Leitao reported the splat below. [0] Commit 65161fb544aa ("net: Fix dev_net(dev) race in unregister_netdevice_notifier_dev_net().") added the DEBUG_NET_WARN_ON_ONCE(), assuming that the netdev is not registered before register_netdevice_notifier_dev_net(). But the assumption was simply wrong. ...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 1b252e9459fd..70c01bd1799e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2141,21 +2141,15 @@ int register_netdevice_notifier_dev_net(struct net_device *dev, struct notifier_block *nb, struct netdev_net_notifier *nn) { - struct net *net = dev...
eb54d2695b57426638fed0ec066ae17a18c4426c
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix truncate sometimes failing and returning 1
Problem Details: __bch_truncate_folio() may return 1 to indicate dirtyness of the folio being truncated, needed for fpunch to get the i_size writes correct. But truncate was forgetting to clear ret, and sometimes returning it as an error. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 94bf34b9b65f..717e7b94c66f 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -466,6 +466,7 @@ int bchfs_truncate(struct mnt_idmap *idmap, ret = bch2_truncate_folio(inode, iattr->ia_size); if (unlikely(ret < 0)) goto err; + ret = 0; ...
677bdb7346b6fd806ea45b11cbfe36de0b0cd644
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix deadlock
Problem Details: This fixes two deadlocks: 1.pcpu_alloc_mutex involved one as pointed by syzbot[1] 2.recursion deadlock. The root cause is that we hold the bc lock during alloc_percpu, fix it by following the pattern used by __btree_node_mem_alloc(). [1] https://lore.kernel.org/all/66f97d9a.050a0220.6bad9.001d.GAE@g...
```diff diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c index ca755e8d1a37..1ec1f90e0eb3 100644 --- a/fs/bcachefs/btree_cache.c +++ b/fs/bcachefs/btree_cache.c @@ -203,7 +203,7 @@ struct btree *__bch2_btree_node_mem_alloc(struct bch_fs *c) return NULL; } - bch2_btree_lock_init(&b->c, 0); + bch...
7909d1fb90e290ffd7b8570f4e2f97fe2fb381d0
Analyze and fix the following issue in the Linux kernel code: bcachefs: Check for -BCH_ERR_open_buckets_empty in journal resize
Problem Details: This fixes occasional failures from journal resize. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 24c294d4634e..5dabbf3c0965 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -1194,7 +1194,9 @@ int bch2_set_nr_journal_buckets(struct bch_fs *c, struct bch_dev *ca, closure_sync(&cl); - if (ret && ret != -BCH_ERR_bucket_al...
2b1283e1ea9b5e0b06f075f79391a51d9f70749b
Analyze and fix the following issue in the Linux kernel code: arm64/mm: Fix Boot panic on Ampere Altra
Problem Details: When the range of present physical memory is sufficiently small enough and the reserved address space for the linear map is sufficiently large enough, The linear map base address is randomized in arm64_memblock_init(). Prior to commit 62cffa496aac ("arm64/mm: Override PARange for !LPA2 and use it cons...
```diff diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 9c0b8d9558fc..ccdef53872a0 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -279,12 +279,7 @@ void __init arm64_memblock_init(void) if (IS_ENABLED(CONFIG_RANDOMIZE_BASE)) { extern u16 memstart_offset_seed; - - /* - * Use the...
c9d699e10fa6c0cdabcddcf991e7ff42af6b2503
Analyze and fix the following issue in the Linux kernel code: perf pmu: Don't double count common sysfs and json events
Problem Details: After pmu_add_cpu_aliases() is called, perf_pmu__num_events() returns an incorrect value that double counts common events and doesn't match the actual count of events in the alias list. This is because after 'cpu_aliases_added == true', the number of events returned is 'sysfs_aliases + cpu_json_aliases...
```diff diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index e51c17b1ea35..57450c73fb63 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -595,7 +595,7 @@ static int perf_pmu__new_alias(struct perf_pmu *pmu, const char *name, }; if (pmu_events_table__find_event(pmu->events_table, pmu...
72c6f57a4193f2eadceb52261315438719c4c1ad
Analyze and fix the following issue in the Linux kernel code: perf pmu: Dynamically allocate tool PMU
Problem Details: perf_pmus__destroy() treats all PMUs as allocated and free's them so we can't have any static PMUs that are added to the PMU lists. Fix it by allocating the tool PMU in the same way as the others. Current users of the tool PMU already use find_pmu() and not perf_pmus__tool_pmu(), so rename the function...
```diff diff --git a/tools/perf/util/pmus.c b/tools/perf/util/pmus.c index afd59d678fd0..dd7c2ffdab38 100644 --- a/tools/perf/util/pmus.c +++ b/tools/perf/util/pmus.c @@ -264,7 +264,7 @@ skip_pe_pmus: if ((to_read_types & PERF_TOOL_PMU_TYPE_TOOL_MASK) != 0 && (read_pmu_types & PERF_TOOL_PMU_TYPE_TOOL_MASK) ==...
db5e228611b118cf7b1f8084063feda5c037f4a7
Analyze and fix the following issue in the Linux kernel code: tracing: fprobe-events: Log error for exceeding the number of entry args
Problem Details: Add error message when the number of entry argument exceeds the maximum size of entry data. This is currently checked when registering fprobe, but in this case no error message is shown in the error_log file. Link: https://lore.kernel.org/all/174055074269.4079315.17809232650360988538.stgit@mhiramat.to...
```diff diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c index 85f037dc1462..e27305d31fc5 100644 --- a/kernel/trace/trace_fprobe.c +++ b/kernel/trace/trace_fprobe.c @@ -1230,6 +1230,11 @@ static int trace_fprobe_create_internal(int argc, const char *argv[], if (is_return && tf->tp.entry_arg) { ...
d0453655b6ddc685a4837f3cc0776ae8eef62d01
Analyze and fix the following issue in the Linux kernel code: tracing: tprobe-events: Reject invalid tracepoint name
Problem Details: Commit 57a7e6de9e30 ("tracing/fprobe: Support raw tracepoints on future loaded modules") allows user to set a tprobe on non-exist tracepoint but it does not check the tracepoint name is acceptable. So it leads tprobe has a wrong character for events (e.g. with subsystem prefix). In this case, the event...
```diff diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c index 8826f44f69a4..85f037dc1462 100644 --- a/kernel/trace/trace_fprobe.c +++ b/kernel/trace/trace_fprobe.c @@ -1049,6 +1049,19 @@ static int parse_symbol_and_return(int argc, const char *argv[], if (*is_return) return 0; + if (is_tra...
ac965d7d88fc36fb42e3d50225c0a44dd8326da4
Analyze and fix the following issue in the Linux kernel code: tracing: tprobe-events: Fix a memory leak when tprobe with $retval
Problem Details: Fix a memory leak when a tprobe is defined with $retval. This combination is not allowed, but the parse_symbol_and_return() does not free the *symbol which should not be used if it returns the error. Thus, it leaks the *symbol memory in that error path. Link: https://lore.kernel.org/all/174055072650.4...
```diff diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c index b8f3c4ba309b..8826f44f69a4 100644 --- a/kernel/trace/trace_fprobe.c +++ b/kernel/trace/trace_fprobe.c @@ -1056,6 +1056,8 @@ static int parse_symbol_and_return(int argc, const char *argv[], if (is_tracepoint) { trace_probe_log_...
b8501febdc513541afc5663d063bfac7ea575b71
Analyze and fix the following issue in the Linux kernel code: clk: qcom: dispcc-sm8750: Drop incorrect CLK_SET_RATE_PARENT on byte intf parent
Problem Details: The parent of disp_cc_mdss_byte0_intf_clk clock should not propagate up the rates, because this messes up entire clock hierarchy when setting clock rates in MSM DSI driver. The dsi_link_clk_set_rate_6g() first sets entire clock hierarchy rates via dev_pm_opp_set_rate() on byte clock and then sets indi...
```diff diff --git a/drivers/clk/qcom/dispcc-sm8750.c b/drivers/clk/qcom/dispcc-sm8750.c index 0358dff91da5..e9bca179998b 100644 --- a/drivers/clk/qcom/dispcc-sm8750.c +++ b/drivers/clk/qcom/dispcc-sm8750.c @@ -827,7 +827,6 @@ static struct clk_regmap_div disp_cc_mdss_byte0_div_clk_src = { &disp_cc_mdss_byte0_clk_s...
9f3c507cb44498067c980674139bcad56e582ee6
Analyze and fix the following issue in the Linux kernel code: i2c: amd-asf: Fix EOI register write to enable successive interrupts
Problem Details: The commit b1f8921dfbaa ("i2c: amd-asf: Clear remote IRR bit to get successive interrupt") introduced a method to enable successive interrupts but inadvertently omitted the necessary write to the EOI register, resulting in a failure to receive successive interrupts. Fix this by adding the required wri...
```diff diff --git a/drivers/i2c/busses/i2c-amd-asf-plat.c b/drivers/i2c/busses/i2c-amd-asf-plat.c index 7512614bf4b7..93ebec162c6d 100644 --- a/drivers/i2c/busses/i2c-amd-asf-plat.c +++ b/drivers/i2c/busses/i2c-amd-asf-plat.c @@ -293,6 +293,7 @@ static irqreturn_t amd_asf_irq_handler(int irq, void *ptr) amd_asf_upd...
556b58c19154a7060b72ab62c0cd0911ccdbf1ba
Analyze and fix the following issue in the Linux kernel code: perf probe: Pick the correct dwarf die while adding probe points
Problem Details: Perf probe on vfs_fstatat fails as below on a powerpc system $ ./perf probe -nf --max-probes=512 -a 'vfs_fstatat $params' Segmentation fault (core dumped) This is observed while running perftool-testsuite_probe testcase. While running with verbose, its observed that segfault happens at: synt...
```diff diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 1e769b68da37..3cc7c40f5097 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -973,6 +973,7 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data) pr_debug("Matched function: %s [%lx...
71c49ee9bb41e1709abac7e2eb05f9193222e580
Analyze and fix the following issue in the Linux kernel code: i2c: ls2x: Fix frequency division register access
Problem Details: According to the chip manual, the I2C register access type of Loongson-2K2000/LS7A is "B", so we can only access registers in byte form (readb()/writeb()). Although Loongson-2K0500/Loongson-2K1000 do not have similar constraints, register accesses in byte form also behave correctly. Also, in hardware...
```diff diff --git a/drivers/i2c/busses/i2c-ls2x.c b/drivers/i2c/busses/i2c-ls2x.c index 8821cac3897b..b475dd27b7af 100644 --- a/drivers/i2c/busses/i2c-ls2x.c +++ b/drivers/i2c/busses/i2c-ls2x.c @@ -10,6 +10,7 @@ * Rewritten for mainline by Binbin Zhou <zhoubinbin@loongson.cn> */ +#include <linux/bitfield.h> #in...
dd1998e243f5fa25d348a384ba0b6c84d980f2b2
Analyze and fix the following issue in the Linux kernel code: i2c: npcm: disable interrupt enable bit before devm_request_irq
Problem Details: The customer reports that there is a soft lockup issue related to the i2c driver. After checking, the i2c module was doing a tx transfer and the bmc machine reboots in the middle of the i2c transaction, the i2c module keeps the status without being reset. Due to such an i2c module status, the i2c irq ...
```diff diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c index 3ca08b8ef8af..de713b5747fe 100644 --- a/drivers/i2c/busses/i2c-npcm7xx.c +++ b/drivers/i2c/busses/i2c-npcm7xx.c @@ -2554,6 +2554,13 @@ static int npcm_i2c_probe_bus(struct platform_device *pdev) if (irq < 0) return irq; ...
f4dc5a3355a84f53ff3287d496728c7b77160069
Analyze and fix the following issue in the Linux kernel code: perf annotate-data: Handle direct use of stack pointer without fbreg
Problem Details: Sometimes compiler generates code to use the stack pointer register without frame pointer. As we know RSP is the stack register on x86, let's treat it as same as fbreg. But the offset would be opposite direction so update the debug message accordingly. Reported-by: Blake Jones <blakejones@google.com...
```diff diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/x86/annotate/instructions.c index ae94b1f0b9cc..c6d403eae744 100644 --- a/tools/perf/arch/x86/annotate/instructions.c +++ b/tools/perf/arch/x86/annotate/instructions.c @@ -410,7 +410,7 @@ static void update_insn_state_x86(struct type_sta...
5c57533eb8c1efeeab4e2e417fa983d65707b925
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: vgic-v4: Fall back to software irqbypass if LPI not found
Problem Details: Continuing with the theme of broken VMMs and guests, irqbypass registration can fail if the virtual ITS lacks a translation for the MSI. Either the guest hasn't mapped it or userspace may have forgotten to restore the ITS. Exit silently and allow irqbypass configuration to succeed. As a reward for ing...
```diff diff --git a/arch/arm64/kvm/vgic/vgic-v4.c b/arch/arm64/kvm/vgic/vgic-v4.c index 3e1de40720e0..9f51d58b5f8a 100644 --- a/arch/arm64/kvm/vgic/vgic-v4.c +++ b/arch/arm64/kvm/vgic/vgic-v4.c @@ -415,7 +415,7 @@ int kvm_vgic_v4_set_forwarding(struct kvm *kvm, int virq, struct vgic_irq *irq; struct its_vlpi_map m...
a0d7e2fc61ab54f1be817c9300231a1b48432628
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: vgic-v4: Only attempt vLPI mapping for actual MSIs
Problem Details: Some 'creative' VMMs out there may assign a VFIO MSI eventfd to an SPI routing entry. And yes, I can already hear you shouting about possibly driving a level interrupt with an edge-sensitive one. You know who you are. This works for the most part, and interrupt injection winds up taking the software ...
```diff diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index b8e55a441282..36d8dd80b431 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -2717,6 +2717,14 @@ int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *cons, { struct kvm_kernel_irqfd *irqfd = container_of(cons, struct ...
a33c9699e73456d08182ad7b87a4af52ac24f779
Analyze and fix the following issue in the Linux kernel code: drm/xe/pxp: Don't kill queues while holding PXP locks
Problem Details: xe_exec_queue_kill can sleep, so we can't call it from under a spinlock. We can instead move the queues to a separate list and then kill them all after we release the spinlock. Furthermore, xe_exec_queue_kill can take the VM lock so we can't call it while holding the PXP mutex because the mutex is tak...
```diff diff --git a/drivers/gpu/drm/xe/xe_pxp.c b/drivers/gpu/drm/xe/xe_pxp.c index 3cd3f83e86b0..47499ca02693 100644 --- a/drivers/gpu/drm/xe/xe_pxp.c +++ b/drivers/gpu/drm/xe/xe_pxp.c @@ -132,14 +132,6 @@ static int pxp_wait_for_session_state(struct xe_pxp *pxp, u32 id, bool in_play) static void pxp_invalidate_qu...
3bd53b2fa57d9472d3af63b3f4d26023ba07b579
Analyze and fix the following issue in the Linux kernel code: Revert "selftests: kselftest: Fix build failure with NOLIBC"
Problem Details: This reverts commit 16767502aa990cca2cb7d1372b31d328c4c85b40. Nolibc gained support for uname(2) and sscanf(3) which are the dependencies of ksft_min_kernel_version(). So re-enable support for ksft_min_kernel_version() under nolibc. Acked-by: Shuah Khan <skhan@linuxfoundation.org> Acked-by: Willy Ta...
```diff diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h index cdf91b0ca40f..c3b6d2604b1e 100644 --- a/tools/testing/selftests/kselftest.h +++ b/tools/testing/selftests/kselftest.h @@ -444,10 +444,6 @@ static inline __noreturn __printf(1, 2) void ksft_exit_skip(const char *msg, ......
2c2b1e059792f610bae4fee8ed517b8ce9c585fb
Analyze and fix the following issue in the Linux kernel code: selinux: add permission checks for loading other kinds of kernel files
Problem Details: Although the LSM hooks for loading kernel modules were later generalized to cover loading other kinds of files, SELinux didn't implement corresponding permission checks, leaving only the module case covered. Define and add new permission checks for these other cases. Signed-off-by: Cameron K. Williams...
```diff diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index a80e3f01153f..0fc70dcf1409 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -4096,7 +4096,7 @@ static int selinux_kernel_module_request(char *kmod_name) SYSTEM__MODULE_REQUEST, &ad); } -static int selinux_ke...
063ab16ff5cfa74aba25ec7efa08d2d016a429da
Analyze and fix the following issue in the Linux kernel code: thermal: hisi: Use kcalloc() instead of kzalloc() with multiplication
Problem Details: According to the latest recommendations, kcalloc() should be used instead of kzalloc() with multiplication (which might overflow). Switch to this new scheme and use more safe kcalloc(). No functional impact. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/202502241734...
```diff diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 7e918bd3f100..4307161533a7 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -412,8 +412,8 @@ static int hi3660_thermal_probe(struct hisi_thermal_data *data) data->nr_sensors = 1; - data->s...
e6c0525fc6afb2e88c02b13a58a036d95492e6f6
Analyze and fix the following issue in the Linux kernel code: thermal: int340x: Use kcalloc() instead of kzalloc() with multiplication
Problem Details: According to the latest recommendations, kcalloc() should be used instead of kzalloc() with multiplication (which might overflow). Switch to this new scheme and use more safe kcalloc(). No functional impact. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/202502241734...
```diff diff --git a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c index 8dca6a6aceca..2d672c4be3ce 100644 --- a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c @...
83c34f5099bf38917b8518404f4ff32d5878fa8d
Analyze and fix the following issue in the Linux kernel code: thermal: k3_j72xx_bandgap: Use kcalloc() instead of kzalloc()
Problem Details: According to the latest recommendations, kcalloc() should be used instead of kzalloc() with multiplication (which might overflow). Switch to this new scheme and use more safe kcalloc(). No functional impact. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/202502241734...
```diff diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c index 70de6dbf99c5..a36289e61315 100644 --- a/drivers/thermal/k3_j72xx_bandgap.c +++ b/drivers/thermal/k3_j72xx_bandgap.c @@ -460,13 +460,13 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) goto err_alloc; ...
c65b5c5187439ae940462c83d430204631045d06
Analyze and fix the following issue in the Linux kernel code: thermal/of: Use kcalloc() instead of kzalloc() with multiplication
Problem Details: According to the latest recommendations, kcalloc() should be used instead of kzalloc() with multiplication (which might overflow). Switch to this new scheme and use more safe kcalloc(). No functional impact. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/202502241734...
```diff diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 5ab4ce4daaeb..fb376bd4d957 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -107,7 +107,7 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n if (!count) return NULL...
e6ca59bb3c8f3fe00a9dc1ec72bcb77cd4ecd242
Analyze and fix the following issue in the Linux kernel code: thermal/debugfs: replace kzalloc() with kcalloc() in thermal_debug_tz_add()
Problem Details: Work is under way to get rid of all multiplications from allocation functions to prevent integer overflows [1]. Here the multiplication is obviously safe, but using kcalloc() is more appropriate and improves readability. This change has no effect on runtime behavior. Link: https://github.com/KSPP/li...
```diff diff --git a/drivers/thermal/thermal_debugfs.c b/drivers/thermal/thermal_debugfs.c index c800504c3cfe..60ee6c366998 100644 --- a/drivers/thermal/thermal_debugfs.c +++ b/drivers/thermal/thermal_debugfs.c @@ -876,7 +876,7 @@ void thermal_debug_tz_add(struct thermal_zone_device *tz) tz_dbg->tz = tz; - tz_dbg...
75f1f311d883dfaffb98be3c1da208d6ed5d4df9
Analyze and fix the following issue in the Linux kernel code: Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'"
Problem Details: This reverts commit 267b21d0bef8e67dbe6c591c9991444e58237ec9. Turns out some DTs do depend on this behavior. Specifically, a downstream Pixel 6 DT. Revert the change at least until we can decide if the DT spec can be changed instead. Cc: stable@vger.kernel.org Signed-off-by: Rob Herring (Arm) <robh@k...
```diff diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 75e819f66a56..ee2e31522d7e 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -415,12 +415,12 @@ static int __init __reserved_mem_alloc_size(unsigned long node, const char *unam prop = of_get_flat_dt_...
9a0b11d4cf3b4324378c322b7043962e648681ed
Analyze and fix the following issue in the Linux kernel code: drm/xe/eustall: Add support to init, enable and disable EU stall sampling
Problem Details: Implement EU stall sampling APIs introduced in the previous patch for Xe_HPC (PVC). Add register definitions and the code that accesses these registers to the APIs. Add initialization and clean up functions and their implementations, EU stall enable and disable functions. v11: Move stream->xecore_buf...
```diff diff --git a/drivers/gpu/drm/xe/regs/xe_eu_stall_regs.h b/drivers/gpu/drm/xe/regs/xe_eu_stall_regs.h new file mode 100644 index 000000000000..c53f57fdde65 --- /dev/null +++ b/drivers/gpu/drm/xe/regs/xe_eu_stall_regs.h @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2025 Intel Corporatio...
1537ec85ebd7d7aa3ce1a003007cd3588cd58bda
Analyze and fix the following issue in the Linux kernel code: drm/xe/uapi: Introduce API for EU stall sampling
Problem Details: A new hardware feature first introduced in PVC gives capability to periodically sample EU stall state and record counts for different stall reasons, on a per IP basis, aggregate across all EUs in a subslice and record the samples in a buffer in each subslice. Eventually, the aggregated data is written ...
```diff diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index ffc836fa8e60..4fb3a4a336fd 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -33,6 +33,7 @@ xe-y += xe_bb.o \ xe_device_sysfs.o \ xe_dma_buf.o \ xe_drm_client.o \ + xe_eu_stall.o \ xe_exec.o \ xe_e...
eb50844d728f11e87491f7c7af15a4a737f1159d
Analyze and fix the following issue in the Linux kernel code: of: property: Increase NR_FWNODE_REFERENCE_ARGS
Problem Details: Currently, the following two macros have different values: // The maximal argument count for firmware node reference #define NR_FWNODE_REFERENCE_ARGS 8 // The maximal argument count for DT node reference #define MAX_PHANDLE_ARGS 16 It may cause firmware node reference's argument count out of range ...
```diff diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 0731994b9d7c..6fa0a268d538 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -91,7 +91,7 @@ struct fwnode_endpoint { #define SWNODE_GRAPH_PORT_NAME_FMT "port@%u" #define SWNODE_GRAPH_ENDPOINT_NAME_FMT "endpoint@%u" -#defi...
27d38bdfd416f4db70e09c3bef3b030c86fd235a
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Improve BSS discovery with hidden SSID in 6 GHz band
Problem Details: Currently, sometimes, the station is unable to identify the configured AP SSID in its scan results when the AP is not broadcasting its name publicly and has a hidden SSID. Currently, channel dwell time for an ath12k station is 30 ms. Sometimes, station can send broadcast probe request to AP close to t...
```diff diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 96c473c4adc6..0c3cd65f9692 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -2433,8 +2433,8 @@ void ath12k_wmi_start_scan_init(struct ath12k *ar, arg->dwell_time_ac...
e447212593a07f0dc2099093889d4b506461121a
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Unload MMUs during vCPU destruction, not before
Problem Details: When destroying a VM, unload a vCPU's MMUs as part of normal vCPU freeing, instead of as a separate prepratory action. Unloading MMUs ahead of time is a holdover from commit 7b53aa565084 ("KVM: Fix vcpu freeing for guest smp"), which "fixed" a rather egregious flaw where KVM would attempt to free *all...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 15de6e92af7d..2b74e8b1df67 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -12361,6 +12361,9 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) { int idx; + kvm_clear_async_pf_completion_queue(vcpu); + kvm_mmu_unload(vcpu); + kvmclo...
a7624ccdef4f020325893534914fad549e51ac83
Analyze and fix the following issue in the Linux kernel code: ext2: Make ext2_params_spec static
Problem Details: It isn't used outside of fs/ext2/super.c. Reported-by: kernel test robot <lkp@intel.com> Fixes: eab61d3260d7 ("ext2: convert to the new mount API") Signed-off-by: Jan Kara <jack@suse.cz>
```diff diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 4b894d16937d..28ff47ec4be6 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -442,7 +442,7 @@ static const struct constant_table ext2_param_errors[] = { {} }; -const struct fs_parameter_spec ext2_param_spec[] = { +static const struct fs_parameter_spe...
a9e60f1ffe1ca57d6af6a2573e2f950e76efbf5b
Analyze and fix the following issue in the Linux kernel code: clk: rockchip: rk3328: fix wrong clk_ref_usb3otg parent
Problem Details: Correct the clk_ref_usb3otg parent to fix clock control for the usb3 controller on rk3328. Verified against the rk3328 trm, the rk3228h trm, and the rk3328 usb3 phy clock map. Fixes: fe3511ad8a1c ("clk: rockchip: add clock controller for rk3328") Signed-off-by: Peter Geis <pgwipeout@gmail.com> Reviewe...
```diff diff --git a/drivers/clk/rockchip/clk-rk3328.c b/drivers/clk/rockchip/clk-rk3328.c index 3bb87b27b662..cf60fcf2fa5c 100644 --- a/drivers/clk/rockchip/clk-rk3328.c +++ b/drivers/clk/rockchip/clk-rk3328.c @@ -201,7 +201,7 @@ PNAME(mux_aclk_peri_pre_p) = { "cpll_peri", "gpll_peri", "hdmiphy_peri"...
4580f4e0ebdf8dc8d506ae926b88510395a0c1d1
Analyze and fix the following issue in the Linux kernel code: bpf: Fix deadlock between rcu_tasks_trace and event_mutex.
Problem Details: Fix the following deadlock: CPU A _free_event() perf_kprobe_destroy() mutex_lock(&event_mutex) perf_trace_event_unreg() synchronize_rcu_tasks_trace() There are several paths where _free_event() grabs event_mutex and calls sync_rcu_tasks_trace. Above is one such case. CPU B bpf_pro...
```diff diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index a612f6f182e5..13bef2462e94 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -392,7 +392,7 @@ static const struct bpf_func_proto bpf_trace_printk_proto = { .arg2_type = ARG_CONST_SIZE, }; -static void __set_printk_...
1a7460a1976d4a9cba1545b071a45c31c1786e38
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix uninitialized pointer def
Problem Details: In the case where a set of checks on xe->info.platform don't assign a value to pointer def the pointer remains uninitialized and hence can fail the following !def check. Fix this be ensuring pointer def is initialized to NULL. Fixes: 292b1a8a5054 ("drm/xe: Stop ignoring errors from xe_heci_gsc_init()"...
```diff diff --git a/drivers/gpu/drm/xe/xe_heci_gsc.c b/drivers/gpu/drm/xe/xe_heci_gsc.c index 3ea325d3db99..27d11e06a82b 100644 --- a/drivers/gpu/drm/xe/xe_heci_gsc.c +++ b/drivers/gpu/drm/xe/xe_heci_gsc.c @@ -173,7 +173,7 @@ static int heci_gsc_add_device(struct xe_device *xe, const struct heci_gsc_def * int xe_heci...
db0d2d7572153490449e360d5ebf298badf5f395
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix pipeDMC and ATS fault handling
Problem Details: The fault handler is supposed to return true when it handles the fault. The pipeDMC and ATS handlers are returning false instead which results in the "unreported faults" WARN triggering when it shouldn't. Fixes: f13011a79999 ("drm/i915: Pimp display fault reporting") Signed-off-by: Ville Syrjälä <vill...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.c b/drivers/gpu/drm/i915/display/intel_display_irq.c index 99fb7fc7be39..aa23bb817805 100644 --- a/drivers/gpu/drm/i915/display/intel_display_irq.c +++ b/drivers/gpu/drm/i915/display/intel_display_irq.c @@ -1101,7 +1101,7 @@ static bool handle_plane_at...
76c7d4300d99fbf7f81190c2cec794ff85e1770d
Analyze and fix the following issue in the Linux kernel code: powerpc/io: Rename _insw_ns() etc.
Problem Details: The "_ns" suffix was "historical" in 2006, finally remove it. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241218105523.416573-17-mpe@ellerman.id.au
```diff diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 89754bfb6fad..922ee33a87cb 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -80,16 +80,12 @@ extern bool isa_io_special; * * in_8, in_le16, in_be16, in_le32, in_be32, in_le64, in_be64 * out_8,...
79e10dad1ce3feac7937bedf911d92f486a9e76a
Analyze and fix the following issue in the Linux kernel code: rseq: Update kernel fields in lockstep with CONFIG_DEBUG_RSEQ=y
Problem Details: With CONFIG_DEBUG_RSEQ=y, an in-kernel copy of the read-only fields is kept synchronized with the user-space fields. Ensure the updates are done in lockstep in case we error out on a write to user-space. Fixes: 7d5265ffcd8b ("rseq: Validate read-only fields under DEBUG_RSEQ config") Signed-off-by: Mic...
```diff diff --git a/kernel/rseq.c b/kernel/rseq.c index 442aba29bc4c..3d136c48cff7 100644 --- a/kernel/rseq.c +++ b/kernel/rseq.c @@ -78,24 +78,24 @@ efault: return -EFAULT; } -static void rseq_set_ro_fields(struct task_struct *t, u32 cpu_id_start, u32 cpu_id, - u32 node_id, u32 mm_cid) -{ - rseq_kernel_...