id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f85c69369854a43af2c5d3b3896da0908d713133
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: enable PVT for 6321 switch
Problem Details: Commit f36456522168 ("net: dsa: mv88e6xxx: move PVT description in info") did not enable PVT for 6321 switch. Fix it. Fixes: f36456522168 ("net: dsa: mv88e6xxx: move PVT description in info") Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.ms...
```diff diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index b989123cdbeb..3cddc8f084b3 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -6274,6 +6274,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .g2_irqs = 10, .stats_type =...
4ae01ec007716986e1a20f1285eb013cbf188830
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family
Problem Details: The atu_move_port_mask for 6341 family (Topaz) is 0xf, not 0x1f. The PortVec field is 8 bits wide, not 11 as in 6390 family. Fix this. Fixes: e606ca36bbf2 ("net: dsa: mv88e6xxx: rework ATU Remove") Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://pa...
```diff diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 06b17c3b2205..b989123cdbeb 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -5818,7 +5818,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .global1_addr = 0x1b, .globa...
f9a457722cf5e3534be5ffab549d6b49737fca72
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: fix VTU methods for 6320 family
Problem Details: The VTU registers of the 6320 family use the 6352 semantics, not 6185. Fix it. Fixes: b8fee9571063 ("net: dsa: mv88e6xxx: add VLAN Get Next support") Signed-off-by: Marek Behún <kabel@kernel.org> Cc: <stable@vger.kernel.org> # 5.15.x Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid....
```diff diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 5db96ca52505..06b17c3b2205 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -5169,8 +5169,8 @@ static const struct mv88e6xxx_ops mv88e6320_ops = { .hardware_reset_pre = mv88e6xxx_g2_ee...
46367f09b2203f7c63f89293aea9279b875d0ff2
Analyze and fix the following issue in the Linux kernel code: ARM: davinci: always enable CONFIG_ARCH_DAVINCI_DA850
Problem Details: A change to the clk driver broke configurations that enable DA830 but not DA850: arm-linux-gnueabi-ld: drivers/clk/davinci/pll.o: in function `__da850_pll0_of_clk_init_declare': pll.c:(.init.text+0x30): undefined reference to `of_da850_pll0_init' arm-linux-gnueabi-ld: drivers/clk/davinci/pll.o:(.rodat...
```diff diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 2a8a9fe46586..b0b9739b53e1 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -4,6 +4,7 @@ menuconfig ARCH_DAVINCI bool "TI DaVinci" depends on ARCH_MULTI_V5 depends on CPU_LITTLE_ENDIAN + selec...
b91e82129400bdc40ee1232aa7e32ae6027f9b4f
Analyze and fix the following issue in the Linux kernel code: bnxt_en: Linearize TX SKB if the fragments exceed the max
Problem Details: If skb_shinfo(skb)->nr_frags excceds what the chip can support, linearize the SKB and warn once to let the user know. net.core.max_skb_frags can be lowered, for example, to avoid the issue. Fixes: 3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS") Reviewed-by: Somnath Kotur <somnat...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 158e9789c1f4..2cd79b59cf00 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -485,6 +485,17 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, ...
107b25db61122d8f990987895c2912927b8b6e3f
Analyze and fix the following issue in the Linux kernel code: bnxt_en: Mask the bd_cnt field in the TX BD properly
Problem Details: The bd_cnt field in the TX BD specifies the total number of BDs for the TX packet. The bd_cnt field has 5 bits and the maximum number supported is 32 with the value 0. CONFIG_MAX_SKB_FRAGS can be modified and the total number of SKB fragments can approach or exceed the maximum supported by the chip. ...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 0ddc3d41e2d8..158e9789c1f4 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -564,7 +564,7 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, s...
8eb1518642738c6892bd629b46043513a3bf1a6a
Analyze and fix the following issue in the Linux kernel code: tracing: Do not use PERF enums when perf is not defined
Problem Details: An update was made to up the module ref count when a synthetic event is registered for both trace and perf events. But if perf is not configured in, the perf enums used will cause the kernel to fail to build. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios....
```diff diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c index 463b0073629a..a5c5f34c207a 100644 --- a/kernel/trace/trace_events_synth.c +++ b/kernel/trace/trace_events_synth.c @@ -858,8 +858,10 @@ static int synth_event_reg(struct trace_event_call *call, struct synth_event *event = ...
216d567610f03b0c6efba3fc452797e09d9503e9
Analyze and fix the following issue in the Linux kernel code: perf trace: Fix wrong size to bpf_map__update_elem call
Problem Details: In linux-next commit c760174401f6 ("perf cpumap: Reduce cpu size from int to int16_t") causes the perf tests 100 126 to fail on s390: Output before: # ./perf test 100 100: perf trace BTF general tests : FAILED! # The root cause is the change from int to int16_t for the cpu maps. The size o...
```diff diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index a102748bd0c9..6ac51925ea42 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -4476,10 +4476,12 @@ static int trace__run(struct trace *trace, int argc, const char **argv) * CPU the bpf-output event's file des...
cac48eb6d383ee4f037e320608efa5dec029e26a
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Use right API to free bitmap memory
Problem Details: Use bitmap_free() to free memory allocated with bitmap_zalloc_node(). This fixes memtrack error: mtl rsc inconsistency: memtrack_free: .../drivers/net/ethernet/mellanox/mlx5/core/en_main.c::466: kfree for unknown address=0xFFFF0000CA3619E8, device=0x0 Signed-off-by: Mark Zhang <markzhang@nvidia.com>...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 2edc61328749..3506024c2453 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -359,7 +359,7 @@ static int mlx5e_rq_shamp...
42cd8dee3a1bcee888745acf45b7218f0d0f70cc
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Remove NULL check before dev_{put, hold}
Problem Details: Fix coccinelle warnings: WARNING: NULL check before dev_{put, hold} functions is not needed. Signed-off-by: Gal Pressman <gal@nvidia.com> Reviewed-by: Jianbo Liu <jianbol@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: http...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c index 721f35e59757..2162d776fe35 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c @@ -31,8 +31,7 @@ static void mlx5e_t...
3865bec60683b86d39a5d8d6c34a1d269adaa84c
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Fix ethtool -N flow-type ip4 to RSS context
Problem Details: There commands can be used to add an RSS context and steer some traffic into it: # ethtool -X eth0 context new New RSS context is 1 # ethtool -N eth0 flow-type ip4 dst-ip 1.1.1.1 context 1 Added rule with ID 1023 However, the second command fails with EINVAL on mlx5e: # ethtool -...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c index 773624bb2c5d..d68230a7b9f4 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c @@ -884,8 +884,10 @@ ...
6df401a2ee4a91f4fd1095507d6f461f1082d814
Analyze and fix the following issue in the Linux kernel code: ipe: policy_fs: fix kernel-doc warnings
Problem Details: Use the "struct" keyword in kernel-doc when describing struct ipefs_file. Add kernel-doc for the struct members also. Don't use kernel-doc notation for 'policy_subdir'. kernel-doc does not support documentation comments for data definitions. This eliminates multiple kernel-doc warnings: security/ipe...
```diff diff --git a/security/ipe/policy_fs.c b/security/ipe/policy_fs.c index 3bcd8cbd09df..4cb4dd7f5236 100644 --- a/security/ipe/policy_fs.c +++ b/security/ipe/policy_fs.c @@ -16,7 +16,11 @@ #define MAX_VERSION_SIZE ARRAY_SIZE("65535.65535.65535") /** - * ipefs_file - defines a file in securityfs. + * struct ipe...
53cd6820f5a05dd7f982f7da85af7d185b3e4992
Analyze and fix the following issue in the Linux kernel code: net: stmmac: Call xpcs_config_eee_mult_fact() only when xpcs is present
Problem Details: Some dwmac variants such as dwmac_socfpga don't use xpcs but lynx_pcs. Don't call xpcs_config_eee_mult_fact() in this case, as this causes a crash at init : Unable to handle kernel NULL pointer dereference at virtual address 00000039 when write [...] Call trace: xpcs_config_eee_mult_fact from ...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index 7c0a4046bbe3..836f2848dfeb 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -524,7 +524,8 @@ int stmmac_pcs_setup(stru...
01a1e9d6a0077d17e737fbc0681d567dbdb3029e
Analyze and fix the following issue in the Linux kernel code: dt-bindings: PCI: Add common schema for devices accessible through PCI BARs
Problem Details: Common YAML schema for devices that exports internal peripherals through PCI BARs. The BARs are exposed as simple-buses through which the peripherals can be accessed. This is not intended to be used as a standalone binding, but should be included by device specific bindings. Signed-off-by: Andrea del...
```diff diff --git a/Documentation/devicetree/bindings/pci/pci-ep-bus.yaml b/Documentation/devicetree/bindings/pci/pci-ep-bus.yaml new file mode 100644 index 000000000000..a2cd7905f5bf --- /dev/null +++ b/Documentation/devicetree/bindings/pci/pci-ep-bus.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR...
3b69e1d3815f376eae785a71705b5c2a621eaf19
Analyze and fix the following issue in the Linux kernel code: PCI: dwc: Add dw_pcie_parent_bus_offset() checking and debug
Problem Details: dw_pcie_parent_bus_offset() looks up the parent bus address of a PCI controller 'reg' property in devicetree. If implemented, .cpu_addr_fixup() is a hard-coded way to get the parent bus address corresponding to a CPU physical address. Add debug code to compare the address from .cpu_addr_fixup() with ...
```diff diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c index 27b464a405a4..4b442d1aa55b 100644 --- a/drivers/pci/controller/dwc/pcie-designware.c +++ b/drivers/pci/controller/dwc/pcie-designware.c @@ -1114,7 +1114,8 @@ resource_size_t dw_pcie_parent_bus_offset(s...
4f34c2b7798d0b2e77e7b8a2901d85f964a11c80
Analyze and fix the following issue in the Linux kernel code: docs/kcm: Fix typo "BFP"
Problem Details: 'BFP' should be 'BPF'. Signed-off-by: Ryohei Kinugawa <ryohei.kinugawa@gmail.com> Link: https://patch.msgid.link/20250318095154.4187952-1-ryohei.kinugawa@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/Documentation/networking/kcm.rst b/Documentation/networking/kcm.rst index db0f5560ac1c..71f44d0beaa3 100644 --- a/Documentation/networking/kcm.rst +++ b/Documentation/networking/kcm.rst @@ -200,7 +200,7 @@ while. Example use:: setsockopt(kcmfd, SOL_KCM, KCM_RECV_DISABLE, &val, sizeof(val)) -...
6d1929475e361ef4e1972da600dfa3cea060a184
Analyze and fix the following issue in the Linux kernel code: docs: networking: strparser: Fix a typo
Problem Details: The context indicates that 'than' is the correct word instead of 'then', as a comparison is being performed. Given that 'then' is also a valid English word, checkpatch.pl wouldn't have picked up on this spelling error. This typo was caught by AI during code review. Suggested-by: Wentao Guan <guanwen...
```diff diff --git a/Documentation/networking/strparser.rst b/Documentation/networking/strparser.rst index 7f623d1db72a..8dc6bb04c710 100644 --- a/Documentation/networking/strparser.rst +++ b/Documentation/networking/strparser.rst @@ -180,7 +180,7 @@ There are seven callbacks: struct contains two fields: offset an...
28bb48c4cb34f65a9aa602142e76e1426da31293
Analyze and fix the following issue in the Linux kernel code: rust: dma: add `Send` implementation for `CoherentAllocation`
Problem Details: Stephen found a future build failure in linux-next [1]: error[E0277]: `*mut MyStruct` cannot be sent between threads safely --> samples/rust/rust_dma.rs:47:22 | 47 | impl pci::Driver for DmaSampleDriver { | ^^^^^^^^^^^^^^^ `*mut MyStruct` cannot be sent...
```diff diff --git a/rust/kernel/dma.rs b/rust/kernel/dma.rs index 9d00f9c49f47..8cdc76043ee7 100644 --- a/rust/kernel/dma.rs +++ b/rust/kernel/dma.rs @@ -301,6 +301,10 @@ impl<T: AsBytes + FromBytes> Drop for CoherentAllocation<T> { } } +// SAFETY: It is safe to send a `CoherentAllocation` to another thread if...
f8e1bcec62efbce2c6acd116b1f4a82a8441ce11
Analyze and fix the following issue in the Linux kernel code: docs: fix the path of example code and example commands for device memory TCP
Problem Details: This updates the old path and fixes the description of unavailable options. Signed-off-by: Yui Washizu <yui.washidu@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Mina Almasry <almasrymina@google.com> Link: https://patch.msgid.link/20250318061251.775191-1-yui.washidu@gmail.com Si...
```diff diff --git a/Documentation/networking/devmem.rst b/Documentation/networking/devmem.rst index d95363645331..eb678ca45496 100644 --- a/Documentation/networking/devmem.rst +++ b/Documentation/networking/devmem.rst @@ -256,7 +256,7 @@ Testing ======= More realistic example code can be found in the kernel source...
81273eb87af86d4a43244b553762348e364b2df7
Analyze and fix the following issue in the Linux kernel code: gve: unlink old napi only if page pool exists
Problem Details: Commit de70981f295e ("gve: unlink old napi when stopping a queue using queue API") unlinks the old napi when stopping a queue. But this breaks QPL mode of the driver which does not use page pool. Fix this by checking that there's a page pool associated with the ring. Cc: stable@vger.kernel.org Fixes: ...
```diff diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c index f0674a443567..b5be2c18858a 100644 --- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c +++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c @@ -114,7 +114,8 @@ void gve_rx_stop_ring_dqo(struct gve_priv *pr...
c60d101a226f18e9a8f01bb4c6ca2b47dfcb15ef
Analyze and fix the following issue in the Linux kernel code: net: stmmac: Fix accessing freed irq affinity_hint
Problem Details: The cpumask should not be a local variable, since its pointer is saved to irq_desc and may be accessed from procfs. To fix it, use the persistent mask cpumask_of(cpu#). Cc: stable@vger.kernel.org Fixes: 8deec94c6040 ("net: stmmac: set IRQ affinity hint for multi MSI vectors") Signed-off-by: Qingfang D...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index c0ae7db96f46..b7c3bfdaa180 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3640,7 +3640,6 @@ static int stmmac_reque...
9de3f3cd470b25fafd150cf243e3a51e40b036ee
Analyze and fix the following issue in the Linux kernel code: PCI: dwc: Add dw_pcie_parent_bus_offset()
Problem Details: Return the offset from CPU physical address to the parent bus address of the specified element of the devicetree 'reg' property. [bhelgaas: cpu_phy_addr -> cpu_phys_addr, return offset, split .cpu_addr_fixup() checking and debug to separate patch] Link: https://lore.kernel.org/r/20250315201548.858189...
```diff diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c index 9d0a5f75effc..27b464a405a4 100644 --- a/drivers/pci/controller/dwc/pcie-designware.c +++ b/drivers/pci/controller/dwc/pcie-designware.c @@ -16,6 +16,7 @@ #include <linux/gpio/consumer.h> #include <li...
8fa649fd7d3009769c7289d0c31c319b72bc42c4
Analyze and fix the following issue in the Linux kernel code: net: phy: dp83822: fix transmit amplitude if CONFIG_OF_MDIO not defined
Problem Details: When CONFIG_OF_MDIO is not defined the index for selecting the transmit amplitude voltage for 100BASE-TX is set to 0, but it should be -1, if there is no need to modify the transmit amplitude voltage. Move initialization of the index from dp83822_of_init to dp8382x_probe. Fixes: 4f3735e82d8a ("net: ph...
```diff diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c index 3662f3905d5a..14f361549638 100644 --- a/drivers/net/phy/dp83822.c +++ b/drivers/net/phy/dp83822.c @@ -833,7 +833,6 @@ static int dp83822_of_init(struct phy_device *phydev) dp83822->set_gpio2_clk_out = true; } - dp83822->tx_amplitude...
d39e08b0893b579ba1fdee5713d011a4585517f7
Analyze and fix the following issue in the Linux kernel code: net: ena: resolve WARN_ON when freeing IRQs
Problem Details: When IRQs are freed, a WARN_ON is triggered as the affinity notifier is not released. This results in the below stack trace: [ 484.544586] ? __warn+0x84/0x130 [ 484.544843] ? free_irq+0x5c/0x70 [ 484.545105] ? report_bug+0x18a/0x1a0 [ 484.545390] ? handle_bug+0x53/0x90 [ 484.545664] ? exc_in...
```diff diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 6aab85a7c60a..70fa3adb4934 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -1716,8 +1716,12 @@ static void ena_free_io_irq(struct ena_ada...
9a352a90e88a041f4b26d359493e12a7f5ae1a6a
Analyze and fix the following issue in the Linux kernel code: perf tools: annotate asm_pure_loop.S
Problem Details: Annotate so it is built with non-executable stack. Fixes: 8b97519711c3 ("perf test: Add asm pureloop test tool") Signed-off-by: Marcus Meissner <meissner@suse.de> Reviewed-by: Leo Yan <leo.yan@arm.com> Link: https://lore.kernel.org/r/20250323085410.23751-1-meissner@suse.de Signed-off-by: Namhyung Kim ...
```diff diff --git a/tools/perf/tests/shell/coresight/asm_pure_loop/asm_pure_loop.S b/tools/perf/tests/shell/coresight/asm_pure_loop/asm_pure_loop.S index 75cf084a927d..577760046772 100644 --- a/tools/perf/tests/shell/coresight/asm_pure_loop/asm_pure_loop.S +++ b/tools/perf/tests/shell/coresight/asm_pure_loop/asm_pure_...
ba3b0861edc5ec7754872ce7426d86642fd4d44a
Analyze and fix the following issue in the Linux kernel code: perf python: Fix setup.py mypy errors
Problem Details: getenv may return None, so assert it isn't None for CC and srctree environmental variables required for the script. Disable an optional warning related to Popen. Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250311213...
```diff diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index 649550e9b7aa..dd289d15acfd 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py @@ -3,6 +3,7 @@ from subprocess import Popen, PIPE from re import sub cc = getenv("CC") +assert cc, "Environment variable CC not set" # Ch...
6bb0dcb3d321c14be7ca33b71a149034d6a2cde8
Analyze and fix the following issue in the Linux kernel code: net: openvswitch: fix kernel-doc warnings in internal headers
Problem Details: Some field descriptions were missing, some were not very accurate. Not touching the uAPI header or .c files for now. Formatting of those comments isn't great in general, but at least they are not missing anything now. Before: $ ./scripts/kernel-doc -none -Wall net/openvswitch/*.h 2>&1 | wc -l 16 ...
```diff diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h index 9ca6231ea647..384ca77f4e79 100644 --- a/net/openvswitch/datapath.h +++ b/net/openvswitch/datapath.h @@ -29,8 +29,8 @@ * datapath. * @n_hit: Number of received packets for which a matching flow was found in * the flow table. - * @n_...
ca1914a32cdcad26c4b003df743fe4f9e4bb2877
Analyze and fix the following issue in the Linux kernel code: net: phy: phy_interface_t: Fix RGMII_TXID code comment
Problem Details: Fix copy-paste error in the code comment for Interface Mode definitions. The code refers to Internal TX delay, not Internal RX delay. It was likely copied from the line above this one. Signed-off-by: Ihor Matushchak <ihor.matushchak@foobox.net> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.o...
```diff diff --git a/include/linux/phy.h b/include/linux/phy.h index 60d3b8860ea2..bfdbdc538910 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -81,7 +81,7 @@ extern const int phy_basic_ports_array[3]; * @PHY_INTERFACE_MODE_RGMII: Reduced gigabit media-independent interface * @PHY_INTERFACE_MODE_RGMII...
1d1f7b15cb9c11974cebfd39da51dc69b8cb31ff
Analyze and fix the following issue in the Linux kernel code: drm/bridge: ti-sn65dsi86: make use of debugfs_init callback
Problem Details: Do not create a custom directory in debugfs-root, but use the debugfs_init callback to create a custom directory at the given place for the bridge. The new directory layout looks like this on a Renesas GrayHawk-Single with a R-Car V4M SoC: /sys/kernel/debug/dri/feb00000.display/DP-1/1-002c Signed-of...
```diff diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index fd68ad2e2718..c2bdc7e57ac7 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -440,36 +440,8 @@ static int status_show(struct seq_file *s, void *data) return 0; } ...
829ee558f3527fd602c6e2e9f270959d1de09fe0
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Fix built-in mic assignment on ASUS VivoBook X515UA
Problem Details: ASUS VivoBook X515UA with PCI SSID 1043:106f had a default quirk pickup via pin table that applies ALC256_FIXUP_ASUS_MIC, but this adds a bogus built-in mic pin 0x13 enabled. This was no big problem because the pin 0x13 was assigned as the secondary mic, but the recent fix made the entries sorted, hen...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 26510ab6ce67..da8f21db607b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10770,6 +10770,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", AL...
b4885bd5935bb26f0a414ad55679a372e53f9b9b
Analyze and fix the following issue in the Linux kernel code: cifs: avoid NULL pointer dereference in dbg call
Problem Details: cifs_server_dbg() implies server to be non-NULL so move call under condition to avoid NULL pointer dereference. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: e79b0332ae06 ("cifs: ignore cached share root handle closing errors") Cc: stable@vger.kernel.org Signed-off-by: Alex...
```diff diff --git a/fs/smb/client/smb2misc.c b/fs/smb/client/smb2misc.c index f3c4b70b77b9..cddf273c14ae 100644 --- a/fs/smb/client/smb2misc.c +++ b/fs/smb/client/smb2misc.c @@ -816,11 +816,12 @@ smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid, WARN_ONCE(tcon->tc_count < 0, "tcon refcount i...
dcce85484d3abe0fe0a930a154bdc076f1eb4ae0
Analyze and fix the following issue in the Linux kernel code: m68k: coldfire: select PCI_IOMAP for PCI
Problem Details: After I dropped CONFIG_GENERIC_IOMAP, some PCI drivers started failing to link when CONFIG_MMU is disabled: ERROR: modpost: "pci_iounmap" [drivers/video/fbdev/i740fb.ko] undefined! ERROR: modpost: "pci_iounmap" [drivers/video/fbdev/vt8623fb.ko] undefined! ERROR: modpost: "pci_iomap_wc" [drivers/video/...
```diff diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index b50c275fa94d..eb5bb6d36899 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -18,12 +18,13 @@ config M68K select DMA_DIRECT_REMAP if M68K_NONCOHERENT_DMA && !COLDFIRE select GENERIC_ATOMIC64 select GENERIC_CPU_DEVICES - select GENERIC_IOMAP ...
739200c57384313e688e6945b56782721c29459f
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix race in print_chain()
Problem Details: 00636 Unable to handle kernel NULL pointer dereference at virtual address 00000000000000b0 00636 Mem abort info: 00636 ESR = 0x0000000096000005 00636 EC = 0x25: DABT (current EL), IL = 32 bits 00636 SET = 0, FnV = 0 00636 EA = 0, S1PTW = 0 00636 FSC = 0x05: level 1 translation fault 00636 Dat...
```diff diff --git a/fs/bcachefs/btree_locking.c b/fs/bcachefs/btree_locking.c index b18fbf6f6226..94eb2b73a843 100644 --- a/fs/bcachefs/btree_locking.c +++ b/fs/bcachefs/btree_locking.c @@ -91,10 +91,10 @@ static noinline void print_chain(struct printbuf *out, struct lock_graph *g) struct trans_waiting_for_lock *i; ...
0b4fd567261bc21ba1fd8636489396f0940b54f8
Analyze and fix the following issue in the Linux kernel code: bcachefs: btree_trans_restart_foreign_task()
Problem Details: In debug mode, we save the call stack on transaction restart - but there's no locking, so we can't touch it if we're issuing the restart from another thread. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index b96157f3dc9c..8823eec6b284 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -335,13 +335,20 @@ static inline void bch2_trans_verify_not_unlocked_or_in_restart(struct btree_tra } __always_inline -static int btree_tr...
5ae6f33053af6e904e609593d05e4faf3aeb16fb
Analyze and fix the following issue in the Linux kernel code: bcachefs: zero init journal bios
Problem Details: fix a kmsan splat Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index ce7302695547..bfdaea6569ae 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -1510,7 +1510,7 @@ int bch2_dev_journal_init(struct bch_dev *ca, struct bch_sb *sb) unsigned nr_bvecs = DIV_ROUND_UP(JOURNAL_ENTRY_SIZE_MAX, PAGE_SIZE);...
9ea24b287b3b9118a157509d931e7d27414e98c7
Analyze and fix the following issue in the Linux kernel code: bcachefs: Eliminate padding in move_bucket_key
Problem Details: We appear to be tripping over a compiler/kmsan bug with padding fields - this is an easy workaround. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/move_types.h b/fs/bcachefs/move_types.h index 82e473ed48d2..807f779f6f76 100644 --- a/fs/bcachefs/move_types.h +++ b/fs/bcachefs/move_types.h @@ -32,7 +32,7 @@ struct bch_move_stats { struct move_bucket_key { struct bpos bucket; - u8 gen; + unsigned gen; }; struct move_buck...
1f88c35674954fbb0b14d994c5fa02c7c5190356
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix a KMSAN splat in btree_update_nodes_written()
Problem Details: We may sometimes read from uninitialized memory; we know, and that's ok. We check if a btree node has been reused before waiting on any outstanding IO. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c index d3e0cf01ba37..67f1e3202835 100644 --- a/fs/bcachefs/btree_update_interior.c +++ b/fs/bcachefs/btree_update_interior.c @@ -649,6 +649,14 @@ static int btree_update_nodes_written_trans(struct btree_trans *trans, return ...
53cf2a3daa4ca5f0a40eeb18c2be8724f123a63c
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix kmsan warnings in bch2_extent_crc_pack()
Problem Details: We store to all fields, so the kmsan warnings were spurious - but initializing via stores to bitfields appear to have been giving the compiler/kmsan trouble, and they're not necessary. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c index 04946d9911f5..ae1a1d917805 100644 --- a/fs/bcachefs/extents.c +++ b/fs/bcachefs/extents.c @@ -592,29 +592,35 @@ static void bch2_extent_crc_pack(union bch_extent_crc *dst, struct bch_extent_crc_unpacked src, enum bch_extent_entry_type ...
9c3a2c9b471aa42b13c26c916f6a0852899a57e0
Analyze and fix the following issue in the Linux kernel code: bcachefs: Disable asm memcpys when kmsan enabled
Problem Details: kmsan doesn't know about inline assembly, obviously; this will close a ton of syzbot bugs. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index d41e133acc4d..7d921fc920a0 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -431,7 +431,7 @@ static inline void memcpy_u64s_small(void *dst, const void *src, static inline void __memcpy_u64s(void *dst, const void *src, unsigned u64s) ...
962322475bb5cebe0da581f6f18d23b00184aa01
Analyze and fix the following issue in the Linux kernel code: bcachefs: Handle backpointers with unknown data types
Problem Details: New data types might be added later, so we don't want to disallow unknown data types - that'll be a compatibility hassle later. Instead, ignore them. Reported-by: syzbot+3a290f5ff67ca3023834@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c index 8da1b68821a0..20c497f0c2cb 100644 --- a/fs/bcachefs/backpointers.c +++ b/fs/bcachefs/backpointers.c @@ -784,7 +784,7 @@ enum alloc_sector_counter { ALLOC_SECTORS_NR }; -static enum alloc_sector_counter data_type_to_alloc_counter(enu...
af2ff37da7ad6aabb79f57c9f7331600bd2b982d
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix block/btree node size defaults
Problem Details: We're fixing option parsing in userspace, it now obeys OPT_SB_FIELD_SECTORS Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c index d0ce96529dd4..81fd6b7977d3 100644 --- a/fs/bcachefs/opts.c +++ b/fs/bcachefs/opts.c @@ -684,12 +684,10 @@ void __bch2_opt_set_sb(struct bch_sb *sb, int dev_idx, if (opt->flags & OPT_SB_FIELD_ONE_BIAS) v++; - if ((opt->flags & OPT_FS) && opt->set_...
5cc0ab39fb16c44ef6bbabb1b5a0c5705ec0bb56
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix incorrect state count
Problem Details: atomic64_read(&j->seq) - j->seq_write_started == JOURNAL_STATE_BUF_NR is the condition in journal_entry_open where we return JOURNAL_ERR_max_open, so journal_cur_seq(j) - seq == JOURNAL_STATE_BUF_NR means that the buf corresponding to seq has started to write. Signed-off-by: Alan Huang <mmpgouride@gma...
```diff diff --git a/fs/bcachefs/journal.h b/fs/bcachefs/journal.h index 1c460ded2a11..ab68c5c4d8d8 100644 --- a/fs/bcachefs/journal.h +++ b/fs/bcachefs/journal.h @@ -161,7 +161,7 @@ static inline int journal_state_count(union journal_res_state s, int idx) static inline int journal_state_seq_count(struct journal *j, ...
16a8d5d00b8add42924185c30f7cefdbb156fdd4
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix btree iter flags in data move
Problem Details: Rebalance requires a not_extents iterator. This wasn't hit before because all_snapshots disableds is_extents on snapshots btrees - but has no effect on the reflink btree. Reported-by: Maël Kerbiriou <mael.kerbiriou@free.fr> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index 55e17c2d8e5a..8fcdc6984f6e 100644 --- a/fs/bcachefs/move.c +++ b/fs/bcachefs/move.c @@ -561,6 +561,7 @@ static int bch2_move_data_btree(struct moving_context *ctxt, bch2_trans_begin(trans); bch2_trans_iter_init(trans, &iter, btree_id, start, ...
5e67243ea670c61d6e59eaf358b74991e45c7b16
Analyze and fix the following issue in the Linux kernel code: bcachefs: Add missing random.h includes
Problem Details: Fix build in userspace, and good hygeine. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c index ce197b5bda9d..f1503df57dc7 100644 --- a/fs/bcachefs/io_read.c +++ b/fs/bcachefs/io_read.c @@ -25,6 +25,7 @@ #include "subvolume.h" #include "trace.h" +#include <linux/random.h> #include <linux/sched/mm.h> #ifdef CONFIG_BCACHEFS_DEBUG ```
6aa446c05a44ddc46b0aea510a95d288e993daec
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix offset_into_extent in data move path
Problem Details: Fixes the following: [ 17.607394] kernel BUG at fs/bcachefs/reflink.c:261! [ 17.608316] Oops: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 17.608485] CPU: 0 UID: 0 PID: 564 Comm: bch-rebalance/3 Tainted: G OE 6.14.0-rc6-arch1-gfcb0bd9609d2 #7 0efd7a8f4a00afeb2c5fb6e7ecb1aec8ddcbb...
```diff diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index 2d9ce7fb5818..55e17c2d8e5a 100644 --- a/fs/bcachefs/move.c +++ b/fs/bcachefs/move.c @@ -591,7 +591,7 @@ static int bch2_move_data_btree(struct moving_context *ctxt, k.k->type == KEY_TYPE_reflink_p && REFLINK_P_MAY_UPDATE_OPTIONS(bkey_s_c_t...
9962cb77488f617963d0314e8c9120315d97ea18
Analyze and fix the following issue in the Linux kernel code: bcachefs: Improve can_write_extent()
Problem Details: This fixes another "rebalance spinning and doing no work" issue; rebalance was reading extents it wanted to move, but then failing in bch2_write() -> bch2_alloc_sectors_start() due to being unable to allocate sufficient replicas. This was triggered by a user playing with the durability settings, the f...
```diff diff --git a/fs/bcachefs/data_update.c b/fs/bcachefs/data_update.c index 44b8ed3cc5d6..08bb7f3019ce 100644 --- a/fs/bcachefs/data_update.c +++ b/fs/bcachefs/data_update.c @@ -638,40 +638,6 @@ int bch2_extent_drop_ptrs(struct btree_trans *trans, bch2_trans_commit(trans, NULL, NULL, BCH_TRANS_COMMIT_no_enospc)...
9f8fe348ac9544f6855f82565e754bf085d81f88
Analyze and fix the following issue in the Linux kernel code: tty: serial: fsl_lpuart: Fix unused variable 'sport' build warning
Problem Details: Remove the unused variable 'sport' to avoid the kernel build warning. Fixes: 3cc16ae096f1 ("tty: serial: fsl_lpuart: use port struct directly to simply code") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202503210614.2qGlnbIq-lkp@intel.com/ Signed-off-by...
```diff diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 33eeefa6fa8f..4470966b826c 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -639,8 +639,6 @@ static void lpuart32_wait_bit_set(struct uart_port *port, unsigned int offset, static int lpua...
021ba7f1babd029e714d13a6bf2571b08af96d0f
Analyze and fix the following issue in the Linux kernel code: udmabuf: fix a buf size overflow issue during udmabuf creation
Problem Details: by casting size_limit_mb to u64 when calculate pglimit. Signed-off-by: Xiaogang Chen<Xiaogang.Chen@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250321164126.329638-1-xiaogang.chen@amd.com Signed-off-by: Christian König <christian.koenig@amd.com>
```diff diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index cc7398cc17d6..e74e36a8ecda 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c @@ -393,7 +393,7 @@ static long udmabuf_create(struct miscdevice *device, if (!ubuf) return -ENOMEM; - pglimit = (size_limit_mb * 1024...
2f6efbabceb6b2914ee9bafb86d9a51feae9cce8
Analyze and fix the following issue in the Linux kernel code: ax25: Remove broken autobind
Problem Details: Binding AX25 socket by using the autobind feature leads to memory leaks in ax25_connect() and also refcount leaks in ax25_release(). Memory leak was detected with kmemleak: ================================================================ unreferenced object 0xffff8880253cd680 (size 96): backtrace: __k...
```diff diff --git a/include/net/ax25.h b/include/net/ax25.h index 4ee141aae0a2..a7bba42dde15 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -418,7 +418,6 @@ void ax25_rt_device_down(struct net_device *); int ax25_rt_ioctl(unsigned int, void __user *); extern const struct seq_operations ax25_rt_seqops; ...
8e623137f112eb86ad949e3bcb6c0e5ae11a092a
Analyze and fix the following issue in the Linux kernel code: drm: Move some options to separate new Kconfig
Problem Details: Move some options out into a new debug specific kconfig file in order to make things a bit cleaner. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Cc: Christian König <christian.koenig@amd.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Philipp St...
```diff diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 9b4061231329..1c6fa662d6ed 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -26,6 +26,11 @@ menuconfig DRM details. You should also select and configure AGP (/dev/agpgart) support if it is available for your platf...
ff9cb6d2035c586ea7c8f1754d4409eec7a2d26d
Analyze and fix the following issue in the Linux kernel code: drm/udl: Unregister device before cleaning up on disconnect
Problem Details: Disconnecting a DisplayLink device results in the following kernel error messages [ 93.041748] [drm:udl_urb_completion [udl]] *ERROR* udl_urb_completion - nonzero write bulk status received: -115 [ 93.055299] [drm:udl_submit_urb [udl]] *ERROR* usb_submit_urb error fffffffe [ 93.065363] [drm:udl_...
```diff diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index 3b56ca2f6eb8..9a66a1a6781f 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c @@ -110,9 +110,9 @@ static void udl_usb_disconnect(struct usb_interface *interface) { struct drm_device *dev = usb_get_int...
0ead88112bf69da4ee54d3f26e21258f00640865
Analyze and fix the following issue in the Linux kernel code: drm/i915/vrr: Avoid reading vrr.enable based on fixed_rr check
Problem Details: Currently, vrr.enable is intended only for variable refresh rate timings. At this point, we do not set fixed refresh rate timings, but the GOP can, which creates a problem during the readback of vrr.enable. The GOP enables the VRR timing generator with fixed timings, while the driver only recognizes t...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index aa65a6933ddb..6bdcdfed4b9b 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -657,8 +657,7 @@ void intel_vrr_get_config(struct intel_crtc_state *crtc_state...
99476fa085da764fbed0684e22b831de8cd22512
Analyze and fix the following issue in the Linux kernel code: perf bench sched pipe: fix enforced blocking reads in worker_thread
Problem Details: The function worker_thread() is programmed in a way that roughly doubles the number of expectable context switches, because it enforces blocking reads: Performance counter stats for 'perf bench sched pipe': 2,000,004 context-switches 11.859548321 seconds time elapsed 0.6...
```diff diff --git a/tools/perf/bench/sched-pipe.c b/tools/perf/bench/sched-pipe.c index e2562677df96..70139036d68f 100644 --- a/tools/perf/bench/sched-pipe.c +++ b/tools/perf/bench/sched-pipe.c @@ -204,17 +204,10 @@ static void *worker_thread(void *__tdata) } for (i = 0; i < loops; i++) { - if (!td->nr) { - r...
7e442be7015af524d2b5fb84f0ff04a44501542b
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix is_compat_mode build break in ppc64
Problem Details: Commit 54f9aa1092457 ("tools/perf/powerpc/util: Add support to handle compatible mode PVR for perf json events") introduced to select proper JSON events in case of compat mode using auxiliary vector. But this caused a compilation error in ppc64 Big Endian. arch/powerpc/util/header.c: In function 'is_c...
```diff diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c index c7df534dbf8f..0be74f048f96 100644 --- a/tools/perf/arch/powerpc/util/header.c +++ b/tools/perf/arch/powerpc/util/header.c @@ -14,8 +14,8 @@ static bool is_compat_mode(void) { - u64 base_platform = getauxval(AT_B...
9480cc14a95e3883f895b5a2baa8f6c0c199c604
Analyze and fix the following issue in the Linux kernel code: perf build: filter all combinations of -flto for libperl
Problem Details: When enabling the libperl feature the build uses perl's build flags (ccopts) but filters out various flags, e.g. for LTO. While this is conceptually correct, it is insufficient in practice, since only "-flto=auto" is filtered out. When perl itself is built with "-flto" this can cause parts of perf bein...
```diff diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 23dbb6bb91cf..eea95c6c0c71 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -821,7 +821,7 @@ else PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) PERL_EMBED_CCOPTS = $(shell perl -MExtUtils::Em...
689582882802cd64986c1eb584c9f5184d67f0cf
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix unmet direct dependencies warning
Problem Details: WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n] Selected by [m]: - DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=m] && DRM_XE [=m] && DRM_XE [=m]=m [=m] && HAS_IOPORT [=y] DRM_XE_DISPLAY requires FB_IOMEM_HELPERS, but the dependenc...
```diff diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 7d7995196702..5c2f459a2925 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -53,7 +53,7 @@ config DRM_XE config DRM_XE_DISPLAY bool "Enable display support" depends on DRM_XE && DRM_XE=m && HAS_IOPORT - se...
a0b539ad369fe434fe488faf92d4ae770a27a90f
Analyze and fix the following issue in the Linux kernel code: rust: macros: fix `make rusttest` build on macOS
Problem Details: Do not emit `#[link_section = ".modinfo"]` on macOS (i.e. when building userspace tests); .modinfo is not a legal section specifier in mach-o. Before this change tests failed to compile: ---- ../rust/macros/lib.rs - module (line 66) stdout ---- rustc-LLVM ERROR: Global variable '_ZN8rust_out13__m...
```diff diff --git a/rust/macros/module.rs b/rust/macros/module.rs index 46f20682a7a9..8ab4e1f3eb45 100644 --- a/rust/macros/module.rs +++ b/rust/macros/module.rs @@ -56,7 +56,7 @@ impl<'a> ModInfoBuilder<'a> { " {cfg} #[doc(hidden)] - #[link_section = \".mo...
4e72a62e8ddd00e50bfe9aec13995fa2079f6486
Analyze and fix the following issue in the Linux kernel code: rust: uaccess: name the correct function
Problem Details: Correctly refer to `reserve` rather than `try_reserve` in a comment. This comment has been incorrect since inception in commit 1b580e7b9ba2 ("rust: uaccess: add userspace pointers"). Fixes: 1b580e7b9ba2 ("rust: uaccess: add userspace pointers") Signed-off-by: Tamir Duberstein <tamird@gmail.com> Revie...
```diff diff --git a/rust/kernel/uaccess.rs b/rust/kernel/uaccess.rs index 719b0a48ff55..80a9782b1c6e 100644 --- a/rust/kernel/uaccess.rs +++ b/rust/kernel/uaccess.rs @@ -285,8 +285,7 @@ impl UserSliceReader { let len = self.length; buf.reserve(len, flags)?; - // The call to `try_reserve` was...
f6be7af44525a005f537ca04f24dc56b391f9a8b
Analyze and fix the following issue in the Linux kernel code: rust: rbtree: fix comments referring to Box instead of KBox
Problem Details: Several safety comments in the RBTree implementation still refer to "Box::from_raw" and "Box::into_raw", but the code actually uses KBox. These comments were not updated when the implementation transitioned from using Box to KBox. Fixes: 8373147ce496 ("rust: treewide: switch to our kernel `Box` type")...
```diff diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs index 1ea25c7092fb..5246b2c8a4ff 100644 --- a/rust/kernel/rbtree.rs +++ b/rust/kernel/rbtree.rs @@ -1168,12 +1168,12 @@ impl<'a, K, V> RawVacantEntry<'a, K, V> { fn insert(self, node: RBTreeNode<K, V>) -> &'a mut V { let node = KBox::into_...
1bdf2ccc351ce73ec5fcc0fa82eb6959b30f34c7
Analyze and fix the following issue in the Linux kernel code: drm/v3d: Use V3D_SMS registers for power on/off and reset on V3D 7.x
Problem Details: In addition to the standard reset controller, V3D 7.x requires configuring the V3D_SMS registers for proper power on/off and reset. Add the new registers to `v3d_regs.h` and ensure they are properly configured during device probing, removal, and reset. This change fixes GPU reset issues on the Raspber...
```diff diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c index aa68be8fe86b..5e997ae8bc9c 100644 --- a/drivers/gpu/drm/v3d/v3d_drv.c +++ b/drivers/gpu/drm/v3d/v3d_drv.c @@ -263,6 +263,36 @@ static const struct of_device_id v3d_of_match[] = { }; MODULE_DEVICE_TABLE(of, v3d_of_match); +stati...
b1cd1d738e8d98296a01768ba217f2f2ea5dd7b8
Analyze and fix the following issue in the Linux kernel code: dt-bindings: gpu: v3d: Add V3D driver maintainer as DT maintainer
Problem Details: As established in commit 89d04995f76c ("MAINTAINERS: Drop Emma Anholt from all M lines."), Emma is no longer active in the Linux kernel and dropped the V3D maintainership. Therefore, remove Emma as one of the DT maintainers and add the current V3D driver maintainer. Acked-by: Emma Anholt <emma@anholt....
```diff diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml index dd2cc63c9a51..43c6d2d72456 100644 --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml @@ -7,7 +7,7 @@ $sche...
e29671ae9714d2c37cd5165a2e928cc2fdd829c1
Analyze and fix the following issue in the Linux kernel code: dt-bindings: gpu: v3d: Add SMS register to BCM2712 compatible
Problem Details: V3D 7.1 exposes a new register block, called V3D_SMS. As BCM2712 has a V3D 7.1 core, add a new register item to its compatible. Similar to the GCA, which is specific for V3D 3.3, SMS should only be added for V3D 7.1 variants (such as brcm,2712-v3d). Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@l...
```diff diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml index 6a1a09031983..dd2cc63c9a51 100644 --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml @@ -77,10 +77,12 @@ a...
38712c5281ac5f6f27058b825ca62ae69f2e2451
Analyze and fix the following issue in the Linux kernel code: dt-bindings: gpu: v3d: Add per-compatible register restrictions
Problem Details: In order to enforce per-SoC register rules, add per-compatible restrictions. For example, V3D 3.3 (used in brcm,7268-v3d) has a cache controller (GCA), which is not present in other V3D generations. Declaring these differences helps ensure the DTB accurately reflect the hardware design. The example wa...
```diff diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml index dc078ceeca9a..6a1a09031983 100644 --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml @@ -22,20 +22,12 @@ p...
76dbd0973c555037931d2ed055a4a69e592caad4
Analyze and fix the following issue in the Linux kernel code: drm/v3d: Associate a V3D tech revision to all supported devices
Problem Details: The V3D driver currently determines the GPU tech version (33, 41...) by reading a register. This approach has worked so far since this information wasn’t needed before powering on the GPU. V3D 7.1 introduces new registers that must be written to power on the GPU, requiring us to know the V3D version b...
```diff diff --git a/drivers/gpu/drm/v3d/v3d_debugfs.c b/drivers/gpu/drm/v3d/v3d_debugfs.c index 76816f2551c1..7e789e181af0 100644 --- a/drivers/gpu/drm/v3d/v3d_debugfs.c +++ b/drivers/gpu/drm/v3d/v3d_debugfs.c @@ -21,74 +21,74 @@ struct v3d_reg_def { }; static const struct v3d_reg_def v3d_hub_reg_defs[] = { - REGD...
667f053b05f00a007738cd7ed6fa1901de19dc7e
Analyze and fix the following issue in the Linux kernel code: PCI/bwctrl: Fix NULL pointer dereference on bus number exhaustion
Problem Details: When BIOS neglects to assign bus numbers to PCI bridges, the kernel attempts to correct that during PCI device enumeration. If it runs out of bus numbers, no pci_bus is allocated and the "subordinate" pointer in the bridge's pci_dev remains NULL. The PCIe bandwidth controller erroneously does not che...
```diff diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c index 58ba8142c9a3..d8d2aa85a229 100644 --- a/drivers/pci/pcie/bwctrl.c +++ b/drivers/pci/pcie/bwctrl.c @@ -294,6 +294,10 @@ static int pcie_bwnotif_probe(struct pcie_device *srv) struct pci_dev *port = srv->port; int ret; + /* Can happen ...
21581dd4e7ff6c07d0ab577e3c32b13a74b31522
Analyze and fix the following issue in the Linux kernel code: tracing: Ensure module defining synth event cannot be unloaded while tracing
Problem Details: Currently, using synth_event_delete() will fail if the event is being used (tracing in progress), but that is normally done in the module exit function. At that stage, failing is problematic as returning a non-zero status means the module will become locked (impossible to unload or reload again). Inst...
```diff diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c index 07ff8be8267e..463b0073629a 100644 --- a/kernel/trace/trace_events_synth.c +++ b/kernel/trace/trace_events_synth.c @@ -852,6 +852,34 @@ static struct trace_event_fields synth_event_fields_array[] = { {} }; +static int s...
0c588ac0ca6c22b774d9ad4a6594681fdfa57d9d
Analyze and fix the following issue in the Linux kernel code: tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER
Problem Details: When __ftrace_event_enable_disable invokes the class callback to unregister the event, the return value is not reported up to the caller, hence leading to event unregister failures being silently ignored. This patch assigns the ret variable to the invocation of the event unregister callback, so that i...
```diff diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 513de9ceb80e..8e7603acca21 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -790,7 +790,9 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file, clear_bit(EVENT_FILE_FL_RECORDED_TGI...
7e6b3fcc9c5294aeafed0dbe1a09a1bc899bd0f2
Analyze and fix the following issue in the Linux kernel code: tracing/osnoise: Fix possible recursive locking for cpus_read_lock()
Problem Details: Lockdep reports this deadlock log: osnoise: could not start sampling thread ============================================ WARNING: possible recursive locking detected -------------------------------------------- CPU0 ---- lock(cpu_hotplug_lock); lock(cpu_hotplug_lock); Call Trace: ...
```diff diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c index f3a2722ee4c0..c83a51218ee5 100644 --- a/kernel/trace/trace_osnoise.c +++ b/kernel/trace/trace_osnoise.c @@ -2032,7 +2032,6 @@ static int start_kthread(unsigned int cpu) if (IS_ERR(kthread)) { pr_err(BANNER "could not start sam...
e3a4182edd1ae60e7e3539ff3b3784af9830d223
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: Only use nf_skip_indirect_calls() when MITIGATION_RETPOLINE
Problem Details: 1. MITIGATION_RETPOLINE is x86-only (defined in arch/x86/Kconfig), so no need to AND with CONFIG_X86 when checking if enabled. 2. Remove unused declaration of nf_skip_indirect_calls() when MITIGATION_RETPOLINE is disabled to avoid warnings. 3. Declare nf_skip_indirect_calls() and nf_skip_indirect_cal...
```diff diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c index 75598520b0fa..6557a4018c09 100644 --- a/net/netfilter/nf_tables_core.c +++ b/net/netfilter/nf_tables_core.c @@ -21,25 +21,22 @@ #include <net/netfilter/nf_log.h> #include <net/netfilter/nft_meta.h> -#if defined(CONFIG_MITIGAT...
932b32ffd7604fb00b5c57e239a3cc4d901ccf6e
Analyze and fix the following issue in the Linux kernel code: netfilter: socket: Lookup orig tuple for IPv6 SNAT
Problem Details: nf_sk_lookup_slow_v4 does the conntrack lookup for IPv4 packets to restore the original 5-tuple in case of SNAT, to be able to find the right socket (if any). Then socket_match() can correctly check whether the socket was transparent. However, the IPv6 counterpart (nf_sk_lookup_slow_v6) lacks this con...
```diff diff --git a/net/ipv6/netfilter/nf_socket_ipv6.c b/net/ipv6/netfilter/nf_socket_ipv6.c index a7690ec62325..9ea5ef56cb27 100644 --- a/net/ipv6/netfilter/nf_socket_ipv6.c +++ b/net/ipv6/netfilter/nf_socket_ipv6.c @@ -103,6 +103,10 @@ struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb, ...
778b09d91baafb13408470c721d034d6515cfa5a
Analyze and fix the following issue in the Linux kernel code: netfilter: nfnetlink_queue: Initialize ctx to avoid memory allocation error
Problem Details: It is possible that ctx in nfqnl_build_packet_message() could be used before it is properly initialize, which is only initialized by nfqnl_get_sk_secctx(). This patch corrects this problem by initializing the lsmctx to a safe value when it is declared. This is similar to the commit 35fcac7a7c25 ("aud...
```diff diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 5c913987901a..8b7b39d8a109 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -567,7 +567,7 @@ nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue, enum ip_conntrack_inf...
34ceb69edd6cb9581978e0f3e459da4959c0c387
Analyze and fix the following issue in the Linux kernel code: Documentation/fs/9p: fix broken link
Problem Details: In b529c06f9dc7 (Update the documentation referencing Plan 9 from User Space., 2020-04-26), another instance of the link was left unfixed. Fix that as well. Signed-off-by: Tuomas Ahola <taahol@utu.fi> Message-ID: <20250322153639.4917-1-taahol@utu.fi> Signed-off-by: Dominique Martinet <asmadeus@codewre...
```diff diff --git a/Documentation/filesystems/9p.rst b/Documentation/filesystems/9p.rst index 2bbf68b56b0d..28871200e87c 100644 --- a/Documentation/filesystems/9p.rst +++ b/Documentation/filesystems/9p.rst @@ -40,7 +40,7 @@ For remote file server:: mount -t 9p 10.10.1.2 /mnt/9 -For Plan 9 From User Space applica...
5df0211a67dfd0cb2e2e0c0b6e08879420c7d8f6
Analyze and fix the following issue in the Linux kernel code: pinctrl: amlogic-a4: Drop surplus semicolon
Problem Details: The kernel bots complain about untidy code found using coccinelle, fix it up. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202503212354.Hx2qaDRe-lkp@intel.com/ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/pinctrl/meson/pinctrl-amlogic-a4.c b/drivers/pinctrl/meson/pinctrl-amlogic-a4.c index 35d5540b8eaa..ee7bbc72f9b3 100644 --- a/drivers/pinctrl/meson/pinctrl-amlogic-a4.c +++ b/drivers/pinctrl/meson/pinctrl-amlogic-a4.c @@ -856,7 +856,7 @@ static void init_bank_register_bit(struct aml_pinctrl...
2c8725c1dca3de043670b38592b1b43105322496
Analyze and fix the following issue in the Linux kernel code: rust: kbuild: skip `--remap-path-prefix` for `rustdoc`
Problem Details: `rustdoc` only recognizes `--remap-path-prefix` starting with Rust 1.81.0, which is later than on minimum, so we cannot pass it unconditionally. Otherwise, we get: error: Unrecognized option: 'remap-path-prefix' Note that `rustc` (the compiler) does recognize the flag since a long time ago (1.26....
```diff diff --git a/rust/Makefile b/rust/Makefile index ea3849eb78f6..089473a89d46 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -57,10 +57,14 @@ endif core-cfgs = \ --cfg no_fp_fmt_parse +# `rustc` recognizes `--remap-path-prefix` since 1.26.0, but `rustdoc` only +# since Rust 1.81.0. Moreover, `rustdoc` ...
62604063621fb075c7966286bdddcb057d883fa8
Analyze and fix the following issue in the Linux kernel code: kbuild: deb-pkg: don't set KBUILD_BUILD_VERSION unconditionally
Problem Details: In ThinPro, we use the convention <upstream_ver>+hp<patchlevel> for the kernel package. This does not have a dash in the name or version. This is built by editing ".version" before a build, and setting EXTRAVERSION="+hp" and KDEB_PKGVERSION make variables: echo 68 > .version make -j<n> EXTRAVE...
```diff diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules index 33bfd00974b3..a417a7f8bbc1 100755 --- a/scripts/package/debian/rules +++ b/scripts/package/debian/rules @@ -21,9 +21,11 @@ ifeq ($(origin KBUILD_VERBOSE),undefined) endif endif -revision = $(lastword $(subst -, ,$(shell dpkg-...
cacd22ce69585a91c386243cd662ada962431e63
Analyze and fix the following issue in the Linux kernel code: kbuild: make all file references relative to source root
Problem Details: -fmacro-prefix-map only affects __FILE__ and __BASE_FILE__. Other references, for example in debug information, are not affected. This makes handling of file references in the compiler outputs harder to use and creates problems for reproducible builds. Switch to -ffile-prefix map which affects all ref...
```diff diff --git a/Documentation/kbuild/reproducible-builds.rst b/Documentation/kbuild/reproducible-builds.rst index f2dcc39044e6..a7762486c93f 100644 --- a/Documentation/kbuild/reproducible-builds.rst +++ b/Documentation/kbuild/reproducible-builds.rst @@ -46,21 +46,6 @@ The kernel embeds the building user and host n...
97282e6d380db8a07120fe1b794ac969ee4a3b5c
Analyze and fix the following issue in the Linux kernel code: x86: drop unnecessary prefix map configuration
Problem Details: The toplevel Makefile already provides -fmacro-prefix-map as part of KBUILD_CPPFLAGS. In contrast to the KBUILD_CFLAGS and KBUILD_AFLAGS variables, KBUILD_CPPFLAGS is not redefined in the architecture specific Makefiles. Therefore the toplevel KBUILD_CPPFLAGS do apply just fine, to both C and ASM sourc...
```diff diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 9cc0ff6e9067..75e7a76deee1 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -54,7 +54,6 @@ targets += cpustr.h KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ -KBUILD_CFLAGS +=...
7e752910b8acd1527af34b51851998feb33cc028
Analyze and fix the following issue in the Linux kernel code: kbuild: deb-pkg: fix versioning for -rc releases
Problem Details: The version number with -rc should be considered older than the final release. For example, 6.14-rc1 should be older than 6.14, but to handle this correctly (just like Debian kernel), "-rc" must be replace with "~rc". $ dpkg --compare-versions 6.14-rc1 lt 6.14 $ echo $? 1 $ dpkg --compare-ver...
```diff diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 0178000197fe..07ca3528e8ea 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -161,7 +161,9 @@ version=$KERNELRELEASE if [ "${KDEB_PKGVERSION:+set}" ]; then packageversion=$KDEB_PKGVERSION else - packageversion=$(${s...
67c007d6c12da3e456c005083696c20d4498ae72
Analyze and fix the following issue in the Linux kernel code: io_uring/net: fix sendzc double notif flush
Problem Details: refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 5823 at lib/refcount.c:28 refcount_warn_saturate+0x15a/0x1d0 lib/refcount.c:28 RIP: 0010:refcount_warn_saturate+0x15a/0x1d0 lib/refcount.c:28 Call Trace: <TASK> io_notif_flush io_uring/notif.h:40 [inline] io_send_zc_cleanup+0x121/0x170 io_u...
```diff diff --git a/io_uring/net.c b/io_uring/net.c index a288c75bb92c..50e8a3ccc9de 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -1440,6 +1440,7 @@ int io_send_zc(struct io_kiocb *req, unsigned int issue_flags) */ if (!(issue_flags & IO_URING_F_UNLOCKED)) { io_notif_flush(zc->notif); + zc->notif = NUL...
3860cbe239639503e56bd4365c6bf4cb957ef04e
Analyze and fix the following issue in the Linux kernel code: PM: sleep: Fix bit masking operation
Problem Details: The mask operation link->flags | DL_FLAG_PM_RUNTIME is always true which is incorrect. The mask operation should be using the bit-wise & operator. Fix this. Fixes: bca84a7b93fd ("PM: sleep: Use DPM_FLAG_SMART_SUSPEND conditionally") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://...
```diff diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index ad50018b8047..ac2a197c1234 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -1836,7 +1836,7 @@ static bool device_prepare_smart_suspend(struct device *dev) idx = device_links_read_lock(); list_for_each_entry_...
e917b73234b02aa4966325e7380d2559bf127ba9
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom_q6v5_pas: Make single-PD handling more robust
Problem Details: Only go into the if condition for single-PD handling when there's actually just one power domain specified there. Otherwise it'll be an issue in the dts and we should fail in the regular code path. This also mirrors the latest changes in the qcom_q6v5_mss driver. Suggested-by: Stephan Gerhold <stepha...
```diff diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 8f6de1b3a79b..b306f223127c 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -501,16 +501,16 @@ static int adsp_pds_attach(struct device *dev, struct device **devs, if (!pd_name...
ba785ff4162a65f18ed501019637a998b752b5ad
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226
Problem Details: MSM8226 requires the CX power domain, so use the msm8996_adsp_resource which has cx under proxy_pd_names and is otherwise equivalent. Suggested-by: Stephan Gerhold <stephan.gerhold@linaro.org> Fixes: fb4f07cc9399 ("remoteproc: qcom: pas: Add MSM8226 ADSP support") Signed-off-by: Luca Weiss <luca@lucaw...
```diff diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 534e88b84849..8f6de1b3a79b 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -1435,7 +1435,7 @@ static const struct adsp_data sm8750_mpss_resource = { }; static const struct o...
efdde3d73ab25cef4ff2d06783b0aad8b093c0e4
Analyze and fix the following issue in the Linux kernel code: remoteproc: core: Clear table_sz when rproc_shutdown
Problem Details: There is case as below could trigger kernel dump: Use U-Boot to start remote processor(rproc) with resource table published to a fixed address by rproc. After Kernel boots up, stop the rproc, load a new firmware which doesn't have resource table ,and start rproc. When starting rproc with a firmware no...
```diff diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index c2cf0d277729..b21eedefff87 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -2025,6 +2025,7 @@ int rproc_shutdown(struct rproc *rproc) kfree(rproc->cached_table); rpr...
4b4ab93ddc5f28f70640f883d53c331b1a9b8d7a
Analyze and fix the following issue in the Linux kernel code: dt-bindings: remoteproc: Consolidate SC8180X and SM8150 PAS files
Problem Details: SC8180X PAS bindings are plain wrong, resulting in false-positive dt checker errors. SC8180X's remoteprocs happen to be identical to SM8150's from the kernel point of view, so reuse that binding instead. Fixes: 4865ed136045 ("dt-bindings: remoteproc: qcom: pas: Add SC8180X adsp, cdsp and mpss") Signed...
```diff diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc8180x-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc8180x-pas.yaml deleted file mode 100644 index 45ee9fbe0966..000000000000 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sc8180x-pas.yaml +++ /dev/null @@ -1,96 +0,0 @@ -...
75845c6c1a64483e9985302793dbf0dfa5f71e32
Analyze and fix the following issue in the Linux kernel code: keys: Fix UAF in key_put()
Problem Details: Once a key's reference count has been reduced to 0, the garbage collector thread may destroy it at any time and so key_put() is not allowed to touch the key after that point. The most key_put() is normally allowed to do is to touch key_gc_work as that's a static global variable. However, in an effort...
```diff diff --git a/include/linux/key.h b/include/linux/key.h index 074dca3222b9..ba05de8579ec 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -236,6 +236,7 @@ struct key { #define KEY_FLAG_ROOT_CAN_INVAL 7 /* set if key can be invalidated by root without permission */ #define KEY_FLAG_KEEP 8 /* set i...
5f3077d7fcd4d777b52473a7d8d6fd065a7deb20
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Add selftests for load-acquire/store-release when register number is invalid
Problem Details: syzbot reported out-of-bounds read in check_atomic_load/store() when the register number is invalid in this context: https://syzkaller.appspot.com/bug?extid=a5964227adc0f904549c To avoid the issue from now on, let's add tests where the register number is invalid for load-acquire/store-release. Af...
```diff diff --git a/tools/testing/selftests/bpf/progs/verifier_load_acquire.c b/tools/testing/selftests/bpf/progs/verifier_load_acquire.c index 1babe9ad9b43..77698d5a19e4 100644 --- a/tools/testing/selftests/bpf/progs/verifier_load_acquire.c +++ b/tools/testing/selftests/bpf/progs/verifier_load_acquire.c @@ -189,6 +18...
c03bb2fa327e4c25d6c5360a8803a4b1cdc2d0b9
Analyze and fix the following issue in the Linux kernel code: bpf: Fix out-of-bounds read in check_atomic_load/store()
Problem Details: syzbot reported the following splat [0]. In check_atomic_load/store(), register validity is not checked before atomic_ptr_type_ok(). This causes the out-of-bounds read in is_ctx_reg() called from atomic_ptr_type_ok() when the register number is MAX_BPF_REG or greater. Call check_load_mem()/check_stor...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 41fd93db8258..8ad7338e726b 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -7788,6 +7788,12 @@ static int check_atomic_rmw(struct bpf_verifier_env *env, static int check_atomic_load(struct bpf_verifier_env *env, struct ...
8b4da3ef92060c281aa3c541ed7aab51500cf7c8
Analyze and fix the following issue in the Linux kernel code: i2c: pasemi: Add registers bits and switch to BIT()
Problem Details: Add the missing register bits to the defines and also switch those to use the BIT macro which is much more readable than using hardcoded masks Co-developed-by: Hector Martin <marcan@marcan.st> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Sven Peter <sven@svenpeter.dev> Reviewed-by: N...
```diff diff --git a/drivers/i2c/busses/i2c-pasemi-core.c b/drivers/i2c/busses/i2c-pasemi-core.c index dac694a9d781..bd128ab2e2eb 100644 --- a/drivers/i2c/busses/i2c-pasemi-core.c +++ b/drivers/i2c/busses/i2c-pasemi-core.c @@ -5,6 +5,7 @@ * SMBus host driver for PA Semi PWRficient */ +#include <linux/bitfield.h> ...
088b1ca970ba6cac141f684b7592ce56bd25e7ea
Analyze and fix the following issue in the Linux kernel code: i2c: k1: Initialize variable before use
Problem Details: Commit 95a8ca229032 ("i2c: spacemit: add support for SpacemiT K1 SoC") introduced a check in the probe function to warn the user if the DTS has incorrect frequency settings. In such cases, the driver falls back to default values. However, the return value of of_property_read_u32() was not stored, maki...
```diff diff --git a/drivers/i2c/busses/i2c-k1.c b/drivers/i2c/busses/i2c-k1.c index 0d8763b852db..5965b4cf6220 100644 --- a/drivers/i2c/busses/i2c-k1.c +++ b/drivers/i2c/busses/i2c-k1.c @@ -514,7 +514,7 @@ static int spacemit_i2c_probe(struct platform_device *pdev) if (!i2c) return -ENOMEM; - of_property_read_u...
7f81f27b1093e4895e87b74143c59c055c3b1906
Analyze and fix the following issue in the Linux kernel code: tracing: Fix use-after-free in print_graph_function_flags during tracer switching
Problem Details: Kairui reported a UAF issue in print_graph_function_flags() during ftrace stress testing [1]. This issue can be reproduced if puting a 'mdelay(10)' after 'mutex_unlock(&trace_types_lock)' in s_start(), and executing the following script: $ echo function_graph > current_tracer $ cat trace > /dev/nu...
```diff diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index ed61ff719aa4..2f077d4158e5 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c @@ -1611,6 +1611,7 @@ void graph_trace_close(struct trace_iterator *iter) if (data) { free_p...
c1657640a8b3f7023675511d4857aff4f32f3a51
Analyze and fix the following issue in the Linux kernel code: tracing: gfp: vsprintf: Do not print "none" when using %pGg printf format
Problem Details: The commit ca29a0bf122145 ("tracing: gfp: Remove duplication of recording GFP flags") caused the following regression in printf_test selftest: [ 46.208199] test_printf: kvasprintf(..., "%pGg", ...) returned 'none|0xfc000000', expected '0xfc000000' [ 46.208209] test_printf: kvasprintf(..., "%pGg", ...
```diff diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h index 82371177ef79..15aae955a10b 100644 --- a/include/trace/events/mmflags.h +++ b/include/trace/events/mmflags.h @@ -101,7 +101,7 @@ TRACE_DEFINE_ENUM(___GFP_LAST_BIT); gfpflag_string(GFP_DMA32), \ gfpflag_string(__GFP_RECLAIM), ...
2cbb20b008dba39893f0e296dc8ca312f40a9a0e
Analyze and fix the following issue in the Linux kernel code: tracing: Disable branch profiling in noinstr code
Problem Details: CONFIG_TRACE_BRANCH_PROFILING inserts a call to ftrace_likely_update() for each use of likely() or unlikely(). That breaks noinstr rules if the affected function is annotated as noinstr. Disable branch profiling for files with noinstr functions. In addition to some individual files, this also includ...
```diff diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild index cf0ad89f5639..f7fb3d88c57b 100644 --- a/arch/x86/Kbuild +++ b/arch/x86/Kbuild @@ -1,4 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 + +# Branch profiling isn't noinstr-safe. Disable it for arch/x86/* +subdir-ccflags-$(CONFIG_TRACE_BRANCH_PROFILING) += -DDISABL...
50a53b60e141d7e31368a87e222e4dd5597bd4ae
Analyze and fix the following issue in the Linux kernel code: perf/amd/ibs: Prevent leaking sensitive data to userspace
Problem Details: Although IBS "swfilt" can prevent leaking samples with kernel RIP to the userspace, there are few subtle cases where a 'data' address and/or a 'branch target' address can fall under kernel address range although RIP is from userspace. Prevent leaking kernel 'data' addresses by discarding such samples w...
```diff diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c index c46500592002..e36c9c63c97c 100644 --- a/arch/x86/events/amd/ibs.c +++ b/arch/x86/events/amd/ibs.c @@ -941,6 +941,8 @@ static void perf_ibs_get_mem_lock(union ibs_op_data3 *op_data3, data_src->mem_lock = PERF_MEM_LOCK_LOCKED; } +/* Be...
d9f87802676bb23b9425aea8ad95c76ad9b50c6e
Analyze and fix the following issue in the Linux kernel code: x86/Kconfig: Make CONFIG_PCI_CNB20LE_QUIRK depend on X86_32
Problem Details: I was unable to find a good description of the ServerWorks CNB20LE chipset. However, it was probably exclusively used with the Pentium III processor (this CPU model was used in all references to it that I found where the CPU model was provided: dmesgs in [1] and [2]; [3] page 2; [4]-[7]). As is widely...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index a079ecf15c71..1090eda3c29f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2929,13 +2929,21 @@ config MMCONF_FAM10H depends on X86_64 && PCI_MMCONFIG && ACPI config PCI_CNB20LE_QUIRK - bool "Read CNB20LE Host Bridge Windows" if EXPERT - depend...
31be5041dca37a67c11042678c55804e964e5145
Analyze and fix the following issue in the Linux kernel code: x86/Kconfig: Always enable ARCH_SPARSEMEM_ENABLE
Problem Details: It appears that (X86_64 || X86_32) is always true on x86. This logical OR directive was introduced in: 6ea3038648da ("arch/x86: remove depends on CONFIG_EXPERIMENTAL") By (EXPERIMENTAL && X86_32) turning into (X86_32). Since this change was an identity transformation, nobody noticed that the condi...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 08bc939abc13..442936d864c6 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1563,7 +1563,6 @@ config ARCH_FLATMEM_ENABLE config ARCH_SPARSEMEM_ENABLE def_bool y - depends on X86_64 || NUMA || X86_32 select SPARSEMEM_STATIC if X86_32 select ...
6287fbad1cd91f0c25cdc3a580499060828a8f30
Analyze and fix the following issue in the Linux kernel code: fs/procfs: fix the comment above proc_pid_wchan()
Problem Details: proc_pid_wchan() used to report kernel addresses to user space but that is no longer the case today. Bring the comment above proc_pid_wchan() in sync with the implementation. Link: https://lkml.kernel.org/r/20250319210222.1518771-1-bvanassche@acm.org Fixes: b2f73922d119 ("fs/proc, core/debug: Don't e...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index cd89e956c322..7feb8f41aa25 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -416,7 +416,7 @@ static const struct file_operations proc_pid_cmdline_ops = { #ifdef CONFIG_KALLSYMS /* * Provides a wchan file via kallsyms in a proper one-value-per-file format...
2158599a4b6d735e1a57c8320723ca74c42dd7ae
Analyze and fix the following issue in the Linux kernel code: samples: add hung_task detector mutex blocking sample
Problem Details: Add a hung_task detector mutex blocking test sample code. This module will create a dummy file on the debugfs. That file will cause the read process to sleep for enough long time (256 seconds) while holding a mutex. As a result, the second process will wait on the mutex for a prolonged duration and ...
```diff diff --git a/samples/Kconfig b/samples/Kconfig index 820e00b2ed68..09011be2391a 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -300,6 +300,15 @@ config SAMPLE_CHECK_EXEC demonstrate how they should be used with execveat(2) + AT_EXECVE_CHECK. +config SAMPLE_HUNG_TASK + tristate "Hung task detect...
d893aca973c315ee985e1f8220fcd239c0ab7d19
Analyze and fix the following issue in the Linux kernel code: x86/mm: restore early initialization of high_memory for 32-bits
Problem Details: Kernel test robot reports the following crash on 32-bit system with HIGHMEM and DEBUG_VIRTUAL: [ 0.056128][ T0] kernel BUG at arch/x86/mm/physaddr.c:77! PANIC: early exception 0x06 IP 60:c116539d error 0 cr2 0x0 [ 0.056916][ T0] CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted 6.14.0-rc4-000...
```diff diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 95b2758b4e4d..f69d2436d780 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -626,6 +626,9 @@ void __init initmem_init(void) highstart_pfn = max_low_pfn; printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", pages_to_mb(highend_...
1b0449544c6482179ac84530b61fc192a6527bfd
Analyze and fix the following issue in the Linux kernel code: mm/vmscan: don't try to reclaim hwpoison folio
Problem Details: Syzkaller reports a bug as follows: Injecting memory failure for pfn 0x18b00e at process virtual address 0x20ffd000 Memory failure: 0x18b00e: dirty swapcache page still referenced by 2 users Memory failure: 0x18b00e: recovery action for dirty swapcache page: Failed page: refcount:2 mapcount:0 mapping:...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 98e6ac82e428..2b2ab386cab5 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1127,6 +1127,13 @@ retry: if (!folio_trylock(folio)) goto keep; + if (folio_contain_hwpoisoned_page(folio)) { + unmap_poisoned_folio(folio, folio_pfn(folio), false); + folio_unloc...
5f5ee52d4f58605330b09851273d6e56aaadd29e
Analyze and fix the following issue in the Linux kernel code: mm/hwpoison: introduce folio_contain_hwpoisoned_page() helper
Problem Details: Patch series "mm/vmscan: don't try to reclaim hwpoison folio". Fix a bug during memory reclaim if folio is hwpoisoned. This patch (of 2): Introduce helper folio_contain_hwpoisoned_page() to check if the entire folio is hwpoisoned or it contains hwpoisoned pages. Link: https://lkml.kernel.org/r/202...
```diff diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f26ce54c7aa4..68f4b188fc6b 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -1098,6 +1098,12 @@ static inline bool is_page_hwpoison(const struct page *page) return folio_test_hugetlb(folio) && PageHWPoison(&f...