id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
408ac28c62f0b869d5477be12dd9eddc0c37242e
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix AP chandef capturing in CSA
Problem Details: When the CSA is announced with only HT elements, the AP chandef isn't captured correctly, leading to crashes in the later code that checks for TPE changes during CSA. Capture the AP chandef correctly in both cases to fix this. Reported-by: Jouni Malinen <j@w1.fi> Fixes: 4540568136fe ("wifi: mac80211:...
```diff diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c index e91ca4ccdd37..073ff9e0f397 100644 --- a/net/mac80211/spectmgmt.c +++ b/net/mac80211/spectmgmt.c @@ -343,6 +343,9 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, break; } + /* capture the AP configuration */ + ...
003eae5a28c6c9d50290a4ac9b955be912f24c9f
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: correctly reference TSO page information
Problem Details: The code got copied from get_workaround_page, but here p->page is the correct way to reference the page. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Fixes: adc902ceada2 ("wifi: iwlwifi: keep the TSO and workaround pages mapped") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Da...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c index 748772fa6b3e..22d482ae53d9 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c @@ -1770,7 +1770,7 @@ static void *iwl_pcie_get_page_hdr(struct i...
b8ec9dba02a74797421c52b1226b23a4302362a6
Analyze and fix the following issue in the Linux kernel code: dt-bindings: fsl-qdma: fix interrupts 'if' check logic
Problem Details: All compatible string include 'fsl,ls1021a-qdma'. Previous if check are always true. if: properties: compatible: contains: enum: - fsl,ls1021a-qdma Change to check other compatible strings to get correct logic and fix below CHECK_DTB warnings. arch/arm64/boot/dts/freescal...
```diff diff --git a/Documentation/devicetree/bindings/dma/fsl-qdma.yaml b/Documentation/devicetree/bindings/dma/fsl-qdma.yaml index 1b689a2529c8..1b9ebdbe528a 100644 --- a/Documentation/devicetree/bindings/dma/fsl-qdma.yaml +++ b/Documentation/devicetree/bindings/dma/fsl-qdma.yaml @@ -89,8 +89,16 @@ allOf: co...
33891539f9d6f245e93a76e3fb5791338180374f
Analyze and fix the following issue in the Linux kernel code: drm/xe/display/xe_hdcp_gsc: Free arbiter on driver removal
Problem Details: Free arbiter allocated in intel_hdcp_gsc_init(). Fixes: 152f2df954d8 ("drm/xe/hdcp: Enable HDCP for XE") Cc: Suraj Kandpal <suraj.kandpal@intel.com> Cc: Arun R Murthy <arun.r.murthy@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Rodrigo...
```diff diff --git a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c index 14b8b4278317..990285aa9b26 100644 --- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c +++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c @@ -160,12 +160,16 @@ void intel_hdcp_gsc_fini(struct xe_device *xe) { struct ...
981ad93c89a3c600dee9795d3ead105acc805483
Analyze and fix the following issue in the Linux kernel code: rust: warn about `bindgen` versions 0.66.0 and 0.66.1
Problem Details: `bindgen` versions 0.66.0 and 0.66.1 panic due to C string literals with NUL characters [1]: panicked at .cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.66.0/codegen/mod.rs:717:71: called `Result::unwrap()` on an `Err` value: FromBytesWithNulError { kind: InteriorNul(4) } Thus,...
```diff diff --git a/scripts/rust_is_available.sh b/scripts/rust_is_available.sh index 4531f9dd19d3..5262c56dd674 100755 --- a/scripts/rust_is_available.sh +++ b/scripts/rust_is_available.sh @@ -161,6 +161,19 @@ if [ "$rust_bindings_generator_cversion" -lt "$rust_bindings_generator_min_cvers echo >&2 "***" exit 1 ...
9e98db17837093cb0f4dcfcc3524739d93249c45
Analyze and fix the following issue in the Linux kernel code: rust: work around `bindgen` 0.69.0 issue
Problem Details: `bindgen` 0.69.0 contains a bug: `--version` does not work without providing a header [1]: error: the following required arguments were not provided: <HEADER> Usage: bindgen <FLAGS> <OPTIONS> <HEADER> -- <CLANG_ARGS>... Thus, in preparation for supporting several `bindgen` versions, wo...
```diff diff --git a/init/Kconfig b/init/Kconfig index febdea2afc3b..94e20d3b99d4 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1928,7 +1928,10 @@ config RUSTC_VERSION_TEXT config BINDGEN_VERSION_TEXT string depends on RUST - default $(shell,command -v $(BINDGEN) >/dev/null 2>&1 && $(BINDGEN) --version || echo ...
c9add2e607a1ca63cc84bd1a7ab04d513096f37e
Analyze and fix the following issue in the Linux kernel code: zorro: make match function take a const pointer
Problem Details: In commit d69d80484598 ("driver core: have match() callback in struct bus_type take a const *"), the match callback for busses was changed to take a const pointer to struct device_driver. Unfortunately I missed fixing up the zorro code, and was only noticed after-the-fact by the kernel test robot. Re...
```diff diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index f49d19977e82..e7d3af1a223f 100644 --- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c @@ -118,10 +118,10 @@ EXPORT_SYMBOL(zorro_unregister_driver); * supported, and 0 if there is no match. */ -static ...
69c7b2fe4c9cc1d3b1186d1c5606627ecf0de883
Analyze and fix the following issue in the Linux kernel code: libceph: fix race between delayed_work() and ceph_monc_stop()
Problem Details: The way the delayed work is handled in ceph_monc_stop() is prone to races with mon_fault() and possibly also finish_hunting(). Both of these can requeue the delayed work which wouldn't be canceled by any of the following code in case that happens after cancel_delayed_work_sync() runs -- __close_sessio...
```diff diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index f263f7e91a21..ab66b599ac47 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c @@ -1085,13 +1085,19 @@ static void delayed_work(struct work_struct *work) struct ceph_mon_client *monc = container_of(work, struct ceph_mon_client, del...
3291d2327e4f1e83f290c26ab7e9d17fd8e1bb2e
Analyze and fix the following issue in the Linux kernel code: i2c: rcar: WARN about spurious irqs
Problem Details: The FIXME is very old and probably needed because of some driver bug like insufficient initialization. It may well be that it was fixed meanwhile but we never know because the spurious irq is silently ignored. Add now a call trace when this happens so we have more information in case the issue still ex...
```diff diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index 828aa2ea0fe4..efa306076493 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -545,7 +545,7 @@ static void rcar_i2c_irq_send(struct rcar_i2c_priv *priv, u32 msr) u32 irqs_to_clear = MDE; /* FIXM...
a23b018c3bf646274f02edd46bf448c20c826d94
Analyze and fix the following issue in the Linux kernel code: firmware_loader: fix soundness issue in `request_internal`
Problem Details: `request_internal` must be called with one of the following function pointers: request_firmware(), firmware_request_nowarn(), firmware_request_platform() or request_firmware_direct(). The previous `FwFunc` alias did not guarantee this, which is unsound. In order to fix this up, implement `FwFunc` as ...
```diff diff --git a/rust/kernel/firmware.rs b/rust/kernel/firmware.rs index 106a928a535e..2ba03af9f036 100644 --- a/rust/kernel/firmware.rs +++ b/rust/kernel/firmware.rs @@ -7,10 +7,23 @@ use crate::{bindings, device::Device, error::Error, error::Result, str::CStr}; use core::ptr::NonNull; -// One of the following...
2c61b8c51d21d1b10c2881aa9c9918ff49f6fb7d
Analyze and fix the following issue in the Linux kernel code: firmware_loader: annotate doctests as `no_run`
Problem Details: The doctests of `Firmware` are compile-time only tests, since they require a proper `Device` and a valid path to a (firmware) blob in order to do something sane on runtime - we can't satisfy both of those requirements. Hence, configure the example as `no_run`. Unfortunately, the kernel's Rust build s...
```diff diff --git a/rust/kernel/firmware.rs b/rust/kernel/firmware.rs index 386c8fb44785..106a928a535e 100644 --- a/rust/kernel/firmware.rs +++ b/rust/kernel/firmware.rs @@ -26,14 +26,18 @@ type FwFunc = /// /// # Examples /// -/// ``` +/// ```no_run /// # use kernel::{c_str, device::Device, firmware::Firmware}; ...
7fbad577c82c5dd6db7217855c26f51554e53d85
Analyze and fix the following issue in the Linux kernel code: drm/i915/display: WA for Re-initialize dispcnlunitt1 xosc clock
Problem Details: The dispcnlunit1_cp_xosc_clk should be de-asserted in display off and only asserted in display on. As part of this workaround, Display driver shall execute set-reset sequence at the end of the initialize sequence to ensure clk does not remain active in display OFF. --v2: - Rebase. --v3: - Correct HSD ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c index e288a1b21d7e..0af1e34ef2a7 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.c +++ b/drivers/gpu/drm/i915/display/intel_display_power.c @@ -1704,6 +1704,14 @@ static void icl_di...
c537fb4e3d36e7cd1a0837dd577cd30d3d64f1bc
Analyze and fix the following issue in the Linux kernel code: drm/qxl: Pin buffer objects for internal mappings
Problem Details: Add qxl_bo_pin_and_vmap() that pins and vmaps a buffer object in one step. Update callers of the regular qxl_bo_vmap(). Fixes a bug where qxl accesses an unpinned buffer object while it is being moved; such as with the monitor-description BO. An typical error is shown below. [ 4.303586] [drm:drm_at...
```diff diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 86a5dea710c0..bc24af08dfcd 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -584,11 +584,11 @@ static struct qxl_bo *qxl_create_cursor(struct qxl_device *qdev, if (ret) goto err...
500c20fe3ea4a241f7ea58a414343367ab2e4085
Analyze and fix the following issue in the Linux kernel code: i2c: add debug message for detected HostNotify alerts
Problem Details: Setting up HostNotify can be tricky. Support debugging by stating when a HostNotify alert was received independent of the irq being mapped. Especially useful with the in-kernel i2c testunit. Update documentation as well. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Andi ...
```diff diff --git a/Documentation/i2c/slave-testunit-backend.rst b/Documentation/i2c/slave-testunit-backend.rst index 0df60c7c0be4..37142a48ab35 100644 --- a/Documentation/i2c/slave-testunit-backend.rst +++ b/Documentation/i2c/slave-testunit-backend.rst @@ -99,6 +99,11 @@ Example to send a notification after 10ms:: ...
ea74bf9ccba9ae80fc0766c07c4abaef927e9e63
Analyze and fix the following issue in the Linux kernel code: drm/xe: Generate oob before compiling anything
Problem Details: Instead of keep adding more dependencies as WAs are needed in different places of the driver, just add a rule with all the objects so the code generation happens before anything else. While at it, group lines related to wa_oob in the Makefile. v2: Prefix $(obj) when declaring dependency Reviewed-by:...
```diff diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index 0eb0acc4f198..1ff9602a52f6 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -12,35 +12,15 @@ subdir-ccflags-$(CONFIG_DRM_XE_WERROR) += -Werror subdir-ccflags-y += -I$(obj) -I$(src) # generated sources -...
f7c696a56cc7d70515774a24057b473757ec6089
Analyze and fix the following issue in the Linux kernel code: io_uring/napi: Remove unnecessary s64 cast
Problem Details: Since the do_div() macro casts the divisor to u32 anyway, remove the unnecessary s64 cast and fix the following Coccinelle/coccicheck warning reported by do_div.cocci: WARNING: do_div() does a 64-by-32 division, please consider using div64_s64 instead Signed-off-by: Thorsten Blum <thorsten.blum@tob...
```diff diff --git a/io_uring/napi.c b/io_uring/napi.c index 8c18ede595c4..762254a7ff3f 100644 --- a/io_uring/napi.c +++ b/io_uring/napi.c @@ -283,7 +283,7 @@ void __io_napi_adjust_timeout(struct io_ring_ctx *ctx, struct io_wait_queue *iow s64 poll_to_ns = timespec64_to_ns(ts); if (poll_to_ns > 0) { u64 va...
044b45be04cb16125a0eccba532e88dc529f64de
Analyze and fix the following issue in the Linux kernel code: PCI: qcom: Prevent use of uninitialized data in qcom_pcie_suspend_noirq()
Problem Details: Smatch complains that "ret" could be uninitialized if "pcie->icc_mem" is NULL and "pm_suspend_target_state == PM_SUSPEND_MEM". Silence this warning by initializing ret to zero. Fixes: 78b5f6f8855e ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/202407081805...
```diff diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 5973df2238b0..e60432b238fb 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1637,7 +1637,7 @@ err_pm_runtime_put: static int qcom_pcie_suspend_noirq(struct devi...
9553636b5757789536d0d23c83e7fba11812f958
Analyze and fix the following issue in the Linux kernel code: PCI: qcom: Prevent potential error pointer dereference
Problem Details: Only call dev_pm_opp_put() if dev_pm_opp_find_freq_exact() succeeds; otherwise it leads to an error pointer dereference. Fixes: 78b5f6f8855e ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/20240708180539.1447307-3-dan.carpenter@linaro.org Signed-off-by: Dan ...
```diff diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 067ccb9cc6d0..5973df2238b0 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1447,8 +1447,8 @@ static void qcom_pcie_icc_opp_update(struct qcom_pcie *pcie) if...
101e5c5c4e766901492b51c33b34af5f775b043f
Analyze and fix the following issue in the Linux kernel code: PCI: qcom: Fix missing error code in qcom_pcie_probe()
Problem Details: Return a negative error code if dev_pm_opp_find_freq_floor() fails; don't return success. Fixes: 78b5f6f8855e ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/20240708180539.1447307-2-dan.carpenter@linaro.org Signed-off-by: Dan Carpenter <dan.carpenter@linaro...
```diff diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index c8cbfb91e1d5..067ccb9cc6d0 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1578,7 +1578,8 @@ static int qcom_pcie_probe(struct platform_device *pdev) if (!ret...
3d1bec293378700dddc087d4d862306702276c23
Analyze and fix the following issue in the Linux kernel code: minixfs: Fix minixfs_rename with HIGHMEM
Problem Details: minixfs now uses kmap_local_page(), so we can't call kunmap() to undo it. This one call was missed as part of the commit this fixes. Fixes: 6628f69ee66a (minixfs: Use dir_put_page() in minix_unlink() and minix_rename()) Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.k...
```diff diff --git a/fs/minix/namei.c b/fs/minix/namei.c index d6031acc34f0..a944a0f17b53 100644 --- a/fs/minix/namei.c +++ b/fs/minix/namei.c @@ -213,8 +213,7 @@ static int minix_rename(struct mnt_idmap *idmap, if (!new_de) goto out_dir; err = minix_set_link(new_de, new_page, old_inode); - kunmap(new_page);...
81fcf28e74a3ffda67a6896cd38843d80bc9ec68
Analyze and fix the following issue in the Linux kernel code: PCI: Document hybrid devres hazards
Problem Details: These functions: pci_request_region() pci_request_regions() pci_request_regions_exclusive() pci_request_selected_regions() pci_request_selected_regions_exclusive() pci_intx() are "hybrid" functions that are managed if pcim_enable_device() has been called, but unmanaged otherwise. This is...
```diff diff --git a/drivers/pci/iomap.c b/drivers/pci/iomap.c index c9725428e387..a715a4803c95 100644 --- a/drivers/pci/iomap.c +++ b/drivers/pci/iomap.c @@ -23,6 +23,10 @@ * * @maxlen specifies the maximum length to map. If you want to get access to * the complete BAR from offset to the end, pass %0 here. + * +...
e354bb84a4c1cbb928e052260cc5ce12ec6722ff
Analyze and fix the following issue in the Linux kernel code: PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()
Problem Details: Deprecate pcim_iomap_table(). It returns a pointer to a table of ioremapped BARs, or NULL if it fails. This makes uses like this: addr = pcim_iomap_table(pdev)[0]; problematic because it causes a NULL pointer dereference on failure. Callers should use pcim_iomap() instead. Deprecate pcim_iomap_r...
```diff diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 8388ca463a7a..a5957b4cbc0e 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -510,7 +510,7 @@ static void pcim_iomap_release(struct device *gendev, void *res) } /** - * pcim_iomap_table - access iomap allocation table + * pcim_ioma...
99fb9531886d8ffa0aa9a693089784c7338518a3
Analyze and fix the following issue in the Linux kernel code: libbpf: fix BPF skeleton forward/backward compat handling
Problem Details: BPF skeleton was designed from day one to be extensible. Generated BPF skeleton code specifies actual sizes of map/prog/variable skeletons for that reason and libbpf is supposed to work with newer/older versions correctly. Unfortunately, it was missed that we implicitly embed hard-coded most up-to-dat...
```diff diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 30f121754d83..8625c948f60a 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -13712,14 +13712,15 @@ int libbpf_num_possible_cpus(void) static int populate_skeleton_maps(const struct bpf_object *obj, struct bpf_map_ske...
06e71ad534881d2a09ced7509d2ab0daedac4c96
Analyze and fix the following issue in the Linux kernel code: bpftool: improve skeleton backwards compat with old buggy libbpfs
Problem Details: Old versions of libbpf don't handle varying sizes of bpf_map_skeleton struct correctly. As such, BPF skeleton generated by newest bpftool might not be compatible with older libbpf (though only when libbpf is used as a shared library), even though it, by design, should. Going forward libbpf will be fix...
```diff diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c index 51eaed76db97..5a4d3240689e 100644 --- a/tools/bpf/bpftool/gen.c +++ b/tools/bpf/bpftool/gen.c @@ -852,24 +852,41 @@ codegen_maps_skeleton(struct bpf_object *obj, size_t map_cnt, bool mmaped, bool { struct bpf_map *map; char ident[256]; - ...
e1533b6319ab9c3a97dad314dd88b3783bc41b69
Analyze and fix the following issue in the Linux kernel code: net: ethernet: lantiq_etop: fix double free in detach
Problem Details: The number of the currently released descriptor is never incremented which results in the same skb being released multiple times. Fixes: 504d4721ee8e ("MIPS: Lantiq: Add ethernet driver") Reported-by: Joe Perches <joe@perches.com> Closes: https://lore.kernel.org/all/fc1bf93d92bb5b2f99c6c62745507cc22f3...
```diff diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index 5352fee62d2b..0b9982804370 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c @@ -217,9 +217,9 @@ ltq_etop_free_channel(struct net_device *dev, struct ltq_etop_chan *ch) if (ch->dma...
f1ac0b7dcd49edf3ea5cc9345fdae70b6c2b199b
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: CT: Initialize err to 0 to avoid warning
Problem Details: It is theoretically possible to return bogus uninitialized values from mlx5_tc_ct_entry_replace_rules, even though in practice this will never be the case as the flow rule will be part of at least the regular ct table or the ct nat table, if not both. But to reduce noise, initialize err to 0. Fixes: ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c index b49d87a51f21..8cf8ba2622f2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c @@ -1145,7 +1145,7 @@ mlx5_tc_ct_entry_re...
7204730b330460a3622bdbe038c492272d4d9a00
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: SHAMPO, Add missing aggregate counter
Problem Details: When the rx_hds_nodata_packets/bytes counters were added, the aggregate counters were omitted. This patch adds them. Fixes: e95c5b9e8912 ("net/mlx5e: SHAMPO, Add header-only ethtool counters for header data split") Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c index db1cac68292f..e7a3290a708a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c @@ -142,6 +142,8 @@ static const struct c...
b45c76e5f43fa66868e874a42a29bd0288a5ddce
Analyze and fix the following issue in the Linux kernel code: mlxsw: Warn about invalid accesses to array fields
Problem Details: A forgotten or buggy variable initialization can cause out-of-bounds access to a register or other item array field. For an overflow, such access would mangle adjacent parts of the register payload. For an underflow, due to all variables being unsigned, the access would likely trample unrelated memory....
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/item.h b/drivers/net/ethernet/mellanox/mlxsw/item.h index cfafbeb42586..a619a0736bd1 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/item.h +++ b/drivers/net/ethernet/mellanox/mlxsw/item.h @@ -218,6 +218,10 @@ __mlxsw_item_bit_array_offset(const struct mlxsw_ite...
01fc5142ae6b06b61ed51a624f2732d6525d8ea3
Analyze and fix the following issue in the Linux kernel code: i40e: Fix XDP program unloading while removing the driver
Problem Details: The commit 6533e558c650 ("i40e: Fix reset path while removing the driver") introduced a new PF state "__I40E_IN_REMOVE" to block modifying the XDP program while the driver is being removed. Unfortunately, such a change is useful only if the ".ndo_bpf()" callback was called out of the rmmod context beca...
```diff diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 284c3fad5a6e..310513d9321b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -13293,6 +13293,10 @@ static int i40e_xdp_setup(struct i40e_vsi *v...
b10545b6b86b7a0b3e26b4c2a5c99b72d49bc4de
Analyze and fix the following issue in the Linux kernel code: tracing/kprobes: Fix build error when find_module() is not available
Problem Details: The kernel test robot reported that the find_module() is not available if CONFIG_MODULES=n. Fix this error by hiding find_modules() in #ifdef CONFIG_MODULES with related rcu locks as try_module_get_by_name(). Link: https://lore.kernel.org/all/172056819167.201571.250053007194508038.stgit@devnote2/ Rep...
```diff diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 4cee3442bcce..61a6da808203 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c @@ -794,6 +794,24 @@ static int validate_module_probe_symbol(const char *modname, const char *symbol) return 0; } +#ifdef CONFIG...
a0aab7d7c8605f53ea77dfaafec1dcc0bfb1f232
Analyze and fix the following issue in the Linux kernel code: selftests: drv-net: rss_ctx: fix cleanup in the basic test
Problem Details: The basic test may fail without resetting the RSS indir table. Use the .exec() method to run cleanup early since we re-test with traffic that returning to default state works. While at it reformat the doc a tiny bit. Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/202...
```diff diff --git a/tools/testing/selftests/drivers/net/hw/rss_ctx.py b/tools/testing/selftests/drivers/net/hw/rss_ctx.py index 475f2a63fcd5..de2a55c0f35c 100755 --- a/tools/testing/selftests/drivers/net/hw/rss_ctx.py +++ b/tools/testing/selftests/drivers/net/hw/rss_ctx.py @@ -64,9 +64,8 @@ def _get_rx_cnts(cfg, prev=...
2baa5fc389b9f7c724d683d213d107f8c87f6715
Analyze and fix the following issue in the Linux kernel code: PCI: dw-rockchip: Fix weird indentation
Problem Details: Fix the indentation of rockchip_pcie_{readl,writel}_apb() parameters to match the opening parenthesis. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-7-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@ker...
```diff diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c index 61b1acba7182..3dfed08ef456 100644 --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c @@ -60,14 +60,13 @@ struct rockchip_pcie { struct irq_domai...
28b8d7793b8573563b3d45321376f36168d77b1e
Analyze and fix the following issue in the Linux kernel code: PCI: dw-rockchip: Fix initial PERST# GPIO value
Problem Details: PERST# is active low according to the PCIe specification. However, the existing pcie-dw-rockchip.c driver does: gpiod_set_value(..., 0); msleep(100); gpiod_set_value(..., 1); when asserting + deasserting PERST#. This is of course wrong, but because all the device trees for this compatible string ...
```diff diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c index a13ca83ce260..61b1acba7182 100644 --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c @@ -245,7 +245,7 @@ static int rockchip_pcie_resource_get(str...
206c4f778b3c7c8950f5c6be518e0a113102a13e
Analyze and fix the following issue in the Linux kernel code: PCI: dw-rockchip: Add error messages in .probe() error paths
Problem Details: Drivers that silently fail to probe provide a bad user experience and make it unnecessarily hard to debug such a failure. Fix it by using dev_err_probe() instead of a plain return. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240227141256.413055-2-ukleinek@debian.org Signed-off...
```diff diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c index d6842141d384..a13ca83ce260 100644 --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c @@ -225,11 +225,15 @@ static int rockchip_pcie_clk_init(struc...
840b7a5edf88fe678c60dee88a135647c0ea4375
Analyze and fix the following issue in the Linux kernel code: PCI: rockchip: Use GPIOD_OUT_LOW flag while requesting ep_gpio
Problem Details: Rockchip platforms use 'GPIO_ACTIVE_HIGH' flag in the devicetree definition for ep_gpio. This means, whatever the logical value set by the driver for the ep_gpio, physical line will output the same logic level. For instance, gpiod_set_value_cansleep(rockchip->ep_gpio, 0); --> Level low gpiod_set_...
```diff diff --git a/drivers/pci/controller/pcie-rockchip.c b/drivers/pci/controller/pcie-rockchip.c index 0ef2e622d36e..c07d7129f1c7 100644 --- a/drivers/pci/controller/pcie-rockchip.c +++ b/drivers/pci/controller/pcie-rockchip.c @@ -121,7 +121,7 @@ int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip) if (ro...
c47f90be4c89d14051d43f0c88eafddf67c834ea
Analyze and fix the following issue in the Linux kernel code: PCI: rockchip-host: Fix rockchip_pcie_host_init_port() PERST# handling
Problem Details: PCIe CEM r5.1, sec 2.9.2, mandates that the PERST# signal must remain asserted for at least 100 usec (Tperst-clk) after the PCIe reference clock becomes stable (if a reference clock is supplied), and for at least 100 msec after the power is stable (Tpvperl, defined by the macro PCIE_T_PVPERL_MS). Modi...
```diff diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/controller/pcie-rockchip-host.c index 300b9dc85ecc..fc868251e570 100644 --- a/drivers/pci/controller/pcie-rockchip-host.c +++ b/drivers/pci/controller/pcie-rockchip-host.c @@ -322,6 +322,7 @@ static int rockchip_pcie_host_init_port(struct ro...
c2a57ee0f2f1ad8c970ff58b78a43e85abbdeb7f
Analyze and fix the following issue in the Linux kernel code: PCI: dwc: Fix index 0 incorrectly being interpreted as a free ATU slot
Problem Details: When PERST# assert and deassert happens on the PERST# supported platforms, both iATU0 and iATU6 will map inbound window to BAR0. DMA will access the area that was previously allocated (iATU0) for BAR0, instead of the new area (iATU6) for BAR0. Right now, this isn't an issue because both iATU0 and iATU...
```diff diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index 2063cf2049e5..caa048761141 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -161,7 +161,7 @@ static int dw_pcie_ep_inbound_atu...
96447ede32d81a88c7a40ca2d0ac078268f648e0
Analyze and fix the following issue in the Linux kernel code: Documentation: PCI: pci-endpoint: Fix EPF ops list
Problem Details: With commit 5779dd0a7dbd7 ("PCI: endpoint: Use notification chain mechanism to notify EPC events to EPF") the linkup callback has been removed and replaced by EPC event notifications. With commit 256ae475201b1 ("PCI: endpoint: Add pci_epf_ops to expose function-specific attrs") a new (optional) add_cf...
```diff diff --git a/Documentation/PCI/endpoint/pci-endpoint.rst b/Documentation/PCI/endpoint/pci-endpoint.rst index 4f5622a65555..21507e3cc238 100644 --- a/Documentation/PCI/endpoint/pci-endpoint.rst +++ b/Documentation/PCI/endpoint/pci-endpoint.rst @@ -172,8 +172,8 @@ by the PCI endpoint function driver. * bind: o...
1ae27dacae42c0259d17097eb7dcb98d16568cce
Analyze and fix the following issue in the Linux kernel code: misc: pci_endpoint_test: Remove unused pci_endpoint_test_bar_{readl,writel} functions
Problem Details: These two functions are defined in the pci_endpoint_test.c file, but not called elsewhere, so delete these unused functions. This fixes the following warning: drivers/misc/pci_endpoint_test.c:144:19: warning: unused function 'pci_endpoint_test_bar_readl'. drivers/misc/pci_endpoint_test.c:150:20: ...
```diff diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index edced893221e..3aaaf47fa4ee 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -144,18 +144,6 @@ static inline void pci_endpoint_test_writel(struct pci_endpoint_test *test, writel(value, ...
f4a180247e06c69e7d8fac4eb14d172c3a5d43a3
Analyze and fix the following issue in the Linux kernel code: hwmon: (g762) Initialize fans after configuring clock
Problem Details: Adding support for G761 included adding support for an internal clock. Enabling the internal clock requires setting a bit in the FAN_CMD2 register. This is implemented in g762_fan_init(). However, g762_fan_init() is called before clock support is selected, and the flag indicating that the internal cloc...
```diff diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c index a00cf3245eec..4fa3aa1271da 100644 --- a/drivers/hwmon/g762.c +++ b/drivers/hwmon/g762.c @@ -44,6 +44,7 @@ #define DRVNAME "g762" static const struct i2c_device_id g762_id[] = { + { "g761" }, { "g762" }, { "g763" }, { } @@ -1083,15 +1084,16...
f708f6970cc9d6bac71da45c129482092e710537
Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: fix kernel NULL pointer dereference when migrating hugetlb folio
Problem Details: A kernel crash was observed when migrating hugetlb folio: BUG: kernel NULL pointer dereference, address: 0000000000000008 PGD 0 P4D 0 Oops: Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 3435 Comm: bash Not tainted 6.10.0-rc6-00450-g8578ca01f21f #66 RIP: 0010:__folio_undo_large_rmappable+0x70/0xb0 RSP:...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index fe44324d6383..43e1af868cfd 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2162,6 +2162,9 @@ static struct folio *alloc_buddy_hugetlb_folio(struct hstate *h, nid = numa_mem_id(); retry: folio = __folio_alloc(gfp_mask, order, nid, nmask); + /* Ensure hugetlb ...
5596d9e8b553dacb0ac34bcf873cbbfb16c3ba3e
Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: fix potential race in __update_and_free_hugetlb_folio()
Problem Details: There is a potential race between __update_and_free_hugetlb_folio() and try_memory_failure_hugetlb(): CPU1 CPU2 __update_and_free_hugetlb_folio try_memory_failure_hugetlb folio_test_hugetlb -- It's still hugetlb folio. folio_clear_hugetlb_hwpoison spin_lock_irq(&hugetlb_l...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 2afb70171b76..fe44324d6383 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1725,13 +1725,6 @@ static void __update_and_free_hugetlb_folio(struct hstate *h, return; } - /* - * Move PageHWPoison flag from head page to the raw error pages, - * which makes an...
24be02a42181f0707be0498045c4c4b13273b16d
Analyze and fix the following issue in the Linux kernel code: filemap: replace pte_offset_map() with pte_offset_map_nolock()
Problem Details: The vmf->ptl in filemap_fault_recheck_pte_none() is still set from handle_pte_fault(). But at the same time, we did a pte_unmap(vmf->pte). After a pte_unmap(vmf->pte) unmap and rcu_read_unlock(), the page table may be racily changed and vmf->ptl maybe fails to protect the actual page table. Fix this...
```diff diff --git a/mm/filemap.c b/mm/filemap.c index 298485d4b992..657bcd887fdb 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -3231,7 +3231,8 @@ static vm_fault_t filemap_fault_recheck_pte_none(struct vm_fault *vmf) if (!(vmf->flags & FAULT_FLAG_ORIG_PTE_VALID)) return 0; - ptep = pte_offset_map(vmf->pmd, vm...
86e50ab6f8a0f5d5e933bece9d0b1d0ddaa4162e
Analyze and fix the following issue in the Linux kernel code: arch/xtensa: always_inline get_current() and current_thread_info()
Problem Details: Mark get_current() and current_thread_info() functions as always_inline to fix the following modpost warning: WARNING: modpost: vmlinux: section mismatch in reference: get_current+0xc (section: .text.unlikely) -> initcall_level_names (section: .init.data) The warning happens when these functions are ...
```diff diff --git a/arch/xtensa/include/asm/current.h b/arch/xtensa/include/asm/current.h index 08010dbf5e09..df275d554788 100644 --- a/arch/xtensa/include/asm/current.h +++ b/arch/xtensa/include/asm/current.h @@ -19,7 +19,7 @@ struct task_struct; -static inline struct task_struct *get_current(void) +static __alw...
5a5aa3c3769051c02a2210cc1b7e12a0833b76c9
Analyze and fix the following issue in the Linux kernel code: sched.h: always_inline alloc_tag_{save|restore} to fix modpost warnings
Problem Details: Mark alloc_tag_{save|restore} as always_inline to fix the following modpost warnings: WARNING: modpost: vmlinux: section mismatch in reference: alloc_tag_save+0x1c (section: .text.unlikely) -> initcall_level_names (section: .init.data) WARNING: modpost: vmlinux: section mismatch in reference: alloc_ta...
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index 61591ac6eab6..a5f4b48fca18 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2192,13 +2192,13 @@ static inline int sched_core_idle_cpu(int cpu) { return idle_cpu(cpu); } extern void sched_set_stop_task(int cpu, struct task_struct...
e7a6395a889a82edb1cdcebc2c66646aca454658
Analyze and fix the following issue in the Linux kernel code: sched_ext: Make scx_bpf_reenqueue_local() skip tasks that are being migrated
Problem Details: When a running task is migrated to another CPU, the stop_task is used to preempt the running task and migrate it. This, expectedly, invokes ops.cpu_release(). If the BPF scheduler then calls scx_bpf_reenqueue_local(), it re-enqueues all tasks on the local DSQ including the task which is being migrated....
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 0fabfe19327c..f4a7abcec793 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -5646,6 +5646,20 @@ __bpf_kfunc u32 scx_bpf_reenqueue_local(void) */ list_for_each_entry_safe(p, n, &rq->scx.local_dsq.list, scx.dsq_list.node) { + /* + ...
fd0cf516956a0aaa4d899383ee5c2ff191418b5f
Analyze and fix the following issue in the Linux kernel code: sched_ext: Reimplement scx_bpf_reenqueue_local()
Problem Details: scx_bpf_reenqueue_local() is used to re-enqueue tasks on the local DSQ from ops.cpu_release(). Because the BPF scheduler may dispatch tasks to the same local DSQ, to avoid processing the same tasks repeatedly, it first takes the number of queued tasks and processes the task at the head of the queue tha...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index f16d72d72635..0fabfe19327c 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -5628,8 +5628,10 @@ __bpf_kfunc_start_defs(); */ __bpf_kfunc u32 scx_bpf_reenqueue_local(void) { - u32 nr_enqueued, i; + LIST_HEAD(tasks); + u32 nr_enqueued = 0; ...
912315715d7b74f7abdb6f063ebace44ee288af9
Analyze and fix the following issue in the Linux kernel code: PCI: qcom-ep: Disable resources unconditionally during PERST# assert
Problem Details: All EP specific resources are enabled during PERST# deassert. As a counter operation, all resources should be disabled during PERST# assert. There is no point in skipping that if the link was not enabled. This will also result in enablement of the resources twice if PERST# got deasserted again. So rem...
```diff diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c index e2a28939b958..20c4a8063efb 100644 --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c @@ -521,12 +521,6 @@ err_disable_resources: static void qcom_pcie_perst_asse...
d53ab629cff57e450fe69fc90eb1ddc372e8da2d
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt792x: fix scheduler interference in drv own process
Problem Details: Add some time to wait for LP engine to complete its operation before polling pmctrl register. Signed-off-by: Michael Lo <michael.lo@mediatek.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Tested-by: David Ruth <druth@chromium.org> Acked-by: Sean Wang <sean.wang@mediatek.com> Link: htt...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 5f8773364d51..4a58a78d5ed2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -1085,6 +1085,7 @@ bool ____mt76_poll_msec(struct mt76_dev *dev, u32 offse...
8c409989678e92e4a737e7cd2bb04f3efb81071a
Analyze and fix the following issue in the Linux kernel code: f2fs: fix start segno of large section
Problem Details: get_ckpt_valid_blocks() checks valid ckpt blocks in current section. It counts all vblocks from the first to the last segment in the large section. However, START_SEGNO() is used to get the first segno in an SIT block. This patch fixes that to get the correct start segno. Fixes: 61461fc921b7 ("f2fs: f...
```diff diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index e1c0f418aa11..bfc01a521cb9 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -347,7 +347,8 @@ static inline unsigned int get_ckpt_valid_blocks(struct f2fs_sb_info *sbi, unsigned int segno, bool use_section) { if (use_section && __is_large_...
dd44477e7fa15ba3b100dfc67bf7cf083f3dccf6
Analyze and fix the following issue in the Linux kernel code: selinux,smack: remove the capability checks in the removexattr hooks
Problem Details: Commit 61df7b828204 ("lsm: fixup the inode xattr capability handling") moved the responsibility of doing the inode xattr capability checking out of the individual LSMs and into the LSM framework itself. Unfortunately, while the original commit added the capability checks to both the setxattr and remove...
```diff diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 17e6640bbf5b..55c78c318ccd 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3356,15 +3356,9 @@ static int selinux_inode_listxattr(struct dentry *dentry) static int selinux_inode_removexattr(struct mnt_idmap *idmap, ...
d694711355748d9b835d29f4678ae011ed4ce9b6
Analyze and fix the following issue in the Linux kernel code: net: ti: icssg-prueth: add missing deps
Problem Details: Add missing dependency on NET_SWITCHDEV. Fixes: abd5576b9c57 ("net: ti: icssg-prueth: Add support for ICSSG switch firmware") Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com> Reviewed-by: MD Danish Anwar <danishanwar@ti.com> Link: https://patch.msgid....
```diff diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig index f160a3b71499..0d5a862cd78a 100644 --- a/drivers/net/ethernet/ti/Kconfig +++ b/drivers/net/ethernet/ti/Kconfig @@ -188,6 +188,7 @@ config TI_ICSSG_PRUETH select TI_ICSS_IEP select TI_K3_CPPI_DESC_POOL depends on PRU_REMOTE...
5618ced0197932d8a87760f430e53534ec169919
Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: fsl,fman: add ptimer-handle property
Problem Details: Add ptimer-handle property to link to ptp-timer node handle. Fix below warning: arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: fman@1a00000: 'ptimer-handle' do not match any of the regexes: '^ethernet@[a-f0-9]+$', '^mdio@[a-f0-9]+$', '^muram@[a-f0-9]+$', '^phc@[a-f0-9]+$', '^port@[a-f0-9]+$', 'pinc...
```diff diff --git a/Documentation/devicetree/bindings/net/fsl,fman.yaml b/Documentation/devicetree/bindings/net/fsl,fman.yaml index f0261861f3cb..9bbf39ef31a2 100644 --- a/Documentation/devicetree/bindings/net/fsl,fman.yaml +++ b/Documentation/devicetree/bindings/net/fsl,fman.yaml @@ -80,6 +80,10 @@ properties: d...
dd84d831ef27036031f9e11a67df1efebef78916
Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: fsl,fman: allow dma-coherent property
Problem Details: Add dma-coherent property to fix below warning. arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dtb: fman@1a00000: 'dma-coherent', 'ptimer-handle' do not match any of the regexes: '^ethernet@[a-f0-9]+$', '^mdio@[a-f0-9]+$', '^muram@[a-f0-9]+$', '^phc@[a-f0-9]+$', '^port@[a-f0-9]+$', 'pinctrl-[0-9]+' fro...
```diff diff --git a/Documentation/devicetree/bindings/net/fsl,fman.yaml b/Documentation/devicetree/bindings/net/fsl,fman.yaml index 7908f67413de..f0261861f3cb 100644 --- a/Documentation/devicetree/bindings/net/fsl,fman.yaml +++ b/Documentation/devicetree/bindings/net/fsl,fman.yaml @@ -78,6 +78,8 @@ properties: ...
f153831097b4435f963e385304cc0f1acba1c657
Analyze and fix the following issue in the Linux kernel code: net: fix rc7's __skb_datagram_iter()
Problem Details: X would not start in my old 32-bit partition (and the "n"-handling looks just as wrong on 64-bit, but for whatever reason did not show up there): "n" must be accumulated over all pages before it's added to "offset" and compared with "copy", immediately after the skb_frag_foreach_page() loop. Fixes: d2...
```diff diff --git a/net/core/datagram.c b/net/core/datagram.c index e9ba4c7b449d..e72dd78471a6 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -423,11 +423,12 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset, if (copy > len) copy = len; + n = 0; skb_frag_foreach_pa...
7b5bdae7740eb6a3d09f9cd4e4b07362a15b86b3
Analyze and fix the following issue in the Linux kernel code: i915/perf: Remove code to update PWR_CLK_STATE for gen12
Problem Details: PWR_CLK_STATE only needs to be modified up until gen11. For gen12 this code is not applicable. Remove code to update context image with PWR_CLK_STATE for gen12. Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL") Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed...
```diff diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 0b1cd4c7a525..025a79fe5920 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -2748,26 +2748,6 @@ oa_configure_all_contexts(struct i915_perf_stream *stream, return 0; } -static int -g...
3699e57aae8817b232c311229ab531ee0ec39fc8
Analyze and fix the following issue in the Linux kernel code: selftests: forwarding: Make vxlan-bridge-1d pass on debug kernels
Problem Details: The ageing time used by the test is too short for debug kernels and results in entries being aged out prematurely [1]. Fix by increasing the ageing time. The same change was done for the VLAN-aware version of the test in commit dfbab74044be ("selftests: forwarding: Make vxlan-bridge-1q pass on debug ...
```diff diff --git a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh index 6f0a2e452ba1..3f9d50f1ef9e 100755 --- a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh +++ b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh @@ -680,9 +68...
cb520c3f366c77e8d69e4e2e2781a8ce48d98e79
Analyze and fix the following issue in the Linux kernel code: drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes
Problem Details: In cdv_intel_lvds_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: stable@vger.kernel.org Fixes: 6a227d5fd6c4 ("gma500: Add support for Cedarview") Signed-off-by: M...
```diff diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c index f08a6803dc18..3adc2c9ab72d 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c @@ -311,6 +311,9 @@ static int cdv_intel_lvds_get_modes(struct drm_connector *connect...
2df7aac81070987b0f052985856aa325a38debf6
Analyze and fix the following issue in the Linux kernel code: drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes
Problem Details: In psb_intel_lvds_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a possible NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: stable@vger.kernel.org Fixes: 89c78134cc54 ("gma500: Add Poulsbo support") Signed-off-by...
```diff diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c index 8486de230ec9..8d1be94a443b 100644 --- a/drivers/gpu/drm/gma500/psb_intel_lvds.c +++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c @@ -504,6 +504,9 @@ static int psb_intel_lvds_get_modes(struct drm_connector *connect...
e56af94b9b5487a71f8c705c83ac5f7bc28ae1a2
Analyze and fix the following issue in the Linux kernel code: misc: keba: Fix missing AUXILIARY_BUS dependency
Problem Details: The cp500 driver creates auxiliary devices. Kernel configs without CONFIG_AUXILIARY_BUS lead to warnings like this: cp500.c: undefined reference to `auxiliary_device_init' cp500.c: undefined reference to `__auxiliary_device_add' Add missing dependency to AUXILIARY_BUS to KEBA_CP500 Kconfig. Reported...
```diff diff --git a/drivers/misc/keba/Kconfig b/drivers/misc/keba/Kconfig index 0ebca1d07ef4..5fbcbc2252ac 100644 --- a/drivers/misc/keba/Kconfig +++ b/drivers/misc/keba/Kconfig @@ -2,6 +2,7 @@ config KEBA_CP500 tristate "KEBA CP500 system FPGA support" depends on PCI + select AUXILIARY_BUS help This driver...
c8bd922d924bb4ab6c6c488310157d1a27996f31
Analyze and fix the following issue in the Linux kernel code: spi: mux: set ctlr->bits_per_word_mask
Problem Details: Like other SPI controller flags, bits_per_word_mask may be used by a peripheral driver, so it needs to reflect the capabilities of the underlying controller. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20240708-spi-mux-fix-v1-3-6c8845193128@baylibre.com Signed-o...
```diff diff --git a/drivers/spi/spi-mux.c b/drivers/spi/spi-mux.c index f4b619cc2657..c02c4204442f 100644 --- a/drivers/spi/spi-mux.c +++ b/drivers/spi/spi-mux.c @@ -158,6 +158,7 @@ static int spi_mux_probe(struct spi_device *spi) /* supported modes are the same as our parent's */ ctlr->mode_bits = spi->controller...
ca52aa4c60f76566601b42e935b8a78f0fb4f8eb
Analyze and fix the following issue in the Linux kernel code: spi: add defer_optimize_message controller flag
Problem Details: Adding spi_optimize_message() broke the spi-mux driver because it calls spi_async() from it's transfer_one_message() callback. This resulted in passing an incorrectly optimized message to the controller. For example, if the underlying controller has an optimize_message() callback, this would have not b...
```diff diff --git a/drivers/spi/spi-mux.c b/drivers/spi/spi-mux.c index 5d72e3d59df8..f4b619cc2657 100644 --- a/drivers/spi/spi-mux.c +++ b/drivers/spi/spi-mux.c @@ -164,6 +164,7 @@ static int spi_mux_probe(struct spi_device *spi) ctlr->bus_num = -1; ctlr->dev.of_node = spi->dev.of_node; ctlr->must_async = true;...
c86a918b1bdba78fb155184f8d88dfba1e63335d
Analyze and fix the following issue in the Linux kernel code: spi: don't unoptimize message in spi_async()
Problem Details: Calling spi_maybe_unoptimize_message() in spi_async() is wrong because the message is likely to be in the queue and not transferred yet. This can corrupt the message while it is being used by the controller driver. spi_maybe_unoptimize_message() is already called in the correct place in spi_finalize_c...
```diff diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index fc13fa192189..679ee414cbea 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -4432,8 +4432,6 @@ int spi_async(struct spi_device *spi, struct spi_message *message) spin_unlock_irqrestore(&ctlr->bus_lock_spinlock, flags); - spi_maybe_unoptimiz...
e2e7f037b400aebbb3892d8010fb3d9cae6f426e
Analyze and fix the following issue in the Linux kernel code: ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MJ
Problem Details: Similar to other Asus Vivobooks, the Asus Vivobook Pro N6506MJ has a DSDT table that describes IRQ 1 as ActiveLow, whereas the kernel overrides it to Edge_High. This discrepancy prevents the internal keyboard from functioning properly. This patch resolves this issue by adding this laptop to the overrid...
```diff diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index b3ae5f9ac551..df5d5a554b38 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -531,6 +531,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = { DMI_MATCH(DMI_BOARD_NAME, "N6506MU"), }, }, + { + ...
c15a688e49987385baa8804bf65d570e362f8576
Analyze and fix the following issue in the Linux kernel code: USB: serial: mos7840: fix crash on resume
Problem Details: Since commit c49cfa917025 ("USB: serial: use generic method if no alternative is provided in usb serial layer"), USB serial core calls the generic resume implementation when the driver has not provided one. This can trigger a crash on resume with mos7840 since support for multiple read URBs was added ...
```diff diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 8b0308d84270..85697466b147 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -1737,6 +1737,49 @@ static void mos7840_port_remove(struct usb_serial_port *port) kfree(mos7840_port); } +static int mos7...
3ccea4784fddd96fbd6c4497eb28b45dab638c2a
Analyze and fix the following issue in the Linux kernel code: ARM: Remove address checking for MMUless devices
Problem Details: Commit 169f9102f9198b ("ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed()") added the function to check address before use. However, for devices without MMU, addr > TASK_SIZE will always fail. This patch move this function after the #ifdef CONFIG_MMU statement. Signed-off-by: Yanjun Ya...
```diff diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 67c425341a95..ab01b51de559 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -25,6 +25,8 @@ #include "fault.h" +#ifdef CONFIG_MMU + bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size) { unsigned long addr = ...
a695949b2e9bb6b6700a764c704731a306c4bebf
Analyze and fix the following issue in the Linux kernel code: drm/meson: fix canvas release in bind function
Problem Details: Allocated canvases may not be released on the error exit path of meson_drv_bind_master(), leading to resource leaking. Rewrite exit path to release canvases on error. Fixes: 2bf6b5b0e374 ("drm/meson: exclusively use the canvas provider module") Signed-off-by: Yao Zi <ziyao@disroot.org> Reviewed-by: Ne...
```diff diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index 17a5cca007e2..4bd0baa2a4f5 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -250,29 +250,20 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) if (ret) ...
ec85147a3529fded4bba12b48623f3a2587af83f
Analyze and fix the following issue in the Linux kernel code: drm/panel: sharp-lq101r1sx01: Fixed reversed "if" in remove
Problem Details: Commit d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove") had a subtle bug. We should be calling sharp_panel_del() when the "sharp" variable is non-NULL, not when it's NULL. Fix. Fixes: d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove...
```diff diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index edc9425bb143..a0d76d588da1 100644 --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c @@ -362,7 +362,7 @@ static void sharp_panel_remove(st...
7f60f33d46b3e119201c48c008fa0bd89798fa83
Analyze and fix the following issue in the Linux kernel code: writing_musb_glue_layer.rst: Fix broken URL
Problem Details: The http://processors.wiki.ti.com EOL in january 2021 The old documentation is still available through the wayback machine. Signed-off-by: Richard Genoud <richard.genoud@bootlin.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20240618151938.1827064-1-richard.genou...
```diff diff --git a/Documentation/driver-api/usb/writing_musb_glue_layer.rst b/Documentation/driver-api/usb/writing_musb_glue_layer.rst index 10416cc11cd5..e755c8551bba 100644 --- a/Documentation/driver-api/usb/writing_musb_glue_layer.rst +++ b/Documentation/driver-api/usb/writing_musb_glue_layer.rst @@ -717,4 +717,4 ...
e7b5c6301910427d546603e3cfbf5b1e9304c92e
Analyze and fix the following issue in the Linux kernel code: zh_CN/admin-guide: one typo fix
Problem Details: Fix one chinese typo error. Signed-off-by: Tao Zou <wodemia@linux.alibaba.com> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn> Reviewed-by: Yanteng Si <siyanteng@loongson.cn> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20240705022842.51451-1-wodemia@linux.alibaba.com
```diff diff --git a/Documentation/translations/zh_CN/admin-guide/numastat.rst b/Documentation/translations/zh_CN/admin-guide/numastat.rst index c0f54d9a6b05..4d9817b91870 100644 --- a/Documentation/translations/zh_CN/admin-guide/numastat.rst +++ b/Documentation/translations/zh_CN/admin-guide/numastat.rst @@ -13,7 +13,...
0ee9fb1ab77b4145b2d23741fe51081147bd24cd
Analyze and fix the following issue in the Linux kernel code: docs/zh_CN/virt: Update the translation of guest-halt-polling.rst
Problem Details: Update to commit 1954d51592b5 ("Documentation: virt: correct location of haltpoll module params") to fix the obvious mistake. Signed-off-by: Zenghui Yu <zenghui.yu@linux.dev> Reviewed-by: Yanteng Si <siyanteng@loongson.cn> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r...
```diff diff --git a/Documentation/translations/zh_CN/virt/guest-halt-polling.rst b/Documentation/translations/zh_CN/virt/guest-halt-polling.rst index b798d1cf0b48..463d1d829062 100644 --- a/Documentation/translations/zh_CN/virt/guest-halt-polling.rst +++ b/Documentation/translations/zh_CN/virt/guest-halt-polling.rst @...
9784f29bf59b2fe7a968be9394afb39a25ac0114
Analyze and fix the following issue in the Linux kernel code: Documentation: add reference from dynamic debug to loglevel kernel params
Problem Details: This is useful information for somebody who has managed to dig into enabling debug output, but is wondering why there is no such output appearing on the console. Signed-off-by: Daniel Lublin <daniel@lublin.se> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/4633bdb82c1c...
```diff diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst b/Documentation/admin-guide/dynamic-debug-howto.rst index 0e9b48daf690..7c036590cd07 100644 --- a/Documentation/admin-guide/dynamic-debug-howto.rst +++ b/Documentation/admin-guide/dynamic-debug-howto.rst @@ -26,6 +26,11 @@ Dynamic debug provides: ...
b5efb63acf7bddaf20eacfcac654c25c446eabe8
Analyze and fix the following issue in the Linux kernel code: s390/mm: Add NULL pointer check to crst_table_free() base_crst_free()
Problem Details: crst_table_free() used to work with NULL pointers before the conversion to ptdescs. Since crst_table_free() can be called with a NULL pointer (error handling in crst_table_upgrade() add an explicit check. Also add the same check to base_crst_free() for consistency reasons. In real life this should n...
```diff diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c index abb629d7e131..7e3e767ab87d 100644 --- a/arch/s390/mm/pgalloc.c +++ b/arch/s390/mm/pgalloc.c @@ -55,6 +55,8 @@ unsigned long *crst_table_alloc(struct mm_struct *mm) void crst_table_free(struct mm_struct *mm, unsigned long *table) { + if (!tab...
3d122660dc70029d9cccb4e8670125f0affa959e
Analyze and fix the following issue in the Linux kernel code: drm/xe/gt: Remove double include
Problem Details: The header generated/xe_wa_oob.h is included twice. Remove one. Fixes: 01570b446939 ("drm/xe/bmg: implement Wa_16023588340") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202407052122.AzuWSPuo-lkp@intel.com/ Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> ...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c index ce8994b808fe..b04e47186f5b 100644 --- a/drivers/gpu/drm/xe/xe_gt.c +++ b/drivers/gpu/drm/xe/xe_gt.c @@ -9,7 +9,6 @@ #include <drm/drm_managed.h> #include <drm/xe_drm.h> -#include <generated/xe_wa_oob.h> #include <generated/xe_wa_o...
9ca5a7d9d2e05de6b80676c4289575f2762fcf68
Analyze and fix the following issue in the Linux kernel code: dt-bindings: soc: fsl: Add fsl,ls1028a-reset for reset syscon node
Problem Details: ls1028a has a reset module that includes reboot, reset control word, and service processor control. Add platform specific compatible string to fix the below warning. syscon@1e60000: compatible: 'anyOf' conditional failed, one must be fixed: ['syscon'] is too short 'syscon' is not one ...
```diff diff --git a/Documentation/devicetree/bindings/soc/fsl/fsl,ls1028a-reset.yaml b/Documentation/devicetree/bindings/soc/fsl/fsl,ls1028a-reset.yaml new file mode 100644 index 000000000000..31295be91013 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/fsl/fsl,ls1028a-reset.yaml @@ -0,0 +1,56 @@ +# SPDX-Lic...
ecbfc6ff94a21a87bfff3d0f65351964e3380839
Analyze and fix the following issue in the Linux kernel code: dt-bindings: soc: fsl: cpm_qe: convert to yaml format
Problem Details: Convert binding doc qe.txt to yaml format. Split it to fsl,qe-firmware.yaml, fsl,qe-ic.yaml, fsl,qe-muram.yaml, fsl,qe-si.yaml fsl,qe-siram.yaml, fsl,qe.yaml. Additional Changes: - Fix error in example. - Change to low case for hex value. - Remove fsl,qe-num-riscs and fsl,qe-snums from required list. ...
```diff diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe-firmware.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe-firmware.yaml new file mode 100644 index 000000000000..53b07d4edc77 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe-firmware.yaml @@ -0,0 +1,48...
c184d44a132429380d53f7b678e38b811fc9386a
Analyze and fix the following issue in the Linux kernel code: dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml
Problem Details: Convert device tree binding fsl,ls-scfg-msi to yaml format. Additional changes: - Include gic.h and use predefined macro in example. - Remove label in example. - Change node name to interrupt-controller in example. - Fix error in example. - ls1046a allow 4 irqs, other platform only 1 irq. - Add $ref: ...
```diff diff --git a/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml b/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml new file mode 100644 index 000000000000..9ba8d4d73351 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml @@ -0,0 +1...
478a01016c08d33635359254fc1ab61a8c83dd1a
Analyze and fix the following issue in the Linux kernel code: tools/power turbostat: Fix typo in turbostat.8
Problem Details: "After" was missing an "r", nothing to see here. Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/tools/power/x86/turbostat/turbostat.8 b/tools/power/x86/turbostat/turbostat.8 index 71ae2d5159ad..44cbc7cb382d 100644 --- a/tools/power/x86/turbostat/turbostat.8 +++ b/tools/power/x86/turbostat/turbostat.8 @@ -323,7 +323,7 @@ available on all processors. Here we limit turbostat to showing just the...
25826c20da55a114c2cba8c4f237dfe7a7b4f8f6
Analyze and fix the following issue in the Linux kernel code: tools/power turbostat: Fix formatting in turbostat.8
Problem Details: We had an extra "+" at the beginning of some lines that look like a poorly formated patch. Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/tools/power/x86/turbostat/turbostat.8 b/tools/power/x86/turbostat/turbostat.8 index 5537fc6b5bc3..8a21e9b56071 100644 --- a/tools/power/x86/turbostat/turbostat.8 +++ b/tools/power/x86/turbostat/turbostat.8 @@ -70,10 +70,10 @@ The column name "all" can be used to enable all disabled-by-default built...
ff12af710b3088d06d933a839e59ab57d7c122e5
Analyze and fix the following issue in the Linux kernel code: amazon: MAINTAINERS: change to odd fixes and Tsahee Zidenberg to CREDITS
Problem Details: Last email from Tsahee Zidenberg was in 2016 [1], so move Tsahee from Amazon platform maintainers to credits (thank you for your contributions and maintenance!). Stale maintainer entries hide information whether subsystem needs help, has a bus-factor or is even orphaned. The Amazon platform still has...
```diff diff --git a/CREDITS b/CREDITS index 0107047f807b..4da4d7e2769f 100644 --- a/CREDITS +++ b/CREDITS @@ -4362,6 +4362,10 @@ N: Haojian Zhuang E: haojian.zhuang@gmail.com D: MMP support +N: Tsahee Zidenberg +E: tsahee@annapurnalabs.com +D: Annapurna Labs Alpine Architecture + N: Richard Zidlicky E: rz@linux-...
78ab3d352f2982bf3f7e506bfbaba7afee1ed8a9
Analyze and fix the following issue in the Linux kernel code: ARM: spitz: fix GPIO assignment for backlight
Problem Details: GPIOs controlling backlight on Spitz and Akita are coming from GPIO expanders, not the pxa27xx-gpio block, correct it. Additionally GPIO lookup tables operate with pin numbers rather than legacy GPIO numbers, fix that as well. Use raw numbers instead of legacy GPIO names to avoid confusion. Fixes: ee...
```diff diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 3c5f5a3cb480..10ab16dcd827 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -520,10 +520,8 @@ static struct gpiod_lookup_table spitz_ads7846_gpio_table = { static struct gpiod_lookup_table spitz_lcdcon_gpio_table ...
dc3c836f9b0f1e615e5143a2afd542fc1162cd86
Analyze and fix the following issue in the Linux kernel code: platform: cznic: turris-omnia-mcu: Depend on WATCHDOG
Problem Details: Add depend on WATCHDOG, otherwise modpost fails with ERROR: modpost: "watchdog_init_timeout" [drivers/platform/cznic/turris-omnia-mcu.ko] undefined! ERROR: modpost: "devm_watchdog_register_device" [drivers/platform/cznic/turris-omnia-mcu.ko] undefined! Fixes: ab89fb5fb92c ("platform: cznic: turris...
```diff diff --git a/drivers/platform/cznic/Kconfig b/drivers/platform/cznic/Kconfig index 8992f7b87223..2a5235cf6844 100644 --- a/drivers/platform/cznic/Kconfig +++ b/drivers/platform/cznic/Kconfig @@ -17,6 +17,7 @@ config TURRIS_OMNIA_MCU depends on MACH_ARMADA_38X || COMPILE_TEST depends on I2C depends on OF +...
5423a01df8c5cdce58138fae4eef64b4ca5ff9e5
Analyze and fix the following issue in the Linux kernel code: platform: cznic: turris-omnia-mcu: Depend on OF
Problem Details: Add depend on OF, otherwise the compilation fails with error: no member named 'of_gpio_n_cells' in 'struct gpio_chip' error: no member named 'of_xlate' in 'struct gpio_chip' Fixes: dfa556e45ae9 ("platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs") Reported-by: kernel test robo...
```diff diff --git a/drivers/platform/cznic/Kconfig b/drivers/platform/cznic/Kconfig index 6edac80d5fa3..8992f7b87223 100644 --- a/drivers/platform/cznic/Kconfig +++ b/drivers/platform/cznic/Kconfig @@ -16,6 +16,7 @@ config TURRIS_OMNIA_MCU tristate "Turris Omnia MCU driver" depends on MACH_ARMADA_38X || COMPILE_TE...
e400ddf0fb76f451bcf0c7de8a1dbdb1fa0359d5
Analyze and fix the following issue in the Linux kernel code: vringh: add MODULE_DESCRIPTION()
Problem Details: Fix the allmodconfig 'make w=1' issue: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/vhost/vringh.o Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Message-Id: <20240516-md-vringh-v1-1-31bf37779a5a@quicinc.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wan...
```diff diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c index 7b8fd977f71c..73e153f9b449 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c @@ -1614,4 +1614,5 @@ EXPORT_SYMBOL(vringh_need_notify_iotlb); #endif +MODULE_DESCRIPTION("host side of a virtio ring"); MODULE_LICENSE("GPL"); ```
d2343023349441173cefcdeb517fc7d5273b4fab
Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-wmi: Fix platform profile option switch bug on Omen and Victus laptops
Problem Details: Fix a platform profile option switch/getter bug on some Omen and Victus laptops dismissing userspace choice when selecting performance mode in inadequate conditions (e.g. by being disconnected from the AC power plug) by - hooking an ACPI notify handler through the omen_register_powersource_e...
```diff diff --git a/drivers/platform/x86/hp/Kconfig b/drivers/platform/x86/hp/Kconfig index 7fef4f12e498..d776761cd5fd 100644 --- a/drivers/platform/x86/hp/Kconfig +++ b/drivers/platform/x86/hp/Kconfig @@ -40,6 +40,7 @@ config HP_WMI depends on ACPI_WMI depends on INPUT depends on RFKILL || RFKILL = n + select P...
0913ec336a6c0c4a2b296bd9f74f8e41c4c83c8c
Analyze and fix the following issue in the Linux kernel code: net: ks8851: Fix deadlock with the SPI chip variant
Problem Details: When SMP is enabled and spinlocks are actually functional then there is a deadlock with the 'statelock' spinlock between ks8851_start_xmit_spi and ks8851_irq: watchdog: BUG: soft lockup - CPU#0 stuck for 27s! call trace: queued_spin_lock_slowpath+0x100/0x284 do_raw_spin_lock+0x34/0...
```diff diff --git a/drivers/net/ethernet/micrel/ks8851_common.c b/drivers/net/ethernet/micrel/ks8851_common.c index 6453c92f0fa7..13462811eaae 100644 --- a/drivers/net/ethernet/micrel/ks8851_common.c +++ b/drivers/net/ethernet/micrel/ks8851_common.c @@ -352,11 +352,11 @@ static irqreturn_t ks8851_irq(int irq, void *_k...
fa0c1c9d283b37fdb7fc1dcccbb88fc8f48a4aa4
Analyze and fix the following issue in the Linux kernel code: perf/x86/intel: Add a distinct name for Granite Rapids
Problem Details: Currently, the Sapphire Rapids and Granite Rapids share the same PMU name, sapphire_rapids. Because from the kernel’s perspective, GNR is similar to SPR. The only key difference is that they support different extra MSRs. The code path and the PMU name are shared. However, from end users' perspective, ...
```diff diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index b61367991a16..0c9c2706d4ec 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -6943,12 +6943,18 @@ __init int intel_pmu_init(void) case INTEL_EMERALDRAPIDS_X: x86_pmu.flags |= PMU_FL_MEM_LOADS_AUX; ...
e5f32ad56b22ebe384a6e7ddad6e9520c5495563
Analyze and fix the following issue in the Linux kernel code: perf/x86/intel/ds: Fix non 0 retire latency on Raptorlake
Problem Details: A non-0 retire latency can be observed on a Raptorlake which doesn't support the retire latency feature. By design, the retire latency shares the PERF_SAMPLE_WEIGHT_STRUCT sample type with other types of latency. That could avoid adding too many different sample types to support all kinds of latency. F...
```diff diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index b9cc520b2942..fa5ea65de0d0 100644 --- a/arch/x86/events/intel/ds.c +++ b/arch/x86/events/intel/ds.c @@ -1944,8 +1944,12 @@ static void setup_pebs_adaptive_sample_data(struct perf_event *event, set_linear_ip(regs, basic->ip); regs->fl...
556a7c039a52c21da33eaae9269984a1ef59189b
Analyze and fix the following issue in the Linux kernel code: perf/x86/intel: Hide Topdown metrics events if the feature is not enumerated
Problem Details: The below error is observed on Ice Lake VM. $ perf stat Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (slots). /bin/dmesg | grep -i perf may provide additional information. In a virtualization env, the Topdown metrics and the slots event haven't been supported...
```diff diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index cd8f2db6cdf6..b61367991a16 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -5830,8 +5830,22 @@ exra_is_visible(struct kobject *kobj, struct attribute *attr, int i) return x86_pmu.version >= 2 ? attr-...
a5a6ff3d639d088d4af7e2935e1ee0d8b4e817d4
Analyze and fix the following issue in the Linux kernel code: perf/x86/intel/uncore: Fix the bits of the CHA extended umask for SPR
Problem Details: The perf stat errors out with UNC_CHA_TOR_INSERTS.IA_HIT_CXL_ACC_LOCAL event. $perf stat -e uncore_cha_55/event=0x35,umask=0x10c0008101/ -a -- ls event syntax error: '..0x35,umask=0x10c0008101/' \___ Bad event or PMU The definition of the CHA umask is config...
```diff diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index a7ea221f2f11..ca98744343b8 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -462,6 +462,7 @@ #define SPR_UBOX_DID 0x3250 /* SPR CHA */ +#define SPR_CHA_EVENT_MASK_...
3a5465418f5fd970e86a86c7f4075be262682840
Analyze and fix the following issue in the Linux kernel code: perf: Fix event leak upon exec and file release
Problem Details: The perf pending task work is never waited upon the matching event release. In the case of a child event, released via free_event() directly, this can potentially result in a leaked event, such as in the following scenario that doesn't even require a weak IRQ work implementation to trigger: schedule()...
```diff diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index a5304ae8c654..393fb13733b0 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -786,6 +786,7 @@ struct perf_event { struct irq_work pending_irq; struct callback_head pending_task; unsigned int pending_w...
2fd5ad3f310de22836cdacae919dd99d758a1f1b
Analyze and fix the following issue in the Linux kernel code: perf: Fix event leak upon exit
Problem Details: When a task is scheduled out, pending sigtrap deliveries are deferred to the target task upon resume to userspace via task_work. However failures while adding an event's callback to the task_work engine are ignored. And since the last call for events exit happen after task work is eventually closed, t...
```diff diff --git a/kernel/events/core.c b/kernel/events/core.c index 51ce436306bd..576400d220a5 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -2284,18 +2284,15 @@ event_sched_out(struct perf_event *event, struct perf_event_context *ctx) } if (event->pending_sigtrap) { - bool dec = true; - ...
e81859fe64ad42dccefe134d1696e0635f78d763
Analyze and fix the following issue in the Linux kernel code: locking/rwsem: Add __always_inline annotation to __down_write_common() and inlined callers
Problem Details: Apparently despite it being marked inline, the compiler may not inline __down_write_common() which makes it difficult to identify the cause of lock contention, as the wchan of the blocked function will always be listed as __down_write_common(). So add __always_inline annotation to the common function ...
```diff diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c index c6d17aee4209..33cac79e3994 100644 --- a/kernel/locking/rwsem.c +++ b/kernel/locking/rwsem.c @@ -1297,7 +1297,7 @@ static inline int __down_read_trylock(struct rw_semaphore *sem) /* * lock for writing */ -static inline int __down_write_commo...
442e26af9aa8115c96541026cbfeaaa76c85d178
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()
Problem Details: In rvu_check_rsrc_availability() in case of invalid SSOW req, an incorrect data is printed to error log. 'req->sso' value is printed instead of 'req->ssow'. Looks like "copy-paste" mistake. Fix this mistake by replacing 'req->sso' with 'req->ssow'. Found by Linux Verification Center (linuxtesting.org...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c index ff78251f92d4..5f661e67ccbc 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c @@ -1643,7 +1643,7 @@ static int rvu_check_rsrc_avail...
3756310e9fe1e0182adac89cedaa98c0eea66675
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Use the LRU walker for eviction
Problem Details: Use the LRU walker for eviction. This helps removing a lot of code with weird locking semantics. The functionality is slightly changed so that when trylocked buffer objects are exhausted, we continue to interleave walks with ticket-locks while there is still progress made. The list walks are not resta...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index f4b2b2bea6cb..0131ec802066 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -224,80 +224,6 @@ static void ttm_bo_flush_all_fences(struct ttm_buffer_object *bo) dma_resv_iter_end(&cursor); } -/** - ...
4c44f89c5daee9540cb7428de5d835bd00951350
Analyze and fix the following issue in the Linux kernel code: drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves
Problem Details: To address the problem with hitches moving when bulk move sublists are lru-bumped, register the list cursors with the ttm_lru_bulk_move structure when traversing its list, and when lru-bumping the list, move the cursor hitch to the tail. This also means it's mandatory for drivers to call ttm_lru_bulk_m...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 4e2391c83d7c..6293f3b54b4a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -2422,6 +2422,8 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm...
c145eea2f75ff7949392aebecf7ef0a81c1f6c14
Analyze and fix the following issue in the Linux kernel code: wifi: mwifiex: Do not return unused priv in mwifiex_get_priv_by_id()
Problem Details: mwifiex_get_priv_by_id() returns the priv pointer corresponding to the bss_num and bss_type, but without checking if the priv is actually currently in use. Unused priv pointers do not have a wiphy attached to them which can lead to NULL pointer dereferences further down the callstack. Fix this by retu...
```diff diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h index 175882485a19..c5164ae41b54 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.h +++ b/drivers/net/wireless/marvell/mwifiex/main.h @@ -1287,6 +1287,9 @@ mwifiex_get_priv_by_id(struct mwifiex_adapter *...
4377aef83d0db25efc928a633ee80698b8520c8e
Analyze and fix the following issue in the Linux kernel code: mmc: tmio/sdhi: Fix includes
Problem Details: TMIO uses an of_* function, and SDHI uses pm_runtime functions. Add the includes directly, so we can clean up another header properly. Sort the pagemap include while we are here. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202402070323.JpYfFtkQ-lkp@inte...
```diff diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index 422fa63a2e99..e8c3fb0fb5c2 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -16,8 +16,9 @@ #include <linux/mod_devicetable.h> #inclu...
0d1b7d6c927431126ece585246e23aa877243360
Analyze and fix the following issue in the Linux kernel code: bnxt: fix crashes when reducing ring count with active RSS contexts
Problem Details: bnxt doesn't check if a ring is used by RSS contexts when reducing ring count. Core performs a similar check for the drivers for the main context, but core doesn't know about additional contexts, so it can't validate them. bnxt_fill_hw_rss_tbl_p5() uses ring id to index bp->rx_ring[], which without the...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 53085058100c..64b61a8d426d 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -6146,6 +6146,21 @@ static u16 bnxt_get_max_rss_ring(struct bnxt *bp) re...
417d88189ccf645a157a3dc3da7e894c1f2829d1
Analyze and fix the following issue in the Linux kernel code: sctp: Fix typos and improve comments
Problem Details: Fix typos s/steam/stream/ and spell out Schedule/Unschedule in the comments. Compile-tested only. Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20240704202558.62704-2-thorsten.blum@toblux.com Signed-off-by: Paolo Ab...
```diff diff --git a/include/net/sctp/stream_sched.h b/include/net/sctp/stream_sched.h index 572d73fdcd5e..8034bf5febbe 100644 --- a/include/net/sctp/stream_sched.h +++ b/include/net/sctp/stream_sched.h @@ -35,10 +35,10 @@ struct sctp_sched_ops { struct sctp_chunk *(*dequeue)(struct sctp_outq *q); /* Called only if...