id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
39231e8d6ba7f794b566fd91ebd88c0834a23b98
Analyze and fix the following issue in the Linux kernel code: mm: fix MAX_FOLIO_ORDER on powerpc configs with hugetlb
Problem Details: In the past, CONFIG_ARCH_HAS_GIGANTIC_PAGE indicated that we support runtime allocation of gigantic hugetlb folios. In the meantime it evolved into a generic way for the architecture to state that it supports gigantic hugetlb folios. In commit fae7d834c43c ("mm: add __dump_folio()") we started using ...
```diff diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index e24f4d88885a..9537a61ebae0 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -137,6 +137,7 @@ config PPC select ARCH_HAS_DMA_OPS if PPC64 select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_GCOV_PROFILE_ALL + select ARCH_HAS_GIGANTI...
86ce2a29dd9a3564fd7be584c8bb7ced28f7ca02
Analyze and fix the following issue in the Linux kernel code: perf script: Fix build by removing unused evsel_script()
Problem Details: The evsel_script() function is unused since the linked commit. Fix the build by removing it. Fixes the following compilation error: static inline struct evsel_script *evsel_script(struct evsel *evsel) ^ builtin-script.c:347:36: error: unused function 'evsel_scr...
```diff diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 3ac6b80c460e..011962e1ee0f 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -344,11 +344,6 @@ struct evsel_script { u64 samples; }; -static inline struct evsel_script *evsel_script(struct evsel ...
b0e6871415b25f5e84a79621834e3d0c9d4627a6
Analyze and fix the following issue in the Linux kernel code: iio: core: Clean up device correctly on iio_device_alloc() failure
Problem Details: Once we called device_initialize() we have to call put_device() on it. Refactor the code to make it in the right order. Fixes: fe6f45f6ba22 ("iio: core: check return value when calling dev_set_name()") Fixes: 847ec80bbaa7 ("Staging: IIO: core support for device registration and management") Signed-off...
```diff diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 93d6e5b101cf..5d2f35cf18bc 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -1697,11 +1697,6 @@ struct iio_dev *iio_device_alloc(struct device *parent, int sizeof_priv) ACCESS_PRIVATE(ind...
f5d203467a31798191365efeb16cd619d2c8f23a
Analyze and fix the following issue in the Linux kernel code: iio: core: add missing mutex_destroy in iio_dev_release()
Problem Details: Add missing mutex_destroy() call in iio_dev_release() to properly clean up the mutex initialized in iio_device_alloc(). Ensure proper resource cleanup and follows kernel practices. Found by code review. While at it, create a lockdep key before mutex initialisation. This will help with converting it t...
```diff diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 88c3d585a1bd..93d6e5b101cf 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -1654,6 +1654,9 @@ static void iio_dev_release(struct device *device) iio_device_detach_buffers(indio_dev); ...
89194773f5738a0617240ac92b190fbd553e58bc
Analyze and fix the following issue in the Linux kernel code: drm/msm: Add NULL check in vm_op_enqueue()
Problem Details: vm_op_enqueue() allocates an msm_vm_op struct with kmalloc, but the return value is not checked for NULL value which can be returned by kmalloc under low-memory conditions. This can result in NULL pointer dereference when the pointer is dereferenced. Add NULL check after the allocation and propagate -...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c index 89a95977f41e..71d5238437eb 100644 --- a/drivers/gpu/drm/msm/msm_gem_vma.c +++ b/drivers/gpu/drm/msm/msm_gem_vma.c @@ -462,15 +462,20 @@ struct op_arg { bool kept; }; -static void +static int vm_op_enqueue(struct op_ar...
5bcc5786a0cfa9249ccbe539833040a6285d0de3
Analyze and fix the following issue in the Linux kernel code: watchdog: starfive: Fix resource leak in probe error path
Problem Details: If pm_runtime_put_sync() fails after watchdog_register_device() succeeds, the probe function jumps to err_exit without unregistering the watchdog device. This leaves the watchdog registered in the subsystem while the driver fails to load, resulting in a resource leak. Add a new error label err_unregis...
```diff diff --git a/drivers/watchdog/starfive-wdt.c b/drivers/watchdog/starfive-wdt.c index 355918d62f63..ed71d3960a0f 100644 --- a/drivers/watchdog/starfive-wdt.c +++ b/drivers/watchdog/starfive-wdt.c @@ -500,12 +500,14 @@ static int starfive_wdt_probe(struct platform_device *pdev) if (pm_runtime_enabled(&pdev->de...
25c0b472eab8379683d4eef681185c104bed8ffd
Analyze and fix the following issue in the Linux kernel code: watchdog: wdat_wdt: Fix ACPI table leak in probe function
Problem Details: wdat_wdt_probe() calls acpi_get_table() to obtain the WDAT ACPI table but never calls acpi_put_table() on any paths. This causes a permanent ACPI table memory leak. Add a single cleanup path which calls acpi_put_table() to ensure the ACPI table is always released. Fixes: 058dfc767008 ("ACPI / watchdo...
```diff diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c index 650fdc7996e1..dd3c2d69c9df 100644 --- a/drivers/watchdog/wdat_wdt.c +++ b/drivers/watchdog/wdat_wdt.c @@ -326,19 +326,27 @@ static int wdat_wdt_probe(struct platform_device *pdev) return -ENODEV; wdat = devm_kzalloc(dev, sizeof(...
f0a4bf61f1a6080d0d2452c7d19066eba0e227b7
Analyze and fix the following issue in the Linux kernel code: watchdog/diag288: Fix module comment typos
Problem Details: Correct spelling and capitalizaion in the header comment so the documentation reads cleanly. Signed-off-by: Zoe Gates <zoe@zeocities.dev> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
```diff diff --git a/drivers/watchdog/diag288_wdt.c b/drivers/watchdog/diag288_wdt.c index 887d5a6c155b..656b937f7653 100644 --- a/drivers/watchdog/diag288_wdt.c +++ b/drivers/watchdog/diag288_wdt.c @@ -6,10 +6,10 @@ * to CP. * * The command can be altered using the module parameter "cmd". This is - * not recomme...
babe81b06158da7e845d19fae0a9205baf2b211d
Analyze and fix the following issue in the Linux kernel code: watchdog: renesas_wwdt: add driver
Problem Details: This driver adds support for the Renesas Window Watchdog Timer (WWDT). Because it can only be setup once after boot and we cannot know if this already happened in early boot stages, it is mandated that the firmware configures the watchdog. Linux then adapts according to the given setup. Note that this ...
```diff diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 05008d937e40..792d0d831336 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -969,6 +969,14 @@ config RENESAS_WDT This driver adds watchdog support for the integrated watchdogs in the Renesas R-Car and other SH-...
7aa31ee9ec92915926e74731378c009c9cc04928
Analyze and fix the following issue in the Linux kernel code: via_wdt: fix critical boot hang due to unnamed resource allocation
Problem Details: The VIA watchdog driver uses allocate_resource() to reserve a MMIO region for the watchdog control register. However, the allocated resource was not given a name, which causes the kernel resource tree to contain an entry marked as "<BAD>" under /proc/iomem on x86 platforms. During boot, this unnamed r...
```diff diff --git a/drivers/watchdog/via_wdt.c b/drivers/watchdog/via_wdt.c index d647923d68fe..f55576392651 100644 --- a/drivers/watchdog/via_wdt.c +++ b/drivers/watchdog/via_wdt.c @@ -165,6 +165,7 @@ static int wdt_probe(struct pci_dev *pdev, dev_err(&pdev->dev, "cannot enable PCI device\n"); return -ENODEV; ...
ce89e3e019f1ec4b11356f35feb8bd8c0f2c6bf7
Analyze and fix the following issue in the Linux kernel code: gpu: nova-core: provide a clear error report for unsupported GPUs
Problem Details: Pass in a PCI device to Spec::new(), and provide a Display implementation for boot42, in order to provide a clear, concise report of what happened: the driver read NV_PMC_BOOT42, and found that the GPU is not supported. For very old GPUs (older than Fermi), the driver still returns ENODEV, but it does...
```diff diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs index 3e3375f8fe99..19755af6ad04 100644 --- a/drivers/gpu/nova-core/gpu.rs +++ b/drivers/gpu/nova-core/gpu.rs @@ -182,7 +182,7 @@ pub(crate) struct Spec { } impl Spec { - fn new(bar: &Bar0) -> Result<Spec> { + fn new(dev: &device...
7d5864dc5d5ea6a35983dd05295fb17f2f2f44ce
Analyze and fix the following issue in the Linux kernel code: ARM: dts: microchip: sama5d2: fix spi flexcom fifo size to 32
Problem Details: Unlike standalone spi peripherals, on sama5d2, the flexcom spi have fifo size of 32 data. Fix flexcom/spi nodes where this property is wrong. Fixes: 6b9a3584c7ed ("ARM: dts: at91: sama5d2: Add missing flexcom definitions") Cc: stable@vger.kernel.org # 5.8+ Signed-off-by: Nicolas Ferre <nicolas.ferre@m...
```diff diff --git a/arch/arm/boot/dts/microchip/sama5d2.dtsi b/arch/arm/boot/dts/microchip/sama5d2.dtsi index 17430d7f2055..fde890f18d20 100644 --- a/arch/arm/boot/dts/microchip/sama5d2.dtsi +++ b/arch/arm/boot/dts/microchip/sama5d2.dtsi @@ -571,7 +571,7 @@ AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID...
13f85988d4fa31bda73a9504d71b10f7a14f1856
Analyze and fix the following issue in the Linux kernel code: gpu: nova-core: gsp: Retrieve GSP static info to gather GPU information
Problem Details: After GSP initialization is complete, retrieve the static configuration information from GSP-RM. This information includes GPU name, capabilities, memory configuration, and other properties. On some GPU variants, it is also required to do this for initialization to complete. Signed-off-by: Alistair Po...
```diff diff --git a/drivers/gpu/nova-core/gsp/boot.rs b/drivers/gpu/nova-core/gsp/boot.rs index 0845d0906ca1..54937606b5b0 100644 --- a/drivers/gpu/nova-core/gsp/boot.rs +++ b/drivers/gpu/nova-core/gsp/boot.rs @@ -239,6 +239,14 @@ impl super::Gsp { // Wait until GSP is fully initialized. commands::wa...
2367ce2e9e5eae3bfe72ed79a7fbd86936158569
Analyze and fix the following issue in the Linux kernel code: gpu: nova-core: sequencer: Add register opcodes
Problem Details: These opcodes are used for register write, modify, poll and store (save) sequencer operations. Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> [acourbot@nvidia.com: apply Lyude's suggested fixes.] Message-ID: <20251114195552.739371-9-joelagn...
```diff diff --git a/drivers/gpu/nova-core/gsp/fw.rs b/drivers/gpu/nova-core/gsp/fw.rs index 4b569fc4c0b1..99486f194b07 100644 --- a/drivers/gpu/nova-core/gsp/fw.rs +++ b/drivers/gpu/nova-core/gsp/fw.rs @@ -389,7 +389,6 @@ impl From<SeqBufOpcode> for u32 { #[derive(Copy, Clone)] pub(crate) struct RegWritePayload(r570...
e3f44742bbb10537fe53d83d20dea2a7c167674d
Analyze and fix the following issue in the Linux kernel code: fbdev: gbefb: fix to use physical address instead of dma address
Problem Details: While debuggigng why X would not start on mips64 Sgi/O2 I found the phys adress being off. Turns out the gbefb passed the internal dma_addr as phys. May be broken pre git history. Fix by converting dma_to_phys. Signed-off-by: René Rebe <rene@exactco.de> Cc: <stable@vger.kernel.org> # v4.0+ Signed-off-...
```diff diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c index 4c36a3e409be..cb6ff15a21db 100644 --- a/drivers/video/fbdev/gbefb.c +++ b/drivers/video/fbdev/gbefb.c @@ -12,6 +12,7 @@ #include <linux/delay.h> #include <linux/platform_device.h> #include <linux/dma-mapping.h> +#include <linux/dma-...
b104df377da169913fe7cbfe409e1c52fdfa75c5
Analyze and fix the following issue in the Linux kernel code: fbdev: vesafb: Use dev_* fn's instead printk
Problem Details: Family dev_* fn's will show device name, giving extra info to logs. Delete the prefix `vesafb:` from msg strings, not needed now, e.g.: vesa-framebuffer vesa-framebuffer.0: scrolling: redraw Signed-off-by: Javier Garcia <rampxxxx@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/drivers/video/fbdev/vesafb.c b/drivers/video/fbdev/vesafb.c index a81df8865143..f135033c22fb 100644 --- a/drivers/video/fbdev/vesafb.c +++ b/drivers/video/fbdev/vesafb.c @@ -314,8 +314,8 @@ static int vesafb_probe(struct platform_device *dev) #endif if (!request_mem_region(vesafb_fix.smem_star...
b8a65b2d8b206cab339de8393f164482328c2bde
Analyze and fix the following issue in the Linux kernel code: fbdev: vga16fb: replace printk() with dev_*() in probe
Problem Details: Use dev_*() with &dev->dev and drop the hard-coded prefix. Keep original severities. No functional change. Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c index eedab14c7d51..85852bca2d23 100644 --- a/drivers/video/fbdev/vga16fb.c +++ b/drivers/video/fbdev/vga16fb.c @@ -1319,7 +1319,7 @@ static int vga16fb_probe(struct platform_device *dev) if (ret) return ret; - printk(KERN_DEBUG "...
ba9eb9b86d232854e983203dc2fb1ba18e316681
Analyze and fix the following issue in the Linux kernel code: mshv: Fix create memory region overlap check
Problem Details: The current check is incorrect; it only checks if the beginning or end of a region is within an existing region. This doesn't account for userspace specifying a region that begins before and ends after an existing region. Change the logic to a range intersection check against gfns and uaddrs for each ...
```diff diff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c index 7684645ef00d..a8f3c5f3ce34 100644 --- a/drivers/hv/mshv_root_main.c +++ b/drivers/hv/mshv_root_main.c @@ -1174,21 +1174,6 @@ mshv_partition_region_by_gfn(struct mshv_partition *partition, u64 gfn) return NULL; } -static struct msh...
22cb2f06fac9a05455eafa3ef3dc49ed7dedb240
Analyze and fix the following issue in the Linux kernel code: Drivers: hv: Use kmalloc_array() instead of kmalloc()
Problem Details: Documentation/process/deprecated.rst recommends against the use of kmalloc with dynamic size calculations due to the risk of overflow and smaller allocation being made than the caller was expecting. Replace kmalloc() with kmalloc_array() in hv_common.c to make the intended allocation size clearer and ...
```diff diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c index 5f5047f122a9..0a3ab7efed46 100644 --- a/drivers/hv/hv_common.c +++ b/drivers/hv/hv_common.c @@ -487,7 +487,7 @@ int hv_common_cpu_init(unsigned int cpu) * online and then taken offline */ if (!*inputarg) { - mem = kmalloc(pgcount * HV_H...
6626f815a1716259f161a4df8d105c9f0c8cbae9
Analyze and fix the following issue in the Linux kernel code: Drivers: hv: fix missing kernel-doc description for 'size' in request_arr_init()
Problem Details: Add missing kernel-doc entry for the @size parameter in request_arr_init(), fixing the following documentation warning reported by the kernel test robot and detected via kernel-doc: Warning: drivers/hv/channel.c:595 function parameter 'size' not described in 'request_arr_init' Reported-by: kernel tes...
```diff diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 88485d255a42..6821f225248b 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -590,7 +590,7 @@ EXPORT_SYMBOL_GPL(vmbus_establish_gpadl); * keeps track of the next available slot in the array. Initially, each * slot points to the nex...
77c860d2dbb72d1f3c6a2e882a07d19eca399db5
Analyze and fix the following issue in the Linux kernel code: x86/hyperv: Enable build of hypervisor crashdump collection files
Problem Details: Enable build of the new files introduced in the earlier commits and add call to do the setup during boot. Signed-off-by: Mukesh Rathor <mrathor@linux.microsoft.com> [ wei: fix build ] Signed-off-by: Wei Liu <wei.liu@kernel.org>
```diff diff --git a/arch/x86/hyperv/Makefile b/arch/x86/hyperv/Makefile index d55f494f471d..6f5d97cddd80 100644 --- a/arch/x86/hyperv/Makefile +++ b/arch/x86/hyperv/Makefile @@ -5,4 +5,10 @@ obj-$(CONFIG_HYPERV_VTL_MODE) += hv_vtl.o ifdef CONFIG_X86_64 obj-$(CONFIG_PARAVIRT_SPINLOCKS) += hv_spinlock.o + + ifdef CO...
77c3a45a0f4866d4c36246abdf9633d3bde13f9e
Analyze and fix the following issue in the Linux kernel code: x86: mshyperv: Remove duplicate asm/msr.h header
Problem Details: ./arch/x86/kernel/cpu/mshyperv.c: asm/msr.h is included more than once. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=26164 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
```diff diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index 80a641a6ac48..6802d89ca790 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -31,7 +31,6 @@ #include <asm/msr.h> #include <asm/nmi.h> #include <clocksource/hyperv_timer.h> -#include <asm/msr.h...
510164539f16062e842a9de762616b5008616fa1
Analyze and fix the following issue in the Linux kernel code: Drivers: hv: Free msginfo when the buffer fails to decrypt
Problem Details: The early failure path in __vmbus_establish_gpadl() doesn't deallocate msginfo if the buffer fails to decrypt. Fix the leak by breaking out the cleanup code into a separate function and calling it where required. Fixes: d4dccf353db80 ("Drivers: hv: vmbus: Mark vmbus ring buffer visible to host in Iso...
```diff diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index d69713201bef..88485d255a42 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -410,6 +410,21 @@ static int create_gpadl_header(enum hv_gpadl_type type, void *kbuffer, return 0; } +static void vmbus_free_channel_msginfo(struct vmbus...
163224c189e8b679ce919aa64ccabb7a992ca2d1
Analyze and fix the following issue in the Linux kernel code: Drivers: hv: Rename fields for SynIC message and event pages
Problem Details: Confidential VMBus requires interacting with two SynICs -- one provided by the host hypervisor, and one provided by the paravisor. Each SynIC requires its own message and event pages. Rename the existing host-accessible SynIC message and event pages with the "hyp_" prefix to clearly distinguish them f...
```diff diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 65dd299e2944..1a33c6944b3c 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -844,14 +844,14 @@ static void vmbus_wait_for_unload(void) = per_cpu_ptr(hv_context.cpu_context, cpu); /* - * In a CoCo VM t...
4cc1aa469cd6b714adc958547a4866247bfd60a9
Analyze and fix the following issue in the Linux kernel code: mshv: Fix deposit memory in MSHV_ROOT_HVCALL
Problem Details: When the MSHV_ROOT_HVCALL ioctl is executing a hypercall, and gets HV_STATUS_INSUFFICIENT_MEMORY, it deposits memory and then returns -EAGAIN to userspace. The expectation is that the VMM will retry. However, some VMM code in the wild doesn't do this and simply fails. Rather than force the VMM to retr...
```diff diff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c index 8a42d9961466..a599bbf1f9b8 100644 --- a/drivers/hv/mshv_root_main.c +++ b/drivers/hv/mshv_root_main.c @@ -159,6 +159,7 @@ static int mshv_ioctl_passthru_hvcall(struct mshv_partition *partition, unsigned int pages_order; void *input...
7563d021e28ec71bc6266e1848b22205ed7863d6
Analyze and fix the following issue in the Linux kernel code: mshv: Fix VpRootDispatchThreadBlocked value
Problem Details: This value in the VP stats page is used to track if the VP can be dispatched for execution when there are no fast interrupts injected. The original value of 201 was used in a version of the hypervisor which did not ship. It was subsequently changed to 202 so that is the correct value. Signed-off-by: ...
```diff diff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c index e3b2bd417c46..8a42d9961466 100644 --- a/drivers/hv/mshv_root_main.c +++ b/drivers/hv/mshv_root_main.c @@ -41,7 +41,7 @@ MODULE_DESCRIPTION("Microsoft Hyper-V root partition VMM interface /dev/mshv"); /* TODO move this to another file ...
6cc73f35406cae1f053e984e8de40e6dc9681446
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Test bpf_skb_check_mtu(BPF_MTU_CHK_SEGS) when transport_header is not set
Problem Details: Add a test to check that bpf_skb_check_mtu(BPF_MTU_CHK_SEGS) is rejected (-EINVAL) if skb->transport_header is not set. The test needs to lower the MTU of the loopback device. Thus, take this opportunity to run the test in a netns by adding "ns_" to the test name. The "serial_" prefix can then be remov...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/check_mtu.c b/tools/testing/selftests/bpf/prog_tests/check_mtu.c index 2a9a30650350..65b4512967e7 100644 --- a/tools/testing/selftests/bpf/prog_tests/check_mtu.c +++ b/tools/testing/selftests/bpf/prog_tests/check_mtu.c @@ -153,6 +153,26 @@ static void test_che...
d946f3c98328171fa50ddb908593cf833587f725
Analyze and fix the following issue in the Linux kernel code: bpf: Check skb->transport_header is set in bpf_skb_check_mtu
Problem Details: The bpf_skb_check_mtu helper needs to use skb->transport_header when the BPF_MTU_CHK_SEGS flag is used: bpf_skb_check_mtu(skb, ifindex, &mtu_len, 0, BPF_MTU_CHK_SEGS) The transport_header is not always set. There is a WARN_ON_ONCE report when CONFIG_DEBUG_NET is enabled + skb->gso_size is set + bpf_...
```diff diff --git a/net/core/filter.c b/net/core/filter.c index 1efec0d70d78..df6ce85e48dc 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -6429,9 +6429,12 @@ BPF_CALL_5(bpf_skb_check_mtu, struct sk_buff *, skb, */ if (skb_is_gso(skb)) { ret = BPF_MTU_CHK_RET_SUCCESS; - if (flags & BPF_MTU_CHK_SEGS ...
5442a9da69789741bfda39f34ee7f69552bf0c56
Analyze and fix the following issue in the Linux kernel code: veth: more robust handing of race to avoid txq getting stuck
Problem Details: Commit dc82a33297fc ("veth: apply qdisc backpressure on full ptr_ring to reduce TX drops") introduced a race condition that can lead to a permanently stalled TXQ. This was observed in production on ARM64 systems (Ampere Altra Max). The race occurs in veth_xmit(). The producer observes a full ptr_ring ...
```diff diff --git a/drivers/net/veth.c b/drivers/net/veth.c index a3046142cb8e..35dd89aff4a9 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -392,14 +392,12 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) } /* Restore Eth hdr pulled by dev_forward_skb/eth_type_trans */ ...
dfe28c4167a9259fc0c372d9f9473e1ac95cff67
Analyze and fix the following issue in the Linux kernel code: net: openvswitch: remove never-working support for setting nsh fields
Problem Details: The validation of the set(nsh(...)) action is completely wrong. It runs through the nsh_key_put_from_nlattr() function that is the same function that validates NSH keys for the flow match and the push_nsh() action. However, the set(nsh(...)) has a very different memory layout. Nested attributes in th...
```diff diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 2832e0794197..792ca44a461d 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -572,69 +572,6 @@ static int set_ipv6(struct sk_buff *skb, struct sw_flow_key *flow_key, return 0; } -static int set_nsh(struct sk_bu...
035bca3f017ee9dea3a5a756e77a6f7138cc6eea
Analyze and fix the following issue in the Linux kernel code: mptcp: fix race condition in mptcp_schedule_work()
Problem Details: syzbot reported use-after-free in mptcp_schedule_work() [1] Issue here is that mptcp_schedule_work() schedules a work, then gets a refcount on sk->sk_refcnt if the work was scheduled. This refcount will be released by mptcp_worker(). [A] if (schedule_work(...)) { [B] sock_hold(sk); return...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 2d6b8de35c44..e27e0fe2460f 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -935,14 +935,19 @@ static void mptcp_reset_rtx_timer(struct sock *sk) bool mptcp_schedule_work(struct sock *sk) { - if (inet_sk_state_load(sk) != TCP_CLOS...
b0c959fec18f4595a6a6317ffc30615cfa37bf69
Analyze and fix the following issue in the Linux kernel code: net: mlxsw: linecards: fix missing error check in mlxsw_linecard_devlink_info_get()
Problem Details: The call to devlink_info_version_fixed_put() in mlxsw_linecard_devlink_info_get() did not check for errors, although it is checked everywhere in the code. Add missed 'err' check to the mlxsw_linecard_devlink_info_get() Fixes: 3fc0c51905fb ("mlxsw: core_linecards: Expose device PSID over device info")...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_linecards.c b/drivers/net/ethernet/mellanox/mlxsw/core_linecards.c index b032d5a4b3b8..10f5bc4892fc 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_linecards.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_linecards.c @@ -601,6 +601,8 @@ int mlxsw_lin...
4f7bc83b983743b439e36b4d30883a87b371cba3
Analyze and fix the following issue in the Linux kernel code: bpf: verifier: Move desc->imm setup to sort_kfunc_descs_by_imm_off()
Problem Details: Metadata about a kfunc call is added to the kfunc_tab in add_kfunc_call() but the call instruction itself could get removed by opt_remove_dead_code() later if it is not reachable. If the call instruction is removed, specialize_kfunc() is never called for it and the desc->imm in the kfunc_tab is never ...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 10d24073c692..098dd7f21c89 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -3391,16 +3391,43 @@ static int kfunc_desc_cmp_by_imm_off(const void *a, const void *b) return 0; } -static void sort_kfunc_descs_by_imm_off(struct b...
e6751b0b19a6baab219a62e1e302b8aa6b5a55b2
Analyze and fix the following issue in the Linux kernel code: net: dsa: hellcreek: fix missing error handling in LED registration
Problem Details: The LED setup routine registered both led_sync_good and led_is_gm devices without checking the return values of led_classdev_register(). If either registration failed, the function continued silently, leaving the driver in a partially-initialized state and leaking a registered LED classdev. Add proper...
```diff diff --git a/drivers/net/dsa/hirschmann/hellcreek_ptp.c b/drivers/net/dsa/hirschmann/hellcreek_ptp.c index bfe21f9f7dcd..cb23bea9c21b 100644 --- a/drivers/net/dsa/hirschmann/hellcreek_ptp.c +++ b/drivers/net/dsa/hirschmann/hellcreek_ptp.c @@ -376,8 +376,18 @@ static int hellcreek_led_setup(struct hellcreek *hel...
e1215d1d38c00d244e5e7db4648598a0a03cc446
Analyze and fix the following issue in the Linux kernel code: selftests: drv-net: xdp: Fix register spill error with clang 20
Problem Details: On clang 20.1.8 the XDP program fails to load with a register spill error. Since hdr_len is a __u32, the compiler decided it only needed the lower 32-bits of ctx->data, which later triggers the register spill verifier error. Suggested-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Dimitri...
```diff diff --git a/tools/testing/selftests/net/lib/xdp_native.bpf.c b/tools/testing/selftests/net/lib/xdp_native.bpf.c index c368fc045f4b..64f05229ab24 100644 --- a/tools/testing/selftests/net/lib/xdp_native.bpf.c +++ b/tools/testing/selftests/net/lib/xdp_native.bpf.c @@ -332,7 +332,7 @@ static __u16 csum_fold_helper...
c7dc5b5228822d2389e6e441f10169e460bcc67a
Analyze and fix the following issue in the Linux kernel code: ipv6: clean up routes when manually removing address with a lifetime
Problem Details: When an IPv6 address with a finite lifetime (configured with valid_lft and preferred_lft) is manually deleted, the kernel does not clean up the associated prefix route. This results in orphaned routes (marked "proto kernel") remaining in the routing table even after their corresponding address has been...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 40e9c336f6c5..b66217d1b2f8 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1324,7 +1324,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) __in6_ifa_put(ifp); } - if (ifp->flags & IFA_F_PERMANENT && !(ifp->flags & IFA_F_NOP...
3781413465df6e0fb7f3c2001f986c9886b7f126
Analyze and fix the following issue in the Linux kernel code: libbpf: Fix BTF dedup to support recursive typedef definitions
Problem Details: Handle recursive typedefs in BTF deduplication Pahole fails to encode BTF for some Go projects (e.g. Kubernetes and Podman) due to recursive type definitions that create reference loops not representable in C. These recursive typedefs trigger a failure in the BTF deduplication algorithm. This patch e...
```diff diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c index 9f141395c074..84a4b0abc8be 100644 --- a/tools/lib/bpf/btf.c +++ b/tools/lib/bpf/btf.c @@ -3901,6 +3901,20 @@ err_out: return err; } +/* + * Calculate type signature hash of TYPEDEF, ignoring referenced type IDs, + * as referenced type IDs equival...
c13339039891dbdfa6c1972f0483bd07f610b776
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix failure paths in send_signal test
Problem Details: When test_send_signal_kern__open_and_load() fails parent closes the pipe which cases ASSERT_EQ(read(pipe_p2c...)) to fail, but child continues and enters infinite loop, while parent is stuck in wait(NULL). Other error paths have similar issue, so kill the child before waiting on it. The bug was discov...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/send_signal.c b/tools/testing/selftests/bpf/prog_tests/send_signal.c index 1702aa592c2c..7ac4d5a488aa 100644 --- a/tools/testing/selftests/bpf/prog_tests/send_signal.c +++ b/tools/testing/selftests/bpf/prog_tests/send_signal.c @@ -206,6 +206,11 @@ destroy_skel...
c34a14bce7090862ebe5a64abe8d85df75e62737
Analyze and fix the following issue in the Linux kernel code: drm/xe/irq: Handle msix vector0 interrupt
Problem Details: Current gu2host handler registered as MSI-X vector 0 and as per bspec for a msix vector 0 interrupt, the driver must check the legacy registers 190008(TILE_INT_REG), 190060h (GT INTR Identity Reg 0) and other registers mentioned in "Interrupt Service Routine Pseudocode" otherwise it will block the next...
```diff diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c index e5ed0242f7b1..024e13e606ec 100644 --- a/drivers/gpu/drm/xe/xe_irq.c +++ b/drivers/gpu/drm/xe/xe_irq.c @@ -897,22 +897,6 @@ static int xe_irq_msix_init(struct xe_device *xe) return 0; } -static irqreturn_t guc2host_irq_handler(int ...
d3fe9aa495854f8d88c69c41a4b31e69424656ad
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: vop2: Use OVL_LAYER_SEL configuration instead of use win_mask calculate used layers
Problem Details: When there are multiple Video Ports, and only one of them is working (for example, VP1 is working while VP0 is not), in this case, the win_mask of VP0 is 0. However, we have already set the port mux for VP0 according to vp0->nlayers, and at the same time, in the OVL_LAYER_SEL register, there are window...
```diff diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c index 38c49030c7ab..cd8380f0eddc 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c @@ -1369,6 +1369,25 @@ static const struct vop2_regs_dump rk3588_...
f2f22721aca46cebb63c589eefda843721908833
Analyze and fix the following issue in the Linux kernel code: x86/sgx: Fix a typo in the kernel-doc comment for enum sgx_attribute
Problem Details: Use the exact enum name when documenting "enum sgx_attribute" to fix a warning if the file is fed into kernel-doc processing: WARNING: ./arch/x86/include/asm/sgx.h:139 expecting prototype for enum sgx_attributes. Prototype was for enum sgx_attribute instead Signed-off-by: Sean Christophe...
```diff diff --git a/arch/x86/include/asm/sgx.h b/arch/x86/include/asm/sgx.h index 3c90cae04e1d..04958459a7ca 100644 --- a/arch/x86/include/asm/sgx.h +++ b/arch/x86/include/asm/sgx.h @@ -112,7 +112,7 @@ enum sgx_miscselect { #define SGX_SSA_MISC_EXINFO_SIZE 16 /** - * enum sgx_attributes - the attributes field in &...
7d7bb790aced3b1b8550b74e02fdfc001d044bee
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: Set VOP for the DRM DMA device
Problem Details: Use VOP for DMA operations performed by DRM core. Rockchip DRM driver is backed by a virtual device that isn't IOMMU-capable, while VOP is the actual display controller device backed by IOMMU. Fixes "swiotlb buffer is full" warning messages originated from GEM prime code paths. Note, that backporting ...
```diff diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index c5c6e2b5772d..3099408e9d05 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -97,6 +97,9 @@ void rockchip_drm_dma_init_device(struct drm_device...
1ff27c5929ab0f5e34d5062637369ca542a6d385
Analyze and fix the following issue in the Linux kernel code: drm/bridge: dw-hdmi-qp: Handle platform supported formats and color depth
Problem Details: Extend struct dw_hdmi_qp_plat_data to include the supported display output formats and maximum bits per color channel. When provided by the platform driver, use them to setup the HDMI bridge accordingly. Additionally, improve debug logging in dw_hdmi_qp_bridge_atomic_enable() to also show the current...
```diff diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c index 4ba7b339eff6..fe4c026280f0 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c @@ -868,8 +868,9 @@ static void dw_hdmi_qp_bridge_atomic_enable(s...
feee7f5ae275dc6573f029824736ef61158cdb77
Analyze and fix the following issue in the Linux kernel code: arm64: tegra: Fix APB DMA controller node name
Problem Details: The APB DMA controller node is currently named "dma@60020000", but according to the DT bindings the node name should be "dma-controller". Update the node name to match the binding and fix dtbs_check warnings. Signed-off-by: Nino Zhang <ninozhang001@gmail.com> Signed-off-by: Thierry Reding <treding@nv...
```diff diff --git a/arch/arm64/boot/dts/nvidia/tegra132.dtsi b/arch/arm64/boot/dts/nvidia/tegra132.dtsi index 93208eb72cb0..26cd11a8a4a1 100644 --- a/arch/arm64/boot/dts/nvidia/tegra132.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra132.dtsi @@ -272,7 +272,7 @@ interrupt-controller; }; - apbdma: dma@60020000 { + ap...
fea3f5e83c5cd80a76d97343023a2f2e6bd862bf
Analyze and fix the following issue in the Linux kernel code: bpf: Handle return value of ftrace_set_filter_ip in register_fentry
Problem Details: The error that returned by ftrace_set_filter_ip() in register_fentry() is not handled properly. Just fix it. Fixes: 00963a2e75a8 ("bpf: Support bpf_trampoline on functions with IPMODIFY (e.g. livepatch)") Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn> Acked-by: Song Liu <song@kernel.org> Link:...
```diff diff --git a/kernel/bpf/trampoline.c b/kernel/bpf/trampoline.c index 5949095e51c3..3610c6db15ee 100644 --- a/kernel/bpf/trampoline.c +++ b/kernel/bpf/trampoline.c @@ -220,7 +220,9 @@ static int register_fentry(struct bpf_trampoline *tr, void *new_addr) } if (tr->func.ftrace_managed) { - ftrace_set_filter...
c1da3df7191f1b4df9256bcd30d78f78201e1d17
Analyze and fix the following issue in the Linux kernel code: bpf: Prevent nesting overflow in bpf_try_get_buffers
Problem Details: bpf_try_get_buffers() returns one of multiple per-CPU buffers based on a per-CPU nesting counter. This mechanism expects that buffers are not endlessly acquired before being returned. migrate_disable() ensures that a task remains on the same CPU, but it does not prevent the task from being preempted by...
```diff diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 865b0dae38d1..81ad01eadcf8 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -774,9 +774,11 @@ int bpf_try_get_buffers(struct bpf_bprintf_buffers **bufs) { int nest_level; + preempt_disable(); nest_level = this_cpu_inc_return(bp...
07f42f8290e927a38ee4248505fc39ed0518519e
Analyze and fix the following issue in the Linux kernel code: PCI/sysfs: Use PM_RUNTIME_ACQUIRE()/PM_RUNTIME_ACQUIRE_ERR()
Problem Details: Use new PM_RUNTIME_ACQUIRE() and PM_RUNTIME_ACQUIRE_ERR() wrapper macros to make the code look more straightforward. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Jonathan Cameron <jonathan.cameron...
```diff diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 9d6f74bd95f8..3881359440b1 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -1517,8 +1517,8 @@ static ssize_t reset_method_store(struct device *dev, return count; } - ACQUIRE(pm_runtime_active_try, pm)(dev); - if (A...
70dcad34009e00523b50818eda082958986ebc0b
Analyze and fix the following issue in the Linux kernel code: ACPI: TAD: Use PM_RUNTIME_ACQUIRE()/PM_RUNTIME_ACQUIRE_ERR()
Problem Details: Use new PM_RUNTIME_ACQUIRE() and PM_RUNTIME_ACQUIRE_ERR() wrapper macros to make the code look more straightforward. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Jonathan Cameron <jonathan.cameron...
```diff diff --git a/drivers/acpi/acpi_tad.c b/drivers/acpi/acpi_tad.c index c9487c5bb7b3..6d870d97ada6 100644 --- a/drivers/acpi/acpi_tad.c +++ b/drivers/acpi/acpi_tad.c @@ -90,8 +90,8 @@ static int acpi_tad_set_real_time(struct device *dev, struct acpi_tad_rt *rt) args[0].buffer.pointer = (u8 *)rt; args[0].buffer...
78ff838a8ab78b3cd438e382ff5204b93db3237e
Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Check for fence error on VRAM save/restore
Problem Details: The code incorrectly assumes that the VRAM save/restore fence is valid. Fix it by checking for error. Fixes: 49cf1b9b609fe ("drm/xe/pf: Handle VRAM migration data as part of PF control") Suggested-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by:...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c index 7540a3854dc7..d5d918ddce4f 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c @@ -571,6 +571,10 @@ static int pf_save_vram_chunk(struct xe_...
dab751b4240f0f0eadea81f93ff0b439379bc6ae
Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Drop the VF VRAM BO reference on successful restore
Problem Details: The reference is only dropped on error. Fix it by adding the missing xe_bo_put(). Fixes: 49cf1b9b609fe ("drm/xe/pf: Handle VRAM migration data as part of PF control") Reported-by: Adam Miszczak <adam.miszczak@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patch.msgid...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c index 35a12d48dcc1..7540a3854dc7 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c @@ -661,6 +661,8 @@ static int pf_restore_vf_vram_mig_data(st...
05d89fe7e46a52bb5dde7ac3f07b383895fab528
Analyze and fix the following issue in the Linux kernel code: selftests/timers: Clean up kernel version check in posix_timers
Problem Details: Several tests in the posix_timers selftest which test timer behavior related to SIG_IGN fail on kernels older than 6.13. This is due to a refactoring of signal handling in commit caf77435dd8a ("signal: Handle ignored signals in do_sigaction(action != SIG_IGN)"). A previous attempt to fix this by addin...
```diff diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c index f0eceb0faf34..a563c438ac79 100644 --- a/tools/testing/selftests/timers/posix_timers.c +++ b/tools/testing/selftests/timers/posix_timers.c @@ -18,6 +18,7 @@ #include <time.h> #include <include/vdso/...
4518767be9089ea4f54754ad27364d6134fc46e2
Analyze and fix the following issue in the Linux kernel code: time: Fix a few typos in time[r] related code comments
Problem Details: Signed-off-by: Jianyun Gao <jianyungao89@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://patch.msgid.link/20250927093411.1509275-1-jianyungao89@gmail.com
```diff diff --git a/include/linux/delay.h b/include/linux/delay.h index 89866bab100d..46412c00033a 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h @@ -68,7 +68,7 @@ void usleep_range_state(unsigned long min, unsigned long max, * @min: Minimum time in microseconds to sleep * @max: Maximum time in mic...
5abb6ccb58f0626a0b7577908bcb698b18812eed
Analyze and fix the following issue in the Linux kernel code: tracing: Have function graph tracer option sleep-time be per instance
Problem Details: Currently the option to have function graph tracer to ignore time spent when a task is sleeping is global when the interface is per-instance. Changing the value in one instance will affect the results of another instance that is also running the function graph tracer. This can lead to confusing results...
```diff diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 484ad7a18463..7fb9b169d6d4 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -498,9 +498,6 @@ found: return get_data_type_data(current, offset); } -/* Both enabled by default (can be cleared by function_graph tracer flags */ -...
6479325eca0148d417a82f0edcb37b58c4c0cf0a
Analyze and fix the following issue in the Linux kernel code: tracing: Have function graph tracer option funcgraph-irqs be per instance
Problem Details: Currently the option to trace interrupts in the function graph tracer is global when the interface is per-instance. Changing the value in one instance will affect the results of another instance that is also running the function graph tracer. This can lead to confusing results. Cc: Masami Hiramatsu <m...
```diff diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 4e86adf6dd4d..3f55b49cf64e 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c @@ -16,7 +16,7 @@ #include "trace.h" #include "trace_output.h" -/* When set, irq functions wi...
d81d9d389b9b73acd68f300c8889c7fa1acd4977
Analyze and fix the following issue in the Linux kernel code: kbuild: don't enable CC_CAN_LINK if the dummy program generates warnings
Problem Details: It is possible that the kernel toolchain generates warnings when used together with the system toolchain. This happens for example when the older kernel toolchain does not handle new versions of sframe debug information. While these warnings where ignored during the evaluation of CC_CAN_LINK, together ...
```diff diff --git a/scripts/cc-can-link.sh b/scripts/cc-can-link.sh index 6efcead31989..e67fd8d7b684 100755 --- a/scripts/cc-can-link.sh +++ b/scripts/cc-can-link.sh @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 -cat << "END" | $@ -x c - -o /dev/null >/dev/null 2>&1 +cat << "END" | $@ -Werror -Wl,--...
e54dd0474c281ebcd32ada4bdbe1e0ada2e1c22b
Analyze and fix the following issue in the Linux kernel code: time: tick-oneshot: Add missing Return and parameter descriptions to kernel-doc
Problem Details: Several functions in kernel/time/tick-oneshot.c are missing parameter and return value descriptions in their kernel-doc comments. This causes warnings during doc generation. Update the kernel-doc blocks to include detailed @param and Return: descriptions for better clarity and to fix kernel-doc warnin...
```diff diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c index 5e2c2c26b3cc..ffee943d796d 100644 --- a/kernel/time/tick-oneshot.c +++ b/kernel/time/tick-oneshot.c @@ -19,6 +19,10 @@ /** * tick_program_event - program the CPU local timer device for the next event + * @expires: the time at which ...
ce04b2f9b0b59f2962c4632f3c6abf08601729e7
Analyze and fix the following issue in the Linux kernel code: PCI: Improve Resizable BAR functions kernel doc
Problem Details: Fix the copy-pasted errors in the Resizable BAR handling functions kernel doc and generally improve wording choices. Fix the formatting errors of the Return: line. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Christian Kö...
```diff diff --git a/drivers/pci/rebar.c b/drivers/pci/rebar.c index a81cb3fcddef..399660cb12fa 100644 --- a/drivers/pci/rebar.c +++ b/drivers/pci/rebar.c @@ -53,13 +53,15 @@ void pci_rebar_init(struct pci_dev *pdev) } /** - * pci_rebar_find_pos - find position of resize ctrl reg for BAR + * pci_rebar_find_pos - fi...
7409c1b12c5b11157d10108db644bd39c0a99426
Analyze and fix the following issue in the Linux kernel code: PCI: Prevent restoring assigned resources
Problem Details: restore_dev_resource() copies saved addresses and flags from the struct pci_dev_resource back to the struct resource, typically, during rollback from a failure or in preparation for a retry attempt. If the resource is within resource tree, the resource must not be modified as the resource tree could b...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 7e268960954b..1d9fc078c7ad 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -15,6 +15,7 @@ */ #include <linux/bitops.h> +#include <linux/bug.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/modu...
337b1b566db087347194e4543ddfdfa5645275cc
Analyze and fix the following issue in the Linux kernel code: PCI: Fix restoring BARs on BAR resize rollback path
Problem Details: BAR resize operation is implemented in the pci_resize_resource() and pbus_reassign_bridge_resources() functions. pci_resize_resource() can be called either from __resource_resize_store() from sysfs or directly by the driver for the Endpoint Device. The pci_resize_resource() requires that caller has re...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 7a899fb4de29..bf0bc38e1c47 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1736,7 +1736,9 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_devic...
34c702ea0497e092a487eacdf28a037f43e3e39f
Analyze and fix the following issue in the Linux kernel code: PCI: Change pci_dev variable from 'bridge' to 'dev'
Problem Details: Upcoming fix to BAR resize will store also device BAR resource in the saved list. Change the pci_dev variable in the loop from 'bridge' to 'dev' as the former would be misleading with non-bridges in the list. This is in a separate change to reduce churn in the upcoming BAR resize fix. While it appear...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index e6984bb530ae..d58f025aeaff 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -2479,12 +2479,13 @@ int pbus_reassign_bridge_resources(struct pci_bus *bus, struct resource *res) } list_for_each_entry(dev_res, &saved, li...
91c4c89db41499eea1b29c56655f79c3bae66e93
Analyze and fix the following issue in the Linux kernel code: PCI: Prevent resource tree corruption when BAR resize fails
Problem Details: pbus_reassign_bridge_resources() saves bridge windows into the saved list before attempting to adjust resource assignments to perform a BAR resize operation. If resource adjustments cannot be completed fully, rollback is attempted by restoring the resource from the saved list. The rollback, however, d...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 4a8735b275e4..e6984bb530ae 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -2504,6 +2504,11 @@ cleanup: bridge = dev_res->dev; i = pci_resource_num(bridge, res); + if (res->parent) { + release_child_resources(r...
6123133ee90fc55a5437364d442dd5876648628d
Analyze and fix the following issue in the Linux kernel code: cxl: Simplify cxl_rd_ops allocation and handling
Problem Details: A root decoder's callback handlers are collected in struct cxl_rd_ops. The structure is dynamically allocated, though it contains only a few pointers in it. This also requires to check two pointes to check for the existence of a callback. Simplify the allocation, release and handler check by embedding...
```diff diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c index bd2e282ca93a..cef3e07244fd 100644 --- a/drivers/cxl/acpi.c +++ b/drivers/cxl/acpi.c @@ -475,12 +475,8 @@ static int __cxl_parse_cfmws(struct acpi_cedt_cfmws *cfmws, cxlrd->qos_class = cfmws->qtg_id; if (cfmws->interleave_arithmetic == ACPI_CEDT_CF...
6c762611fed7365790000925f3d14f20037d0061
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Test widen_imprecise_scalars() with different stack depth
Problem Details: A test case for a situation when widen_imprecise_scalars() is called with old->allocated_stack > cur->allocated_stack. Test structure: def widening_stack_size_bug(): r1 = 0 for r6 in 0..1: iterator_with_diff_stack_depth(r1) r1 = 42 def iterator_with_diff_stack_dept...
```diff diff --git a/tools/testing/selftests/bpf/progs/iters_looping.c b/tools/testing/selftests/bpf/progs/iters_looping.c index 05fa5ce7fc59..d00fd570255a 100644 --- a/tools/testing/selftests/bpf/progs/iters_looping.c +++ b/tools/testing/selftests/bpf/progs/iters_looping.c @@ -161,3 +161,56 @@ int simplest_loop(void *...
b0c8e6d3d866b6a7f73877f71968dbffd27b7785
Analyze and fix the following issue in the Linux kernel code: bpf: account for current allocated stack depth in widen_imprecise_scalars()
Problem Details: The usage pattern for widen_imprecise_scalars() looks as follows: prev_st = find_prev_entry(env, ...); queued_st = push_stack(...); widen_imprecise_scalars(env, prev_st, queued_st); Where prev_st is an ancestor of the queued_st in the explored states tree. This ancestor is not guaranteed ...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 8314518c8d93..fbe4bb91c564 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -8866,7 +8866,7 @@ static int widen_imprecise_scalars(struct bpf_verifier_env *env, struct bpf_verifier_state *cur) { struct bpf_func_state *fo...
660b299bed2a2a55a1f9102d029549d0235f881c
Analyze and fix the following issue in the Linux kernel code: Revert "drm/tegra: dsi: Clear enable register if powered by bootloader"
Problem Details: Commit b6bcbce33596 ("soc/tegra: pmc: Ensure power-domains are in a known state") was introduced so that all power domains get initialized to a known working state when booting and it does this by shutting them down (including asserting resets and disabling clocks) before registering each power domain ...
```diff diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index b5089b772267..ddfb2858acbf 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -913,15 +913,6 @@ static void tegra_dsi_encoder_enable(struct drm_encoder *encoder) u32 value; int err; - /* If the bootload...
6cbab9f0da72b4dc3c3f9161197aa3b9daa1fa3a
Analyze and fix the following issue in the Linux kernel code: drm/tegra: Add call to put_pid()
Problem Details: Add a call to put_pid() corresponding to get_task_pid(). host1x_memory_context_alloc() does not take ownership of the PID so we need to free it here to avoid leaking. Signed-off-by: Prateek Agarwal <praagarwal@nvidia.com> Fixes: e09db97889ec ("drm/tegra: Support context isolation") [mperttunen@nvidia....
```diff diff --git a/drivers/gpu/drm/tegra/uapi.c b/drivers/gpu/drm/tegra/uapi.c index 5adab6b22916..d0b6a1fa6efa 100644 --- a/drivers/gpu/drm/tegra/uapi.c +++ b/drivers/gpu/drm/tegra/uapi.c @@ -114,9 +114,12 @@ int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data, struct drm_ if (err) goto put_ch...
b1aa02acd03bfef3ed39c511d33c4a4303d2f9b1
Analyze and fix the following issue in the Linux kernel code: drm/xe: Remove duplicate DRM_EXEC selection from Kconfig
Problem Details: There are 2 identical "select DRM_EXEC" lines for DRM_XE. Remove one to clean up the configuration. Fixes: d490ecf57790 ("drm/xe: Rework xe_exec and the VM rebind worker to use the drm_exec helper") Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> ...
```diff diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 7219f6b884b6..4b288eb3f5b0 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -13,7 +13,6 @@ config DRM_XE select TMPFS select DRM_BUDDY select DRM_CLIENT_SELECTION - select DRM_EXEC select DRM_KMS_HELPER...
23a29a81b44e3a7a139fee4d3eada5f299d8985e
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: Enable EXT4 for Tegra
Problem Details: After commit d6ace46c82fd ("ext4: remove obsolete EXT3 config options") was added, when using the 'tegra_defconfig' kernel configuration, mounting an MMC device on Tegra20, Tegra30 and Tegra124 boards is failing with "unknown filesystem type 'ext4'". Fix this by updating the 'tegra_defconfig' to use th...
```diff diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index ba863b445417..ce70ff07c978 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig @@ -315,13 +315,9 @@ CONFIG_AK8975=y CONFIG_PWM=y CONFIG_PWM_TEGRA=y CONFIG_PHY_TEGRA_XUSB=y -CONFIG_EXT2_FS=y...
4c5376b4b143c4834ebd392aef2215847752b16a
Analyze and fix the following issue in the Linux kernel code: drm/tegra: dc: Fix reference leak in tegra_dc_couple()
Problem Details: driver_find_device() calls get_device() to increment the reference count once a matching device is found, but there is no put_device() to balance the reference count. To avoid reference count leakage, add put_device() to decrease the reference count. Found by code review. Cc: stable@vger.kernel.org F...
```diff diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 59d5c1ba145a..6c84bd69b11f 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -3148,6 +3148,7 @@ static int tegra_dc_couple(struct tegra_dc *dc) dc->client.parent = &parent->client; dev_dbg(dc->dev, "coup...
4ef92743625818932b9c320152b58274c05e5053
Analyze and fix the following issue in the Linux kernel code: bpf: Add bpf_prog_run_data_pointers()
Problem Details: syzbot found that cls_bpf_classify() is able to change tc_skb_cb(skb)->drop_reason triggering a warning in sk_skb_reason_drop(). WARNING: CPU: 0 PID: 5965 at net/core/skbuff.c:1192 __sk_skb_reason_drop net/core/skbuff.c:1189 [inline] WARNING: CPU: 0 PID: 5965 at net/core/skbuff.c:1192 sk_skb_reason_dr...
```diff diff --git a/include/linux/filter.h b/include/linux/filter.h index f5c859b8131a..973233b82dc1 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -901,6 +901,26 @@ static inline void bpf_compute_data_pointers(struct sk_buff *skb) cb->data_end = skb->data + skb_headlen(skb); } +static inlin...
ec33b59542d96830e3c89845ff833cf7b25ef172
Analyze and fix the following issue in the Linux kernel code: mm/mempool: fix poisoning order>0 pages with HIGHMEM
Problem Details: The kernel test has reported: BUG: unable to handle page fault for address: fffba000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page *pde = 03171067 *pte = 00000000 Oops: Oops: 0002 [#1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G T...
```diff diff --git a/mm/mempool.c b/mm/mempool.c index 1c38e873e546..d7bbf1189db9 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -68,10 +68,20 @@ static void check_element(mempool_t *pool, void *element) } else if (pool->free == mempool_free_pages) { /* Mempools backed by page allocator */ int order = (int)(lo...
9be4f0f687048ba77428ceca11994676736507b7
Analyze and fix the following issue in the Linux kernel code: drm/xe/kunit: Fix forcewake assertion in mocs test
Problem Details: The MOCS kunit test calls KUNIT_ASSERT_TRUE_MSG() with a condition of 'true;' this prevents the assertion from ever failing. Replace KUNIT_ASSERT_TRUE_MSG with KUNIT_FAIL_AND_ABORT to get the intended failure behavior in cases where forcewake was not acquired successfully. Fixes: 51c0ee84e4dc ("drm/x...
```diff diff --git a/drivers/gpu/drm/xe/tests/xe_mocs.c b/drivers/gpu/drm/xe/tests/xe_mocs.c index 0e502feaca81..6bb278167aaf 100644 --- a/drivers/gpu/drm/xe/tests/xe_mocs.c +++ b/drivers/gpu/drm/xe/tests/xe_mocs.c @@ -49,7 +49,7 @@ static void read_l3cc_table(struct xe_gt *gt, fw_ref = xe_force_wake_get(gt_to_fw(gt)...
500e1368e46928f4b2259612dcabb6999afae2a6
Analyze and fix the following issue in the Linux kernel code: amba: tegra-ahb: Fix device leak on SMMU enable
Problem Details: Make sure to drop the reference taken to the AHB platform device when looking up its driver data while enabling the SMMU. Note that holding a reference to a device does not prevent its driver data from going away. Fixes: 89c788bab1f0 ("ARM: tegra: Add SMMU enabler in AHB") Cc: stable@vger.kernel.org ...
```diff diff --git a/drivers/amba/tegra-ahb.c b/drivers/amba/tegra-ahb.c index c0e8b765522d..f23c3ed01810 100644 --- a/drivers/amba/tegra-ahb.c +++ b/drivers/amba/tegra-ahb.c @@ -144,6 +144,7 @@ int tegra_ahb_enable_smmu(struct device_node *dn) if (!dev) return -EPROBE_DEFER; ahb = dev_get_drvdata(dev); + put_de...
6a37539973f8a38e7e165a6bcdeb107edf7c490a
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix the issue of missing ras message on sriov host
Problem Details: This code only applies to amdgpu processing poison consumption after uniras is enabled, but not to sriov. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index 644f79f3c9af..a2879d2b7c8e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -36,7 +36,6 @@ #include "amdgpu_ras.h" #include "amdgpu_umc.h" #inc...
20459c098d688971237e56e30263ddce467c8c9b
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: avoid memory allocation in the critical code path v3
Problem Details: When we run out of VMIDs we need to wait for some to become available. Previously we were using a dma_fence_array for that, but this means that we have to allocate memory. Instead just wait for the first not signaled fence from the least recently used VMID to signal. That is not as efficient since we ...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c index 3ef5bc95642c..b2af2cc6826c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c @@ -201,58 +201,34 @@ static int amdgpu_vmid_grab_idle(struct amdgpu_ring *ring, st...
ce27c9c2129679551c4e5fe71c1c5d42fff399c2
Analyze and fix the following issue in the Linux kernel code: soc/tegra: fuse: speedo-tegra210: Update speedo IDs
Problem Details: Existing code only sets CPU and GPU speedo IDs 0 and 1. The CPU DVFS code supports 11 IDs and nouveau supports 5. This aligns with what the downstream vendor kernel supports. Align SKUs with the downstream list. The Tegra210 CVB tables were added in the first referenced fixes commit. Since then, all T...
```diff diff --git a/drivers/soc/tegra/fuse/speedo-tegra210.c b/drivers/soc/tegra/fuse/speedo-tegra210.c index 695d0b7f9a8a..a8cc36329772 100644 --- a/drivers/soc/tegra/fuse/speedo-tegra210.c +++ b/drivers/soc/tegra/fuse/speedo-tegra210.c @@ -65,27 +65,51 @@ static void __init rev_sku_to_speedo_ids(struct tegra_sku_inf...
562b0f254d8b1515a1c8d2a650f940d4f719300e
Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Fix kernel-doc warning in migration_save_consume
Problem Details: The kernel-doc for xe_sriov_pf_migration_save_consume() contained multiple "Return:" sections, causing a warning. Fix it by removing the extra line. Fixes: 67df4a5cbc583 ("drm/xe/pf: Add data structures and handlers for migration rings") Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Rev...
```diff diff --git a/drivers/gpu/drm/xe/xe_sriov_pf_migration.c b/drivers/gpu/drm/xe/xe_sriov_pf_migration.c index 21b06ce6830a..de06cc690fc8 100644 --- a/drivers/gpu/drm/xe/xe_sriov_pf_migration.c +++ b/drivers/gpu/drm/xe/xe_sriov_pf_migration.c @@ -148,8 +148,6 @@ pf_migration_consume(struct xe_device *xe, unsigned i...
79bd8c9814a273fa7ba43399e1c07adec3fc95db
Analyze and fix the following issue in the Linux kernel code: ps3disk: use memcpy_{from,to}_bvec index
Problem Details: With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting ps3disk to new bvec helpers, incrementing the offset was accidently lost, corrupting consecutive buffers. Restore index for non-corrupted data transfers. Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) Signed-off-by: René Rebe ...
```diff diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c index dc9e4a14b885..8892f218a814 100644 --- a/drivers/block/ps3disk.c +++ b/drivers/block/ps3disk.c @@ -85,10 +85,14 @@ static void ps3disk_scatter_gather(struct ps3_storage_device *dev, struct bio_vec bvec; rq_for_each_segment(bvec, req, iter...
e0fd4d42e27f761e9cc82801b3f183e658dc749d
Analyze and fix the following issue in the Linux kernel code: posix-timers: Plug potential memory leak in do_timer_create()
Problem Details: When posix timer creation is set to allocate a given timer ID and the access to the user space value faults, the function terminates without freeing the already allocated posix timer structure. Move the allocation after the user space access to cure that. [ tglx: Massaged change log ] Fixes: ec2d0c0...
```diff diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index aa3120104a51..56e17b625c72 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -475,12 +475,6 @@ static int do_timer_create(clockid_t which_clock, struct sigevent *event, if (!kc->timer_create) return -EOPNOT...
14473a1f88596fd729e892782efc267c0097dd1d
Analyze and fix the following issue in the Linux kernel code: irqchip/riscv-intc: Add missing free() callback in riscv_intc_domain_ops
Problem Details: The irq_domain_free_irqs() helper requires that the irq_domain_ops->free callback is implemented. Otherwise, the kernel reports the warning message "NULL pointer, cannot free irq" when irq_dispose_mapping() is invoked to release the per-HART local interrupts. Set irq_domain_ops->free to irq_domain_fre...
```diff diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c index e5805885394e..70290b35b317 100644 --- a/drivers/irqchip/irq-riscv-intc.c +++ b/drivers/irqchip/irq-riscv-intc.c @@ -166,7 +166,8 @@ static int riscv_intc_domain_alloc(struct irq_domain *domain, static const struct irq_domain...
e13c1f34aa8675363f45593e85c125e15b9a4410
Analyze and fix the following issue in the Linux kernel code: soc/tegra: Resolve a spelling error in the tegra194-cbb.c
Problem Details: Fix a typo spotted during code reading. Signed-off-by: Bruno Sobreira França <brunofrancadevsec@gmail.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Reviewed-by: Herve Codina <herve.codina@bootlin.com> Signed-off-by: Thierry Reding <tredin...
```diff diff --git a/drivers/soc/tegra/cbb/tegra194-cbb.c b/drivers/soc/tegra/cbb/tegra194-cbb.c index c1bdea8c853f..ab75d50cc85c 100644 --- a/drivers/soc/tegra/cbb/tegra194-cbb.c +++ b/drivers/soc/tegra/cbb/tegra194-cbb.c @@ -1836,7 +1836,7 @@ print_errlog1_2(struct seq_file *file, struct tegra194_cbb *cbb, } /* -...
c87f820bc4748fdd4d50969e8930cd88d1b61582
Analyze and fix the following issue in the Linux kernel code: soc/tegra: fuse: Do not register SoC device on ACPI boot
Problem Details: On Tegra platforms using ACPI, the SMCCC driver already registers the SoC device. This makes the registration performed by the Tegra fuse driver redundant. When booted via ACPI, skip registering the SoC device and suppress printing SKU information from the Tegra fuse driver, as this information is alr...
```diff diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c index d27667283846..74d2fedea71c 100644 --- a/drivers/soc/tegra/fuse/fuse-tegra.c +++ b/drivers/soc/tegra/fuse/fuse-tegra.c @@ -182,8 +182,6 @@ static int tegra_fuse_probe(struct platform_device *pdev) } fuse->soc->in...
8911ee2543663588480d762184e00331cc2f008f
Analyze and fix the following issue in the Linux kernel code: arm64: tegra: Move HDA into the correct bus
Problem Details: HDA is part of the DISP_USB bus, so move it into that and drop the address prefix accordingly. Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
```diff diff --git a/arch/arm64/boot/dts/nvidia/tegra264-p3971.dtsi b/arch/arm64/boot/dts/nvidia/tegra264-p3971.dtsi index 1fcfac2066ae..b1bd4ee7aee3 100644 --- a/arch/arm64/boot/dts/nvidia/tegra264-p3971.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra264-p3971.dtsi @@ -29,8 +29,10 @@ status = "okay"; }; }; + }...
e2f085ab8636fae2ebe0adf42071e7558234cd7b
Analyze and fix the following issue in the Linux kernel code: dt-bindings: display: msm: sm6150-mdss: Fix example indentation and OPP values
Problem Details: Improve the binding example by fixing indentation and adding missing blank lines for better readability. Also correct the OPP clock values to match the actual SM6150 DTS configuration. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com> Patchwork:...
```diff diff --git a/Documentation/devicetree/bindings/display/msm/qcom,sm6150-mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,sm6150-mdss.yaml index 98949deed9ae..46e9335f849f 100644 --- a/Documentation/devicetree/bindings/display/msm/qcom,sm6150-mdss.yaml +++ b/Documentation/devicetree/bindings/display...
e149847cb722faad3f96313799c180c9cdd1ba03
Analyze and fix the following issue in the Linux kernel code: drm/msm/disp: fix kernel-doc warnings
Problem Details: Fix all kernel-doc warnings in msm_disp_snapshot.h: msm_disp_snapshot.h:53: warning: Function parameter or struct member 'blocks' not described in 'msm_disp_state' msm_disp_snapshot.h:69: warning: Function parameter or struct member 'node' not described in 'msm_disp_state_block' msm_disp_snapshot.h:...
```diff diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h index b5f452bd7ada..53bd1dcde15f 100644 --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h @@ -38,6 +38,7 @@ * struct msm_disp_state - structure to store ...
d9792823d18ff9895eaf5769a29a54804f24bc25
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: drop dpu_hw_dsc_destroy() prototype
Problem Details: The commit a106ed98af68 ("drm/msm/dpu: use devres-managed allocation for HW blocks") dropped all dpu_hw_foo_destroy() functions, but the prototype for dpu_hw_dsc_destroy() was omitted. Drop it now to clean up the header. Fixes: a106ed98af68 ("drm/msm/dpu: use devres-managed allocation for HW blocks") ...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h index b7013c9822d2..cc7cc6f6f7cd 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h @@ -71,12 +71,6 @@ struct dpu_hw_dsc *dpu_hw_dsc_init_1_2(struct drm_devi...
dd06398da10656428b337131258d6930f2664f66
Analyze and fix the following issue in the Linux kernel code: dt-bindings: display/msm: Reference DAI schema for DAI properties
Problem Details: DisplayPort nodes are DAIs (Digital Audio Interfaces): they have already 'sound-dai-cells'. Reference the common DAI schema to bring common properties for them, which allows also customizing DAI name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Rob Herring (Ar...
```diff diff --git a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml index aeb4e4f36044..08c273f707c1 100644 --- a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml +++ b/Documentation/devicetree/bindings/display/msm/dp-c...
31475b88110c4725b4f9a79c3a0d9bbf97e69e1c
Analyze and fix the following issue in the Linux kernel code: s390/mm: Fix __ptep_rdp() inline assembly
Problem Details: When a zero ASCE is passed to the __ptep_rdp() inline assembly, the generated instruction should have the R3 field of the instruction set to zero. However the inline assembly is written incorrectly: for such cases a zero is loaded into a register allocated by the compiler and this register is then used...
```diff diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index b7100c6a4054..6663f1619abb 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -1154,17 +1154,15 @@ static inline pte_t pte_mkhuge(pte_t pte) #define IPTE_NODAT 0x400 #define IPTE_GUEST_ASCE ...
9c92d36b0b1ea8b2a19dbe0416434f3491dbfaaf
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: qrb2210-rb1: Fix UART3 wakeup IRQ storm
Problem Details: For BT use cases, pins are configured with pull-up state in sleep state to avoid noise. If IRQ type is configured as level high and the GPIO line is also in a high state, it causes continuous interrupt assertions leading to an IRQ storm when wakeup irq enables at system suspend/runtime suspend. Switch...
```diff diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts index e0e362b140ad..1b9ca957a94b 100644 --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts @@ -704,7 +704,7 @@ &uart3 { /delete-property/ interrupts; interrupts-extend...
a03b2011808ab02ccb7ab6b573b013b77fbb5921
Analyze and fix the following issue in the Linux kernel code: cpuidle: governors: teo: Drop misguided target residency check
Problem Details: When the target residency of the current candidate idle state is greater than the expected time till the closest timer (the sleep length), it does not matter whether or not the tick has already been stopped or if it is going to be stopped. The closest timer will trigger anyway at its due time, so if a...
```diff diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c index a3ebc2cda093..cc74cecbea7f 100644 --- a/drivers/cpuidle/governors/teo.c +++ b/drivers/cpuidle/governors/teo.c @@ -458,11 +458,8 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev, * If the closes...
37339122a7801660dce11abd817af82cc4bef163
Analyze and fix the following issue in the Linux kernel code: firewire: core: Initialize topology_map.lock
Problem Details: Lockdep barfs on the new uninitialized spinlock. Initialize it. protip: enable lockdep (CONFIG_PROVE_LOCKING=y) when doing locking changes firewire_ohci 0000:02:01.1: added OHCI v1.10 device as card 0, 4 IR + 4 IT contexts, quirks 0x11 INFO: trying to register non-static key. The code is fine...
```diff diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c index e5e0174a0335..66e1106db5e7 100644 --- a/drivers/firewire/core-card.c +++ b/drivers/firewire/core-card.c @@ -577,6 +577,8 @@ void fw_card_initialize(struct fw_card *card, INIT_LIST_HEAD(&card->transactions.list); spin_lock_init(&c...
71c814e98696f2cd53e9e6cef7501c2d667d4c5a
Analyze and fix the following issue in the Linux kernel code: spi: microchip: rename driver file and internal identifiers
Problem Details: The spi-microchip-core.c driver provides support for the Microchip PolarFire SoC (MPFS) "hard" SPI controller. It was originally named "core" with the expectation that it might also cover Microchip's CoreSPI "soft" IP, but that never materialized. The CoreSPI IP cannot be supported by this driver beca...
```diff diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 4d8f00c850c1..d53798036076 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -706,15 +706,6 @@ config SPI_MESON_SPIFC This enables master mode support for the SPIFC (SPI flash controller) available in Amlogic Meson SoCs. -config ...
8f565bdd14eec5611cc041dba4650e42ccdf71d9
Analyze and fix the following issue in the Linux kernel code: drm/xe: Prevent BIT() overflow when handling invalid prefetch region
Problem Details: If user provides a large value (such as 0x80) for parameter prefetch_mem_region_instance in vm_bind ioctl, it will cause BIT(prefetch_region) overflow as below: " ------------[ cut here ]------------ UBSAN: shift-out-of-bounds in drivers/gpu/drm/xe/xe_vm.c:3414:7 shift exponent 128 is too large for ...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 8fb5cc6a69ec..7cac646bdf1c 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -3411,8 +3411,10 @@ static int vm_bind_ioctl_check_args(struct xe_device *xe, struct xe_vm *vm, op == DRM_XE_VM_BIND_OP_PREFETCH...
9407d138b8d5eff1cabceb4b3176f03191871479
Analyze and fix the following issue in the Linux kernel code: selftests/futex: Add newline to ksft_exit_fail_msg()
Problem Details: This was missed in commit e5c04d0f3ea0 ("selftests/futex: Refactor futex_wait with kselftest_harness.h") while replacing previous perror() calls, which automatically append the newline character. Fixes: e5c04d0f3ea0 ("selftests/futex: Refactor futex_wait with kselftest_harness.h") Signed-off-by: Carlo...
```diff diff --git a/tools/testing/selftests/futex/functional/futex_wait.c b/tools/testing/selftests/futex/functional/futex_wait.c index 152ca4612886..4cd87f2a3422 100644 --- a/tools/testing/selftests/futex/functional/futex_wait.c +++ b/tools/testing/selftests/futex/functional/futex_wait.c @@ -108,14 +108,14 @@ TEST(fi...
2d98144440f0101e6e432a748ec9f14a0f8be9e5
Analyze and fix the following issue in the Linux kernel code: selftests/futex: Remove unused test_futex_mpol()
Problem Details: Commit ed323aeda5e09 ("selftest/futex: Compile also with libnuma < 2.0.16") removed the unused function test_futex_mpol() and commit d35ca2f64272 ("selftests/futex: Refactor futex_numa_mpol with kselftest_harness.h") added it back by accident. Remove it again. Fixes: d35ca2f64272 ("selftests/futex: Re...
```diff diff --git a/tools/testing/selftests/futex/functional/futex_numa_mpol.c b/tools/testing/selftests/futex/functional/futex_numa_mpol.c index d037a3f10ee8..969c73c4b33b 100644 --- a/tools/testing/selftests/futex/functional/futex_numa_mpol.c +++ b/tools/testing/selftests/futex/functional/futex_numa_mpol.c @@ -131,1...
dd14022a7ce96963aa923e35cf4bcc8c32f95840
Analyze and fix the following issue in the Linux kernel code: x86/microcode/AMD: Add Zen5 model 0x44, stepping 0x1 minrev
Problem Details: Add the minimum Entrysign revision for that model+stepping to the list of minimum revisions. Fixes: 50cef76d5cb0 ("x86/microcode/AMD: Load only SHA256-checksummed patches") Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: <stable@kernel.org...
```diff diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index dc82153009da..a881bf4c2011 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -224,6 +224,7 @@ static bool need_sha_check(u32 cur_rev) case 0xb1010: return cur_rev <= 0xb1010...
cf296b294c3bd8f7db229060efe677dfd49e46b6
Analyze and fix the following issue in the Linux kernel code: VFS: introduce end_creating_keep()
Problem Details: Occasionally the caller of end_creating() wants to keep using the dentry. Rather then requiring them to dget() the dentry (when not an error) before calling end_creating(), provide end_creating_keep() which does this. cachefiles and overlayfs make use of this. Reviewed-by: Amir Goldstein <amir73il@gm...
```diff diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 59327618ac42..ef22ac19545b 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -155,8 +155,7 @@ retry: /* Tell rmdir() it's not allowed to delete the subdir */ inode_lock(d_inode(subdir)); - dget(subdir); - end_creating(subdir)...
fe497f0759e0efb949f9480911d00b6045c21f50
Analyze and fix the following issue in the Linux kernel code: VFS: change vfs_mkdir() to unlock on failure.
Problem Details: vfs_mkdir() already drops the reference to the dentry on failure but it leaves the parent locked. This complicates end_creating() which needs to unlock the parent even though the dentry is no longer available. If we change vfs_mkdir() to unlock on failure as well as releasing the dentry, we can remove...
```diff diff --git a/Documentation/filesystems/porting.rst b/Documentation/filesystems/porting.rst index 7233b04668fc..76ff738a00f3 100644 --- a/Documentation/filesystems/porting.rst +++ b/Documentation/filesystems/porting.rst @@ -1309,3 +1309,16 @@ a different length, use vfs_parse_fs_qstr(fc, key, &QSTR_LEN(value, ...
f046fbb4d81d1b0c4a169707411e3cd540c03354
Analyze and fix the following issue in the Linux kernel code: ecryptfs: use new start_creating/start_removing APIs
Problem Details: This requires the addition of start_creating_dentry() which is given the dentry which has already been found, and asks for it to be locked and its parent validated. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neil@brown.name>...
```diff diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index ed1394da8d6b..6a5bca89e752 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -24,18 +24,26 @@ #include <linux/unaligned.h> #include "ecryptfs_kernel.h" -static int lock_parent(struct dentry *dentry, - struct dentry **lower_dent...
ac50950ca143fd637dec4f7457a9162e1a4344e8
Analyze and fix the following issue in the Linux kernel code: VFS/ovl/smb: introduce start_renaming_dentry()
Problem Details: Several callers perform a rename on a dentry they already have, and only require lookup for the target name. This includes smb/server and a few different places in overlayfs. start_renaming_dentry() performs the required lookup and takes the required lock using lock_rename_child() It is used in thre...
```diff diff --git a/fs/namei.c b/fs/namei.c index 0ee0a110b088..5153ceddd37a 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3669,7 +3669,7 @@ EXPORT_SYMBOL(unlock_rename); /** * __start_renaming - lookup and lock names for rename - * @rd: rename data containing parent and flags, and + * @rd: ren...