id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
0ae3113a46a64266f19fdc9753d5e3a6748fc594
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am6*: Fix bus-width property in MMC nodes
Problem Details: Move bus-width property to *main.dtsi, above the OTAP/ITAP delay values. While there is no error with where it is currently at, it is easier to read the MMC node if the bus-width property is located above the OTAP/ITAP delay values consistently across MMC nodes. Add missing bus-width for MMC2 in k3-am...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index c8902a3bf543..b4ab7db6cc14 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -558,9 +558,9 @@ clock-names = "clk_ahb", "clk_xin"; assigned-clocks = <...
2812d23ade3d614b451bff5d63d29a31b92d8859
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am6*: Fix ti,clkbuf-sel property in MMC nodes
Problem Details: Move ti,clkbuf-sel property above the OTAP/ITAP delay values. While there is no error with where it is currently at, it is easier to read the MMC node if ti,clkbuf-sel is located above the OTAP/ITAP delay values consistently across MMC nodes. Add missing ti,clkbuf-sel for MMC0 in k3-am64-main. Signed...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index 172482a87ae2..c8902a3bf543 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -578,6 +578,7 @@ power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>; clock...
379c7752bbd0e81654544a896dd19c19ebb6faba
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am64-main: Fix ITAP/OTAP values for MMC
Problem Details: Update MMC0/MMC1 OTAP/ITAP values according to the datasheet [0], refer to Table 7-68 for MMC0 and Table 7-77 for MMC1. [0] https://www.ti.com/lit/ds/symlink/am6442.pdf Fixes: 8abae9389bdb ("arm64: dts: ti: Add support for AM642 SoC") Signed-off-by: Judith Mendez <jm@ti.com> Tested-by: Wadim Egorov <...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi index 529e07229e6f..a7a0e265c881 100644 --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi @@ -634,6 +634,9 @@ ti,otap-del-sel-mmc-hs = <0x0>; ti,otap-del-sel-ddr52 =...
a5c57fd2e9bd1c8ea8613a8f94fd0be5eccbf321
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries/iommu: DLPAR add doesn't completely initialize pci_controller
Problem Details: When a PCI device is dynamically added, the kernel oopses with a NULL pointer dereference: BUG: Kernel NULL pointer dereference on read at 0x00000030 Faulting instruction address: 0xc0000000006bbe5c Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA ...
```diff diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h index ce2b1b5eebdd..a8b7e8682f5b 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h @@ -30,6 +30,16 @@ void *pci_traverse_device_nodes(struct device_node *start, void *data); extern v...
dfc554d5217163f9d1c9d75d1380af1156df6eb3
Analyze and fix the following issue in the Linux kernel code: arm64: dts: sm8650: Add msi-map-mask for PCIe nodes
Problem Details: "msi-map-mask" is a required property for all Qcom PCIe controllers as it would allow all PCIe devices under a bus to share the same MSI identifier. Without this property, each device has to use a separate MSI identifier which is not possible due to platform limitations. Currently, this is not an iss...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi index d488b3b3265e..12ba839f215e 100644 --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi @@ -2277,6 +2277,7 @@ /* Entries are reversed due to the unusual ITS DeviceID encoding */ ...
450e178facd62b23bb7638f20a3c99436ee80640
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: samsung-matisse-common: Add UART
Problem Details: This was not enabled in the matisse-wifi tree. Without this, it is not possible to use the USB port for serial debugging via a "Carkit debug cable". Signed-off-by: Stefan Hansson <newbyte@postmarketos.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <ko...
```diff diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi index 24ed2ba85d62..a15a44fc0181 100644 --- a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-c...
d29a6cf980572d8cf7b63935716fca663e2610f0
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j784s4-evm: Remove Pinmux for CTS and RTS in wkup_uart0
Problem Details: Only Tx and Rx Signal lines for wkup_uart0 are brought out on the J784S4 EVM from SoC, but CTS and RTS signal lines are not brought on the EVM. Thus, remove pinmux for CTS and RTS signal lines for wkup_uart0 in J784S4. Fixes: 6fa5d37a2f34 ("arm64: dts: ti: k3-j784s4-evm: Add mcu and wakeup uarts") Sig...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts index bb2558b68381..81fd7afac8c5 100644 --- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts @@ -343,8 +343,6 @@ wkup_uart0_pins_default: wkup-uart0-default-pins { bootp...
28e5b74d524050008edf415f20a3e38907b8f176
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j721s2-common-proc-board: Remove Pinmux for CTS and RTS in wkup_uart0
Problem Details: Only Tx and Rx Signal lines for wkup_uart0 are brought out on the Common Proc Board through SoM, but CTS and RTS signal lines are not brought on the board. Thus, remove pinmux for CTS and RTS signal lines for wkup_uart0 in J721S2. Fixes: f5e9ee0b354a ("arm64: dts: ti: k3-j721s2-common-proc-board: Add ...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts index 5631735c9b7a..c5a0b7cbb14f 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts +++ b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts @@ -197,8 +197,6 @@ &wku...
0fa8b0e2083d333e4854b9767fb893f924e70ae5
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j7200-common-proc-board: Remove clock-frequency from mcu_uart0
Problem Details: Clock-frequency property is already present in mcu_uart0 node of the k3-j7200-mcu-wakeup.dtsi file. Thus, remove redundant clock-frequency property from mcu_uart0 node. Fixes: 3709ea7f960e ("arm64: dts: ti: k3-j7200-common-proc-board: Add uart pinmux") Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com> Li...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts index 160580a0584a..6593c5da82c0 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts +++ b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts @@ -273,7 +273,6 @@ status ...
566feddd2ba5e29d9ccab36d6508592ae563f275
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j7200-common-proc-board: Modify Pinmux for wkup_uart0 and mcu_uart0
Problem Details: WKUP_PADCONFIG registers for wkup_uart0 and mcu_uart0 lies under wkup_pmx2 for J7200. Thus, modify pinmux for both of them. Fixes: 3709ea7f960e ("arm64: dts: ti: k3-j7200-common-proc-board: Add uart pinmux") Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com> Link: https://lore.kernel.org/r/20240214105846....
```diff diff --git a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts index 1d8bddcae90e..160580a0584a 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts +++ b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts @@ -119,24 +119,25 @@ }; ...
49c379d3a72ab86aafeafebe6b43577acb1ef359
Analyze and fix the following issue in the Linux kernel code: xfs: use kvfree for buf in xfs_ioc_getbmap
Problem Details: Without this the kernel crashes in kfree for files with a sufficiently large number of extents. Fixes: d4c75a1b40cd ("xfs: convert remaining kmem_free() to kfree()") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Chaitanya Kulkarni <kch@n...
```diff diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 7eeebcb6b925..7c35d7644097 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -1506,7 +1506,7 @@ xfs_ioc_getbmap( error = 0; out_free_buf: - kfree(buf); + kvfree(buf); return error; } ```
b34b9547cee41575a4fddf390f615570759dc999
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/arm_global_timer: Fix maximum prescaler value
Problem Details: The prescaler in the "Global Timer Control Register bit assignments" is documented to use bits [15:8], which means that the maximum prescaler register value is 0xff. Fixes: 171b45a4a70e ("clocksource/drivers/arm_global_timer: Implement rate compensation whenever source clock changes") Signed-off-by: M...
```diff diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c index 44a61dc6f932..e1c773bb5535 100644 --- a/drivers/clocksource/arm_global_timer.c +++ b/drivers/clocksource/arm_global_timer.c @@ -32,7 +32,7 @@ #define GT_CONTROL_IRQ_ENABLE BIT(2) /* banked */ #define GT_CONTROL...
10201396ef6455a68ac671fa0163205d327ebb70
Analyze and fix the following issue in the Linux kernel code: i3c: dw: Disable IBI IRQ depends on hot-join and SIR enabling
Problem Details: Disable IBI IRQ signal and status only when hot-join and SIR enabling of all target devices attached to the bus are disabled. Fixes: e389b1d72a62 ("i3c: dw: Add support for in-band interrupts") Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Link: https://lore.kernel.org/r/20240119054547.983693...
```diff diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index ef5751e91cc9..276153e10f5a 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -1163,8 +1163,10 @@ static void dw_i3c_master_set_sir_enabled(struct dw_i3c_master *master, global ...
cb0a395578f1b817f9cf7d2a8525781094fec0c5
Analyze and fix the following issue in the Linux kernel code: dt-bindings: i3c: drop "master" node name suffix
Problem Details: Drop the requirement of "-master" suffix in node names because: 1. "Master" word is discouraged and MIPI Alliance renamed it to "Controller". 2. Some devices can operate in Controller (Master) or Target mode, thus the name is not accurate in such cases. 3. Other buses, like I2C controllers, use s...
```diff diff --git a/Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml b/Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml index fcc3dbff9c9a..47be5d9a32d4 100644 --- a/Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml +++ b/Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.ya...
ed6d0bed343ee5448f3c7b4884adc54c15e63984
Analyze and fix the following issue in the Linux kernel code: rust: locked_by: shorten doclink preview
Problem Details: Increases readability by removing `super::` from the link preview text. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kern...
```diff diff --git a/rust/kernel/sync/locked_by.rs b/rust/kernel/sync/locked_by.rs index b17ee5cd98f3..babc731bd5f6 100644 --- a/rust/kernel/sync/locked_by.rs +++ b/rust/kernel/sync/locked_by.rs @@ -9,14 +9,17 @@ use core::{cell::UnsafeCell, mem::size_of, ptr}; /// Allows access to some data to be serialised by a lock...
cd16c41fdefa014c719d9ad04cf88ef5e77edffa
Analyze and fix the following issue in the Linux kernel code: rust: kernel: remove unneeded doclink targets
Problem Details: Remove explicit targets for doclinks in cases where rustdoc can determine the correct target by itself. The goal is to reduce unneeded verbosity in the source code. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Rebored...
```diff diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs index ed3af3491b47..73d6fa544ca6 100644 --- a/rust/kernel/workqueue.rs +++ b/rust/kernel/workqueue.rs @@ -426,13 +426,10 @@ impl<T: ?Sized, const ID: u64> Work<T, ID> { /// The [`OFFSET`] constant must be the offset of a field in `Self` of type [...
4c799d1dc89b5287f82c7d7bdc5039928980b1bd
Analyze and fix the following issue in the Linux kernel code: rust: kernel: add doclinks
Problem Details: Add doclinks to existing documentation. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20240131-doc-fixes-v3-v...
```diff diff --git a/rust/kernel/sync/arc.rs b/rust/kernel/sync/arc.rs index 6c46b1affca5..936bc549a082 100644 --- a/rust/kernel/sync/arc.rs +++ b/rust/kernel/sync/arc.rs @@ -365,12 +365,12 @@ impl<T: ?Sized> From<Pin<UniqueArc<T>>> for Arc<T> { /// A borrowed reference to an [`Arc`] instance. /// /// For cases when...
6269fadf351eafad6f890091eed69875125285b6
Analyze and fix the following issue in the Linux kernel code: rust: kernel: add blank lines in front of code blocks
Problem Details: Throughout the code base, blank lines are used before starting a code block. Adapt outliers to improve consistency within the kernel crate. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Re...
```diff diff --git a/rust/kernel/types.rs b/rust/kernel/types.rs index fdb778e65d79..8aabe348b194 100644 --- a/rust/kernel/types.rs +++ b/rust/kernel/types.rs @@ -90,6 +90,7 @@ impl ForeignOwnable for () { /// /// In the example below, we have multiple exit paths and we want to log regardless of which one is /// tak...
af8b18d7404bfb82aa07a09ad5b53d33ab2955d8
Analyze and fix the following issue in the Linux kernel code: rust: kernel: mark code fragments in docs with backticks
Problem Details: Fix places where comments include code fragments that are not enclosed in backticks. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: http...
```diff diff --git a/rust/kernel/ioctl.rs b/rust/kernel/ioctl.rs index 5987ad6d38a7..cfa7d080b531 100644 --- a/rust/kernel/ioctl.rs +++ b/rust/kernel/ioctl.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 -//! ioctl() number definitions. +//! `ioctl()` number definitions. //! //! C header: [`include/asm-gene...
ebf2b8a75a05a1683596aa73c24c1b5bcd5132ae
Analyze and fix the following issue in the Linux kernel code: rust: kernel: unify spelling of refcount in docs
Problem Details: Replace instances of 'ref-count[ed]' with 'refcount[ed]' to increase consistency within the Rust documentation. The latter form is used more widely in the rest of the kernel: ```console $ rg '(\*|//).*?\srefcount(|ed)[\s,.]' | wc -l 1605 $ rg '(\*|//).*?\sref-count(|ed)[\s,.]' | wc -l 43 ``` (numbers...
```diff diff --git a/rust/kernel/sync/arc.rs b/rust/kernel/sync/arc.rs index 77cdbcf7bd2e..6c46b1affca5 100644 --- a/rust/kernel/sync/arc.rs +++ b/rust/kernel/sync/arc.rs @@ -56,7 +56,7 @@ mod std_vendor; /// b: u32, /// } /// -/// // Create a ref-counted instance of `Example`. +/// // Create a refcounted instan...
4c62348d5b845c9acb82378faf5aefdcb06c38be
Analyze and fix the following issue in the Linux kernel code: rust: str: move SAFETY comment in front of unsafe block
Problem Details: SAFETY comments should immediately precede the unsafe block they justify. Move assignment to `bar` past comment as it is safe. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Al...
```diff diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index 843ffeec9b3e..fec5c4314758 100644 --- a/rust/kernel/str.rs +++ b/rust/kernel/str.rs @@ -191,9 +191,9 @@ impl CStr { /// ``` /// # use kernel::c_str; /// # use kernel::str::CStr; + /// let bar = c_str!("ツ"); /// // SAFETY: String l...
8cfce47d7598bed0481c8d79437dd572705bb51e
Analyze and fix the following issue in the Linux kernel code: rust: str: use `NUL` instead of 0 in doc comments
Problem Details: Throughout the module, bytes with the value zero are referred to as `NUL` bytes. Adapt the only two outliers. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alice Ryhl <alicery...
```diff diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index 0a8569594fc3..843ffeec9b3e 100644 --- a/rust/kernel/str.rs +++ b/rust/kernel/str.rs @@ -149,13 +149,13 @@ impl CStr { self.0.as_ptr() as _ } - /// Convert the string to a byte slice without the trailing 0 byte. + /// Convert the st...
ed8596532a667e1a25ef0293acbb19078b94f686
Analyze and fix the following issue in the Linux kernel code: rust: kernel: add srctree-relative doclinks
Problem Details: Convert existing references to C header files to make use of Commit bc2e7d5c298a ("rust: support `srctree`-relative links"). Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alic...
```diff diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index b89ecf4e97a0..74581c958a6c 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -78,7 +78,7 @@ pub trait Module: Sized + Sync { /// Equivalent to `THIS_MODULE` in the C API. /// -/// C header: `include/linux/export.h` +/// C header: [`include...
16dca5d12ed114110bcdfac3ae00de9f125821c8
Analyze and fix the following issue in the Linux kernel code: rust: ioctl: end top-level module docs with full stop
Problem Details: Every other module ends its first line of documentation with a full stop. Adapt the only outlier. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.co...
```diff diff --git a/rust/kernel/ioctl.rs b/rust/kernel/ioctl.rs index 59050e5f5a5a..5987ad6d38a7 100644 --- a/rust/kernel/ioctl.rs +++ b/rust/kernel/ioctl.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 -//! ioctl() number definitions +//! ioctl() number definitions. //! //! C header: [`include/asm-generic...
69d5fbb0159673ea6737204f4d458a220e81a0c9
Analyze and fix the following issue in the Linux kernel code: rust: error: improve unsafe code in example
Problem Details: The `from_err_ptr` function is safe. There is no need for the call to it to be inside the unsafe block. Reword the SAFETY comment to provide a better justification of why the FFI call is safe. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail...
```diff diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs index 4f0c1edd63b7..4786d3ee1e92 100644 --- a/rust/kernel/error.rs +++ b/rust/kernel/error.rs @@ -264,13 +264,9 @@ pub fn to_result(err: core::ffi::c_int) -> Result { /// pdev: &mut PlatformDevice, /// index: u32, /// ) -> Result<*mut core::ffi...
b6cda913bba42e1fdad82df41d906ff603319743
Analyze and fix the following issue in the Linux kernel code: rust: kernel: fix multiple typos in documentation
Problem Details: Fixes multiple trivial typos in documentation and comments of the kernel crate. allocator: - Fix a trivial list item alignment issue in the last SAFETY comment of `krealloc_aligned`. init: - Replace 'type' with 'trait' in the doc comments of the `PinInit` and `Init` traits. - Add colons before st...
```diff diff --git a/rust/kernel/allocator.rs b/rust/kernel/allocator.rs index 4b057e837358..01ad139e19bc 100644 --- a/rust/kernel/allocator.rs +++ b/rust/kernel/allocator.rs @@ -35,7 +35,7 @@ unsafe fn krealloc_aligned(ptr: *mut u8, new_layout: Layout, flags: bindings::gf // - `ptr` is either null or a pointer re...
78e886ba2b549945ecada055ee0765f0ded5707a
Analyze and fix the following issue in the Linux kernel code: net: ena: Remove ena_select_queue
Problem Details: Avoid the following warnings by removing the ena_select_queue() function and rely on the net core to do the queue selection, The issue happen when an skb received from an interface with more queues than ena is forwarded to the ena interface. [ 1176.159959] eth0 selects TX queue 11, but real number of ...
```diff diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 2d28e97b2cf3..09e7da1a69c9 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -2689,22 +2689,6 @@ error_drop_packet: return NETDEV_TX_OK; ...
31edf4bbe0ba27fd03ac7d87eb2ee3d2a231af6d
Analyze and fix the following issue in the Linux kernel code: nbd: null check for nla_nest_start
Problem Details: nla_nest_start() may fail and return NULL. Insert a check and set errno based on other call sites within the same source code. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Michal Kubecek <mkubecek@suse.cz> Fixes: 47d902b90a32 ("nbd: add a status netlink command") Signed-off-...
```diff diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 30ae3cc12e77..d2b422d842b7 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -2433,6 +2433,12 @@ static int nbd_genl_status(struct sk_buff *skb, struct genl_info *info) } dev_list = nla_nest_start_noflag(reply, NBD_ATTR_DEVICE_LIST);...
f120e62e37f0af4c4cbe08e5a88ea60a6a17c858
Analyze and fix the following issue in the Linux kernel code: net: bcmasp: Sanity check is off by one
Problem Details: A sanity check for OOB write is off by one leading to a false positive when the array is full. Fixes: 9b90aca97f6d ("net: ethernet: bcmasp: fix possible OOB write in bcmasp_netfilt_get_all_active()") Signed-off-by: Justin Chen <justin.chen@broadcom.com> Reviewed-by: Florian Fainelli <florian.fainelli@...
```diff diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c index 29b04a274d07..80245c65cc90 100644 --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c @@ -535,9 +535,6 @@ int bcmasp_netfilt_get_all_active(struct bcmasp_i...
5b76d928f8b779a1b19c5842e7cabee4cbb610c3
Analyze and fix the following issue in the Linux kernel code: net: bcmasp: Indicate MAC is in charge of PHY PM
Problem Details: Avoid the PHY library call unnecessarily into the suspend/resume functions by setting phydev->mac_managed_pm to true. The ASP driver essentially does exactly what mdio_bus_phy_resume() does. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Signed-off-by: Florian Fainelli...
```diff diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c index f59557b0cd51..6ad1366270f7 100644 --- a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c @@ -1050,6 +1050,9 @@ static int bcmasp_netif_ini...
4103d8480866fe5abb71ef0ed8af3a3b7b9625bf
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: diag: unique 'cestab' subtest names
Problem Details: It is important to have a unique (sub)test name in TAP, because some CI environments drop tests with duplicated name. Some 'cestab' subtests from the diag selftest had the same names, e.g.: ....chk 0 cestab Now the previous value is taken, to have different names, e.g.: ....chk 2->0 cestab ...
```diff diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index 266656a16229..0a58ebb8b04c 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -189,10 +189,15 @@ chk_msk_inuse() # $1: cestab nr chk_msk_cestab() { -...
645c1dc965ef6b5554e5e69737bb179c7a0f872f
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: diag: unique 'in use' subtest names
Problem Details: It is important to have a unique (sub)test name in TAP, because some CI environments drop tests with duplicated name. Some 'in use' subtests from the diag selftest had the same names, e.g.: chk 0 msk in use after flush Now the previous value is taken, to have different names, e.g.: chk 2->0...
```diff diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index e0615c6ffb8d..266656a16229 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -166,9 +166,13 @@ chk_msk_listen() chk_msk_inuse() { local expected=$1...
2ef0d804c090658960c008446523863fd7e3541e
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: userspace_pm: unique subtest names
Problem Details: It is important to have a unique (sub)test name in TAP, because some CI environments drop tests with duplicated names. Some subtests from the userspace_pm selftest had the same names. That's because different subflows are created (and deleted) between the same pair of IP addresses. Simply adding the ...
```diff diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh index 6167837f48e1..1b94a75604fe 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -75,7 +75,7 @@ print_test() { test_name...
4d8e0dde0403b5a86aa83e243f020711a9c3e31f
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: simult flows: fix some subtest names
Problem Details: The selftest was correctly recording all the results, but the 'reverse direction' part was missing in the name when needed. It is important to have a unique (sub)test name in TAP, because some CI environments drop tests with duplicated name. Fixes: 675d99338e7a ("selftests: mptcp: simult flows: forma...
```diff diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index 0cc964e6f2c1..8f9ddb3ad4fe 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -250,7 +250,8 @@ run_test() [ $bail -eq...
694bd45980a61045eb5ec07799e3b94c76db830e
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: diag: fix bash warnings on older kernels
Problem Details: Since the 'Fixes' commit mentioned below, the command that is executed in __chk_nr() helper can return nothing if the feature is not supported. This is the case when the MPTCP CURRESTAB counter is not supported. To avoid this warning ... ./diag.sh: line 65: [: !=: unary operator expected ... we ju...
```diff diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index 04fcb8a077c9..e0615c6ffb8d 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -62,8 +62,8 @@ __chk_nr() nr=$(eval $command) printf "%-50s" "$msg" ...
662f084f3396d8a804d56cb53ac05c9e39902a7b
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: pm nl: avoid error msg on older kernels
Problem Details: Since the 'Fixes' commit mentioned below, and if the kernel being tested doesn't support the 'fullmesh' flag, this error will be printed: netlink error -22 (Invalid argument) ./pm_nl_ctl: bailing out due to netlink error[s] But that can be normal if the kernel doesn't support the feature, no need...
```diff diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh index 79e83a2c95de..71899a3ffa7a 100755 --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh @@ -183,7 +183,7 @@ check "ip netns exec $ns1 ./pm_nl...
d2a2547565a9f1ad7989f7e21f97cbf065a9390d
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: pm nl: also list skipped tests
Problem Details: If the feature is not supported by older kernels, and instead of just ignoring some tests, we should mark them as skipped, so we can still track them. Fixes: d85555ac11f9 ("selftests: mptcp: pm_netlink: format subtests results in TAP") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang <geliang@kern...
```diff diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh index 8f4ff123a7eb..79e83a2c95de 100755 --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh @@ -194,6 +194,12 @@ subflow 10.0.1.1" " (no...
045e9d812868a2d80b7a57b224ce8009444b7bbc
Analyze and fix the following issue in the Linux kernel code: mptcp: fix duplicate subflow creation
Problem Details: Fullmesh endpoints could end-up unexpectedly generating duplicate subflows - same local and remote addresses - when multiple incoming ADD_ADDR are processed before the PM creates the subflow for the local endpoints. Address the issue explicitly checking for duplicates at subflow creation time. To avo...
```diff diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index ed6983af1ab2..58d17d9604e7 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -396,19 +396,6 @@ void mptcp_pm_free_anno_list(struct mptcp_sock *msk) } } -static bool lookup_address_in_vec(const struct mptcp_addr_info *addrs...
967d3c27127e71a10ff5c083583a038606431b61
Analyze and fix the following issue in the Linux kernel code: mptcp: fix data races on remote_id
Problem Details: Similar to the previous patch, address the data race on remote_id, adding the suitable ONCE annotations. Fixes: bedee0b56113 ("mptcp: address lookup improvements") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by:...
```diff diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 912e25077437..ed6983af1ab2 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -443,7 +443,7 @@ static unsigned int fill_remote_addresses_vec(struct mptcp_sock *msk, mptcp_for_each_subflow(msk, subflow) { ssk = mptcp_subfl...
a7cfe776637004a4c938fde78be4bd608c32c3ef
Analyze and fix the following issue in the Linux kernel code: mptcp: fix data races on local_id
Problem Details: The local address id is accessed lockless by the NL PM, add all the required ONCE annotation. There is a caveat: the local id can be initialized late in the subflow life-cycle, and its validity is controlled by the local_id_valid flag. Remove such flag and encode the validity in the local_id field its...
```diff diff --git a/net/mptcp/diag.c b/net/mptcp/diag.c index e57c5f47f035..6ff6f14674aa 100644 --- a/net/mptcp/diag.c +++ b/net/mptcp/diag.c @@ -65,7 +65,7 @@ static int subflow_get_info(struct sock *sk, struct sk_buff *skb) sf->map_data_len) || nla_put_u32(skb, MPTCP_SUBFLOW_ATTR_FLAGS, flags) || nla...
b8adb69a7d29c2d33eb327bca66476fb6066516b
Analyze and fix the following issue in the Linux kernel code: mptcp: fix lockless access in subflow ULP diag
Problem Details: Since the introduction of the subflow ULP diag interface, the dump callback accessed all the subflow data with lockless. We need either to annotate all the read and write operation accordingly, or acquire the subflow socket lock. Let's do latter, even if slower, to avoid a diffstat havoc. Fixes: 5147...
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index dd78a1181031..f6eba9652d01 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -2506,7 +2506,7 @@ struct tcp_ulp_ops { /* cleanup ulp */ void (*release)(struct sock *sk); /* diagnostic */ - int (*get_info)(const struct sock *sk, struct sk_buff...
584f3894262634596532cf43a5e782e34a0ce374
Analyze and fix the following issue in the Linux kernel code: mptcp: add needs_id for netlink appending addr
Problem Details: Just the same as userspace PM, a new parameter needs_id is added for in-kernel PM mptcp_pm_nl_append_new_local_addr() too. Add a new helper mptcp_pm_has_addr_attr_id() to check whether an address ID is set from PM or not. In mptcp_pm_nl_get_local_id(), needs_id is always true, but in mptcp_pm_nl_add_...
```diff diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 287a60381eae..a24c9128dee9 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -901,7 +901,8 @@ static void __mptcp_pm_release_addr_entry(struct mptcp_pm_addr_entry *entry) } static int mptcp_pm_nl_append_new_local_addr(struc...
6c347be62ae963b301ead8e7fa7b9973e6e0d6e1
Analyze and fix the following issue in the Linux kernel code: mptcp: add needs_id for userspace appending addr
Problem Details: When userspace PM requires to create an ID 0 subflow in "userspace pm create id 0 subflow" test like this: userspace_pm_add_sf $ns2 10.0.3.2 0 An ID 1 subflow, in fact, is created. Since in mptcp_pm_nl_append_new_local_addr(), 'id 0' will be treated as no ID is set by userspace, and will all...
```diff diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c index 4f3901d5b8ef..e582b3b2d174 100644 --- a/net/mptcp/pm_userspace.c +++ b/net/mptcp/pm_userspace.c @@ -26,7 +26,8 @@ void mptcp_free_local_addr_list(struct mptcp_sock *msk) } static int mptcp_userspace_pm_append_new_local_addr(struct mptcp_...
e898e4cd1aab271ca414f9ac6e08e4c761f6913c
Analyze and fix the following issue in the Linux kernel code: ipv6: properly combine dev_base_seq and ipv6.dev_addr_genid
Problem Details: net->dev_base_seq and ipv6.dev_addr_genid are monotonically increasing. If we XOR their values, we could miss to detect if both values were changed with the same amount. Fixes: 63998ac24f83 ("ipv6: provide addr and netconf dump consistency info") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: ...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 733ace18806c..5a839c5fb1a5 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -708,6 +708,22 @@ errout: return err; } +/* Combine dev_addr_genid and dev_base_seq to detect changes. + */ +static u32 inet6_base_seq(const struct net *net)...
081a0e3b0d4c061419d3f4679dec9f68725b17e4
Analyze and fix the following issue in the Linux kernel code: ipv4: properly combine dev_base_seq and ipv4.dev_addr_genid
Problem Details: net->dev_base_seq and ipv4.dev_addr_genid are monotonically increasing. If we XOR their values, we could miss to detect if both values were changed with the same amount. Fixes: 0465277f6b3f ("ipv4: provide addr and netconf dump consistency info") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: ...
```diff diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index ca0ff15dc8fa..bc74f131fe4d 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1825,6 +1825,21 @@ done: return err; } +/* Combine dev_addr_genid and dev_base_seq to detect changes. + */ +static u32 inet_base_seq(const struct net *net) +{ +...
173f6cd384ae27bb57af8cc5201b4f4a137d6e55
Analyze and fix the following issue in the Linux kernel code: coccinelle: device_attr_show: Remove useless expression STR
Problem Details: Commit ff82e84e80fc ("coccinelle: device_attr_show: simplify patch case") simplifies the patch case, as a result, STR is no longer needed. This also helps to fix below coccicheck warning: > warning: rp: metavariable STR not used in the - or context code CC: Julia Lawall <Julia.Lawall@inria.fr> CC: Ni...
```diff diff --git a/scripts/coccinelle/api/device_attr_show.cocci b/scripts/coccinelle/api/device_attr_show.cocci index 550d1d2fc02a..dfcf9304195f 100644 --- a/scripts/coccinelle/api/device_attr_show.cocci +++ b/scripts/coccinelle/api/device_attr_show.cocci @@ -28,7 +28,7 @@ ssize_t show(struct device *dev, struct dev...
3a7845041eb7235f2fb00ef0960995da5be63b11
Analyze and fix the following issue in the Linux kernel code: exfat: fix appending discontinuous clusters to empty file
Problem Details: Eric Hong found that when using ftruncate to expand an empty file, exfat_ent_set() will fail if discontinuous clusters are allocated. The reason is that the empty file does not have a cluster chain, but exfat_ent_set() attempts to append the newly allocated cluster to the cluster chain. In addition, ex...
```diff diff --git a/fs/exfat/file.c b/fs/exfat/file.c index d25a96a148af..cc00f1a7a1e1 100644 --- a/fs/exfat/file.c +++ b/fs/exfat/file.c @@ -35,13 +35,18 @@ static int exfat_cont_expand(struct inode *inode, loff_t size) if (new_num_clusters == num_clusters) goto out; - exfat_chain_set(&clu, ei->start_clu, num_...
97dde84026339e4b4af9a6301f825d1828d7874b
Analyze and fix the following issue in the Linux kernel code: net: stmmac: Fix incorrect dereference in interrupt handlers
Problem Details: If 'dev' or 'data' is NULL, the 'priv' variable has an incorrect address when dereferencing calling netdev_err(). Since we get as 'dev_id' or 'data' what was passed as the 'dev' argument to request_irq() during interrupt initialization (that is, the net_device and rx/tx queue pointers initialized at t...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 75d029704503..e80d77bd9f1f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6059,11 +6059,6 @@ static irqreturn_t stm...
b3db266fb031fba88c423d4bb8983a73a3db6527
Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: Limit read size on v1.2
Problem Details: Between UCSI 1.2 and UCSI 2.0, the size of the MESSAGE_IN region was increased from 16 to 256. In order to avoid overflowing reads for older systems, add a mechanism to use the read UCSI version to truncate read sizes on UCSI v1.2. Tested-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Pra...
```diff diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index 14f5a7bfae2e..7c5cecdd93d6 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -36,6 +36,19 @@ */ #define UCSI_SWAP_TIMEOUT_MS 5000 +static int ucsi_read_message_in(struct ucsi *ucsi, void *buf, +...
42af6bcbc351d544889fcbcfc9c3d4bd39191b7d
Analyze and fix the following issue in the Linux kernel code: tty: hvc-iucv: fix function pointer casts
Problem Details: clang warns about explicitly casting between incompatible function pointers: drivers/tty/hvc/hvc_iucv.c:1100:23: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 1100 | priv->dev->release = (v...
```diff diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c index fdecc0d63731..b1149bc62ca1 100644 --- a/drivers/tty/hvc/hvc_iucv.c +++ b/drivers/tty/hvc/hvc_iucv.c @@ -1035,6 +1035,10 @@ static const struct attribute_group *hvc_iucv_dev_attr_groups[] = { NULL, }; +static void hvc_iucv_free(struc...
b4a89adc2ff369f825c3427e9bb5c9cac096dc65
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable bForcedBgMode
Problem Details: Rename variable bForcedBgMode to forced_bg_mode to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-19-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 07a89d1af86d..348644998744 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1193,7 +1193,7 @@ struct rtllib_device { u8 *assocreq_ies, *assocresp_ies; size_t assocreq_ies_len, a...
34eb6bea1ffb8fd9dff2a7174651e6aaac4b3b7e
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable NumRecvBcnInPeriod
Problem Details: Rename variable NumRecvBcnInPeriod to num_recv_bcn_in_period to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-18-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 6bfc0485d4fc..bf1c8bd8ecc8 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -923,7 +923,7 @@ static void _rtl92e_update_rxcounts(struct r8...
0dd08a4b53de1f6b5af0eb52c8b3db38a8d98e54
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable LpsIdleCount
Problem Details: Rename variable LpsIdleCount to lps_idle_count to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-17-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c index 44a9fe831849..5aac9110bff6 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c @@ -208,12 +208,12 @@ void rtl92e_leisure_ps_enter(struct net_device *dev...
1650401eac5ff0f90f9ac717183cf8c2fa5c1dca
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable Octet
Problem Details: Rename variable Octet to octet to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-16-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl819x_Qos.h b/drivers/staging/rtl8192e/rtl819x_Qos.h index 50e01ca49a4c..dc991100742f 100644 --- a/drivers/staging/rtl8192e/rtl819x_Qos.h +++ b/drivers/staging/rtl8192e/rtl819x_Qos.h @@ -13,7 +13,7 @@ struct qos_tsinfo { }; struct octet_string { - u8 *Octet; + u8 *oct...
3f3dd0a07c8a7646c1e1038ca611c7b7a3cbde3f
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Fix if statement alignment with open parenthesis
Problem Details: Add a space in front of statement to fix checkpatch warning: Alignment should match open parenthesis Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-15-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index dc91e59f1bc2..5281138ad468 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1207,7 +1207,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device...
c64b64c98bc714db87bd062fbb936c88a0832970
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Remove unnecessary blank line
Problem Details: Remove blank line to fix checkpatch warning: Blank lines aren't necessary before a close brace '}' Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-14-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index ab41632def7a..dc91e59f1bc2 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1081,7 +1081,6 @@ static void rtllib_associate_complete_wq(void *data) ...
9842cb03969ec55eee44ffed2ad938e80b5d3844
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Fixup if statement broken across multiple lines.
Problem Details: Join broken lines across if statement to fix checkpatch warning: Lines should not end with a '(' Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-13-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 538689fb5580..ab41632def7a 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1736,10 +1736,8 @@ rtllib_rx_deauth(struct rtllib_device *ieee, struct sk...
459a6c2b25806214d0f41dc539561a66954f9194
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Fix paren alignment for rtllib_disable_net_monitor_mode()
Problem Details: Join 2 lines to fix Warning: Alignment should match open parenthesis Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-12-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 60598b41fb9f..538689fb5580 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -361,8 +361,7 @@ void rtllib_enable_net_monitor_mode(struct net_device *de...
0efe628a94b6503d0152b88db4a71f064c3334fc
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable SelfHTCap
Problem Details: Rename variable SelfHTCap to self_ht_cap to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-11-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h index 18dab893270f..a4580445305d 100644 --- a/drivers/staging/rtl8192e/rtl819x_HT.h +++ b/drivers/staging/rtl8192e/rtl819x_HT.h @@ -98,7 +98,7 @@ struct rt_hi_throughput { u8 cur_short_gi_40mhz; u8 cur_short_gi_20mhz;...
a9055dc8e5cad4a47c2101db9ef10de7ca55461a
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable LPSAwakeIntvl
Problem Details: Rename variable LPSAwakeIntvl to lps_awake_intvl to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-10-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index c380d1c3e9b6..8de46b61416b 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1072,7 +1072,7 @@ struct rt_pwr_save_ctrl { bool bLeisurePs; u8 LpsIdleCount; - u8 LPSAwak...
332fe0ec286427713607064021b712914bef701c
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable PeerHTInfoBuf
Problem Details: Rename variable PeerHTInfoBuf to peer_ht_info_buf to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-9-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h index 29e1206078fe..18dab893270f 100644 --- a/drivers/staging/rtl8192e/rtl819x_HT.h +++ b/drivers/staging/rtl8192e/rtl819x_HT.h @@ -100,7 +100,7 @@ struct rt_hi_throughput { enum ht_spec_ver peer_ht_spec_ver; struct h...
05ee6e2ffc959af78155367c7f3256b690e95693
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable PeerHTCapBuf
Problem Details: Rename variable PeerHTCapBuf to peer_ht_cap_buf to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-8-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h index 68577bffb936..29e1206078fe 100644 --- a/drivers/staging/rtl8192e/rtl819x_HT.h +++ b/drivers/staging/rtl8192e/rtl819x_HT.h @@ -99,7 +99,7 @@ struct rt_hi_throughput { u8 cur_short_gi_20mhz; enum ht_spec_ver peer_...
e51e94692d5952dc24f16831a3a6c4363c703ea0
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename function MgntQuery_TxRateExcludeCCKRates()
Problem Details: Rename function MgntQuery_TxRateExcludeCCKRates to mgnt_query_tx_rate_exclude_cck_rates to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gre...
```diff diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index cd45a9c46a94..c380d1c3e9b6 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1821,6 +1821,6 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, void rtllib_indicate_packets(s...
583b7e3b93f584549379c2e204181fbb92fabdc9
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename function pointer SetHwRegHandler()
Problem Details: Rename function pointer SetHwRegHandler to set_hw_reg_handler to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 9b9d95ba06df..4cd3d7b7c31c 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -164,7 +164,7 @@ void rtl92e_set_reg(struct net_device...
6b7a8b468befd36890e6d333c85d200c610f8121
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable LPSDelayCnt
Problem Details: Rename variable LPSDelayCnt to lps_delay_cnt to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 32acba4ce3f7..a527d7f61eef 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -705,7 +705,7 @@ static void _rtl92e_init_priv_variable(struct...
808f35c4e635e54c4b3e205cb5b54bd1ed47cdc9
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable LPSAwakeIntvl_tmp
Problem Details: Rename variable LPSAwakeIntvl_tmp to lps_awake_intvl_tmp to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index cf855ba39c10..8a60bf3b7079 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1390,33 +1390,33 @@ static short rtllib_sta_ps_sleep(struct rtllib_device...
a372b8023741783d7753b8993538084b033a45ac
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename function rtllib_rx_ADDBARsp()
Problem Details: Rename function rtllib_rx_ADDBARsp to rtllib_rx_add_ba_rsp to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c index ee9ce392155c..da7319c124e7 100644 --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c @@ -300,7 +300,7 @@ OnADDBAReq_Fail: } } -int rtllib_rx_ADDBARsp(struct ...
dfc5660b2438e2c89c43b8cb4303531a05cc3d49
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Rename variable FirstIe_InScan
Problem Details: Rename variable FirstIe_InScan to first_ie_in_scan to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240126223106.986093-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index 5fd44d0c4b1d..d131ef525f46 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -269,7 +269,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev...
ca2f16c315683d9922445b59a738f6e4c168d54d
Analyze and fix the following issue in the Linux kernel code: Add 10EC5280 to bmi160_i2c ACPI IDs to allow binding on some devices
Problem Details: "10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and probably others) in their ACPI table as the ID for the bmi160 IMU. This means the bmi160_i2c driver won't bind to it, and the IMU is unavailable to the user. Manufacturers have been approached on several occasions to try getting ...
```diff diff --git a/drivers/iio/imu/bmi160/bmi160_i2c.c b/drivers/iio/imu/bmi160/bmi160_i2c.c index 81652c08e644..a081305254db 100644 --- a/drivers/iio/imu/bmi160/bmi160_i2c.c +++ b/drivers/iio/imu/bmi160/bmi160_i2c.c @@ -43,6 +43,15 @@ static const struct i2c_device_id bmi160_i2c_id[] = { MODULE_DEVICE_TABLE(i2c, bm...
680ce1d3a3dc63234406231c1f7c40e4f8ed0878
Analyze and fix the following issue in the Linux kernel code: iio: dummy_evgen: remove Excess kernel-doc comments
Problem Details: Drop kernel-doc comments for struct fields that were removed to prevent kernel-doc warnings: iio_dummy_evgen.c:43: warning: Excess struct member 'irq_sim' description in 'iio_dummy_eventgen' iio_dummy_evgen.c:43: warning: Excess struct member 'base' description in 'iio_dummy_eventgen' Fixes: 337cbeb2...
```diff diff --git a/drivers/iio/dummy/iio_dummy_evgen.c b/drivers/iio/dummy/iio_dummy_evgen.c index 5a0072727ba4..16d3f144dda0 100644 --- a/drivers/iio/dummy/iio_dummy_evgen.c +++ b/drivers/iio/dummy/iio_dummy_evgen.c @@ -31,8 +31,6 @@ * @regs: irq regs we are faking * @lock: protect the evgen state * @inuse: ma...
9a270ec7bfb0b928ff7c11a4b1f8a026cd20e6b4
Analyze and fix the following issue in the Linux kernel code: usb: roles: Link the switch to its connector
Problem Details: This is probable useful information to have in user space in general, but it's primarily needed for the xHCI DbC (Debug Capability). When xHCI DbC is being used, the USB port needs to be muxed to the xHCI even in device role. In xHCI DbC mode, the xHCI is the USB device controller. Tested-by: Uday Bha...
```diff diff --git a/Documentation/ABI/testing/sysfs-class-usb_role b/Documentation/ABI/testing/sysfs-class-usb_role index 3b810a425a52..9fab3f06679e 100644 --- a/Documentation/ABI/testing/sysfs-class-usb_role +++ b/Documentation/ABI/testing/sysfs-class-usb_role @@ -19,3 +19,9 @@ Description: - none - host - d...
b65bdf7fd605ebd652a8d44304bafe753f44f160
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: Fix an IS_ERR() vs NULL check in dwc3_power_off_all_roothub_ports()
Problem Details: The ioremap() function doesn't return error pointers, it returns NULL on error. Update the check. Fixes: 2d2a3349521d ("usb: dwc3: Add workaround for host mode VBUS glitch when boot") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: http...
```diff diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index ae189b7a4f8b..4e6239d3a0ac 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -35,7 +35,7 @@ static void dwc3_power_off_all_roothub_ports(struct dwc3 *dwc) /* xhci regs is not mapped yet, do it temperary here */ if (dwc-...
e30e9ad9ed66c049f32ab2ffe38f0b576bebdd2c
Analyze and fix the following issue in the Linux kernel code: xhci: update event ring dequeue pointer position to controller correctly
Problem Details: The event ring dequeue pointer field (ERDP) in xHC hardware is used to inform controller how far the driver has processed events on the event ring. In the case all events are handled and event ring is empty then the address of the TRB after the last processed one should be written. This TRB is both th...
```diff diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 1136c6170b1a..62bde16f435e 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -3016,9 +3016,6 @@ static int xhci_handle_event(struct xhci_hcd *xhci, struct xhci_interrupter *ir) return 0; } - /* Up...
2444a80c1cc2c4240f60f2162abef3797c1803de
Analyze and fix the following issue in the Linux kernel code: kobject: make uevent_seqnum atomic
Problem Details: We will soon no longer acquire uevent_sock_mutex for most kobject_uevent_net_broadcast() calls, and also while calling uevent_net_broadcast(). Make uevent_seqnum an atomic64_t to get its own protection. This fixes a race while reading /sys/kernel/uevent_seqnum. Signed-off-by: Eric Dumazet <edumazet@...
```diff diff --git a/include/linux/kobject.h b/include/linux/kobject.h index c30affcc43b4..c8219505a79f 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -38,7 +38,7 @@ extern char uevent_helper[]; #endif /* counter to tag the uevent, read only except for the kobject core */ -extern u64 uevent_s...
5928d411557ec5d53832cdd39fc443704a3e5b77
Analyze and fix the following issue in the Linux kernel code: Documentation: Document the Linux Kernel CVE process
Problem Details: The Linux kernel project now has the ability to assign CVEs to fixed issues, so document the process and how individual developers can get a CVE if one is not automatically assigned for their fixes. Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Konstantin Ryabitsev <konstantin@linuxfound...
```diff diff --git a/Documentation/process/cve.rst b/Documentation/process/cve.rst new file mode 100644 index 000000000000..5e2753eff729 --- /dev/null +++ b/Documentation/process/cve.rst @@ -0,0 +1,121 @@ +==== +CVEs +==== + +Common Vulnerabilities and Exposure (CVE®) numbers were developed as an +unambiguous way to id...
9704669c386f9bbfef2e002e7e690c56b7dcf5de
Analyze and fix the following issue in the Linux kernel code: tracing/probes: Fix to search structure fields correctly
Problem Details: Fix to search a field from the structure which has anonymous union correctly. Since the reference `type` pointer was updated in the loop, the search loop suddenly aborted where it hits an anonymous union. Thus it can not find the field after the anonymous union. This avoids updating the cursor `type` p...
```diff diff --git a/kernel/trace/trace_btf.c b/kernel/trace/trace_btf.c index ca224d53bfdc..5bbdbcbbde3c 100644 --- a/kernel/trace/trace_btf.c +++ b/kernel/trace/trace_btf.c @@ -91,8 +91,8 @@ retry: for_each_member(i, type, member) { if (!member->name_off) { /* Anonymous union/struct: push it for later use */...
0cab687205986491302cd2e440ef1d253031c221
Analyze and fix the following issue in the Linux kernel code: cxl/pci: Fix disabling memory if DVSEC CXL Range does not match a CFMWS window
Problem Details: The Linux CXL subsystem is built on the assumption that HPA == SPA. That is, the host physical address (HPA) the HDM decoder registers are programmed with are system physical addresses (SPA). During HDM decoder setup, the DVSEC CXL range registers (cxl-3.1, 8.1.3.8) are checked if the memory is enable...
```diff diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c index 480489f5644e..e9e6c81ce034 100644 --- a/drivers/cxl/core/pci.c +++ b/drivers/cxl/core/pci.c @@ -477,9 +477,9 @@ int cxl_hdm_decode_init(struct cxl_dev_state *cxlds, struct cxl_hdm *cxlhdm, allowed++; } - if (!allowed) { - cxl_set_mem_ena...
cc214417f06f6b0a8f6da09220c8bcdb742210b9
Analyze and fix the following issue in the Linux kernel code: cxl: Fix sysfs export of qos_class for memdev
Problem Details: Current implementation exports only to /sys/bus/cxl/devices/.../memN/qos_class. With both ram and pmem exposed, the second registered sysfs attribute is rejected as duplicate. It's not possible to create qos_class under the dev_groups via the driver due to the ram and pmem sysfs sub-directories already...
```diff diff --git a/drivers/cxl/core/cdat.c b/drivers/cxl/core/cdat.c index ecbd209ca70a..08fd0baea7a0 100644 --- a/drivers/cxl/core/cdat.c +++ b/drivers/cxl/core/cdat.c @@ -382,6 +382,7 @@ void cxl_endpoint_parse_cdat(struct cxl_port *port) cxl_memdev_set_qos_class(cxlds, dsmas_xa); cxl_qos_class_verify(cxlmd);...
b626070ffc14acca5b87a2aa5f581db98617584c
Analyze and fix the following issue in the Linux kernel code: x86/numa: Fix the sort compare func used in numa_fill_memblks()
Problem Details: The compare function used to sort memblks into starting address order fails when the result of its u64 address subtraction gets truncated to an int upon return. The impact of the bad sort is that memblks will be filled out incorrectly. Depending on the set of memblks, a user may see no errors at all b...
```diff diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 8ada9bbfad58..65e9a6e391c0 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -934,7 +934,7 @@ static int __init cmp_memblk(const void *a, const void *b) const struct numa_memblk *ma = *(const struct numa_memblk **)a; const struct numa_memb...
9b99c17f7510bed2adbe17751fb8abddba5620bc
Analyze and fix the following issue in the Linux kernel code: x86/numa: Fix the address overlap check in numa_fill_memblks()
Problem Details: numa_fill_memblks() fills in the gaps in numa_meminfo memblks over a physical address range. To do so, it first creates a list of existing memblks that overlap that address range. The issue is that it is off by one when comparing to the end of the address range, so memblks that do not overlap are selec...
```diff diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index adc497b93f03..8ada9bbfad58 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -944,14 +944,12 @@ static struct numa_memblk *numa_memblk_list[NR_NODE_MEMBLKS] __initdata; * @start: address to begin fill * @end: address to end fill * - * Fi...
e4c3b72a6ea93ed9c1815c74312eee9305638852
Analyze and fix the following issue in the Linux kernel code: xfs: ensure submit buffers on LSN boundaries in error handlers
Problem Details: While performing the IO fault injection test, I caught the following data corruption report: XFS (dm-0): Internal error ltbno + ltlen > bno at line 1957 of file fs/xfs/libxfs/xfs_alloc.c. Caller xfs_free_ag_extent+0x79c/0x1130 CPU: 3 PID: 33 Comm: kworker/3:0 Not tainted 6.5.0-rc7-next-20230825-000...
```diff diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 8c1d260bb9e1..cd134830a695 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -3204,11 +3204,28 @@ xlog_do_recovery_pass( kvfree(hbp); /* - * Submit buffers that have been added from the last record processed, - ...
1149314a16f7972743c66988b2ac19767009325e
Analyze and fix the following issue in the Linux kernel code: xfs: disable sparse inode chunk alignment check when there is no alignment
Problem Details: While testing a 64k-blocksize filesystem, I noticed that xfs/709 fails to rebuild the inode btree with a bunch of "Corruption remains" messages. It turns out that when the inode chunk size is smaller than a single filesystem block, no block alignments constraints are necessary for inode chunk allocati...
```diff diff --git a/fs/xfs/scrub/ialloc_repair.c b/fs/xfs/scrub/ialloc_repair.c index b3f7182dd2f5..e94f10800082 100644 --- a/fs/xfs/scrub/ialloc_repair.c +++ b/fs/xfs/scrub/ialloc_repair.c @@ -369,7 +369,7 @@ xrep_ibt_check_inode_ext( * On a sparse inode fs, this cluster could be part of a sparse chunk. * Spars...
7d42e097607c4d246d99225bf2b195b6167a210c
Analyze and fix the following issue in the Linux kernel code: crypto: qat - resolve race condition during AER recovery
Problem Details: During the PCI AER system's error recovery process, the kernel driver may encounter a race condition with freeing the reset_data structure's memory. If the device restart will take more than 10 seconds the function scheduling that restart will exit due to a timeout, and the reset_data structure will be...
```diff diff --git a/drivers/crypto/intel/qat/qat_common/adf_aer.c b/drivers/crypto/intel/qat/qat_common/adf_aer.c index 3597e7605a14..9da2278bd5b7 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_aer.c +++ b/drivers/crypto/intel/qat/qat_common/adf_aer.c @@ -130,7 +130,8 @@ static void adf_device_reset_worker(struc...
c2304e1a0b8051a60d4eb9c99a1c509d90380ae5
Analyze and fix the following issue in the Linux kernel code: crypto: qat - change SLAs cleanup flow at shutdown
Problem Details: The implementation of the Rate Limiting (RL) feature includes the cleanup of all SLAs during device shutdown. For each SLA, the firmware is notified of the removal through an admin message, the data structures that take into account the budgets are updated and the memory is freed. However, this explici...
```diff diff --git a/drivers/crypto/intel/qat/qat_common/adf_rl.c b/drivers/crypto/intel/qat/qat_common/adf_rl.c index de1b214dba1f..d4f2db3c53d8 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_rl.c +++ b/drivers/crypto/intel/qat/qat_common/adf_rl.c @@ -788,6 +788,24 @@ static void clear_sla(struct adf_rl *rl_data...
910c57dfa4d113aae6571c2a8b9ae8c430975902
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Mark target gfn of emulated atomic instruction as dirty
Problem Details: When emulating an atomic access on behalf of the guest, mark the target gfn dirty if the CMPXCHG by KVM is attempted and doesn't fault. This fixes a bug where KVM effectively corrupts guest memory during live migration by writing to guest memory without informing userspace that the page is dirty. Mar...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 48a61d283406..e4270eaa33df 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -8007,6 +8007,16 @@ static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt, if (r < 0) return X86EMUL_UNHANDLEABLE; + + /* + * Mark the page dirty...
bacefe0c7b77b7527a613e053b6d378412a8a779
Analyze and fix the following issue in the Linux kernel code: perf tools: Fixup module symbol end address properly
Problem Details: I got a strange error on ARM to fail on processing FINISHED_ROUND record. It turned out that it was failing in symbol__alloc_hist() because the symbol size is too big. When a sample is captured on a specific BPF program, it failed. I've added a debug code and found the end address of the symbol is f...
```diff diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 35975189999b..9ebdb8e13c0b 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -248,14 +248,31 @@ void symbols__fixup_end(struct rb_root_cached *symbols, bool is_kallsyms) * segment is very big. Therefore do not fill...
3aff0c459e77ac0fb1c4d6884433467f797f7357
Analyze and fix the following issue in the Linux kernel code: RISC-V: Drop invalid test from CONFIG_AS_HAS_OPTION_ARCH
Problem Details: Commit e4bb020f3dbb ("riscv: detect assembler support for .option arch") added two tests, one for a valid value to '.option arch' that should succeed and one for an invalid value that is expected to fail to make sure that support for '.option arch' is properly detected because Clang does not error when...
```diff diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index bffbd869a068..e3142ce531a0 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -315,7 +315,6 @@ config AS_HAS_OPTION_ARCH # https://reviews.llvm.org/D123515 def_bool y depends on $(as-instr, .option arch$(comma) +m) - depends on !$(as-inst...
0ee695a471a750cad4fff22286d91e038b1ef62f
Analyze and fix the following issue in the Linux kernel code: kbuild: Add -Wa,--fatal-warnings to as-instr invocation
Problem Details: Certain assembler instruction tests may only induce warnings from the assembler on an unsupported instruction or option, which causes as-instr to succeed when it was expected to fail. Some tests workaround this limitation by additionally testing that invalid input fails as expected. However, this is fr...
```diff diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include index 5a84b6443875..3ee8ecfb8c04 100644 --- a/scripts/Kconfig.include +++ b/scripts/Kconfig.include @@ -33,7 +33,7 @@ ld-option = $(success,$(LD) -v $(1)) # $(as-instr,<instr>) # Return y if the assembler supports <instr>, n otherwise -as-instr ...
c83ccdc9586b3e9882da9e27507c046751999d59
Analyze and fix the following issue in the Linux kernel code: counter: fix privdata alignment
Problem Details: Aligning to the L1 cache does not guarantee the same alignment as kmallocing an object [1]. Furthermore, in some platforms, that alignment is not sufficient for DMA safety (in case someone wants to have a DMA safe buffer in privdata) [2]. Sometime ago, we had the same fixes in IIO. [1]: https://git.k...
```diff diff --git a/drivers/counter/counter-core.c b/drivers/counter/counter-core.c index 09c77afb33ca..3f24481fc04a 100644 --- a/drivers/counter/counter-core.c +++ b/drivers/counter/counter-core.c @@ -31,10 +31,11 @@ struct counter_device_allochelper { struct counter_device counter; /* - * This is cache line a...
c4bb31c7b05132e8aed99b267e262da1859a6805
Analyze and fix the following issue in the Linux kernel code: perf vendor events intel: Update tigerlake events to v1.15
Problem Details: Update alderlake events to v1.15 released in: https://github.com/intel/perfmon/commit/282a6951fd9f025cff6c8c0ea16b1fcec786a4cd Documentation fixes, removal of TOPDOWN.BR_MISPREDICT_SLOTS, deprecation of UNC_ARB_DAT_REQUESTS.RD, UNC_ARB_DAT_REQUESTS.RD and UNC_ARB_IFA_OCCUPANCY.ALL. Event json automat...
```diff diff --git a/tools/perf/pmu-events/arch/x86/mapfile.csv b/tools/perf/pmu-events/arch/x86/mapfile.csv index 96b86d3b60ce..5297d25f4e03 100644 --- a/tools/perf/pmu-events/arch/x86/mapfile.csv +++ b/tools/perf/pmu-events/arch/x86/mapfile.csv @@ -32,7 +32,7 @@ GenuineIntel-6-(37|4A|4C|4D|5A),v15,silvermont,core Ge...
2252ddf4343caf7271d5e2e438c44c9d7590e35f
Analyze and fix the following issue in the Linux kernel code: perf vendor events intel: Update alderlake events to v1.24
Problem Details: Update alderlake events to v1.24 released in: https://github.com/intel/perfmon/commit/e627dd8d89e2d2110f1d499608dd6f37aae37a8c Adds aliased events, improves documentation and fix some event fields. Event json automatically generated by: https://github.com/intel/perfmon/blob/main/scripts/create_perf_j...
```diff diff --git a/tools/perf/pmu-events/arch/x86/alderlake/floating-point.json b/tools/perf/pmu-events/arch/x86/alderlake/floating-point.json index c8ba96c4a7f8..cd291943dc08 100644 --- a/tools/perf/pmu-events/arch/x86/alderlake/floating-point.json +++ b/tools/perf/pmu-events/arch/x86/alderlake/floating-point.json @...
2df70149e73e79783bcbc7db4fa51ecef0e2022c
Analyze and fix the following issue in the Linux kernel code: power: supply: bq27xxx-i2c: Do not free non existing IRQ
Problem Details: The bq27xxx i2c-client may not have an IRQ, in which case client->irq will be 0. bq27xxx_battery_i2c_probe() already has an if (client->irq) check wrapping the request_threaded_irq(). But bq27xxx_battery_i2c_remove() unconditionally calls free_irq(client->irq) leading to: [ 190.310742] ------------[...
```diff diff --git a/drivers/power/supply/bq27xxx_battery_i2c.c b/drivers/power/supply/bq27xxx_battery_i2c.c index 3a1798b0c1a7..9910c600743e 100644 --- a/drivers/power/supply/bq27xxx_battery_i2c.c +++ b/drivers/power/supply/bq27xxx_battery_i2c.c @@ -209,7 +209,9 @@ static void bq27xxx_battery_i2c_remove(struct i2c_cli...
9de552935b6ceaa113d205232fde70e5345bdf29
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: add prefix for admatec GmbH
Problem Details: admatec GmbH is a german supplier for industrial displays. Link: https://www.admatec.de/ Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240215090442.3513760-1-heiko@sntech.de
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 1a0dc04f1db4..fef2e12b504e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -61,6 +61,8 @@ pattern...
2bb2ad58f6b711edb94fa43e5ac65323532fde95
Analyze and fix the following issue in the Linux kernel code: drm/amd: Change `jpeg_v4_0_5_start_dpg_mode()` to void
Problem Details: jpeg_v4_0_5_start_dpg_mode() always returns 0 and the return value doesn't get used in the caller jpeg_v4_0_5_start(). Modify the function to be void. Reported-by: coverity-bot <keescook+coverity-bot@chromium.org> Addresses-Coverity-ID: 1583635 ("Code maintainability issues") Fixes: 0a119d53f74a ("drm...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c index 3602738874ee..8d1754e35605 100644 --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c @@ -358,7 +358,7 @@ static int jpeg_v4_0_5_enable_static_power_gating(struct amdg...
f6aed043ee5d75b3d1bfc452b1a9584b63c8f76b
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add 'replay' NULL check in 'edp_set_replay_allow_active()'
Problem Details: In the first if statement, we're checking if 'replay' is NULL. But in the second if statement, we're not checking if 'replay' is NULL again before calling replay->funcs->replay_set_power_opt(). if (replay == NULL && force_static) return false; ... if (link->replay_settings.replay_feature_enabled...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c index 443215b96308..acfbbc638cc6 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +++ b/drivers/gpu/drm/amd/display/dc/l...
6f18d7ad9dba48261d34bfd3854d6924eaebb3ef
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix missing parameter descriptions in ih_v7_0.c
Problem Details: Rectifies kdoc warnings related to the 'ih' parameter in the 'ih_v7_0_get_wptr', 'ih_v7_0_irq_rearm', and 'ih_v7_0_set_rptr' functions within the 'ih_v7_0.c' file. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/ih_v7_0.c:392: warning: Function parameter or member 'ih' not described in 'ih_v7...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c index 236806797b23..16fe428c0722 100644 --- a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c @@ -378,9 +378,10 @@ static void ih_v7_0_irq_disable(struct amdgpu_device *adev) } /** - * ih...
dc84f52eb26ddffc345d9c1e1d660df179b77371
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/nbio: Add NBIO 7.11.1 Support
Problem Details: Fix up doorbell setup and clockgating. v2: squash in fixes (Alex) Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com> Signed-off-by: Lang Yu <Lang.Yu@amd.com> Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c index 1f52b4b1db03..05020141c0ae 100644 --- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c @@ -89,7 +89,9 @@ static void nbio_v7_11_vpe_doorbell_range(struct amdgpu_device *ade...
79863ddee8eb5969c1bcaf0d41dd886ba6166c2e
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: 3.2.272
Problem Details: Summary: * Revert some changes related to pixel encoding and clocks that cause corruption * IPS hang fix and FGCG enable by default for DCN35 * PSR-SU/Replay fixes * Plane clip size change treated as medium update * Fix for checking link alignment done during link training. * HDMI compliance test fi...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 181144541657..9b42f6fc8c69 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -51,7 +51,7 @@ struct aux_payload; struct set_config_cmd_payload; struct dmub_notification; -#...
6f04d664a9fa191e97b54a19f95f2db140554662
Analyze and fix the following issue in the Linux kernel code: perf test: Enable Symbols test to work with a current module dso
Problem Details: The test needs a struct machine and creates one for the current host, but a side-effect is that struct machine has set up kernel maps including module maps. If the 'Symbols' test --dso option specifies a current kernel module, it will already be present as a kernel dso, and a map with kmaps needs to b...
```diff diff --git a/tools/perf/tests/symbols.c b/tools/perf/tests/symbols.c index 16e1c5502b09..2fed6d67f50f 100644 --- a/tools/perf/tests/symbols.c +++ b/tools/perf/tests/symbols.c @@ -41,6 +41,30 @@ static void exit_test_info(struct test_info *ti) machine__delete(ti->machine); } +struct dso_map { + struct dso *...
d1909c0221739356f31c721de4743e7d219a56cc
Analyze and fix the following issue in the Linux kernel code: module: Don't ignore errors from set_memory_XX()
Problem Details: set_memory_ro(), set_memory_nx(), set_memory_x() and other helpers can fail and return an error. In that case the memory might not be protected as expected and the module loading has to be aborted to avoid security issues. Check return value of all calls to set_memory_XX() and handle error if any. Ad...
```diff diff --git a/kernel/module/internal.h b/kernel/module/internal.h index 4f1b98f011da..2ebece8a789f 100644 --- a/kernel/module/internal.h +++ b/kernel/module/internal.h @@ -322,9 +322,9 @@ static inline struct module *mod_find(unsigned long addr, struct mod_tree_root * } #endif /* CONFIG_MODULES_TREE_LOOKUP */ ...