id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
38a700efc51080c7184f71edbf5e49561da9754f
Analyze and fix the following issue in the Linux kernel code: gpio: mlxbf3: Support add_pin_ranges()
Problem Details: Support add_pin_ranges() so that pinctrl_gpio_request() can be called. The GPIO value is not modified when the user runs the "gpioset" tool. This is because when gpiochip_generic_request is invoked by the gpio-mlxbf3 driver, "pin_ranges" is empty so it skips "pinctrl_gpio_request()". pinctrl_gpio_reque...
```diff diff --git a/drivers/gpio/gpio-mlxbf3.c b/drivers/gpio/gpio-mlxbf3.c index e30cee108986..0a5f241a8352 100644 --- a/drivers/gpio/gpio-mlxbf3.c +++ b/drivers/gpio/gpio-mlxbf3.c @@ -19,6 +19,8 @@ * gpio[1]: HOST_GPIO32->HOST_GPIO55 */ #define MLXBF3_GPIO_MAX_PINS_PER_BLOCK 32 +#define MLXBF3_GPIO_MAX_PINS_BLO...
b9b88be046a92a43d70badb340cac9ffd9695dcb
Analyze and fix the following issue in the Linux kernel code: rust: init: wrap type checking struct initializers in a closure
Problem Details: In the implementation of the init macros there is a `if false` statement that type checks the initializer to ensure every field is initialized. Since the next patch has a stack variable to store the struct, the function might allocate too much memory on debug builds. Putting the struct into a closure t...
```diff diff --git a/rust/kernel/init/macros.rs b/rust/kernel/init/macros.rs index 5063b45970f3..a1ccc978feab 100644 --- a/rust/kernel/init/macros.rs +++ b/rust/kernel/init/macros.rs @@ -1040,14 +1040,14 @@ macro_rules! __init_internal { // once, this struct initializer will still be type-checked a...
769e8f6cd7182c95d4bd37491e13300ff067c7a7
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: ipc4-topology: Fix pipeline params at the output of copier
Problem Details: When we walk the list of connected widgets from the source to the sink to prepare all widgets, the pipeline_params must be modified to reflect the output audio format at each widget. But, the copier only modifies the sample format in the pipeline_params. So, fix it to also modify the rate and channels....
```diff diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 39649fddf16a..310aadd97d28 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -1349,25 +1349,6 @@ static int snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_s } #endif -static ...
56ecc164040b3685f6cb36b4d513d73d0f88140b
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: ipc4-topology: Fix the output reference params for SRC
Problem Details: For playback, the SRC sink rate must be configured based on the requested output format which is restricted to only handle DAI's that support a single audio format for now. For capture, the SRC module should convert the rate to match the rate requested by the PCM hw_params. Signed-off-by: Ranjani Srid...
```diff diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 8bc12f12888d..39649fddf16a 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -1839,19 +1839,39 @@ static int sof_ipc4_prepare_src_module(struct snd_sof_widget *swidget, struct sof_ipc4_src *src = s...
627d05a41ca1fbb9d390f9513af262f001f261f7
Analyze and fix the following issue in the Linux kernel code: spi: spi-cadence: Fix data corruption issues in slave mode
Problem Details: Remove 10us delay in cdns_spi_process_fifo() (called from cdns_spi_irq()) to fix data corruption issue on Master side when this driver configured in Slave mode, as Slave is failed to prepare the date on time due to above delay. Add 10us delay before processing the RX FIFO as TX empty doesn't guarantee...
```diff diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c index de8fe3c5becb..9b021390263e 100644 --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c @@ -317,12 +317,6 @@ static void cdns_spi_process_fifo(struct cdns_spi *xspi, int ntx, int nrx) xspi->rx_bytes -= nrx; while (ntx || nr...
715dc9a1f0c8ae0bbd4e5b37f9a165ea39e47fe9
Analyze and fix the following issue in the Linux kernel code: spi: stm32: fix accidential revert to byte-sized transfer splitting
Problem Details: Commit 6f486556abe35 ("spi: stm32: renaming of spi_master into spi_controller") included an accidential reverted of a change added in commit 1e4929112507f ("spi: stm32: split large transfers based on word size instead of bytes"). This breaks large SPI transfers with word sizes > 8 bits, which are e.g....
```diff diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 6d10fa4ab783..7ddf9db776b0 100644 --- a/drivers/spi/spi-stm32.c +++ b/drivers/spi/spi-stm32.c @@ -1001,9 +1001,9 @@ static int stm32_spi_prepare_msg(struct spi_controller *ctrl, if (spi->cfg->set_number_of_data) { int ret; - ret = spi_...
453b014e2c294abf762d3bce12e91ce4b34055e6
Analyze and fix the following issue in the Linux kernel code: ACPI: resource: Fix IRQ override quirk for PCSpecialist Elimina Pro 16 M
Problem Details: It turns out that some PCSpecialist Elimina Pro 16 M models have "GM6BGEQ" as DMI product-name instead of "Elimina Pro 16 M", causing the existing DMI quirk to not work on these models. The DMI board-name is always "GM6BGEQ", so match on that instead. Fixes: 56fec0051a69 ("ACPI: resource: Add IRQ ove...
```diff diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index a4d9f149b48d..32cfa3f4efd3 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -501,9 +501,13 @@ static const struct dmi_system_id maingear_laptop[] = { static const struct dmi_system_id pcspecialist_laptop[] = { { .ide...
f286620b5dc974fe281d8feed6e228fd2f39d013
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Fix spelling mistake "powe" -> "power"
Problem Details: There is a spelling mistake in a quirk entry. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Fixes: 3babae915f4c ("ALSA: hda/tas2781: Add tas2781 HDA driver") Link: https://lore.kernel.org/r/20230821080003.16678-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8f2f1a0c48d4..e294f3b0c9d1 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -9960,7 +9960,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 ...
0d8387fba9f151220e48dc3dcdc2335539708f13
Analyze and fix the following issue in the Linux kernel code: pinctrl: mediatek: assign functions to configure pin bias on MT7986
Problem Details: Assign bias_disable_get/set and bias_get/set functions to allow configuring pin bias on MT7986. Fixes: 2c58d8dc9cd0 ("pinctrl: mediatek: add pull_type attribute for mediatek MT7986 SoC") Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://lore.kernel.org/r/47f72372354312a839b9337e09476aa...
```diff diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7986.c b/drivers/pinctrl/mediatek/pinctrl-mt7986.c index aa0ccd67f4f4..acaac9b38aa8 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt7986.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7986.c @@ -922,6 +922,10 @@ static struct mtk_pin_soc mt7986a_data = { .ies_presen...
8f6f16fe1553ce63edfb98a39ef9d4754a0c39bf
Analyze and fix the following issue in the Linux kernel code: pinctrl: mediatek: fix pull_type data for MT7981
Problem Details: MediaTek has released pull_type data for MT7981 in their SDK. Use it and set functions to configure pin bias. Fixes: 6c83b2d94fcc ("pinctrl: add mt7981 pinctrl driver") Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://lore.kernel.org/r/7bcc8ead25dbfabc7f5a85d066224a926fbb4941.16923273...
```diff diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7981.c b/drivers/pinctrl/mediatek/pinctrl-mt7981.c index 18abc5780011..0fd2c0c451f9 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c @@ -457,37 +457,15 @@ static const unsigned int mt7981_pull_type[] = { MTK_...
e77f06be7216c9e25de8fe74a56df962fcc96cf6
Analyze and fix the following issue in the Linux kernel code: dt-bindings: pinctrl: Drop 'phandle' properties
Problem Details: 'phandle' properties are implicitly supported on all nodes, so it shouldn't be listed in schemas. dtschema had a bug where 'phandle' and other implicit properties weren't being added under 'additionalProperties' schemas. That was fixed in v2023.07 release. Signed-off-by: Rob Herring <robh@kernel.org>...
```diff diff --git a/Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml index 35723966b70a..890961826c6f 100644 --- a/Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/ingenic,pinctr...
6bc3462a0f5ecaa376a0b3d76dafc55796799e17
Analyze and fix the following issue in the Linux kernel code: pinctrl: amd: Mask wake bits on probe again
Problem Details: Shubhra reports that their laptop is heating up over s2idle. Even though it's getting into the deepest state, it appears to be having spurious wakeup events. While debugging a tangential issue with the RTC Carsten reports that recent 6.1.y based kernel face a similar problem. Looking at acpidump and ...
```diff diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c index 4a8c1b57a90d..4dff656af3ad 100644 --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c @@ -862,6 +862,33 @@ static const struct pinconf_ops amd_pinconf_ops = { .pin_config_group_set = amd_pinconf_group_set, };...
d3045530bdd29d91033eea437d8a961f4ee598b5
Analyze and fix the following issue in the Linux kernel code: fuse: implement statx
Problem Details: Allow querying btime. When btime is requested in mask, then FUSE_STATX request is sent. Otherwise keep using FUSE_GETATTR. The userspace interface for statx matches that of the statx(2) API. However there are limitations on how this interface is used: - returned basic stats and btime are used, stx...
```diff diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 04006db6e173..e7f63e60118c 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -350,10 +350,14 @@ int fuse_valid_type(int m) S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m); } +static bool fuse_valid_size(u64 size) +{ + return size <= LLONG_MAX; +} + bool fuse_inva...
82dbbfdf8f7ecc7381ce2adb22778418d520d84c
Analyze and fix the following issue in the Linux kernel code: gpio: pca9570: fix kerneldoc
Problem Details: While renaming one of the fields in the driver data struct, the kerneldoc was not updated which apparently angers the test robot now. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308171538.nKKUOtbg-lkp@intel.com/ Fixes: a3f7c1d6ddcb ("gpio: pca9570: r...
```diff diff --git a/drivers/gpio/gpio-pca9570.c b/drivers/gpio/gpio-pca9570.c index d8db80ef1293..d37ba4049368 100644 --- a/drivers/gpio/gpio-pca9570.c +++ b/drivers/gpio/gpio-pca9570.c @@ -30,7 +30,7 @@ struct pca9570_chip_data { /** * struct pca9570 - GPIO driver data * @chip: GPIO controller chip - * @p_data: ...
ad1367f831f8743746a1f49705c28e36a7c95525
Analyze and fix the following issue in the Linux kernel code: drm/bridge: Fix kernel-doc typo in desc of output_bus_cfg in drm_bridge_state
Problem Details: There's an obvious copy-paste error in the description of output_bus_cfg. Fix it. Fixes: f32df58acc68 ("drm/bridge: Add the necessary bits to support bus format negotiation") Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwo...
```diff diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 9a022caacf93..cf8e1220a4ac 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -1126,7 +1126,7 @@ struct drm_bridge_state { struct drm_bus_cfg input_bus_cfg; /** - * @output_bus_cfg: input bus configuration + * @o...
035a69586f329e3e73750299695401e0c2b76ee2
Analyze and fix the following issue in the Linux kernel code: xen: xenbus: Use helper function IS_ERR_OR_NULL()
Problem Details: Use IS_ERR_OR_NULL() to detect an error pointer or a null pointer open-coding to simplify the code. Signed-off-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/20230817014736.3094289-1-lizetao1@huawei.com Signed-off-by: Juergen Gross <jgro...
```diff diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c index 3f3836cb7279..fcb335bb7b18 100644 --- a/drivers/xen/xenbus/xenbus_probe_frontend.c +++ b/drivers/xen/xenbus/xenbus_probe_frontend.c @@ -429,7 +429,7 @@ static void xenbus_check_frontend(char *class, char *...
067e4f174f6d4ecf8872ad93d859d57bab44f7b6
Analyze and fix the following issue in the Linux kernel code: x86/xen: Make virt_to_pfn() a static inline
Problem Details: Making virt_to_pfn() a static inline taking a strongly typed (const void *) makes the contract of a passing a pointer of that type to the function explicit and exposes any misuse of the macro virt_to_pfn() acting polymorphic and accepting many types such as (void *), (unitptr_t) or (unsigned long) as a...
```diff diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index fa9ec20783fa..85e63d58c074 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h @@ -295,7 +295,10 @@ static inline unsigned long bfn_to_local_pfn(unsigned long mfn) /* VIRT <-> MACHINE conversio...
d826c9e61c99120f8996f8fed6417167e32eb922
Analyze and fix the following issue in the Linux kernel code: xen: remove a confusing comment on auto-translated guest I/O
Problem Details: After removing the conditional return from xen_create_contiguous_region(), the accompanying comment was left in place, but it now precedes an unrelated conditional and confuses readers. Fixes: 989513a735f5 ("xen: cleanup pvh leftovers from pv-only sources") Signed-off-by: Petr Tesarik <petr.tesarik.ex...
```diff diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index e0a975165de7..804a5441324c 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -2310,12 +2310,6 @@ int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order, int success; unsigned long vstart = (unsigned ...
b98c16107cc1647242abbd11f234c05a3a5864f6
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: limit reorder_buf_filtered to avoid UBSAN warning
Problem Details: The commit 06470f7468c8 ("mac80211: add API to allow filtering frames in BA sessions") added reorder_buf_filtered to mark frames filtered by firmware, and it can only work correctly if hw.max_rx_aggregation_subframes <= 64 since it stores the bitmap in a u64 variable. However, new HE or EHT devices ca...
```diff diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 3a8a2d2c58c3..2a55ae932c56 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -6612,6 +6612,7 @@ void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap, * marks frames marked in the bitmap as having been...
c6c0052df25ab9f37f8b29e9d55a9c877f3c6c5f
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Fix kernel doc errors
Problem Details: Fix set of the following errors due to use of wrong kernel doc format to describe function parameters: drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:68: warning: Function parameter or member 'rcfw' not described in '__wait_for_resp' Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.ke...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c index 287117ec50ee..524a5ff58872 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c @@ -55,7 +55,7 @@ static void bnxt_qplib_service_creq(struct tasklet_stru...
c289330331eb93bc6a3c68b9119ccd7d4285a4a2
Analyze and fix the following issue in the Linux kernel code: openrisc: Remove kernel-doc marker from ioremap comment
Problem Details: Replace the kernel-doc marker (/**) with a regular comment to fix the warning: arch/openrisc/mm/ioremap.c:108: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Stafford Horne <shorne@gmail.com>
```diff diff --git a/arch/openrisc/mm/ioremap.c b/arch/openrisc/mm/ioremap.c index 8ec0dafecf25..c6717f876c1c 100644 --- a/arch/openrisc/mm/ioremap.c +++ b/arch/openrisc/mm/ioremap.c @@ -104,7 +104,7 @@ void iounmap(volatile void __iomem *addr) } EXPORT_SYMBOL(iounmap); -/** +/* * OK, this one's a bit tricky... i...
136a2d894105843f19170614429bf12f1789e680
Analyze and fix the following issue in the Linux kernel code: openrisc: Include cpu.h and switch_to.h for prototypes
Problem Details: When compiling with W=1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/process.c:100:6: error: no previous prototype for 'arch_cpu_idle' [-Werror=missing-prototypes] arch/openrisc/kernel/process.c:240:21: error: no previous prototype for '__switch_to' [-Werror=missing-proto...
```diff diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c index a07512de0169..86e02929f3ac 100644 --- a/arch/openrisc/kernel/process.c +++ b/arch/openrisc/kernel/process.c @@ -14,6 +14,7 @@ */ #define __KERNEL_SYSCALLS__ +#include <linux/cpu.h> #include <linux/errno.h> #include <linux/...
31c67b5fabe351644b2612c6ba75da70aeb417b1
Analyze and fix the following issue in the Linux kernel code: openrisc: Add prototype for die to bug.h
Problem Details: When compiling with W=1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/traps.c:221:17: sing-prototypesrror: no previous prototype for 'die' [-Werror=missing-prototypes] Fix by adding the prototype to the appropriate header file and including the header file in the appropriat...
```diff diff --git a/arch/openrisc/include/asm/bug.h b/arch/openrisc/include/asm/bug.h new file mode 100644 index 000000000000..6d04776eaf10 --- /dev/null +++ b/arch/openrisc/include/asm/bug.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_OPENRISC_BUG_H +#define __ASM_OPENRISC_BUG_H + +#i...
8d4a142904f07765b7c7c46abf71f811a0811987
Analyze and fix the following issue in the Linux kernel code: openrisc: Add prototype for show_registers to processor.h
Problem Details: When compiling with W=1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/traps.c:67:6: error: no previous prototype for 'show_registers' [-Werror=missing-prototypes] Fix by adding the prototype to the appropriate header file and including the header file in the appropriate C f...
```diff diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h index ed9efb430afa..3b736e74e6ed 100644 --- a/arch/openrisc/include/asm/processor.h +++ b/arch/openrisc/include/asm/processor.h @@ -73,6 +73,7 @@ struct thread_struct { void start_thread(struct pt_regs *regs, unsigned ...
af1fc7402e560f27ea5a92b7ee0572e3d1e389c5
Analyze and fix the following issue in the Linux kernel code: openrisc: Declare do_signal function as static
Problem Details: When compiling with W=1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/signal.c:227:5: error: no previous prototype for 'do_signal' [-Werror=missing-prototypes] Fix this by declaring the function a static as it is not used outside of the scope of this file. Reported-by: Arn...
```diff diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c index 3fbf00330043..e2f21a5d8ad9 100644 --- a/arch/openrisc/kernel/signal.c +++ b/arch/openrisc/kernel/signal.c @@ -229,7 +229,7 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs) * mode below. */ -int do_signal(struct pt...
1c4de499e6134ecb048bbd80133b213c705de3e5
Analyze and fix the following issue in the Linux kernel code: openrisc: Add missing prototypes for assembly called fnctions
Problem Details: These functions are all called from assembly files so there is no need for a prototype in a header file, but when compiling with W=1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/ptrace.c:191:17: error: no previous prototype for 'do_syscall_trace_enter' [-Werror=missing-protot...
```diff diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c index 0b7d2ca6ba3b..1eeac3b62e9d 100644 --- a/arch/openrisc/kernel/ptrace.c +++ b/arch/openrisc/kernel/ptrace.c @@ -27,6 +27,10 @@ #include <asm/thread_info.h> #include <asm/page.h> +asmlinkage long do_syscall_trace_enter(struct pt_r...
cb39c35783f26892bb1a72b1115c94fa2e77f4c5
Analyze and fix the following issue in the Linux kernel code: pds_core: Fix some kernel-doc comments
Problem Details: Fix some kernel-doc comments to silence the warnings: drivers/net/ethernet/amd/pds_core/auxbus.c:18: warning: Function parameter or member 'pf' not described in 'pds_client_register' drivers/net/ethernet/amd/pds_core/auxbus.c:18: warning: Excess function parameter 'pf_pdev' description in 'pds_client_...
```diff diff --git a/drivers/net/ethernet/amd/pds_core/auxbus.c b/drivers/net/ethernet/amd/pds_core/auxbus.c index 6787a5fae908..f46efebaaea9 100644 --- a/drivers/net/ethernet/amd/pds_core/auxbus.c +++ b/drivers/net/ethernet/amd/pds_core/auxbus.c @@ -8,7 +8,7 @@ /** * pds_client_register - Link the client to the f...
bc1fb82ae11753c5dec53c667a055dc37796dbd2
Analyze and fix the following issue in the Linux kernel code: net: annotate data-races around sk->sk_lingertime
Problem Details: sk_getsockopt() runs locklessly. This means sk->sk_lingertime can be read while other threads are changing its value. Other reads also happen without socket lock being held, and must be annotated. Remove preprocessor logic using BITS_PER_LONG, compilers are smart enough to figure this by themselves. ...
```diff diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c index 6b66d6a88b9a..3c03e49422c7 100644 --- a/net/bluetooth/iso.c +++ b/net/bluetooth/iso.c @@ -1475,7 +1475,7 @@ static int iso_sock_release(struct socket *sock) iso_sock_close(sk); - if (sock_flag(sk, SOCK_LINGER) && sk->sk_lingertime && + if (sock_...
c05ce6907b3d6e148b70f0bb5eafd61dcef1ddc1
Analyze and fix the following issue in the Linux kernel code: dmaengine: ste_dma40: Add missing IRQ check in d40_probe
Problem Details: Check for the return value of platform_get_irq(): if no interrupt is specified, it wouldn't make sense to call request_irq(). Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3") Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.o...
```diff diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 825001bde42c..89e82508c133 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3590,6 +3590,10 @@ static int __init d40_probe(struct platform_device *pdev) spin_lock_init(&base->lcla_pool.lock); base->irq = platform_ge...
1fbda5f4c7c1c8bd51cd3bc3d2ff19176c696b74
Analyze and fix the following issue in the Linux kernel code: dmaengine: owl-dma: fix clang -Wvoid-pointer-to-enum-cast warning
Problem Details: When building with clang 18 I see the following warning: | drivers/dma/owl-dma.c:1119:14: warning: cast to smaller integer type | 'enum owl_dma_id' from 'const void *' [-Wvoid-pointer-to-enum-cast] | 1119 | od->devid = (enum owl_dma_id)of_device_get_match_data(&pdev->dev); This is d...
```diff diff --git a/drivers/dma/owl-dma.c b/drivers/dma/owl-dma.c index e745f0c67094..3b7ceee0b85b 100644 --- a/drivers/dma/owl-dma.c +++ b/drivers/dma/owl-dma.c @@ -1117,7 +1117,7 @@ static int owl_dma_probe(struct platform_device *pdev) dev_info(&pdev->dev, "dma-channels %d, dma-requests %d\n", nr_channels, nr...
4542057e18caebe5ebaee28f0438878098674504
Analyze and fix the following issue in the Linux kernel code: mm: avoid 'might_sleep()' in get_mmap_lock_carefully()
Problem Details: This might_sleep() goes back a long time: it was originally introduced way back when by commit 010060741ad3 ("x86: add might_sleep() to do_page_fault()"), and made it into the generic VM code when the x86 fault path got re-organized and generalized in commit c2508ec5a58d ("mm: introduce new 'lock_mm_an...
```diff diff --git a/mm/memory.c b/mm/memory.c index 1ec1ef3418bf..cdc4d4c1c858 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5257,11 +5257,8 @@ EXPORT_SYMBOL_GPL(handle_mm_fault); static inline bool get_mmap_lock_carefully(struct mm_struct *mm, struct pt_regs *regs) { - /* Even if this succeeds, make it clear we ...
cf18ecd34f71dfd2815046d4c0d7b6439bb0cbde
Analyze and fix the following issue in the Linux kernel code: m68k: coldfire: dma_timer: ERROR: "foo __init bar" should be "foo __init bar"
Problem Details: Fix one occurrences of the checkpatch.pl error: ERROR: "foo __init bar" should be "foo __init bar" Signed-off-by: Xingwei He <hexingwei001@208suo.com> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
```diff diff --git a/arch/m68k/coldfire/dma_timer.c b/arch/m68k/coldfire/dma_timer.c index cbb289439606..91e6728f51ed 100644 --- a/arch/m68k/coldfire/dma_timer.c +++ b/arch/m68k/coldfire/dma_timer.c @@ -48,7 +48,7 @@ static struct clocksource clocksource_cf_dt = { .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; -static i...
74e01332d9585b8252c16c1da055828dc5a5dac9
Analyze and fix the following issue in the Linux kernel code: smb: client: reduce stack usage in smb2_query_reparse_point()
Problem Details: Clang warns about exceeded stack frame size fs/smb/client/smb2ops.c:2973:12: warning: stack frame size (1336) exceeds limit (1024) in 'smb2_query_reparse_point' [-Wframe-larger-than] Fix this by allocating a structure that will hold most of the large variables. Signed-off-by: Paulo Alcantara (...
```diff diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index 015d13d9054d..38bc92371560 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -2965,6 +2965,7 @@ static int smb2_query_reparse_point(const unsigned int xid, u32 *tag, struct kvec *rsp, int *rsp_buftype) { ...
b9148756d3e71591f95861ea7e037f8f89f9d594
Analyze and fix the following issue in the Linux kernel code: smb: client: reduce stack usage in smb2_query_info_compound()
Problem Details: Clang warns about exceeded stack frame size fs/smb/client/smb2ops.c:2521:1: warning: stack frame size (1336) exceeds limit (1024) in 'smb2_query_info_compound' [-Wframe-larger-than] Fix this by allocating a structure that will hold most of the large variables. Signed-off-by: Paulo Alcantara (S...
```diff diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index d31ea7e7fd84..015d13d9054d 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -2513,15 +2513,13 @@ smb2_query_info_compound(const unsigned int xid, struct cifs_tcon *tcon, struct kvec *rsp, int *buftype, struct cif...
f4e5ceb6c1a64f9f8c666877164d95d5eb46da5b
Analyze and fix the following issue in the Linux kernel code: smb: client: reduce stack usage in smb2_set_ea()
Problem Details: Clang warns about exceeded stack frame size fs/smb/client/smb2ops.c:1080:1: warning: stack frame size (1432) exceeds limit (1024) in 'smb2_set_ea' [-Wframe-larger-than] Fix this by allocating a structure that will hold most of the large variables. Signed-off-by: Paulo Alcantara (SUSE) <pc@mangue...
```diff diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 6d5fa0351dce..1588f98660aa 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -2214,4 +2214,17 @@ static inline void cifs_sg_set_buf(struct sg_table *sgtable, } } +struct smb2_compound_vars { + struct cifs_open_parm...
933148a47c8b3db569cb92888571a57b8c171f3b
Analyze and fix the following issue in the Linux kernel code: smb: client: reduce stack usage in smb_send_rqst()
Problem Details: Clang warns about exceeded stack frame size fs/smb/client/transport.c:420:1: warning: stack frame size (1048) exceeds limit (1024) in 'smb_send_rqst' [-Wframe-larger-than] Fix this by allocating a structure that will hold transform header and compound requests. Signed-off-by: Paulo Alcantara (SU...
```diff diff --git a/fs/smb/client/transport.c b/fs/smb/client/transport.c index f280502a2aee..1b5d9794ed5b 100644 --- a/fs/smb/client/transport.c +++ b/fs/smb/client/transport.c @@ -416,13 +416,19 @@ out: return rc; } +struct send_req_vars { + struct smb2_transform_hdr tr_hdr; + struct smb_rqst rqst[MAX_COMPOUND]...
69a4e06c0e7bceeba95104180110841d232e94e4
Analyze and fix the following issue in the Linux kernel code: smb: client: reduce stack usage in cifs_try_adding_channels()
Problem Details: Clang warns about exceeded stack frame size fs/smb/client/sess.c:160:5: warning: stack frame size (1368) exceeds limit (1024) in 'cifs_try_adding_channels' [-Wframe-larger-than] It turns out that cifs_ses_add_channel() got inlined into cifs_try_adding_channels() which had a stack-allocated variab...
```diff diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c index c57ca2050b73..5292216d9947 100644 --- a/fs/smb/client/sess.c +++ b/fs/smb/client/sess.c @@ -360,11 +360,11 @@ cifs_ses_add_channel(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses, { struct TCP_Server_Info *chan_server; struct cifs_chan *chan...
ce04127c5849af610d395b5b9552ef31d83c0189
Analyze and fix the following issue in the Linux kernel code: smb: client: ensure to try all targets when finding nested links
Problem Details: With current implementation, when a nested DFS link is found during mount(2), the client follows the referral and then try to connect to all of its targets. If all targets failed, the client bails out rather than retrying remaining targets from previous referral. Fix this by stacking all referrals an...
```diff diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 657dee4b2c8c..712557c2d526 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -1721,11 +1721,23 @@ struct cifs_mount_ctx { struct list_head dfs_ses_list; }; +static inline void __free_dfs_info_param(struct dfs_info3...
919dc320956ea353a7fb2d84265195ad5ef525ac
Analyze and fix the following issue in the Linux kernel code: fsverity: skip PKCS#7 parser when keyring is empty
Problem Details: If an fsverity builtin signature is given for a file but the ".fs-verity" keyring is empty, there's no real reason to run the PKCS#7 parser. Skip this to avoid the PKCS#7 attack surface when builtin signature support is configured into the kernel but is not being used. This is a hardening improvement...
```diff diff --git a/fs/verity/signature.c b/fs/verity/signature.c index b95acae64eac..90c07573dd77 100644 --- a/fs/verity/signature.c +++ b/fs/verity/signature.c @@ -62,6 +62,22 @@ int fsverity_verify_signature(const struct fsverity_info *vi, return 0; } + if (fsverity_keyring->keys.nr_leaves_on_tree == 0) { + ...
b358f57f7db620f5c25e60d70015f4e4bb050688
Analyze and fix the following issue in the Linux kernel code: ipv6: do not match device when remove source route
Problem Details: After deleting an IPv6 address on an interface and cleaning up the related preferred source entries, it is important to ensure that all routes associated with the deleted address are properly cleared. The current implementation of rt6_remove_prefsrc() only checks the preferred source addresses bound to...
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index db10c36f34bb..a5b74b91c8f3 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4582,21 +4582,19 @@ struct fib6_info *addrconf_f6i_alloc(struct net *net, /* remove deleted ip from prefsrc entries */ struct arg_dev_net_ip { - struct net_device *dev; ...
c4cf2bc0d2c97214e41b44b2b05cedc7093ccbbd
Analyze and fix the following issue in the Linux kernel code: selftests: vrf_route_leaking: remove ipv6_ping_frag from default testing
Problem Details: As the initial commit 1a01727676a8 ("selftests: Add VRF route leaking tests") said, the IPv6 MTU test fails as source address selection picking ::1. Every time we run the selftest this one report failed. There seems not much meaning to keep reporting a failure for 3 years that no one plan to fix/updat...
```diff diff --git a/tools/testing/selftests/net/vrf_route_leaking.sh b/tools/testing/selftests/net/vrf_route_leaking.sh index 23cf924754a5..dedc52562b4f 100755 --- a/tools/testing/selftests/net/vrf_route_leaking.sh +++ b/tools/testing/selftests/net/vrf_route_leaking.sh @@ -565,7 +565,7 @@ EOF command -v ping6 > /dev/...
5cb249686e67dbef3ffe53887fa725eefc5a7144
Analyze and fix the following issue in the Linux kernel code: net: release reference to inet6_dev pointer
Problem Details: addrconf_prefix_rcv returned early without releasing the inet6_dev pointer when the PIO lifetime is less than accept_ra_min_lft. Fixes: 5027d54a9c30 ("net: change accept_ra_min_rtr_lft to affect all RA lifetimes") Cc: Maciej Żenczykowski <maze@google.com> Cc: Lorenzo Colitti <lorenzo@google.com> Cc: D...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 5184bd0ceb12..47d1dd8501b7 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2742,7 +2742,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao) } if (valid_lft != 0 && valid_lft < in6_dev->cnf.accept_ra...
f866fbc842de5976e41ba874b76ce31710b634b5
Analyze and fix the following issue in the Linux kernel code: ipv4: fix data-races around inet->inet_id
Problem Details: UDP sendmsg() is lockless, so ip_select_ident_segs() can very well be run from multiple cpus [1] Convert inet->inet_id to an atomic_t, but implement a dedicated path for TCP, avoiding cost of a locked instruction (atomic_add_return()) Note that this patch will cause a trivial merge conflict because w...
```diff diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c index c2e7037c7ba1..7750702900fa 100644 --- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c +++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c @@ -1...
f534f6581ec084fe94d6759f7672bd009794b07e
Analyze and fix the following issue in the Linux kernel code: net: validate veth and vxcan peer ifindexes
Problem Details: veth and vxcan need to make sure the ifindexes of the peer are not negative, core does not validate this. Using iproute2 with user-space-level checking removed: Before: # ./ip link add index 10 type veth peer index -1 # ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state U...
```diff diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c index 4068d962203d..98c669ad5141 100644 --- a/drivers/net/can/vxcan.c +++ b/drivers/net/can/vxcan.c @@ -192,12 +192,7 @@ static int vxcan_newlink(struct net *net, struct net_device *dev, nla_peer = data[VXCAN_INFO_PEER]; ifmp = nla_data(nla_...
32bbe64a1386065ab2aef8ce8cae7c689d0add6e
Analyze and fix the following issue in the Linux kernel code: net: bcmgenet: Fix return value check for fixed_phy_register()
Problem Details: The fixed_phy_register() function returns error pointers and never returns NULL. Update the checks accordingly. Fixes: b0ba512e25d7 ("net: bcmgenet: enable driver to work without a device tree") Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Acked-b...
```diff diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c index 0092e46c46f8..cc3afb605b1e 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c @@ -617,7 +617,7 @@ static int bcmgenet_mii_pd_init(struct bcmgen...
23a14488ea5882dea5851b65c9fce2127ee8fcad
Analyze and fix the following issue in the Linux kernel code: net: bgmac: Fix return value check for fixed_phy_register()
Problem Details: The fixed_phy_register() function returns error pointers and never returns NULL. Update the checks accordingly. Fixes: c25b23b8a387 ("bgmac: register fixed PHY for ARM BCM470X / BCM5301X chipsets") Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by...
```diff diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c index 10c7c232cc4e..52ee3751187a 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c @@ -1448,7 +1448,7 @@ int bgmac_phy_connect_direct(struct bgmac *bgmac) int err; phy_de...
6d4ab2e97dcfbcd748ae71761a9d8e5e41cc732c
Analyze and fix the following issue in the Linux kernel code: extrawarn: enable format and stringop overflow warnings in W=1
Problem Details: The stringop and format warnings got disabled globally when they were newly introduced in commit bd664f6b3e376 ("disable new gcc-7.1.1 warnings for now"), 217c3e0196758 ("disable stringop truncation warnings for now") and 5a76021c2eff7 ("gcc-10: disable 'stringop-overflow' warning for now"). In all ca...
```diff diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 8afbe4706ff1..4c734bba6e90 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -16,8 +16,6 @@ KBUILD_CFLAGS += -Werror=strict-prototypes KBUILD_CFLAGS += -Wno-format-security KBUILD_CFLAGS += -Wno-trigraphs KBU...
db4bfcba7bb8d10f00bba2a3da6b9a9c2a1d7b71
Analyze and fix the following issue in the Linux kernel code: um: Fix hostaudio build errors
Problem Details: Use "select" to ensure that the required kconfig symbols are set as expected. Drop HOSTAUDIO since it is now equivalent to UML_SOUND. Set CONFIG_SOUND=m in ARCH=um defconfig files to maintain the status quo of the default configs. Allow SOUND with UML regardless of HAS_IOMEM. Otherwise there is a kco...
```diff diff --git a/arch/um/configs/i386_defconfig b/arch/um/configs/i386_defconfig index 630be793759e..e543cbac8792 100644 --- a/arch/um/configs/i386_defconfig +++ b/arch/um/configs/i386_defconfig @@ -34,6 +34,7 @@ CONFIG_TTY_CHAN=y CONFIG_XTERM_CHAN=y CONFIG_CON_CHAN="pts" CONFIG_SSL_CHAN="pts" +CONFIG_SOUND=m C...
f5ff432d96e17a8fdb1962b73cea3823ebd701e8
Analyze and fix the following issue in the Linux kernel code: um: Remove strlcpy usage
Problem Details: strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated [1]. In an effort to remove strlcpy() completely [2], replace strlcpy() here with strscpy(). No return...
```diff diff --git a/arch/um/include/shared/user.h b/arch/um/include/shared/user.h index 0347a190429c..981e11d8e025 100644 --- a/arch/um/include/shared/user.h +++ b/arch/um/include/shared/user.h @@ -50,7 +50,6 @@ static inline int printk(const char *fmt, ...) #endif extern int in_aton(char *str); -extern size_t str...
ab104318f63997113b0ce7ac288e51359925ed79
Analyze and fix the following issue in the Linux kernel code: net: lan966x: Fix return value check for vcap_get_rule()
Problem Details: As Simon Horman suggests, update vcap_get_rule() to always return an ERR_PTR() and update the error detection conditions to use IS_ERR(), so use IS_ERR() to fix the return value issue. Fixes: 72df3489fb10 ("net: lan966x: Add ptp trap rules") Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Suggested...
```diff diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c index 60bd0cff6677..63905bb5a63a 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c @@ -59,7 +59,7 @@ static int lan9...
a0e026e7b37e997f4fa3fcaa714e5484f3ce9e75
Analyze and fix the following issue in the Linux kernel code: net: phy: Fix deadlocking in phy_error() invocation
Problem Details: Since commit 91a7cda1f4b8 ("net: phy: Fix race condition on link status change") all the phy_error() method invocations have been causing the nested-mutex-lock deadlock because it's normally done in the PHY-driver threaded IRQ handlers which since that change have been called with the phydev->lock mute...
```diff diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index bdf00b2b2c1d..a9ecfdd19624 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1184,9 +1184,11 @@ void phy_stop_machine(struct phy_device *phydev) static void phy_process_error(struct phy_device *phydev) { - mutex_lock(&phydev->...
4d0fe8c52bb3029d83e323c961221156ab98680b
Analyze and fix the following issue in the Linux kernel code: kobject: Add sanity check for kset->kobj.ktype in kset_register()
Problem Details: When I register a kset in the following way: static struct kset my_kset; kobject_set_name(&my_kset.kobj, "my_kset"); ret = kset_register(&my_kset); A null pointer dereference exception is occurred: [ 4453.568337] Unable to handle kernel NULL pointer dereference at \ virtual address 000000000...
```diff diff --git a/lib/kobject.c b/lib/kobject.c index 14e845209226..72fa20f405f1 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -861,6 +861,11 @@ int kset_register(struct kset *k) if (!k) return -EINVAL; + if (!k->kobj.ktype) { + pr_err("must have a ktype to be initialized properly!\n"); + return -EINVAL...
bb6d73d9add68ad270888db327514384dfa44958
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Prevent zero-length STAG registration
Problem Details: Currently irdma allows zero-length STAGs to be programmed in HW during the kernel mode fast register flow. Zero-length MR or STAG registration disable HW memory length checks. Improve gaps in bounds checking in irdma by preventing zero-length STAG or MR registrations except if the IB_PD_UNSAFE_GLOBAL_...
```diff diff --git a/drivers/infiniband/hw/irdma/ctrl.c b/drivers/infiniband/hw/irdma/ctrl.c index b1fdddd2fa1a..55421a92882c 100644 --- a/drivers/infiniband/hw/irdma/ctrl.c +++ b/drivers/infiniband/hw/irdma/ctrl.c @@ -1061,6 +1061,9 @@ static int irdma_sc_alloc_stag(struct irdma_sc_dev *dev, u64 hdr; enum irdma_pa...
cf38e7691c85f1b09973b22a0b89bf1e1228d2f9
Analyze and fix the following issue in the Linux kernel code: watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load
Problem Details: When built with CONFIG_INTEL_MID_WATCHDOG=m, currently the driver needs to be loaded manually, for the lack of module alias. This causes unintended resets in cases where watchdog timer is set-up by bootloader and the driver is not explicitly loaded. Add MODULE_ALIAS() to load the driver automatically a...
```diff diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c index 9b2173f765c8..fb7fae750181 100644 --- a/drivers/watchdog/intel-mid_wdt.c +++ b/drivers/watchdog/intel-mid_wdt.c @@ -203,3 +203,4 @@ module_platform_driver(mid_wdt_driver); MODULE_AUTHOR("David Cohen <david.a.cohen@linux.inte...
98334dc292fddba043fef8f6ebc84b22d42baca9
Analyze and fix the following issue in the Linux kernel code: watchdog: xilinx_wwdt: Use div_u64() in xilinx_wwdt_start()
Problem Details: After commit f1a43aadb5a6 ("watchdog: Enable COMPILE_TEST for more drivers"), it is possible to enable this driver on 32-bit architectures. When building for those architectures with clang, there is an error due to a 64-bit division in xilinx_wwdt_start(): ERROR: modpost: "__aeabi_uldivmod" [drivers...
```diff diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c index 1d998db41533..d271e2e8d6e2 100644 --- a/drivers/watchdog/xilinx_wwdt.c +++ b/drivers/watchdog/xilinx_wwdt.c @@ -9,6 +9,7 @@ #include <linux/interrupt.h> #include <linux/io.h> #include <linux/ioport.h> +#include <linux/math64.h...
aeb3ef51b602dce456c850414aa1becd0e7aeab1
Analyze and fix the following issue in the Linux kernel code: watchdog: s3c2410: Fix potential deadlock on &wdt->lock
Problem Details: As &wdt->lock is acquired by hard irq s3c2410wdt_irq(), other acquisition of the same lock under process context should disable irq, otherwise deadlock could happen if the irq preempt the execution while the lock is held in process context on the same CPU. [Deadlock Scenario] s3c2410wdt_suspend() ...
```diff diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 2bcc8faa7fa5..0b4bd883ff28 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -378,10 +378,11 @@ static int s3c2410wdt_enable(struct s3c2410_wdt *wdt, bool en) static int s3c2410wdt_keepalive(str...
895cedc1791916e8a98864f12b656702fad0bb67
Analyze and fix the following issue in the Linux kernel code: xprtrdma: Remap Receive buffers after a reconnect
Problem Details: On server-initiated disconnect, rpcrdma_xprt_disconnect() was DMA- unmapping the Receive buffers, but rpcrdma_post_recvs() neglected to remap them after a new connection had been established. The result was immediate failure of the new connection with the Receives flushing with LOCAL_PROT_ERR. Fixes: ...
```diff diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index b098fde373ab..28c0771c4e8c 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -935,9 +935,6 @@ struct rpcrdma_rep *rpcrdma_rep_create(struct rpcrdma_xprt *r_xprt, if (!rep->rr_rdmabuf) goto out_free; -...
f4e89f1a6dab4c063fc1e823cc9dddc408ff40cf
Analyze and fix the following issue in the Linux kernel code: NFSv4: fix out path in __nfs4_get_acl_uncached
Problem Details: Another highly rare error case when a page allocating loop (inside __nfs4_get_acl_uncached, this time) is not properly unwound on error. Since pages array is allocated being uninitialized, need to free only lower array indices. NULL checks were useful before commit 62a1573fcf84 ("NFSv4 fix acl retrieva...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 4604e9f3d1b0..832fa226b8f2 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -6004,9 +6004,8 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, out_ok: ret = res.acl_len; out_free: - for (i = 0; i < npages; i++) - if (p...
4e3733fd2b0f677faae21cf838a43faf317986d3
Analyze and fix the following issue in the Linux kernel code: NFSv4.2: fix error handling in nfs42_proc_getxattr
Problem Details: There is a slight issue with error handling code inside nfs42_proc_getxattr(). If page allocating loop fails then we free the failing page array element which is NULL but __free_page() can't deal with NULL args. Found by Linux Verification Center (linuxtesting.org). Fixes: a1f26739ccdc ("NFSv4.2: imp...
```diff diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 63802d195556..49f78e23b34c 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -1377,7 +1377,6 @@ ssize_t nfs42_proc_getxattr(struct inode *inode, const char *name, for (i = 0; i < np; i++) { pages[i] = alloc_page(GFP_KERNEL); if (!pages...
c3dd7de2a3137d84161dcfb522c19f8b2884e502
Analyze and fix the following issue in the Linux kernel code: NFS: Fix sysfs server name memory leak
Problem Details: Free the formatted server index string after it has been duplicated by kobject_rename(). Fixes: 1c7251187dc0 ("NFS: add superblock sysfs entries") Reported-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Sig...
```diff diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c index acda8f033d30..bf378ecd5d9f 100644 --- a/fs/nfs/sysfs.c +++ b/fs/nfs/sysfs.c @@ -345,8 +345,10 @@ void nfs_sysfs_move_sb_to_server(struct nfs_server *server) int ret = -ENOMEM; s = kasprintf(GFP_KERNEL, "server-%d", server->s_sysfs_id); - if (s) + if (s) {...
e5c0ca13659e9d18f53368d651ed7e6e433ec1cf
Analyze and fix the following issue in the Linux kernel code: blk-mq: release scheduler resource when request completes
Problem Details: Chuck reported [1] an IO hang problem on NFS exports that reside on SATA devices and bisected to commit 615939a2ae73 ("blk-mq: defer to the normal submission path for post-flush requests"). We analysed the IO hang problem, found there are two postflush requests waiting for each other. The first postf...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index b04ff6f56926..953f08354c8c 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -681,6 +681,21 @@ out_queue_exit: } EXPORT_SYMBOL_GPL(blk_mq_alloc_request_hctx); +static void blk_mq_finish_request(struct request *rq) +{ + struct request_queue *q = rq->q; + +...
2572ce62415cf3b632391091447252e2661ed520
Analyze and fix the following issue in the Linux kernel code: net: mdio: mdio-bitbang: Fix C45 read/write protocol
Problem Details: Based on the original code semantic in case of Clause 45 MDIO, the address command is supposed to be followed by the command sending the MMD address, not the CSR address. The commit 002dd3de097c ("net: mdio: mdio-bitbang: Separate C22 and C45 transactions") has erroneously broken that. So most likely d...
```diff diff --git a/drivers/net/mdio/mdio-bitbang.c b/drivers/net/mdio/mdio-bitbang.c index b83932562be2..81b7748c10ce 100644 --- a/drivers/net/mdio/mdio-bitbang.c +++ b/drivers/net/mdio/mdio-bitbang.c @@ -186,7 +186,7 @@ int mdiobb_read_c45(struct mii_bus *bus, int phy, int devad, int reg) struct mdiobb_ctrl *ctrl ...
e94b590abfff2cdbf0bdaa7d9904364c8d480af5
Analyze and fix the following issue in the Linux kernel code: net: dsa: mt7530: fix handling of 802.1X PAE frames
Problem Details: 802.1X PAE frames are link-local frames, therefore they must be trapped to the CPU port. Currently, the MT753X switches treat 802.1X PAE frames as regular multicast frames, therefore flooding them to user ports. To fix this, set 802.1X PAE frames to be trapped to the CPU port(s). Fixes: b8f126a8d543 (...
```diff diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 38b3c6dda386..b8bb9f3b3609 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1006,6 +1006,10 @@ mt753x_trap_frames(struct mt7530_priv *priv) mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK, MT753X_BPDU_CP...
35931eb3945b8d38c31f8e956aee3cf31c52121b
Analyze and fix the following issue in the Linux kernel code: fs: Fix kernel-doc warnings
Problem Details: These have a variety of causes and a corresponding variety of solutions. Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org> Message-Id: <20230818200824.2720007-1-willy@infradead.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
```diff diff --git a/fs/file.c b/fs/file.c index 7bb2cddbd82b..1ddf645ca691 100644 --- a/fs/file.c +++ b/fs/file.c @@ -668,7 +668,7 @@ EXPORT_SYMBOL(close_fd); /* for ksys_close() */ /** * last_fd - return last valid index into fd table - * @cur_fds: files struct + * @fdt: File descriptor table. * * Context: E...
ec05b12634ad007f7a37161ecb7cd243c3b1970c
Analyze and fix the following issue in the Linux kernel code: devpts: Fix kernel-doc warnings
Problem Details: This documentation has bit-rotted over time. Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org> Message-Id: <20230818201003.2720257-1-willy@infradead.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
```diff diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index fe3db0eda8e4..b31dfd79e474 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -534,12 +534,12 @@ void devpts_kill_index(struct pts_fs_info *fsi, int idx) /** * devpts_pty_new -- create a new inode in /dev/pts/ - * @ptmx_inode: inode of the mas...
f520489e99a35b0a5257667274fbe9afd2d8c50b
Analyze and fix the following issue in the Linux kernel code: selftests: mlxsw: Fix test failure on Spectrum-4
Problem Details: Remove assumptions about shared buffer cell size and instead query the cell size from devlink. Adjust the test to send small packets that fit inside a single cell. Tested on Spectrum-{1,2,3,4}. Fixes: 4735402173e6 ("mlxsw: spectrum: Extend to support Spectrum-4 ASIC") Signed-off-by: Ido Schimmel <ido...
```diff diff --git a/tools/testing/selftests/drivers/net/mlxsw/sharedbuffer.sh b/tools/testing/selftests/drivers/net/mlxsw/sharedbuffer.sh index 7d9e73a43a49..0c47faff9274 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/sharedbuffer.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/sharedbuffer.sh @@ -98,12 +98...
348c976be0a599918b88729def198a843701c9fe
Analyze and fix the following issue in the Linux kernel code: mlxsw: Fix the size of 'VIRT_ROUTER_MSB'
Problem Details: The field 'virtual router' was extended to 12 bits in Spectrum-4. Therefore, the element 'MLXSW_AFK_ELEMENT_VIRT_ROUTER_MSB' needs 3 bits for Spectrum < 4 and 4 bits for Spectrum >= 4. The elements are stored in an internal storage scratchpad. Currently, the MSB is defined there as 3 bits. It means th...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c index f0b2963ebac3..973de2adc943 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c @@ -32,8 +32,8 @@...
0dc63b9cfd4c5666ced52c829fdd65dcaeb9f0f1
Analyze and fix the following issue in the Linux kernel code: mlxsw: reg: Fix SSPR register layout
Problem Details: The two most significant bits of the "local_port" field in the SSPR register are always cleared since they are overwritten by the deprecated and overlapping "sub_port" field. On systems with more than 255 local ports (e.g., Spectrum-4), this results in the firmware maintaining invalid mappings between...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index 8165bf31a99a..17160e867bef 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/reg.h +++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h @@ -97,14 +97,6 @@ MLXSW_ITEM32(reg, sspr, m, 0x00, 31, 1); */ MLXSW_ITEM3...
bc2de151ab6ad0762a04563527ec42e54dde572a
Analyze and fix the following issue in the Linux kernel code: mlxsw: pci: Set time stamp fields also when its type is MIRROR_UTC
Problem Details: Currently, in Spectrum-2 and above, time stamps are extracted from the CQE into the time stamp fields in 'struct mlxsw_skb_cb', only when the CQE time stamp type is UTC. The time stamps are read directly from the CQE and software can get the time stamp in UTC format using CQEv2. From Spectrum-4, the t...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c index c968309657dd..51eea1f0529c 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/pci.c +++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c @@ -517,11 +517,15 @@ static void mlxsw_pci_skb_cb_ts_set(struct mlxsw_pci *m...
043d5f68d0ccdda91029b4b6dce7eeffdcfad281
Analyze and fix the following issue in the Linux kernel code: ipvlan: Fix a reference count leak warning in ipvlan_ns_exit()
Problem Details: There are two network devices(veth1 and veth3) in ns1, and ipvlan1 with L3S mode and ipvlan2 with L2 mode are created based on them as figure (1). In this case, ipvlan_register_nf_hook() will be called to register nf hook which is needed by ipvlans in L3S mode in ns1 and value of ipvl_nf_hook_refcnt is...
```diff diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index b15dd9a3ad54..1b55928e89b8 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c @@ -748,7 +748,8 @@ static int ipvlan_device_event(struct notifier_block *unused, write_pnet(&port->pnet, ne...
cba3f1786916063261e3e5ccbb803abc325b24ef
Analyze and fix the following issue in the Linux kernel code: dccp: annotate data-races in dccp_poll()
Problem Details: We changed tcp_poll() over time, bug never updated dccp. Note that we also could remove dccp instead of maintaining it. Fixes: 7c657876b63c ("[DCCP]: Initial implementation") Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20230818015820.2701595-1-edumazet@google.com...
```diff diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 4e3266e4d7c3..fcc5c9d64f46 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -315,11 +315,15 @@ EXPORT_SYMBOL_GPL(dccp_disconnect); __poll_t dccp_poll(struct file *file, struct socket *sock, poll_table *wait) { - __poll_t mask; struct so...
76f33296d2e09f63118db78125c95ef56df438e9
Analyze and fix the following issue in the Linux kernel code: sock: annotate data-races around prot->memory_pressure
Problem Details: *prot->memory_pressure is read/writen locklessly, we need to add proper annotations. A recent commit added a new race, it is time to audit all accesses. Fixes: 2d0c88e84e48 ("sock: Fix misuse of sk_under_memory_pressure()") Fixes: 4d93df0abd50 ("[SCTP]: Rewrite of sctp buffer management code") Signed...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index e3d987b2ef12..690e22139543 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1323,6 +1323,7 @@ struct proto { /* * Pressure flag: try to collapse. * Technical note: it is used by multiple contexts non atomically. + * Make sure to use...
d44036cad31170da0cb9c728e80743f84267da6e
Analyze and fix the following issue in the Linux kernel code: net: dsa: felix: fix oversize frame dropping for always closed tc-taprio gates
Problem Details: The blamed commit resolved a bug where frames would still get stuck at egress, even though they're smaller than the maxSDU[tc], because the driver did not take into account the extra 33 ns that the queue system needs for scheduling the frame. It now takes that into account, but the arithmetic that we ...
```diff diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 1c113957fcf4..f16daa9b1765 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1069,6 +1069,9 @@ static u64 vsc9959_tas_remaining_gate_len_ps(u64 gate_len_ns) if ...
2ebbc9752d06bb1d01201fe632cb6da033b0248d
Analyze and fix the following issue in the Linux kernel code: devlink: add missing unregister linecard notification
Problem Details: Cited fixes commit introduced linecard notifications for register, however it didn't add them for unregister. Fix that by adding them. Fixes: c246f9b5fd61 ("devlink: add support to create line card and expose to user") Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Simon Horman <horms@kernel...
```diff diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c index 1f00f874471f..bfed7929a904 100644 --- a/net/devlink/leftover.c +++ b/net/devlink/leftover.c @@ -6704,6 +6704,7 @@ void devlink_notify_unregister(struct devlink *devlink) struct devlink_param_item *param_item; struct devlink_trap_item *trap_i...
05f3d5bc23524bed6f043dfe6b44da687584f9fb
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: SDP: fix receive link config
Problem Details: On SDP interfaces, frame oversize and undersize errors are observed as driver is not considering packet sizes of all subscribers of the link before updating the link config. This patch fixes the same. Fixes: 9b7dd87ac071 ("octeontx2-af: Support to modify min/max allowed packet lengths") Signed-off-by...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c index 04b0e885f9d2..c2f68678e947 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c @@ -4270,9 +4270,10 @@ rx_frscfg: i...
005abf9e5e0d4dcfce318ae5dbcac32b7bf6b647
Analyze and fix the following issue in the Linux kernel code: Revert "f2fs: do not issue small discard commands during checkpoint"
Problem Details: Previously, we have two mechanisms to cache & submit small discards: a) set max small discard number in /sys/fs/f2fs/vdb/max_small_discards, and checkpoint will cache small discard candidates w/ configured maximum number. b) call FITRIM ioctl, also, checkpoint in f2fs_trim_fs() will cache small disca...
```diff diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 35d1e1dd849f..b38bf2b34490 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -2213,7 +2213,7 @@ find_next: len = next_pos - cur_pos; if (f2fs_sb_has_blkzoned(sbi) || - !force || len < cpc->trim_minlen) + (force && len < cpc->tr...
726865e69aa39d113471066acfdf2be3bbd96d50
Analyze and fix the following issue in the Linux kernel code: f2fs: doc: fix description of max_small_discards
Problem Details: The description of max_small_discards is out-of-update in below two aspects, fix it. - it is disabled by default - small discards will be issued during checkpoint Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
```diff diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs index ad3d76d37c8b..36c3cb547901 100644 --- a/Documentation/ABI/testing/sysfs-fs-f2fs +++ b/Documentation/ABI/testing/sysfs-fs-f2fs @@ -102,9 +102,9 @@ What: /sys/fs/f2fs/<disk>/max_small_discards Date: November 20...
c984ff1423ae9f70b1f28ce811856db0d9c99021
Analyze and fix the following issue in the Linux kernel code: blk-crypto: dynamically allocate fallback profile
Problem Details: blk_crypto_profile_init() calls lockdep_register_key(), which warns and does not register if the provided memory is a static object. blk-crypto-fallback currently has a static blk_crypto_profile and calls blk_crypto_profile_init() thereupon, resulting in the warning and failure to register. Fortunatel...
```diff diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c index ad9844c5b40c..e6468eab2681 100644 --- a/block/blk-crypto-fallback.c +++ b/block/blk-crypto-fallback.c @@ -78,7 +78,7 @@ static struct blk_crypto_fallback_keyslot { struct crypto_skcipher *tfms[BLK_ENCRYPTION_MODE_MAX]; } *blk_crypto...
c164c7bc9775be7bcc68754bb3431fce5823822e
Analyze and fix the following issue in the Linux kernel code: blk-cgroup: hold queue_lock when removing blkg->q_node
Problem Details: When blkg is removed from q->blkg_list from blkg_free_workfn(), queue_lock has to be held, otherwise, all kinds of bugs(list corruption, hard lockup, ..) can be triggered from blkg_destroy_all(). Fixes: f1c006f1c685 ("blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_po...
```diff diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index fc49be622e05..9faafcd10e17 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -136,7 +136,9 @@ static void blkg_free_workfn(struct work_struct *work) blkcg_policy[i]->pd_free_fn(blkg->pd[i]); if (blkg->parent) blkg_put(blkg->parent); +...
6548fce05803262ab43241b61dee3e2982486e4b
Analyze and fix the following issue in the Linux kernel code: drivers/rnbd: restore sysfs interface to rnbd-client
Problem Details: Commit 137380c0ec40 renamed 'rnbd-client' to 'rnbd_client', this changed sysfs interface to /sys/devices/virtual/rnbd_client/ctl/map_device from /sys/devices/virtual/rnbd-client/ctl/map_device. CC: Ivan Orlov <ivan.orlov0322@gmail.com> CC: "Md. Haris Iqbal" <haris.iqbal@ionos.com> CC: Jack Wang <jinpu...
```diff diff --git a/drivers/block/rnbd/rnbd-clt-sysfs.c b/drivers/block/rnbd/rnbd-clt-sysfs.c index c36d8b1ceeed..39887556cf95 100644 --- a/drivers/block/rnbd/rnbd-clt-sysfs.c +++ b/drivers/block/rnbd/rnbd-clt-sysfs.c @@ -25,7 +25,7 @@ static struct device *rnbd_dev; static const struct class rnbd_dev_class = { - ...
10d3340441bd0db857fc7fcb1733a800acf47a3d
Analyze and fix the following issue in the Linux kernel code: mfd: rz-mtu3: Link time dependencies
Problem Details: The new set of drivers for RZ/G2L MTU3a tries to enable compile-testing the individual client drivers even when the MFD portion is disabled but gets it wrong, causing a link failure when the core is in a loadable module but the other drivers are built-in: x86_64-linux-ld: drivers/pwm/pwm-rz-mtu3.o: in...
```diff diff --git a/drivers/counter/Kconfig b/drivers/counter/Kconfig index bca21df51168..62f118173355 100644 --- a/drivers/counter/Kconfig +++ b/drivers/counter/Kconfig @@ -92,7 +92,7 @@ config MICROCHIP_TCB_CAPTURE config RZ_MTU3_CNT tristate "Renesas RZ/G2L MTU3a counter driver" - depends on RZ_MTU3 || COMPILE...
f1a63db65e456263fa10d8a52aed652f392f22ce
Analyze and fix the following issue in the Linux kernel code: mfd: qcom-pm8xxx: Fix potential deadlock on &chip->pm_irq_lock
Problem Details: As &chip->pm_irq_lock is acquired by pm8xxx_irq_handler() under irq context, other process context code should disable irq before acquiring the lock. Since .irq_set_type and .irq_get_irqchip_state callbacks are generally executed from process context without irq disabled by default, the same lock acqu...
```diff diff --git a/drivers/mfd/qcom-pm8xxx.c b/drivers/mfd/qcom-pm8xxx.c index 9a948df8c28d..07c531bd1236 100644 --- a/drivers/mfd/qcom-pm8xxx.c +++ b/drivers/mfd/qcom-pm8xxx.c @@ -103,8 +103,9 @@ static int pm8xxx_config_irq(struct pm_irq_chip *chip, unsigned int bp, unsigned int cp) { int rc; + unsigned long fl...
94f34d99401c23247f940e9d1b6408236a3a3769
Analyze and fix the following issue in the Linux kernel code: mfd: rz-mtu3: Fix COMPILE_TEST build error
Problem Details: When (MFD) RZ_MTU3=m and PWM_RZ_MTU3=y, It hits the below error aarch64-linux-gnu-ld: rz-mtu3.c:(.text+0x544): undefined reference to `mfd_remove_devices' Fix this issue by selecting MFD_CORE. Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Closes: https://lore.kernel.org/linux-pwm/202...
```diff diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index a3875d983b9f..aea95745c73f 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1373,6 +1373,7 @@ config MFD_SC27XX_PMIC config RZ_MTU3 tristate "Renesas RZ/G2L MTU3a core driver" depends on (ARCH_RZG2L && OF) || COMPILE_TEST + select M...
d085c27aa62999e2fe054707ab9da2af65d22b2f
Analyze and fix the following issue in the Linux kernel code: mfd: rk808: Make MFD_RK8XX tristate
Problem Details: There is no reason for MFD_RK8XX to be bool, all drivers that depend on it, or that select it, are tristate. Fixes: c20e8c5b1203af37 ("mfd: rk808: Split into core and i2c") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Test...
```diff diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 85be64579fc9..8effe182266d 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1220,7 +1220,7 @@ config MFD_RC5T583 different functionality of the device. config MFD_RK8XX - bool + tristate select MFD_CORE config MFD_RK8XX_I2C `...
af58740d8b06a6a97b7594235a1be11bd6aa37fa
Analyze and fix the following issue in the Linux kernel code: pstore: Fix kernel-doc warning
Problem Details: Fix the warning for the description of struct persistent_ram_buffer and improve the descriptions of the other struct members while I'm here. Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org> Link: https://lore.kernel.org/r/20230818201253.2729485-1-willy@infradead.org Signed-off-by: Kees C...
```diff diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 0eb780b90281..650e437b55e6 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -25,12 +25,10 @@ /** * struct persistent_ram_buffer - persistent circular RAM buffer * - * @sig: - * signature to indicate header (PERSISTENT_RAM_SIG xor...
70d91dc9b2ac91327d0eefd86163abc3548effa6
Analyze and fix the following issue in the Linux kernel code: selinux: set next pointer before attaching to list
Problem Details: Set the next pointer in filename_trans_read_helper() before attaching the new node under construction to the list, otherwise garbage would be dereferenced on subsequent failure during cleanup in the out goto label. Cc: <stable@vger.kernel.org> Fixes: 430059024389 ("selinux: implement new format of fil...
```diff diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 31b08b34c722..dc904865af58 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -2005,6 +2005,7 @@ static int filename_trans_read_helper(struct policydb *p, void *fp) if (!datum) goto out; ...
64917f4df048a0649ea7901c2321f020e71e6f24
Analyze and fix the following issue in the Linux kernel code: perf trace: Use heuristic when deciding if a syscall tracepoint "const char *" field is really a string
Problem Details: 'perf trace' tries to find BPF progs associated with a syscall that have a signature that is similar to syscalls without one to try and reuse, so, for instance, the 'open' signature can be reused with many other syscalls that have as its first arg a string. It uses the tracefs events format file for f...
```diff diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 3964cf44cdbc..e541d0e2777a 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -3398,6 +3398,19 @@ try_to_find_pair: if (strcmp(field->type, candidate_field->type)) goto next_candidate; + /* + * Th...
83a0943b1870944612a8aa0049f910826ebfd4f7
Analyze and fix the following issue in the Linux kernel code: perf trace: Use the augmented_raw_syscall BPF skel only for tracing syscalls
Problem Details: It is possible to use 'perf trace' with tracepoints and in that case we can't initialize/use the augmented_raw_syscalls BPF skel. For instance, this usecase: # perf trace -e sched:*exec --max-events=5 ? ( ): NetworkManager/1183 ... [continued]: poll()) ...
```diff diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 0ebfa95895e0..3964cf44cdbc 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -3895,7 +3895,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv) if (err < 0) goto out_error_open; #if...
0a55264cf966fb95ebf9d03d9f81fa992f069312
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix a selftest compilation error
Problem Details: When building the kernel and selftest with clang compiler (llvm17 or llvm18), I hit the following compilation failure: In file included from progs/test_lwt_redirect.c:3: In file included from /usr/include/linux/ip.h:21: In file included from /usr/include/asm/byteorder.h:5: In file included from...
```diff diff --git a/tools/testing/selftests/bpf/progs/test_lwt_redirect.c b/tools/testing/selftests/bpf/progs/test_lwt_redirect.c index 7ab1fd310efb..8c895122f293 100644 --- a/tools/testing/selftests/bpf/progs/test_lwt_redirect.c +++ b/tools/testing/selftests/bpf/progs/test_lwt_redirect.c @@ -1,8 +1,8 @@ // SPDX-Lice...
21b25bd111be7c4f92e731cbb83f725d524789af
Analyze and fix the following issue in the Linux kernel code: docs/zh_CN: correct regi_chg(),regi_add() to region_chg(),region_add()
Problem Details: Minor typo fix in translations. Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com> Acked-by: Yanteng Si <siyanteng@loongson.cn> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20230813132417.815036-1-xueshi.hu@smartx.com
```diff diff --git a/Documentation/translations/zh_CN/mm/hugetlbfs_reserv.rst b/Documentation/translations/zh_CN/mm/hugetlbfs_reserv.rst index b7a0544224ad..45048a30f736 100644 --- a/Documentation/translations/zh_CN/mm/hugetlbfs_reserv.rst +++ b/Documentation/translations/zh_CN/mm/hugetlbfs_reserv.rst @@ -296,7 +296,7 ...
656f18ad8d5bc878cf05210e2fea8f13270ffcc5
Analyze and fix the following issue in the Linux kernel code: ARC: entry: replace 8 byte ADD.ne with 4 byte ADD2.ne
Problem Details: ARCv2 current ------------ 000007e0 <EV_Trap>: 7e0: 2482 3c01 sub sp,sp,112 7e4: 1c28 3006 std r0r1,[sp,40] 7e8: 1c30 3086 std r2r3,[sp,48] 7ec: 1c38 3106 std r4r5,[sp,56] 7f0: 1c40 3186 std r6r7,[s...
```diff diff --git a/arch/arc/include/asm/entry-arcv2.h b/arch/arc/include/asm/entry-arcv2.h index f7c9b3915d10..a030eae93d35 100644 --- a/arch/arc/include/asm/entry-arcv2.h +++ b/arch/arc/include/asm/entry-arcv2.h @@ -167,7 +167,7 @@ ; ISA requires ADD.nz to have same dest and src reg operands mov.nz r10, sp - a...
ebab9426cd73c45945b44344ca904b343f0ca070
Analyze and fix the following issue in the Linux kernel code: Documentation/ABI: Fix typos
Problem Details: Fix typos in Documentation/ABI. The changes are in descriptions or comments where they shouldn't affect use of the ABIs. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20230814212822.193684-2-helgaas@kernel.org Sign...
```diff diff --git a/Documentation/ABI/stable/sysfs-block b/Documentation/ABI/stable/sysfs-block index c57e5b7cb532..1fe9a553c37b 100644 --- a/Documentation/ABI/stable/sysfs-block +++ b/Documentation/ABI/stable/sysfs-block @@ -295,7 +295,7 @@ Description: capable of executing requests targeting different sector rang...
0d345996e4cb573f8cc81d49b3ee9a7fd2035bef
Analyze and fix the following issue in the Linux kernel code: x86/kernel: increase kcov coverage under arch/x86/kernel folder
Problem Details: Currently kcov instrument is disabled for object files under arch/x86/kernel folder. For object files under arch/x86/kernel, actually just disabling the kcov instrument of files:"head32.o or head64.o and sev.o" could achieve successful booting and provide kcov coverage for object files that do not dis...
```diff diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 4070a01c11b7..00df34c263cc 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -33,11 +33,10 @@ KCSAN_SANITIZE := n KMSAN_SANITIZE_head$(BITS).o := n KMSAN_SANITIZE_nmi.o := n -# If instrumentation of this dir ...
6b72e5f9e79360fce4f2be7fe81159fbdf4256a5
Analyze and fix the following issue in the Linux kernel code: fs: ocfs2: namei: check return value of ocfs2_add_entry()
Problem Details: Process result of ocfs2_add_entry() in case we have an error value. Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lkml.kernel.org/r/20230803145417.177649-1-artem.chernyshev@red-soft.ru Fixes: ccd979bdbce9 ("[PATCH] OCFS2: The Second Oracle Cluster Filesystem") Signed...
```diff diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 17c52225b87d..03bccfd183f3 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -1535,6 +1535,10 @@ static int ocfs2_rename(struct mnt_idmap *idmap, status = ocfs2_add_entry(handle, new_dentry, old_inode, OCFS2_I(old_inode)->ip_blkno, ne...
1f38c86bb29f4548b8df01b47a313518e6ed2dfe
Analyze and fix the following issue in the Linux kernel code: watchdog/hardlockup: avoid large stack frames in watchdog_hardlockup_check()
Problem Details: After commit 77c12fc95980 ("watchdog/hardlockup: add a "cpu" param to watchdog_hardlockup_check()") we started storing a `struct cpumask` on the stack in watchdog_hardlockup_check(). On systems with CONFIG_NR_CPUS set to 8192 this takes up 1K on the stack. That triggers warnings with `CONFIG_FRAME_WA...
```diff diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 085d7a78f62f..d145305d95fe 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -151,9 +151,6 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs) */ if (is_hardlockup(cpu)) { unsigned int this_cpu = smp_processor_id(); -...
8d539b84f1e3478436f978ceaf55a0b6cab497b5
Analyze and fix the following issue in the Linux kernel code: nmi_backtrace: allow excluding an arbitrary CPU
Problem Details: The APIs that allow backtracing across CPUs have always had a way to exclude the current CPU. This convenience means callers didn't need to find a place to allocate a CPU mask just to handle the common case. Let's extend the API to take a CPU ID to exclude instead of just a boolean. This isn't any m...
```diff diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h index 18605f1b3580..26c1d2ced4ce 100644 --- a/arch/arm/include/asm/irq.h +++ b/arch/arm/include/asm/irq.h @@ -32,7 +32,7 @@ void handle_IRQ(unsigned int, struct pt_regs *); #include <linux/cpumask.h> extern void arch_trigger_cpumask_backtr...
46f12960aad2d48fc6742470f718e147e5c85d06
Analyze and fix the following issue in the Linux kernel code: drm/i915: Move abs_diff() to math.h
Problem Details: abs_diff() belongs to math.h. Move it there. This will allow others to use it. [andriy.shevchenko@linux.intel.com: add abs_diff() documentation] Link: https://lkml.kernel.org/r/20230804050934.83223-1-andriy.shevchenko@linux.intel.com [akpm@linux-foundation.org: fix comment, per Randy] Link: https:...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c index 6b2d8a1e2aa9..290e856fe9e9 100644 --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c @@ -21,6 +21,7 @@ * DEALINGS IN THE SOFTWARE. */ +#incl...
84c10951da91575778cbc3d199cdddea3d42d905
Analyze and fix the following issue in the Linux kernel code: ocfs2: cluster: fix potential deadlock on &o2net_debug_lock
Problem Details: &o2net_debug_lock is acquired by timer o2net_idle_timer() along the following call chain. Thus the acquisition of the lock under process context should disable bottom half, otherwise deadlock could happen if the timer happens to preempt the execution while the lock is held in process context on the sa...
```diff diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index 35c05c18de59..bc27301eab6d 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c @@ -44,17 +44,17 @@ static LIST_HEAD(send_tracking); void o2net_debug_add_nst(struct o2net_send_tracking *nst) { - spin_lock(&o2n...
28a45ef85e25ed05fb5d8846ec01f752618dad44
Analyze and fix the following issue in the Linux kernel code: ocfs2: cluster: fix potential deadlock on &qs->qs_lock
Problem Details: &qs->qs_lock is acquired by timer o2net_idle_timer() along the following call chain. Thus the acquisition of the lock under process context should disable bottom half, otherwise deadlock could happen if the timer happens to preempt the execution while the lock is held in process context on the same CP...
```diff diff --git a/fs/ocfs2/cluster/quorum.c b/fs/ocfs2/cluster/quorum.c index 189c111bc371..15d0ed9c13e5 100644 --- a/fs/ocfs2/cluster/quorum.c +++ b/fs/ocfs2/cluster/quorum.c @@ -93,7 +93,7 @@ static void o2quo_make_decision(struct work_struct *work) int lowest_hb, lowest_reachable = 0, fence = 0; struct o2quo_...
fb40b0537342e1acd5c2daf2ff6780c1d0d2883c
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: fix 'lx-lsmod' show the wrong size
Problem Details: 'lsmod' shows total core layout size, so we need to sum up all the sections in core layout in gdb scripts. / # lsmod kasan_test 200704 0 - Live 0xffff80007f640000 Before patch: (gdb) lx-lsmod Address Module Size Used by 0xffff80007f640000 kasan_test 36864 0 ...
```diff diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in index 50a92c4e9984..fab74ca9df6f 100644 --- a/scripts/gdb/linux/constants.py.in +++ b/scripts/gdb/linux/constants.py.in @@ -64,6 +64,9 @@ LX_GDBPARSED(IRQ_HIDDEN) /* linux/module.h */ LX_GDBPARSED(MOD_TEXT) +LX_GDBPARSED(MOD_...