id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c6a28acb1a27eb42970b959ff7af3a8a077f8cce
Analyze and fix the following issue in the Linux kernel code: net: fix pointer check in skb_pp_cow_data routine
Problem Details: Properly check page pointer returned by page_pool_dev_alloc routine in skb_pp_cow_data() for non-linear part of the original skb. Reported-by: Julian Wiedmann <jwiedmann.dev@gmail.com> Closes: https://lore.kernel.org/netdev/cover.1707729884.git.lorenzo@kernel.org/T/#m7d189b0015a7281ed9221903902490c03e...
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1434c422f76e..b9de3ee65ae6 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -968,7 +968,7 @@ int skb_pp_cow_data(struct page_pool *pool, struct sk_buff **pskb, truesize = size; page = page_pool_dev_alloc(pool, &page_off, &truesize); - if...
6f1a214d446b2f2f9c8c4b96755a8f0316ba4436
Analyze and fix the following issue in the Linux kernel code: selftests: sched: Fix spelling mistake "hiearchy" -> "hierarchy"
Problem Details: There is a spelling mistake in a printed message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
```diff diff --git a/tools/testing/selftests/sched/cs_prctl_test.c b/tools/testing/selftests/sched/cs_prctl_test.c index 7ba057154343..62fba7356af2 100644 --- a/tools/testing/selftests/sched/cs_prctl_test.c +++ b/tools/testing/selftests/sched/cs_prctl_test.c @@ -276,7 +276,7 @@ int main(int argc, char *argv[]) if (se...
85506aca2eb4ea41223c91c5fe25125953c19b13
Analyze and fix the following issue in the Linux kernel code: selftests/mqueue: Set timeout to 180 seconds
Problem Details: While mq_perf_tests runs with the default kselftest timeout limit, which is 45 seconds, the test takes about 60 seconds to complete on i3.metal AWS instances. Hence, the test always times out. Increase the timeout to 180 seconds. Fixes: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second tim...
```diff diff --git a/tools/testing/selftests/mqueue/setting b/tools/testing/selftests/mqueue/setting new file mode 100644 index 000000000000..a953c96aa16e --- /dev/null +++ b/tools/testing/selftests/mqueue/setting @@ -0,0 +1 @@ +timeout=180 ```
3425a2005b291b62b6f6deeeab1156839c41cf85
Analyze and fix the following issue in the Linux kernel code: selftests/ftrace: Add test to exercize function tracer across cpu hotplug
Problem Details: Add a test to exercize cpu hotplug with the function tracer active to ensure that sensitive functions in idle path are excluded from being traced. This helps catch issues such as the one fixed by commit 4b3338aaa74d ("powerpc/ftrace: Fix stack teardown in ftrace_no_trace"). Signed-off-by: Naveen N Rao...
```diff diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_hotplug.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_hotplug.tc new file mode 100644 index 000000000000..ccfbfde3d942 --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_hotplug.tc @@ -0,0 +1,42 @@ +#!/bin/sh +# SPDX-Lice...
5bc9dc068afe95e924136d57c1a385194282a919
Analyze and fix the following issue in the Linux kernel code: selftest: ftrace: fix minor typo in log
Problem Details: Resolves a spelling error in the test log, preventing potential confusion. Signed-off-by: Vincenzo Mezzela <vincenzo.mezzela@gmail.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
```diff diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc index 4562e13cb26b..717898894ef7 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/t...
2597c9947b0174fcc71bdd7ab6cb49c2b4291e95
Analyze and fix the following issue in the Linux kernel code: kasan: guard release_free_meta() shadow access with kasan_arch_is_ready()
Problem Details: release_free_meta() accesses the shadow directly through the path kasan_slab_free __kasan_slab_free kasan_release_object_meta release_free_meta kasan_mem_to_shadow There are no kasan_arch_is_ready() guards here, allowing an oops when the shadow is not initialized. The o...
```diff diff --git a/mm/kasan/generic.c b/mm/kasan/generic.c index df6627f62402..032bf3e98c24 100644 --- a/mm/kasan/generic.c +++ b/mm/kasan/generic.c @@ -522,6 +522,9 @@ static void release_alloc_meta(struct kasan_alloc_meta *meta) static void release_free_meta(const void *object, struct kasan_free_meta *meta) { +...
13d0599ab3b2ff17f798353f24bcbef1659d3cfc
Analyze and fix the following issue in the Linux kernel code: mm/damon/lru_sort: fix quota status loss due to online tunings
Problem Details: For online parameters change, DAMON_LRU_SORT creates new schemes based on latest values of the parameters and replaces the old schemes with the new one. When creating it, the internal status of the quotas of the old schemes is not preserved. As a result, charging of the quota starts from zero after t...
```diff diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c index f2e5f9431892..3de2916a65c3 100644 --- a/mm/damon/lru_sort.c +++ b/mm/damon/lru_sort.c @@ -185,9 +185,21 @@ static struct damos *damon_lru_sort_new_cold_scheme(unsigned int cold_thres) return damon_lru_sort_new_scheme(&pattern, DAMOS_LRU_DEPRIO); } ...
1b0ca4e4ff10a2c8402e2cf70132c683e1c772e4
Analyze and fix the following issue in the Linux kernel code: mm/damon/reclaim: fix quota stauts loss due to online tunings
Problem Details: Patch series "mm/damon: fix quota status loss due to online tunings". DAMON_RECLAIM and DAMON_LRU_SORT is not preserving internal quota status when applying new user parameters, and hence could cause temporal quota accuracy degradation. Fix it by preserving the status. This patch (of 2): For onlin...
```diff diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c index ab974e477d2f..66e190f0374a 100644 --- a/mm/damon/reclaim.c +++ b/mm/damon/reclaim.c @@ -150,9 +150,20 @@ static struct damos *damon_reclaim_new_scheme(void) &damon_reclaim_wmarks); } +static void damon_reclaim_copy_quota_status(struct damos_quota...
0721a614ef798053a4a54c74e2501b8d15b0eff3
Analyze and fix the following issue in the Linux kernel code: mm/damon/sysfs-schemes: handle schemes sysfs dir removal before commit_schemes_quota_goals
Problem Details: 'commit_schemes_quota_goals' command handler, damos_sysfs_set_quota_scores() assumes the number of schemes sysfs directory will be same to the number of schemes of the DAMON context. The assumption is wrong since users can remove schemes sysfs directories while DAMON is running. In the case, illegal ...
```diff diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index dd2fb5127009..ae0f0b314f3a 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -1905,6 +1905,10 @@ void damos_sysfs_set_quota_scores(struct damon_sysfs_schemes *sysfs_schemes, damon_for_each_scheme(scheme, ctx) { str...
118642d7f606fc9b9c92ee611275420320290ffb
Analyze and fix the following issue in the Linux kernel code: mm: memcontrol: clarify swapaccount=0 deprecation warning
Problem Details: The swapaccount deprecation warning is throwing false positives. Since we deprecated the knob and defaulted to enabling, the only reports we've been getting are from folks that set swapaccount=1. While this is a nice affirmation that always-enabling was the right choice, we certainly don't want to wa...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 1ed40f9d3a27..61932c9215e7 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -7971,9 +7971,13 @@ bool mem_cgroup_swap_full(struct folio *folio) static int __init setup_swap_account(char *s) { - pr_warn_once("The swapaccount= commandline option is depr...
4f155af0ae4464134bfcfd9f043b6b727c84e947
Analyze and fix the following issue in the Linux kernel code: mm/memblock: add MEMBLOCK_RSRV_NOINIT into flagname[] array
Problem Details: The commit 77e6c43e137c ("memblock: introduce MEMBLOCK_RSRV_NOINIT flag") skipped adding this newly introduced memblock flag into flagname[] array, thus preventing a correct memblock flags output for applicable memblock regions. Link: https://lkml.kernel.org/r/20240209030912.1382251-1-anshuman.khandua...
```diff diff --git a/mm/memblock.c b/mm/memblock.c index 4dcb2ee35eca..d9f4b82cbffe 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -2249,6 +2249,7 @@ static const char * const flagname[] = { [ilog2(MEMBLOCK_MIRROR)] = "MIRROR", [ilog2(MEMBLOCK_NOMAP)] = "NOMAP", [ilog2(MEMBLOCK_DRIVER_MANAGED)] = "DRV_MNG", + ...
678e54d4bb9a4822f8ae99690ac131c5d490cdb1
Analyze and fix the following issue in the Linux kernel code: mm/zswap: invalidate duplicate entry when !zswap_enabled
Problem Details: We have to invalidate any duplicate entry even when !zswap_enabled since zswap can be disabled anytime. If the folio store success before, then got dirtied again but zswap disabled, we won't invalidate the old duplicate entry in the zswap_store(). So later lru writeback may overwrite the new data in ...
```diff diff --git a/mm/zswap.c b/mm/zswap.c index 36903d938c15..db4625af65fb 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -1518,7 +1518,7 @@ bool zswap_store(struct folio *folio) if (folio_test_large(folio)) return false; - if (!zswap_enabled || !tree) + if (!tree) return false; /* @@ -1533,6 +1533,10 @@ ...
1eb1e984379e2da04361763f66eec90dd75cf63e
Analyze and fix the following issue in the Linux kernel code: lib/Kconfig.debug: TEST_IOV_ITER depends on MMU
Problem Details: Trying to run the iov_iter unit test on a nommu system such as the qemu kc705-nommu emulation results in a crash. KTAP version 1 # Subtest: iov_iter # module: kunit_iov_iter 1..9 BUG: failure at mm/nommu.c:318/vmap()! Kernel panic - not syncing: BUG! The test calls vmap() directly, bu...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 975a07f9f1cc..ef36b829ae1f 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2235,6 +2235,7 @@ config TEST_DIV64 config TEST_IOV_ITER tristate "Test iov_iter operation" if !KUNIT_ALL_TESTS depends on KUNIT + depends on MMU default KUNIT_AL...
13ddaf26be324a7f951891ecd9ccd04466d27458
Analyze and fix the following issue in the Linux kernel code: mm/swap: fix race when skipping swapcache
Problem Details: When skipping swapcache for SWP_SYNCHRONOUS_IO, if two or more threads swapin the same entry at the same time, they get different pages (A, B). Before one thread (T0) finishes the swapin and installs page (A) to the PTE, another thread (T1) could finish swapin of page (B), swap_free the entry, then sw...
```diff diff --git a/include/linux/swap.h b/include/linux/swap.h index 4db00ddad261..8d28f6091a32 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -549,6 +549,11 @@ static inline int swap_duplicate(swp_entry_t swp) return 0; } +static inline int swapcache_prepare(swp_entry_t swp) +{ + return 0; +} +...
16e96ba5e92ce06b54f0862d44bb27bfa00d6c23
Analyze and fix the following issue in the Linux kernel code: mm/swap_state: update zswap LRU's protection range with the folio locked
Problem Details: When a folio is swapped in, the protection size of the corresponding zswap LRU is incremented, so that the zswap shrinker is more conservative with its reclaiming action. This field is embedded within the struct lruvec, so updating it requires looking up the folio's memcg and lruvec. However, current...
```diff diff --git a/mm/swap_state.c b/mm/swap_state.c index e671266ad772..7255c01a1e4e 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -680,9 +680,10 @@ skip: /* The page was likely read above, so no need for plugging here */ folio = __read_swap_cache_async(entry, gfp_mask, mpol, ilx, &page_allocated, ...
7efa6f2c803366f84c3c362f01e822490669d72b
Analyze and fix the following issue in the Linux kernel code: selftests/mm: uffd-unit-test check if huge page size is 0
Problem Details: If HUGETLBFS is not enabled then the default_huge_page_size function will return 0 and cause a divide by 0 error. Add a check to see if the huge page size is 0 and skip the hugetlb tests if it is. Link: https://lkml.kernel.org/r/20240205145055.3545806-2-terry.tritton@linaro.org Fixes: 16a45b57cbf2 ("s...
```diff diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c index cce90a10515a..2b9f8cc52639 100644 --- a/tools/testing/selftests/mm/uffd-unit-tests.c +++ b/tools/testing/selftests/mm/uffd-unit-tests.c @@ -1517,6 +1517,12 @@ int main(int argc, char *argv[]) cont...
e9e3db69966d5e9e6f7e7d017b407c0025180fe5
Analyze and fix the following issue in the Linux kernel code: mm/damon/core: check apply interval in damon_do_apply_schemes()
Problem Details: kdamond_apply_schemes() checks apply intervals of schemes and avoid further applying any schemes if no scheme passed its apply interval. However, the following schemes applying function, damon_do_apply_schemes() iterates all schemes without the apply interval check. As a result, the shortest apply in...
```diff diff --git a/mm/damon/core.c b/mm/damon/core.c index 36f6f1d21ff0..5b325749fc12 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1026,6 +1026,9 @@ static void damon_do_apply_schemes(struct damon_ctx *c, damon_for_each_scheme(s, c) { struct damos_quota *quota = &s->quota; + if (c->passed_sample_int...
e3b63e966cac0bf78aaa1efede1827a252815a1d
Analyze and fix the following issue in the Linux kernel code: mm: zswap: fix missing folio cleanup in writeback race path
Problem Details: In zswap_writeback_entry(), after we get a folio from __read_swap_cache_async(), we grab the tree lock again to check that the swap entry was not invalidated and recycled. If it was, we delete the folio we just added to the swap cache and exit. However, __read_swap_cache_async() returns the folio loc...
```diff diff --git a/mm/zswap.c b/mm/zswap.c index 350dd2fc8159..d2423247acfd 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -1440,6 +1440,8 @@ static int zswap_writeback_entry(struct zswap_entry *entry, if (zswap_rb_search(&tree->rbroot, swp_offset(entry->swpentry)) != entry) { spin_unlock(&tree->lock); delete_fr...
bb619d71224ea85ec94e0a83b2bb82ebe7df2a41
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix modpost warning on xe_mocs kunit module
Problem Details: $ make W=1 -j100 M=drivers/gpu/drm/xe MODPOST drivers/gpu/drm/xe/Module.symvers WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/xe/tests/xe_mocs_test.o Fix is identical to '1d425066f15f ("drm/xe: Fix modpost warning on kunit modules")'. Fixes: a6a4ea6d7d37 ("drm/xe: Add mocs kunit")...
```diff diff --git a/drivers/gpu/drm/xe/tests/xe_mocs_test.c b/drivers/gpu/drm/xe/tests/xe_mocs_test.c index 4f62e7a4270b..ee40f31e1e12 100644 --- a/drivers/gpu/drm/xe/tests/xe_mocs_test.c +++ b/drivers/gpu/drm/xe/tests/xe_mocs_test.c @@ -22,4 +22,5 @@ kunit_test_suite(xe_mocs_test_suite); MODULE_AUTHOR("Intel Corpo...
e5626eb80026c4b63f8682cdeca1456303c65791
Analyze and fix the following issue in the Linux kernel code: drm/xe/xe_gt_idle: Drop redundant newline in name
Problem Details: Newline in name is redunant and produces an unnecessary empty line during 'cat name'. Newline is added during sysfs_emit. See '27a1a1e2e47d ("drm/xe: stringify the argument to avoid potential vulnerability")'. v2: Add Fixes tag (Riana) Fixes: 7b076d14f21a ("drm/xe/mtl: Add support to get C6 residency...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c index 9358f7336889..9fcae65b6469 100644 --- a/drivers/gpu/drm/xe/xe_gt_idle.c +++ b/drivers/gpu/drm/xe/xe_gt_idle.c @@ -145,10 +145,10 @@ void xe_gt_idle_sysfs_init(struct xe_gt_idle *gtidle) } if (xe_gt_is_media_type(gt)) { - ...
8cbf22b3dcf0c89d1df1a8e106295b349607eb5b
Analyze and fix the following issue in the Linux kernel code: selftests: ftrace: fix typo in test description
Problem Details: The typo in the description shows up in test logs and output. This patch submission is part of my application to the Linux Foundation mentorship program: Linux kernel Bug Fixing Spring Unpaid 2024. Signed-off-by: Ali Zahraee <ahzahraee@gmail.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.or...
```diff diff --git a/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc b/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc index add7d5bf585d..c45094d1e1d2 100644 --- a/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc +++ b/tools/testing/selftests/ftrace/test.d/00basic/test_ow...
1901ae3cc9f8cbe78c3cdeec18cd54246ff11ca8
Analyze and fix the following issue in the Linux kernel code: selftest/ftrace: fix typo in ftracetest script
Problem Details: Fix a typo in ftracetest script which is run when running the kselftests for ftrace. s/faii/fail Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
```diff diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest index c778d4dcc17e..25d4e0fca385 100755 --- a/tools/testing/selftests/ftrace/ftracetest +++ b/tools/testing/selftests/ftrace/ftracetest @@ -504,7 +504,7 @@ prlog "# of undefined(test bug): " `echo $UNDEFINED_CASES...
080b0c8d6d261b400f24bb1075fbab8c6daaf69e
Analyze and fix the following issue in the Linux kernel code: ice: Fix ASSERT_RTNL() warning during certain scenarios
Problem Details: Commit 91fdbce7e8d6 ("ice: Add support in the driver for associating queue with napi") invoked the netif_queue_set_napi() call. This kernel function requires to be called with rtnl_lock taken, otherwise ASSERT_RTNL() warning will be triggered. ice_vsi_rebuild() initiating this call is under rtnl_lock w...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c index 7ac847718882..c979192e44d1 100644 --- a/drivers/net/ethernet/intel/ice/ice_base.c +++ b/drivers/net/ethernet/intel/ice/ice_base.c @@ -190,15 +190,13 @@ static void ice_free_q_vector(struct ice_vsi *vsi, int ...
baf67aefbe7d7deafa59ca49612d163f8889934c
Analyze and fix the following issue in the Linux kernel code: PCI: Mark 3ware-9650SE Root Port Extended Tags as broken
Problem Details: Per PCIe r6.1, sec 2.2.6.2 and 7.5.3.4, a Requester may not use 8-bit Tags unless its Extended Tag Field Enable is set, but all Receivers/Completers must handle 8-bit Tags correctly regardless of their Extended Tag Field Enable. Some devices do not handle 8-bit Tags as Completers, so add a quirk for t...
```diff diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index d797df6e5f3e..2ebbe51a7efe 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5527,6 +5527,7 @@ static void quirk_no_ext_tags(struct pci_dev *pdev) pci_walk_bus(bridge->bus, pci_configure_extended_tags, NULL); } +DECLARE_PCI_FIXUP...
704dccec0d490f2ad06f3f16ebed254d81906c3a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: Fix interrupt-map cell sizes
Problem Details: The PCI node interrupt-map properties have the wrong size as #address-cells in the interrupt parent are not accounted for. The dtc interrupt_map check catches this, but the warning is off because its dependency, interrupt_provider, is off by default. Signed-off-by: Rob Herring <robh@kernel.org> Link:...
```diff diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index 5e1277fea725..61c8fd49c966 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -830,10 +830,10 @@ #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0x7>; - ...
f02b0f0dc26fbb77fe47b6e47cc5c211f0432c37
Analyze and fix the following issue in the Linux kernel code: arm: dts: Fix dtc interrupt_map warnings
Problem Details: The dtc interrupt_map warning is off because its dependency, interrupt_provider, is off by default. Fix all the warnings so it can be enabled. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240213-arm-dt-cleanups-v1-...
```diff diff --git a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-gateway-7001.dts b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-gateway-7001.dts index 4d70f6afd13a..6d5e69035f94 100644 --- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-gateway-7001.dts +++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-gateway-7001.dts @@ -60,6 +60,...
91adecf911e5df78ea3e8f866e69db2c33416a5c
Analyze and fix the following issue in the Linux kernel code: arm64: dts: Fix dtc interrupt_provider warnings
Problem Details: The dtc interrupt_provider warning is off by default. Fix all the warnings so it can be enabled. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-By: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> # Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Geert Uy...
```diff diff --git a/arch/arm64/boot/dts/amazon/alpine-v2.dtsi b/arch/arm64/boot/dts/amazon/alpine-v2.dtsi index dccbba6e7f98..dbf2dce8d1d6 100644 --- a/arch/arm64/boot/dts/amazon/alpine-v2.dtsi +++ b/arch/arm64/boot/dts/amazon/alpine-v2.dtsi @@ -145,7 +145,6 @@ msix: msix@fbe00000 { compatible = "al,alpine-msix...
96fd598e9c34cfa68402a4da3020c9236cfacf35
Analyze and fix the following issue in the Linux kernel code: arm: dts: Fix dtc interrupt_provider warnings
Problem Details: The dtc interrupt_provider warning is off by default. Fix all the warnings so it can be enabled. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> Reviewed-by: Alexandre Torgue <alexandre.torgue@foss.st.com> Acked-by: Florian Fainelli <florian.faine...
```diff diff --git a/arch/arm/boot/dts/amazon/alpine.dtsi b/arch/arm/boot/dts/amazon/alpine.dtsi index ff68dfb4eb78..90bd12feac01 100644 --- a/arch/arm/boot/dts/amazon/alpine.dtsi +++ b/arch/arm/boot/dts/amazon/alpine.dtsi @@ -167,7 +167,6 @@ msix: msix@fbe00000 { compatible = "al,alpine-msix"; reg = <0x0 0x...
fca7526b7d8910c6125cb1ebc3e78ccd5f50ec52
Analyze and fix the following issue in the Linux kernel code: drm/tests/drm_buddy: fix build failure on 32-bit targets
Problem Details: Guenter Roeck reports that commit a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test") causes build failures on 32-bit targets: "This patch breaks the build on all 32-bit systems since it introduces an unhandled direct 64-bit divide operation. ERROR: modpost: "__umoddi3" [drivers/gpu/...
```diff diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c index fee6bec757d1..8a464f7f4c61 100644 --- a/drivers/gpu/drm/tests/drm_buddy_test.c +++ b/drivers/gpu/drm/tests/drm_buddy_test.c @@ -21,7 +21,8 @@ static inline u64 get_size(int order, u64 chunk_size) static void dr...
eeb9f5c2dcec90009d7cf12e780e7f9631993fc5
Analyze and fix the following issue in the Linux kernel code: vdso/helpers: Fix grammar in comments
Problem Details: Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20240219153939.75719-2-anna-maria@linutronix.de
```diff diff --git a/include/vdso/helpers.h b/include/vdso/helpers.h index 9a2af9fca45e..73501149439d 100644 --- a/include/vdso/helpers.h +++ b/include/vdso/helpers.h @@ -30,9 +30,9 @@ static __always_inline u32 vdso_read_retry(const struct vdso_data *vd, static __always_inline void vdso_write_begin(struct vdso_data *...
86ab1b84b257bce8110947f563e168498d2d3860
Analyze and fix the following issue in the Linux kernel code: dm ioctl: update DM_DRIVER_EMAIL to new dm-devel mailing list
Problem Details: Fixes: 3da5d2de9238 ("MAINTAINERS: update the dm-devel mailing list") Signed-off-by: Mike Snitzer <snitzer@kernel.org>
```diff diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 3b1ad7127cb8..c2c07bfa6471 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -25,7 +25,7 @@ #include <linux/ima.h> #define DM_MSG_PREFIX "ioctl" -#define DM_DRIVER_EMAIL "dm-devel@redhat.com" +#define DM_DRIVER_EMAIL "dm-devel@...
5d8d40815314684af2593c075e6eee1afb42bb92
Analyze and fix the following issue in the Linux kernel code: dm crypt: Fix IO priority lost when queuing write bios
Problem Details: Since dm-crypt queues writes to a different kernel thread (workqueue), the bios will dispatch from tasks with different io_context->ioprio settings and blkcg than the submitting task, thus giving incorrect ioprio to the io scheduler. Get the original IO priority setting via struct dm_crypt_io::base_bi...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 7388f45ada07..50467f005177 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1688,6 +1688,7 @@ retry: GFP_NOIO, &cc->bs); clone->bi_private = io; clone->bi_end_io = crypt_endio; + clone->bi_ioprio = io->base_bio->bi_iopr...
d95e2c34a3ca76861014cde4205934e434c27c45
Analyze and fix the following issue in the Linux kernel code: dm verity: Fix IO priority lost when reading FEC and hash
Problem Details: After obtaining the data, verification or error correction process may trigger a new IO that loses the priority of the original IO, that is, the verification of the higher priority IO may be blocked by the lower priority IO. Make the IO used for verification and error correction follow the priority of...
```diff diff --git a/drivers/md/dm-verity-fec.c b/drivers/md/dm-verity-fec.c index b475200d8586..e46aee6f932e 100644 --- a/drivers/md/dm-verity-fec.c +++ b/drivers/md/dm-verity-fec.c @@ -60,7 +60,8 @@ static int fec_decode_rs8(struct dm_verity *v, struct dm_verity_fec_io *fio, * to the data block. Caller is responsib...
5581a43d302fb860f88f649c1a48a1c65c566eb0
Analyze and fix the following issue in the Linux kernel code: dm vdo delta-index: fix various small nits
Problem Details: Fix some needless line wrapping (given surrounding context), missing braces and some stale or incorrect references to data structure or function name. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat...
```diff diff --git a/drivers/md/dm-vdo/delta-index.c b/drivers/md/dm-vdo/delta-index.c index 0322552cdbd8..6306777bb202 100644 --- a/drivers/md/dm-vdo/delta-index.c +++ b/drivers/md/dm-vdo/delta-index.c @@ -47,7 +47,7 @@ * * The delta in each entry is encoded with a variable-length Huffman code to minimize the memo...
dea93aab18341d6d96a49e840e5605cebca7e8ea
Analyze and fix the following issue in the Linux kernel code: dm vdo chapter_index: fix a few small nits
Problem Details: Add missing braces and raise one function arg up a line to eliminate line wrap. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo/chapter-index.c b/drivers/md/dm-vdo/chapter-index.c index 7285a842e888..363991d56218 100644 --- a/drivers/md/dm-vdo/chapter-index.c +++ b/drivers/md/dm-vdo/chapter-index.c @@ -19,8 +19,7 @@ int uds_make_open_chapter_index(struct open_chapter_index **chapter_index, size_t memory_...
d008f6eeab44798943a86f7a0b50f1b1a6192f38
Analyze and fix the following issue in the Linux kernel code: dm vdo dedupe: fix various small nits
Problem Details: Add a __must_hold sparse annotation to launch_dedupe_state_change that reflects its ASSERTION code comments about locking requirements, add some extra braces and fix a couple typos. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com> Signed-off-b...
```diff diff --git a/drivers/md/dm-vdo/dedupe.c b/drivers/md/dm-vdo/dedupe.c index d81065a0951c..2a1902c4423c 100644 --- a/drivers/md/dm-vdo/dedupe.c +++ b/drivers/md/dm-vdo/dedupe.c @@ -81,7 +81,7 @@ * * A query to the UDS index is handled asynchronously by the index's threads. When the query is * complete, a ca...
b863d7f7503c42bc3c7033bcf8fff70d0bf825a7
Analyze and fix the following issue in the Linux kernel code: dm vdo recovery-journal: fix sparse 'mixed bitwiseness' warning
Problem Details: Only one user of WRITE_FLAGS so no need to factor it out in an enum (which causes sparse's 'mixed bitwiseness' warning). Just use the flags in the only consumer. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com> Signed-off-by: Matthew Sakai <m...
```diff diff --git a/drivers/md/dm-vdo/recovery-journal.c b/drivers/md/dm-vdo/recovery-journal.c index a6981e5dd017..1e15bfe42cfc 100644 --- a/drivers/md/dm-vdo/recovery-journal.c +++ b/drivers/md/dm-vdo/recovery-journal.c @@ -34,7 +34,6 @@ enum { */ RECOVERY_JOURNAL_RESERVED_BLOCKS = (MAXIMUM_VDO_USER_VIOS / R...
a6c05c981ecc841a3e95af666c2a1a6a265e7adc
Analyze and fix the following issue in the Linux kernel code: dm vdo: fix various blk_opf_t sparse warnings
Problem Details: Use proper blk_opf_t type rather than unsigned int. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo/block-map.c b/drivers/md/dm-vdo/block-map.c index 1278a5791160..cc87e1ac72b6 100644 --- a/drivers/md/dm-vdo/block-map.c +++ b/drivers/md/dm-vdo/block-map.c @@ -1620,7 +1620,7 @@ static void write_initialized_page(struct vdo_completion *completion) struct block_map_zone *zone = p...
ff9199464886500bd0c3df4a5ebae4760607aeda
Analyze and fix the following issue in the Linux kernel code: dm vdo: fix sparse 'warning: Using plain integer as NULL pointer'
Problem Details: Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo/index.c b/drivers/md/dm-vdo/index.c index e343a973881d..1596f6ba43a5 100644 --- a/drivers/md/dm-vdo/index.c +++ b/drivers/md/dm-vdo/index.c @@ -732,18 +732,18 @@ static void close_chapters(void *arg) static void stop_chapter_writer(struct chapter_writer *writer) { - struct thr...
3fa8e6ec07f7d326cbd9af2daa29b5fe3fb9eb12
Analyze and fix the following issue in the Linux kernel code: dm vdo: fix sparse warnings about missing statics
Problem Details: Addresses various sparse warnings like: warning: symbol 'SYMBOL' was not declared. Should it be static? Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo/Makefile b/drivers/md/dm-vdo/Makefile index 8f8d161a6dbe..8c06c3b969e3 100644 --- a/drivers/md/dm-vdo/Makefile +++ b/drivers/md/dm-vdo/Makefile @@ -9,7 +9,6 @@ dm-vdo-objs := \ chapter-index.o \ completion.o \ config.o \ - constants.o \ data-vio.o \ dedupe.o \ delta-in...
5c45cd10c085f46148f1b6030c5d710d842dd1d0
Analyze and fix the following issue in the Linux kernel code: dm vdo index: fix various small nits
Problem Details: Add braces around multi-line while loops and if statements. Also remove excess newlines. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Chung Chung <cchung@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo/index-layout.c b/drivers/md/dm-vdo/index-layout.c index 6446a1f58641..f0511988ea07 100644 --- a/drivers/md/dm-vdo/index-layout.c +++ b/drivers/md/dm-vdo/index-layout.c @@ -386,9 +386,10 @@ static void define_sub_index_nonce(struct index_layout *layout) encode_u64_le(buffer, &off...
ac9ae5769d61e4fe1c5e4245c5cbcd6c0f0f0e9e
Analyze and fix the following issue in the Linux kernel code: dm vdo dedupe: fix various small nits
Problem Details: Remove extra blank line, mark function inline, add missing braces, and fix a typo in a comment. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Chung Chung <cchung@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo/dedupe.c b/drivers/md/dm-vdo/dedupe.c index b3ffb85518c3..8533f1669a01 100644 --- a/drivers/md/dm-vdo/dedupe.c +++ b/drivers/md/dm-vdo/dedupe.c @@ -1061,7 +1061,7 @@ static void start_deduping(struct hash_lock *lock, struct data_vio *agent, * increment_stat() - Increment a stati...
1ccef45aa889a0a3cd3f82681bfd90e0d4c2b203
Analyze and fix the following issue in the Linux kernel code: dm vdo slab-depot: fix various small nits
Problem Details: Comment typo, whitespace issues, mark function inline. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Chung Chung <cchung@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo/slab-depot.c b/drivers/md/dm-vdo/slab-depot.c index 56d975c98752..42126bd60242 100644 --- a/drivers/md/dm-vdo/slab-depot.c +++ b/drivers/md/dm-vdo/slab-depot.c @@ -1360,7 +1360,7 @@ static unsigned int calculate_slab_priority(struct vdo_slab *slab) /* * Slabs are essentially ...
6bda10727d1651abc32763fbf081602df61cd9ad
Analyze and fix the following issue in the Linux kernel code: dm vdo block-map: fix a few small nits
Problem Details: Rename 'pages' to 'num_pages' in distribute_page_over_waitq(). Update assert message in validate_completed_page() to model others. Tweak line-wrapping on a comment that was needlessly long. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo/block-map.c b/drivers/md/dm-vdo/block-map.c index f9f68e8d4b0c..64f893b0721a 100644 --- a/drivers/md/dm-vdo/block-map.c +++ b/drivers/md/dm-vdo/block-map.c @@ -535,19 +535,19 @@ static void complete_waiter_with_page(struct vdo_waiter *waiter, void *page_info static unsigned int d...
4c79d55678b8bf993cb94c6181180997112bb353
Analyze and fix the following issue in the Linux kernel code: dm vdo: fix how dm_kcopyd_client_create() failure is checked
Problem Details: dm_kcopyd_client_create() returns an ERR_PTR so its return must be checked with IS_ERR(). Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Chung Chung <cchung@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo-target.c b/drivers/md/dm-vdo-target.c index 72d2291dd93f..4fbc148681e5 100644 --- a/drivers/md/dm-vdo-target.c +++ b/drivers/md/dm-vdo-target.c @@ -8,6 +8,7 @@ #include <linux/completion.h> #include <linux/delay.h> #include <linux/device-mapper.h> +#include <linux/err.h> #incl...
a4bba246ecdea4bf73602dcedbc9091656d63872
Analyze and fix the following issue in the Linux kernel code: dm vdo wait-queue: rename to vdo_waitq_dequeue_waiter
Problem Details: Rename vdo_waitq_dequeue_next_waiter to vdo_waitq_dequeue_waiter. The "next" aspect of returned waiter is implied. "next" also isn't informative ("oldest" would be). Removing "next_" adds symmetry to vdo_waitq_enqueue_waiter(). Also fix whitespace and comments from previous waitq commit. Reviewed-by...
```diff diff --git a/drivers/md/dm-vdo/block-map.c b/drivers/md/dm-vdo/block-map.c index 7f9c4bc05f02..c5cb9da5d33e 100644 --- a/drivers/md/dm-vdo/block-map.c +++ b/drivers/md/dm-vdo/block-map.c @@ -913,7 +913,7 @@ static void allocate_free_page(struct page_info *info) /* * Remove all entries which match the pag...
cd1227dd8341dca720ec71ad7dd2824fbf60ed4e
Analyze and fix the following issue in the Linux kernel code: dm vdo wait-queue: remove unused debug function vdo_waitq_get_next_waiter
Problem Details: Reviewed-by: Ken Raeburn <raeburn@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Matthew Sakai <msakai@redhat.com>
```diff diff --git a/drivers/md/dm-vdo/wait-queue.c b/drivers/md/dm-vdo/wait-queue.c index 9c12a9893823..4231d3243fa1 100644 --- a/drivers/md/dm-vdo/wait-queue.c +++ b/drivers/md/dm-vdo/wait-queue.c @@ -207,21 +207,3 @@ bool vdo_waitq_notify_next_waiter(struct vdo_wait_queue *waitq, return true; } - -/** - * vdo_w...
46766d4888ffdfd2bce91a6879bd6285a92a4881
Analyze and fix the following issue in the Linux kernel code: dm vdo: add memory allocation utilities
Problem Details: This patch adds standardized allocation macros and memory tracking tools to track and report any allocated memory that is not freed. This makes it easier to ensure that the vdo target does not leak memory. This patch also adds utilities for controlling whether certain threads are allowed to allocate m...
```diff diff --git a/drivers/md/dm-vdo/memory-alloc.c b/drivers/md/dm-vdo/memory-alloc.c new file mode 100644 index 000000000000..46dd5bda6825 --- /dev/null +++ b/drivers/md/dm-vdo/memory-alloc.c @@ -0,0 +1,442 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright 2023 Red Hat + */ + +#include <linux/delay.h> ...
42e15d12070b4ff9af2b980f1b65774c2dab0507
Analyze and fix the following issue in the Linux kernel code: dm-crypt: recheck the integrity tag after a failure
Problem Details: If a userspace process reads (with O_DIRECT) multiple blocks into the same buffer, dm-crypt reports an authentication error [1]. The error is reported in a log and it may cause RAID leg being kicked out of the array. This commit fixes dm-crypt, so that if integrity verification fails, the data is read...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 14c5be6eda3b..6044614bab76 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -62,6 +62,8 @@ struct convert_context { struct skcipher_request *req; struct aead_request *req_aead; } r; + bool aead_recheck; + bool aead_failed;...
50c70240097ce41fe6bce6478b80478281e4d0f7
Analyze and fix the following issue in the Linux kernel code: dm-crypt: don't modify the data when using authenticated encryption
Problem Details: It was said that authenticated encryption could produce invalid tag when the data that is being encrypted is modified [1]. So, fix this problem by copying the data into the clone bio first and then encrypt them inside the clone bio. This may reduce performance, but it is needed to prevent the user fro...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index f745f8508243..14c5be6eda3b 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -2071,6 +2071,12 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io) io->ctx.bio_out = clone; io->ctx.iter_out = clone->bi_iter; + if...
9177f3c0dea6143d05cac1bbd28668fd0e216d11
Analyze and fix the following issue in the Linux kernel code: dm-verity: recheck the hash after a failure
Problem Details: If a userspace process reads (with O_DIRECT) multiple blocks into the same buffer, dm-verity reports an error [1]. This commit fixes dm-verity, so that if hash verification fails, the data is read again into a kernel buffer (where userspace can't modify it) and the hash is rechecked. If the recheck su...
```diff diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c index 82662f5769c4..224469e1efbc 100644 --- a/drivers/md/dm-verity-target.c +++ b/drivers/md/dm-verity-target.c @@ -482,6 +482,63 @@ int verity_for_bv_block(struct dm_verity *v, struct dm_verity_io *io, return 0; } +static int verit...
c88f5e553fe38b2ffc4c33d08654e5281b297677
Analyze and fix the following issue in the Linux kernel code: dm-integrity: recheck the integrity tag after a failure
Problem Details: If a userspace process reads (with O_DIRECT) multiple blocks into the same buffer, dm-integrity reports an error [1]. The error is reported in a log and it may cause RAID leg being kicked out of the array. This commit fixes dm-integrity, so that if integrity verification fails, the data is read again ...
```diff diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index c5f03aab4552..e46c798c5c36 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -278,6 +278,8 @@ struct dm_integrity_c { atomic64_t number_of_mismatches; + mempool_t recheck_pool; + struct notifier_block reboot...
ee89921da471edcb4b1e67f5bbfedddf39749782
Analyze and fix the following issue in the Linux kernel code: ice: fix pin phase adjust updates on PF reset
Problem Details: Do not allow to set phase adjust value for a pin if PF reset is in progress, this would cause confusing netlink extack errors as the firmware cannot process the request properly during the reset time. Return (-EBUSY) and report extack error for the user who tries configure pin phase adjust during the ...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index 395e10c246f7..adfa1f2a80a6 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.c +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c @@ -963,6 +963,9 @@ ice_dpll_pin_phase_adjust_set(const struct dpll_pin *pin,...
9a8385fe14bcb250a3889e744dc54e9c411d8400
Analyze and fix the following issue in the Linux kernel code: ice: fix dpll periodic work data updates on PF reset
Problem Details: Do not allow dpll periodic work function to acquire data from firmware if PF reset is in progress. Acquiring data will cause dmesg errors as the firmware cannot respond or process the request properly during the reset time. Test by looping execution of below step until dmesg error appears: - perform P...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index 343b2a668959..395e10c246f7 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.c +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c @@ -1364,8 +1364,10 @@ static void ice_dpll_periodic_work(struct kthread_work...
fc7fd1a10a9d2d38378b42e9a508da4c68018453
Analyze and fix the following issue in the Linux kernel code: ice: fix dpll and dpll_pin data access on PF reset
Problem Details: Do not allow to acquire data or alter configuration of dpll and pins through firmware if PF reset is in progress, this would cause confusing netlink extack errors as the firmware cannot respond or process the request properly during the reset time. Return (-EBUSY) and extack error for the user who tri...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index 2beaeb9c336d..343b2a668959 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.c +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c @@ -30,6 +30,26 @@ static const char * const pin_type_name[] = { [ICE_DPLL_...
3b14430c65b4f510b2a310ca4f18ed6ca7184b00
Analyze and fix the following issue in the Linux kernel code: ice: fix dpll input pin phase_adjust value updates
Problem Details: The value of phase_adjust for input pin shall be updated in ice_dpll_pin_state_update(..). Fix by adding proper argument to the firmware query function call - a pin's struct field pointer where the phase_adjust value during driver runtime is stored. Previously the phase_adjust used to misinform user a...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index 9c0d739be1e9..2beaeb9c336d 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.c +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c @@ -373,7 +373,7 @@ ice_dpll_pin_state_update(struct ice_pf *pf, struct ice_d...
e8335ef57c6816d81b24173ba88cc9b3f043687f
Analyze and fix the following issue in the Linux kernel code: ice: fix connection state of DPLL and out pin
Problem Details: Fix the connection state between source DPLL and output pin, updating the attribute 'state' of 'parent_device'. Previously, the connection state was broken, and didn't reflect the correct state. When 'state_on_dpll_set' is called with the value 'DPLL_PIN_STATE_CONNECTED' (1), the output pin will switc...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index b9c5eced6326..9c0d739be1e9 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.c +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c @@ -254,6 +254,7 @@ ice_dpll_output_frequency_get(const struct dpll_pin *pin,...
253751233b19b58b1d361388c8d2b40c940e729c
Analyze and fix the following issue in the Linux kernel code: arm64: kretprobes: acquire the regs via a BRK exception
Problem Details: On arm64, kprobes always take an exception and so create a struct pt_regs through the usual exception entry logic. Similarly kretprobes taskes and exception for function entry, but for function returns it uses a trampoline which attempts to create a struct pt_regs without taking an exception. This is ...
```diff diff --git a/arch/arm64/include/asm/brk-imm.h b/arch/arm64/include/asm/brk-imm.h index 1abdcd508a11..beb42c62b6ac 100644 --- a/arch/arm64/include/asm/brk-imm.h +++ b/arch/arm64/include/asm/brk-imm.h @@ -11,6 +11,7 @@ * 0x004: for installing kprobes * 0x005: for installing uprobes * 0x006: for kprobe softw...
97d935faacde478501eea6f75c86beea71f29ba3
Analyze and fix the following issue in the Linux kernel code: arm64: Unmask Debug + SError in do_notify_resume()
Problem Details: When returning to a user context, the arm64 entry code masks all DAIF exceptions before handling pending work in exit_to_user_mode_prepare() and do_notify_resume(), where it will transiently unmask all DAIF exceptions. This is a holdover from the old entry assembly, which conservatively masked all DAIF...
```diff diff --git a/arch/arm64/kernel/entry-common.c b/arch/arm64/kernel/entry-common.c index 3c849ad03bf8..b77a15955f28 100644 --- a/arch/arm64/kernel/entry-common.c +++ b/arch/arm64/kernel/entry-common.c @@ -130,7 +130,7 @@ static __always_inline void __exit_to_user_mode(void) static void do_notify_resume(struct pt...
6f15e617cc99323339dc241d19956f0d640c4354
Analyze and fix the following issue in the Linux kernel code: RAS: Introduce a FRU memory poison manager
Problem Details: Memory errors are an expected occurrence on systems with high memory density. Generally, errors within a small number of unique physical locations are acceptable, based on manufacturer and/or admin policy. During run time, memory with errors may be retired so it is no longer used by the system. This is...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index fc5996feba70..76163f09e4e2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18363,6 +18363,12 @@ F: drivers/ras/ F: include/linux/ras.h F: include/ras/ras_event.h +RAS FRU MEMORY POISON MANAGER (FMPM) +M: Yazen Ghannam <Yazen.Ghannam@amd.com> +L: linux-edac@vger.ke...
f176168bcb95bd1fdd32f5a794e68b7a36ac8740
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm6115: fix USB PHY configuration
Problem Details: The patch adding Type-C support for sm6115 was misapplied. All the orientation switch configuration ended up at the UFS PHY node instead of the USB PHY node. Move the data bits to the correct place. Fixes: a06a2f12f9e2 ("arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling") Signed-off-by: Dmitry...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index 4e7d33730451..d1aa2e57cb57 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -884,10 +884,31 @@ clock-output-names = "usb3_phy_pipe_clk_src"; #phy-cells = <0>; +...
bf7626f19d6ff14b9722273e23700400cc4d78ba
Analyze and fix the following issue in the Linux kernel code: drm/i915/tv: Fix TV mode
Problem Details: Commit 1fd4a5a36f9f ("drm/connector: Rename legacy TV property") failed to update all the users of the struct drm_tv_connector_state mode field, which resulted in a build failure in i915. However, a subsequent commit in the same series reintroduced a mode field in that structure, with a different sema...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c index 3b79488357ba..d8b096779e12 100644 --- a/drivers/gpu/drm/i915/display/intel_sdvo.c +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c @@ -1220,7 +1220,7 @@ static bool intel_sdvo_set_tv_format(struct intel_sdvo ...
944d5fe50f3f03daacfea16300e656a1691c4a23
Analyze and fix the following issue in the Linux kernel code: sched/membarrier: reduce the ability to hammer on sys_membarrier
Problem Details: On some systems, sys_membarrier can be very expensive, causing overall slowdowns for everything. So put a lock on the path in order to serialize the accesses to prevent the ability for this to be called at too high of a frequency and saturate the machine. Signed-off-by: Greg Kroah-Hartman <gregkh@lin...
```diff diff --git a/kernel/sched/membarrier.c b/kernel/sched/membarrier.c index 2ad881d07752..4e715b9b278e 100644 --- a/kernel/sched/membarrier.c +++ b/kernel/sched/membarrier.c @@ -162,6 +162,9 @@ | MEMBARRIER_PRIVATE_EXPEDITED_RSEQ_BITMASK \ | MEMBARRIER_CMD_GET_REGISTRATIONS) +static DEFINE_MUTEX(membarrier...
0f688c0eb63a643ef0568b29b12cefbb23181e1a
Analyze and fix the following issue in the Linux kernel code: drm/xe: Return 2MB page size for compact 64k PTEs
Problem Details: Compact 64k PTEs are only intended to be used within a single VMA which covers the entire 2MB range of the compact 64k PTEs. Add XE_VMA_PTE_COMPACT VMA flag to indicate compact 64k PTEs are used and update xe_vma_max_pte_size to return at least 2MB if set. v2: Include missing changes Fixes: 8f33b4f05...
```diff diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c index 46cea37bdac5..7f54bc3e389d 100644 --- a/drivers/gpu/drm/xe/xe_pt.c +++ b/drivers/gpu/drm/xe/xe_pt.c @@ -547,13 +547,16 @@ xe_pt_stage_bind_entry(struct xe_ptw *parent, pgoff_t offset, *child = &xe_child->base; /* - * Prefer the...
15f0e0c2c46dddd8ee56d9b3db679fd302cc4b91
Analyze and fix the following issue in the Linux kernel code: drm/xe: Add XE_VMA_PTE_64K VMA flag
Problem Details: Add XE_VMA_PTE_64K VMA flag to ensure skipping rebinds does not cross 64k page boundaries. Fixes: 8f33b4f054fc ("drm/xe: Avoid doing rebinds") Fixes: c47794bdd63d ("drm/xe: Set max pte size when skipping rebinds") Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Thomas Hellström <th...
```diff diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c index 1e35c7525447..46cea37bdac5 100644 --- a/drivers/gpu/drm/xe/xe_pt.c +++ b/drivers/gpu/drm/xe/xe_pt.c @@ -499,10 +499,12 @@ xe_pt_stage_bind_entry(struct xe_ptw *parent, pgoff_t offset, * this device *requires* 64K PTE size for VRAM, f...
19adaccef8b246182dc89a7470aa7758245efd5d
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix xe_vma_set_pte_size
Problem Details: xe_vma_set_pte_size had a return value and did not set the 4k VMA flag. Both of these were incorrect. Fix these. Fixes: c47794bdd63d ("drm/xe: Set max pte size when skipping rebinds") Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 836a6e849cda..2b0c76c663e5 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -2198,7 +2198,7 @@ static u64 xe_vma_max_pte_size(struct xe_vma *vma) return SZ_1G; /* Uninitialized, used max size */ } -static ...
5aa3c0cf5bba6437c9e63a56f684f61de8b503d6
Analyze and fix the following issue in the Linux kernel code: genirq/irqdomain: Don't call ops->select for DOMAIN_BUS_ANY tokens
Problem Details: Users of the IRQCHIP_PLATFORM_DRIVER_{BEGIN,END} helpers rely on a fwspec containing only the fwnode (and crucially a number of parameters set to 0) together with a DOMAIN_BUS_ANY token to check whether a parent irqchip has probed and registered a domain. Since de1ff306dcf4 ("genirq/irqdomain: Remove ...
```diff diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index aeb41655d6de..3dd1c871e091 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -449,7 +449,7 @@ struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, */ mutex_lock(&irq_domain_mutex); list_for_each_entry(h...
34da27aa8956d3a75c7556a59c9c7cfd0b3f18ab
Analyze and fix the following issue in the Linux kernel code: irqchip/imx-intmux: Handle pure domain searches correctly
Problem Details: The removal of the paremeter count restriction in the core code to allow pure domain token based select() decisions broke the IMX intmux select callback as that unconditioally expects that there is a parameter. Add the missing check for zero parameter count and the token match. Fixes: de1ff306dcf4 ("...
```diff diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-intmux.c index aa041e4dfee0..65084c7619b0 100644 --- a/drivers/irqchip/irq-imx-intmux.c +++ b/drivers/irqchip/irq-imx-intmux.c @@ -166,6 +166,10 @@ static int imx_intmux_irq_select(struct irq_domain *d, struct irq_fwspec *fwspec if (fwspe...
fdf87a0dc26d0550c60edc911cda42f9afec3557
Analyze and fix the following issue in the Linux kernel code: ARM: ep93xx: Add terminator to gpiod_lookup_table
Problem Details: Without the terminator, if a con_id is passed to gpio_find() that does not exist in the lookup table the function will not stop looping correctly, and eventually cause an oops. Cc: stable@vger.kernel.org Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors") Reported-by: Andy Shevchenko <andriy...
```diff diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 71b113976420..8b1ec60a9a46 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -339,6 +339,7 @@ static struct gpiod_lookup_table ep93xx_i2c_gpiod_table = { GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN), GPIO_LOO...
49cbb7b7d36ec3ba73ce1daf7ae1d71d435453b8
Analyze and fix the following issue in the Linux kernel code: ALSA: ump: Fix the discard error code from snd_ump_legacy_open()
Problem Details: snd_ump_legacy_open() didn't return the error code properly even if it couldn't open. Fix it. Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20240220150843.28630-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/core/ump.c b/sound/core/ump.c index 3bef1944e955..fe7911498cc4 100644 --- a/sound/core/ump.c +++ b/sound/core/ump.c @@ -985,7 +985,7 @@ static int snd_ump_legacy_open(struct snd_rawmidi_substream *substream) struct snd_ump_endpoint *ump = substream->rmidi->private_data; int dir = substrea...
eb0d253ff9c74dee30aa92fe460b825eb28acd73
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Don't enable any tiles by default on VPU40xx
Problem Details: There is no point in requesting 1 tile on VPU40xx as the FW will probably need more tiles to run workloads, so it will have to reconfigure PLL anyway. Don't enable any tiles and allow the FW to perform initial tile configuration. This improves NPU boot stability as the tiles are always enabled only by...
```diff diff --git a/drivers/accel/ivpu/ivpu_hw_40xx.c b/drivers/accel/ivpu/ivpu_hw_40xx.c index 1c995307c113..a1523d0b1ef3 100644 --- a/drivers/accel/ivpu/ivpu_hw_40xx.c +++ b/drivers/accel/ivpu/ivpu_hw_40xx.c @@ -24,7 +24,7 @@ #define SKU_HW_ID_SHIFT 16u #define SKU_HW_ID_MASK 0xffff0000u...
ba3b759fb688c09cd9b09852d2728b012cf040ba
Analyze and fix the following issue in the Linux kernel code: kconfig: lxdialog: fix cursor render in checklist
Problem Details: When a checklist is opened, the cursor is rendered in a wrong position (after the last list element on the screen). You can observe it by opening any checklist in menuconfig. Added wmove() to set the cursor in the proper position, just like in menubox.c. Removed wnoutrefresh(dialog) because dialog win...
```diff diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c index fd161cfff121..31d0a89fbeb7 100644 --- a/scripts/kconfig/lxdialog/checklist.c +++ b/scripts/kconfig/lxdialog/checklist.c @@ -188,9 +188,8 @@ do_resize: print_buttons(dialog, height, width, 0); - wnoutrefresh(dial...
778666df60f0d96f215e33e27448de47a2207fb3
Analyze and fix the following issue in the Linux kernel code: s390: compile relocatable kernel without -fPIE
Problem Details: On s390, currently kernel uses the '-fPIE' compiler flag for compiling vmlinux. This has a few problems: - It uses dynamic symbols (.dynsym), for which the linker refuses to allow more than 64k sections. This can break features which use '-ffunction-sections' and '-fdata-sections', includi...
```diff diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 39e937309fc2..2dc722fb31b4 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -583,14 +583,23 @@ config RELOCATABLE help This builds a kernel image that retains relocation information so it can be loaded at an arbitrary address. - The k...
9ea30fd166e9b869546059f714beab78cb150b11
Analyze and fix the following issue in the Linux kernel code: s390/boot: add 'alloc' to info.bin .vmlinux.info section flags
Problem Details: When attempting to boot a kernel compiled with OBJCOPY=llvm-objcopy, there is a crash right at boot: Out of memory allocating 6d7800 bytes 8 aligned in range 0:20000000 Reserved memory ranges: 0000000000000000 a394c3c30d90cdaf DECOMPRESSOR Usable online memory ranges (info source: sclp read in...
```diff diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile index ace0bda1ad24..d40135efdec4 100644 --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile @@ -94,7 +94,7 @@ OBJCOPYFLAGS_syms.o := -I binary -O elf64-s390 -B s390:64-bit --rename-section . $(obj)/syms.o: $(obj)/syms.bin FORCE $(call if_...
d0c8fd21006777b3952263973237fcd82e049ec4
Analyze and fix the following issue in the Linux kernel code: s390/pci: fix three typos in comments
Problem Details: Found and fixed these while working on synchronizing the state handling of zpci_dev's. Signed-off-by: Gerd Bayer <gbayer@linux.ibm.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
```diff diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index c87b8aff5285..9e80945fb11d 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -896,7 +896,7 @@ int zpci_deconfigure_device(struct zpci_dev *zdev) } /** - * zpci_device_reserved() - Mark device as resverved + * zpci_device_reserved() - M...
427c70dec738318b7f71e1b9d829ff0e9771d493
Analyze and fix the following issue in the Linux kernel code: platform/x86: thinkpad_acpi: Only update profile if successfully converted
Problem Details: Randomly a Lenovo Z13 will trigger a kernel warning traceback from this condition: ``` if (WARN_ON((profile < 0) || (profile >= ARRAY_SIZE(profile_names)))) ``` This happens because thinkpad-acpi always assumes that convert_dytc_to_profile() successfully updated the profile. On the contrary a conditi...
```diff diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index c4895e9bc714..5ecd9d33250d 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -10308,6 +10308,7 @@ static int convert_dytc_to_profile(int funcmode, int dytcmode, return ...
84c16d01ff219bc0a5dca5219db6b8b86a6854fb
Analyze and fix the following issue in the Linux kernel code: platform/x86: intel-vbtn: Stop calling "VBDL" from notify_handler
Problem Details: Commit 14c200b7ca46 ("platform/x86: intel-vbtn: Fix missing tablet-mode-switch events") causes 2 issues on the ThinkPad X1 Tablet Gen2: 1. The ThinkPad will wake up immediately from suspend 2. When put in tablet mode SW_TABLET_MODE reverts to 0 after about 1 second Both these issues are caused by the...
```diff diff --git a/drivers/platform/x86/intel/vbtn.c b/drivers/platform/x86/intel/vbtn.c index 210b0a81b7ec..084c355c86f5 100644 --- a/drivers/platform/x86/intel/vbtn.c +++ b/drivers/platform/x86/intel/vbtn.c @@ -200,9 +200,6 @@ static void notify_handler(acpi_handle handle, u32 event, void *context) autorelease = ...
8215ca518164d35f10c0b5545c8bb80f538638b8
Analyze and fix the following issue in the Linux kernel code: platform/x86: x86-android-tablets: Fix acer_b1_750_goodix_gpios name
Problem Details: The Acer B1 750 tablet used a Novatek NVT-ts touchscreen, not a Goodix touchscreen. Rename acer_b1_750_goodix_gpios to acer_b1_750_nvt_ts_gpios to correctly reflect this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240216201721.239791-5-hdegoede@redhat.com
```diff diff --git a/drivers/platform/x86/x86-android-tablets/other.c b/drivers/platform/x86/x86-android-tablets/other.c index bc6bbf7ec6ea..278402dcb808 100644 --- a/drivers/platform/x86/x86-android-tablets/other.c +++ b/drivers/platform/x86/x86-android-tablets/other.c @@ -68,7 +68,7 @@ static const struct x86_i2c_cli...
812a79b52b92345d777b6377fa538747d366b6ce
Analyze and fix the following issue in the Linux kernel code: platform/x86: x86-android-tablets: Fix serdev instantiation no longer working
Problem Details: After commit b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") x86_instantiate_serdev() no longer works due to the serdev-controller-device moving in the device hierarchy from (e.g.) /sys/devices/pci0000:00/8086228A:00/serial0 to /sys/devices/pci0000:00/808622...
```diff diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c index f6547c9d7584..a3415f1c0b5f 100644 --- a/drivers/platform/x86/x86-android-tablets/core.c +++ b/drivers/platform/x86/x86-android-tablets/core.c @@ -21,6 +21,7 @@ #include <linux/string.h> #incl...
dc5afd720f84de3c1f5d700eb0b858006a2dc468
Analyze and fix the following issue in the Linux kernel code: platform/x86: Add new get_serdev_controller() helper
Problem Details: In some cases UART attached devices which require an in kernel driver, e.g. UART attached Bluetooth HCIs are described in the ACPI tables by an ACPI device with a broken or missing UartSerialBusV2() resource. This causes the kernel to create a /dev/ttyS# char-device for the UART instead of creating an...
```diff diff --git a/drivers/platform/x86/serdev_helpers.h b/drivers/platform/x86/serdev_helpers.h new file mode 100644 index 000000000000..bcf3a0c356ea --- /dev/null +++ b/drivers/platform/x86/serdev_helpers.h @@ -0,0 +1,80 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * In some cases UART attached devices...
bd8905d70944aae5063fd91c667e6f846ee92718
Analyze and fix the following issue in the Linux kernel code: platform/x86: x86-android-tablets: Fix keyboard touchscreen on Lenovo Yogabook1 X90
Problem Details: After commit 4014ae236b1d ("platform/x86: x86-android-tablets: Stop using gpiolib private APIs") the touchscreen in the keyboard half of the Lenovo Yogabook1 X90 stopped working with the following error: Goodix-TS i2c-goodix_ts: error -EBUSY: Failed to get irq GPIO The problem is that when getting t...
```diff diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c index f8221a15575b..f6547c9d7584 100644 --- a/drivers/platform/x86/x86-android-tablets/core.c +++ b/drivers/platform/x86/x86-android-tablets/core.c @@ -113,6 +113,9 @@ int x86_acpi_irq_helper_get(const...
275b583d047a23c48d01b0c45fb5d95618c1da2d
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: avs: ICL-based platforms support
Problem Details: Define handlers specific to cAVS 2.0 platforms, that is ICL, JSL and all other variants based on this very version of AudioDSP architecture. Most operations are inherited from their predecessors with the major difference being firmware-logging functionality - IPC request as well as debug memory windows...
```diff diff --git a/sound/soc/intel/avs/Makefile b/sound/soc/intel/avs/Makefile index a8d4b0ef2603..6ababafd40bd 100644 --- a/sound/soc/intel/avs/Makefile +++ b/sound/soc/intel/avs/Makefile @@ -3,7 +3,7 @@ snd-soc-avs-objs := dsp.o ipc.o messages.o utils.o core.o loader.o \ topology.o path.o pcm.o board_select...
a8f858d98f016a0209edaf1518fd45a5e5c62d47
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: avs: Prefix SKL/APL-specific members
Problem Details: Prefix members that are platform-specific with 'avs_' to improve code cohesiveness and reduce the chance for naming-conflics with other drivers. Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/2...
```diff diff --git a/sound/soc/intel/avs/apl.c b/sound/soc/intel/avs/apl.c index 1860099c782a..24c06568b3e8 100644 --- a/sound/soc/intel/avs/apl.c +++ b/sound/soc/intel/avs/apl.c @@ -14,10 +14,10 @@ #include "topology.h" static int __maybe_unused -apl_enable_logs(struct avs_dev *adev, enum avs_log_enable enable, u3...
e1a0cbae52d0bf3cb350eba5c95c46c14a5bcda4
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: avs: Fix sound clipping in single capture scenario
Problem Details: To avoid sound clipping when there just one, single CAPTURE stream ongoing, disable L1SEN before it is started. Any PLAYBACK stream or additional CAPTURE allows L1SEN to be re-enabled. Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski...
```diff diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c index 4dfc5a1ebb7c..2cafbc392cdb 100644 --- a/sound/soc/intel/avs/pcm.c +++ b/sound/soc/intel/avs/pcm.c @@ -643,6 +643,79 @@ static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_so return 0; } +static void avs_hda_s...
5b7236c198a30d736a7664e26b09b5e3e8a914f4
Analyze and fix the following issue in the Linux kernel code: MIPS: Alchemy: Use kcalloc() instead of kzalloc()
Problem Details: As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values wrapping ar...
```diff diff --git a/arch/mips/alchemy/common/clock.c b/arch/mips/alchemy/common/clock.c index c01be8c45271..6c8996e20a7d 100644 --- a/arch/mips/alchemy/common/clock.c +++ b/arch/mips/alchemy/common/clock.c @@ -771,7 +771,7 @@ static int __init alchemy_clk_init_fgens(int ctype) } id.flags = CLK_SET_RATE_PARENT | CL...
b388e57d4628eb22782bdad4cd5b83ca87a1b7c9
Analyze and fix the following issue in the Linux kernel code: x86/vdso: Fix rethunk patching for vdso-image-{32,64}.o
Problem Details: For CONFIG_RETHUNK kernels, objtool annotates all the function return sites so they can be patched during boot. By design, after apply_returns() is called, all tail-calls to the compiler-generated default return thunk (__x86_return_thunk) should be patched out and replaced with whatever's needed for a...
```diff diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index c4df99aa1615..b80f4bbe4f75 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -34,8 +34,12 @@ obj-y += vma.o extable.o KASAN_SANITIZE_vma.o := y UBSAN_SANITIZE_vma.o := y KCSAN_SANITIZE_vma.o ...
d7b77a0d565b048cb0808fa8a4fb031352b22a01
Analyze and fix the following issue in the Linux kernel code: arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend
Problem Details: The fields in SMCR_EL1 reset to an architecturally UNKNOWN value. Since we do not otherwise manage the traps configured in this register at runtime we need to reconfigure them after a suspend in case nothing else was kind enough to preserve them for us. Do so for SMCR_EL1.EZT0. Fixes: d4913eee152d ("a...
```diff diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index d52592088afa..f27acca550d5 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -1320,6 +1320,8 @@ void sme_suspend_exit(void) if (system_supports_fa64()) smcr |= SMCR_ELx_FA64; + if (system_supports_sme2())...
9533864816fb4a6207c63b7a98396351ce1a9fae
Analyze and fix the following issue in the Linux kernel code: arm64/sme: Restore SME registers on exit from suspend
Problem Details: The fields in SMCR_EL1 and SMPRI_EL1 reset to an architecturally UNKNOWN value. Since we do not otherwise manage the traps configured in this register at runtime we need to reconfigure them after a suspend in case nothing else was kind enough to preserve them for us. The vector length will be restored...
```diff diff --git a/arch/arm64/include/asm/fpsimd.h b/arch/arm64/include/asm/fpsimd.h index 481d94416d69..b67b89c54e1c 100644 --- a/arch/arm64/include/asm/fpsimd.h +++ b/arch/arm64/include/asm/fpsimd.h @@ -386,6 +386,7 @@ extern void sme_alloc(struct task_struct *task, bool flush); extern unsigned int sme_get_vl(void...
802379b8f9e169293e9ba7089e5f1a6340e2e7a3
Analyze and fix the following issue in the Linux kernel code: perf: CXL: fix CPMU filter value mask length
Problem Details: CPMU filter value is described as 4B length in CXL r3.0 8.2.7.2.2. However, it is used as 2B length in code and comments. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Hojin Nam <hj96.nam@samsung.com> Link: https://lore.kernel.org/r/20240216014522.32321-1-hj96.nam@samsung....
```diff diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c index bc0d414a6aff..308c9969642e 100644 --- a/drivers/perf/cxl_pmu.c +++ b/drivers/perf/cxl_pmu.c @@ -59,7 +59,7 @@ #define CXL_PMU_COUNTER_CFG_EVENT_GRP_ID_IDX_MSK GENMASK_ULL(63, 59) #define CXL_PMU_FILTER_CFG_REG(n, f) (0x400 + 4 * ((f) + (n)...
ae366ba8576da0135d7d3db2dfa6304f3338d0c2
Analyze and fix the following issue in the Linux kernel code: gpiolib: Handle no pin_ranges in gpiochip_generic_config()
Problem Details: Similar to gpiochip_generic_request() and gpiochip_generic_free() the gpiochip_generic_config() function needs to handle the case where there are no pinctrl pins mapped to the GPIOs, usually through the gpio-ranges device tree property. Commit f34fd6ee1be8 ("gpio: dwapb: Use generic request, free and ...
```diff diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 8b3a0f45b574..e434e8cc1229 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2042,6 +2042,11 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_free); int gpiochip_generic_config(struct gpio_chip *gc, unsigned int offset, unsigned...
6b1c2a19cb30563c11c6d2dd0b6fc7af6a8e4455
Analyze and fix the following issue in the Linux kernel code: hexagon: select FRAME_POINTER instead of redefining it
Problem Details: Because FRAME_POINTER is defined in lib/Kconfig.debug, the arch Kconfig should select it. Add 'select FRAME_POINTER' to HEXAGON. ARCH_WANT_FRAME_POINTERS must also be selected to avoid the unmet dependency warning. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Randy Dunlap <rdunl...
```diff diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index a880ee067d2e..e922026fef09 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -7,7 +7,9 @@ config HEXAGON select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_NO_PREEMPT + select ARCH_WANT_FRAME_POINTERS selec...
ef39583440ab3e7e9186200a451250172f96572b
Analyze and fix the following issue in the Linux kernel code: dt-bindings: mips: cpus: Sort the entries
Problem Details: The entries were nearly sorted but there were still some entries at the wrong places. Let's fix it. Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Thomas Bogen...
```diff diff --git a/Documentation/devicetree/bindings/mips/cpus.yaml b/Documentation/devicetree/bindings/mips/cpus.yaml index cf382dea3922..9bc47868d28b 100644 --- a/Documentation/devicetree/bindings/mips/cpus.yaml +++ b/Documentation/devicetree/bindings/mips/cpus.yaml @@ -23,22 +23,22 @@ properties: - brcm,bmi...
179771efacd7bbdd9bac5c5961ac4ac03df6585d
Analyze and fix the following issue in the Linux kernel code: dt-bindings: Add vendor prefix for Mobileye Vision Technologies Ltd.
Problem Details: Mobileye Vision Technologies Ltd. is a company developing autonomous driving technologies and advanced driver-assistance systems (ADAS) including cameras, computer chips and software. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Gregory...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 1a0dc04f1db4..fb088d9c6f5b 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -911,6 +911,8 @@ patte...
5e9d13bd3de8c34ee81b9db8c50887fea5b93834
Analyze and fix the following issue in the Linux kernel code: MIPS: Allows relocation exception vectors everywhere
Problem Details: Now the exception vector for CPS systems are allocated on-fly with memblock as well. It will try to allocate from KSEG1 first, and then try to allocate in low 4G if possible. The main reset vector is now generated by uasm, to avoid tons of patches to the code. Other vectors are copied to the location...
```diff diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h index 23c67c0871b1..15d8d69de455 100644 --- a/arch/mips/include/asm/mips-cm.h +++ b/arch/mips/include/asm/mips-cm.h @@ -311,6 +311,7 @@ GCR_CX_ACCESSOR_RW(32, 0x018, other) /* GCR_Cx_RESET_BASE - Configure where powered up cores wil...
3391b95cf6a0b5b70904857dcc415b832f81866a
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix set_uncached_handler for ebase in XKPHYS
Problem Details: ebase might reside in XKPHYS if memblock is unable to allocate memory within the KSEG0 physical range. To map EBASE into uncached space, we convert it back to its physical address and utilize the new CKSEG1ADDR_OR_64BIT helper for mapping. Co-developed-by: Vladimir Kondratiev <vladimir.kondratiev@int...
```diff diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 2d95e9971a2d..a0085445f440 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -2299,7 +2299,7 @@ static const char panic_null_cerr[] = void set_uncached_handler(unsigned long offset, void *addr, unsigned long size) {...
20c8c4dafe93e82441583e93bd68c0d256d7bed4
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat'
Problem Details: Currently, rebooting a pseries nested qemu-kvm guest (L2) results in below error as L1 qemu sends PVR value 'arch_compat' == 0 via ppc_set_compat ioctl. This triggers a condition failure in kvmppc_set_arch_compat() resulting in an EINVAL. qemu-system-ppc64: Unable to set CPU compatibility mode in KVM:...
```diff diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 52427fc2a33f..0b921704da45 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -391,6 +391,24 @@ static void kvmppc_set_pvr_hv(struct kvm_vcpu *vcpu, u32 pvr) /* Dummy value used in computing PCR value be...
219eee9c0d16f1b754a8b85275854ab17df0850a
Analyze and fix the following issue in the Linux kernel code: net: skbuff: add overflow debug check to pull/push helpers
Problem Details: syzbot managed to trigger following splat: BUG: KASAN: use-after-free in __skb_flow_dissect+0x4a3b/0x5e50 Read of size 1 at addr ffff888208a4000e by task a.out/2313 [..] __skb_flow_dissect+0x4a3b/0x5e50 __skb_get_hash+0xb4/0x400 ip_tunnel_xmit+0x77e/0x26f0 ipip_tunnel_xmit+0x298/0x410 .. Ana...
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e3a2ed5d09ad..28c7cb7ce251 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2684,6 +2684,8 @@ static inline void skb_put_u8(struct sk_buff *skb, u8 val) void *skb_push(struct sk_buff *skb, unsigned int len); static inline v...
a7d6027790acea24446ddd6632d394096c0f4667
Analyze and fix the following issue in the Linux kernel code: arp: Prevent overflow in arp_req_get().
Problem Details: syzkaller reported an overflown write in arp_req_get(). [0] When ioctl(SIOCGARP) is issued, arp_req_get() looks up an neighbour entry and copies neigh->ha to struct arpreq.arp_ha.sa_data. The arp_ha here is struct sockaddr, not struct sockaddr_storage, so the sa_data buffer is just 14 bytes. In the ...
```diff diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 9456f5bb35e5..0d0d725b46ad 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -1125,7 +1125,8 @@ static int arp_req_get(struct arpreq *r, struct net_device *dev) if (neigh) { if (!(READ_ONCE(neigh->nud_state) & NUD_NOARP)) { read_lock_bh(&neigh->lock)...
70317fd24b419091aa0a6dc3ea3ec7bb50c37c32
Analyze and fix the following issue in the Linux kernel code: sysfs: Introduce a mechanism to hide static attribute_groups
Problem Details: Add a mechanism for named attribute_groups to hide their directory at sysfs_update_group() time, or otherwise skip emitting the group directory when the group is first registered. It piggybacks on is_visible() in a similar manner as SYSFS_PREALLOC, i.e. special flags in the upper bits of the returned m...
```diff diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index 138676463336..ccb275cdabcb 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c @@ -31,6 +31,17 @@ static void remove_files(struct kernfs_node *parent, kernfs_remove_by_name(parent, (*bin_attr)->attr.name); } +static umode_t __first_visible(const str...
def689fc26b9a9622d2e2cb0c4933dd3b1c8071c
Analyze and fix the following issue in the Linux kernel code: devlink: fix possible use-after-free and memory leaks in devlink_init()
Problem Details: The pernet operations structure for the subsystem must be registered before registering the generic netlink family. Make an unregister in case of unsuccessful registration. Fixes: 687125b5799c ("devlink: split out core code") Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> Link: https://lore.ke...
```diff diff --git a/net/devlink/core.c b/net/devlink/core.c index 6a58342752b4..7f0b093208d7 100644 --- a/net/devlink/core.c +++ b/net/devlink/core.c @@ -529,14 +529,20 @@ static int __init devlink_init(void) { int err; - err = genl_register_family(&devlink_nl_family); - if (err) - goto out; err = register_per...