id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a0157b5aa34eb43ec4c5510f9c260bbb03be937e
Analyze and fix the following issue in the Linux kernel code: media: venus: fix use after free in vdec_close
Problem Details: There appears to be a possible use after free with vdec_close(). The firmware will add buffer release work to the work queue through HFI callbacks as a normal part of decoding. Randomly closing the decoder device from userspace during normal decoding can incur a read after free for inst. Fix it by can...
```diff diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 0d2ab95bec0f..d12089370d91 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1747,6 +1747,7 @@ static int vdec_close(struct file *file) vdec_pm_get(in...
e750a4b1224142bd8dd057b0d5adf8a5608b7e77
Analyze and fix the following issue in the Linux kernel code: media: venus: flush all buffers in output plane streamoff
Problem Details: For scenarios, when source change is followed by VIDIOC_STREAMOFF on output plane, driver should discard any queued OUTPUT buffers, which are not decoded or dequeued. Flush with HFI_FLUSH_INPUT does not have any actual impact. So, fix it, by invoking HFI_FLUSH_ALL, which will flush all queued buffers. ...
```diff diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 29130a9441e7..0d2ab95bec0f 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1255,7 +1255,7 @@ static int vdec_stop_output(struct venus_inst *inst) bre...
ef05bdf5d61529daa82058db87fab2752adfc8ee
Analyze and fix the following issue in the Linux kernel code: bcachefs: Add missing printbuf_tabstops_reset() calls
Problem Details: Fixes warnings from bch2_print_allocator_stuck() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index 9d3d64746a5b..27d97c22ae27 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -1703,6 +1703,7 @@ void bch2_fs_alloc_debug_to_text(struct printbuf *out, struct bch_fs *c) for (unsigned i = 0; i <...
cc2ccd19d9ffc0e2b711edf6291b4ae825e28912
Analyze and fix the following issue in the Linux kernel code: drm/msm/adreno: fix a743 and a740 cx mem init
Problem Details: Disable the call to qcom_scm_gpu_init_regs() for a730 and a740 after init failures on the HDK8550 and HDK8450 platforms: msm_dpu ae01000.display-controller: failed to load adreno gpu msm_dpu ae01000.display-controller: failed to bind 3d00000.gpu (ops a3xx_ops [msm]): -5 msm_dpu ae01000.display-controll...
```diff diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 03e23eef5126..95c7024ef247 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1739,14 +1739,9 @@ static int a7xx_cx_mem_init(struct a6xx_gpu *a6xx_gpu) REG_A7XX...
181914b1de65913c0a73485c3cbda4741699147e
Analyze and fix the following issue in the Linux kernel code: drm/msm/adreno: fix a7xx gpu init
Problem Details: The gpulist has twice the a6xx gpulist, replace the second one with the a7xx gpulist. Solves: msm_dpu ae01000.display-controller: Unknown GPU revision: 7.3.0.1 msm_dpu ae01000.display-controller: Unknown GPU revision: 67.5.10.1 msm_dpu ae01000.display-controller: Unknown GPU revision: 67.5.20.1 on SM...
```diff diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 1e789ff6945e..cfc74a9e2646 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -33,7 +33,7 @@ static const struct adreno_gpulist *gpulists[] = { &a...
1a5cba43096c9242fab503a40b053ec6b93d313a
Analyze and fix the following issue in the Linux kernel code: iio: light: apds9306: Fix error handing
Problem Details: The return value of 'iio_gts_find_int_time_by_sel()' is assigned to variable 'intg_old' but value of 'ret' is checked for error. Update to use 'intg_old' for error checking. Fixes: 620d1e6c7a3f ("iio: light: Add support for APDS9306 Light Sensor") Signed-off-by: Mudit Sharma <muditsharma.info@gmail.co...
```diff diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c index d6627b3e6000..66a063ea3db4 100644 --- a/drivers/iio/light/apds9306.c +++ b/drivers/iio/light/apds9306.c @@ -583,8 +583,8 @@ static int apds9306_intg_time_set(struct apds9306_data *data, int val2) return ret; intg_old = iio_gts...
34b3fc558b537bdf99644dcde539e151716f6331
Analyze and fix the following issue in the Linux kernel code: x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines
Problem Details: The outer if () should have been dropped when switching to c->x86_vfm. Fixes: 6568fc18c2f6 ("x86/cpu/intel: Switch to new Intel CPU model defines") Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Tony Luck <tony.luck@intel.com> Lin...
```diff diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index a813089ca408..a9ea0dba6f0c 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -294,17 +294,13 @@ static void early_init_intel(struct cpuinfo_x86 *c) } /* Penwell and Cloverview have the TSC which doesn'...
361e2ff5cefe10da266ced01845ab0b08112a1fd
Analyze and fix the following issue in the Linux kernel code: media: em28xx: Set GPIOs for non-audio boards when switching input
Problem Details: Fixes changing the Line Out audio source with the video input on MyGica UTV3 board. Previously, GPIOs were only set in em28xx_set_audio_source(), which only boards with USB audio support reach. Signed-off-by: Nils Rothaug <nils.rothaug@gmx.de> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: H...
```diff diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c index 61d7bf701d57..29a7f3f19b56 100644 --- a/drivers/media/usb/em28xx/em28xx-core.c +++ b/drivers/media/usb/em28xx/em28xx-core.c @@ -416,8 +416,9 @@ int em28xx_audio_analog_set(struct em28xx *dev) int ret, i; u8 xc...
92098b1c10cb29bcc6fa0908a766dc9e16b1e889
Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: fix printf format mismatch in expect_str_buf_eq()
Problem Details: Fix the following compiler warning on 32bit: i386-linux-gcc -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -W -Wall -Wextra -fno-stack-protector -m32 -mstack-protector-guard=global -fstack-protector-all -o nolibc-test \ -nostdlib -nostdinc -static -Isysroot/i386/include nolibc-test.c n...
```diff diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 94bb6e11c16f..994477ee87be 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -607,7 +607,7 @@ int expect_strne(const char *expr, int llen, ...
2a49c8b6b6d0dba9c5a4e921f07fbd7a8ad7a5f1
Analyze and fix the following issue in the Linux kernel code: selftests/fpu: add missing MODULE_DESCRIPTION() macro
Problem Details: make allmodconfig && make W=1 C=1 now reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_fpu.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240622-md-i386-lib-test_fpu_glue-v1-1-a4e40b7b1264@quicinc.com Fixes: 9613736d852d ("selftest...
```diff diff --git a/lib/test_fpu_glue.c b/lib/test_fpu_glue.c index eef282a2715f..074f30301f29 100644 --- a/lib/test_fpu_glue.c +++ b/lib/test_fpu_glue.c @@ -59,4 +59,5 @@ static void __exit test_fpu_exit(void) module_init(test_fpu_init); module_exit(test_fpu_exit); +MODULE_DESCRIPTION("Test cases for floating poi...
6073496a20c5e2e8eee63c50af4b30fb2f521643
Analyze and fix the following issue in the Linux kernel code: resource: add missing MODULE_DESCRIPTION()
Problem Details: Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/resource_kunit.o Link: https://lkml.kernel.org/r/20240529-md-kernel-resource_kunit-v1-1-bb719784b714@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.int...
```diff diff --git a/kernel/resource_kunit.c b/kernel/resource_kunit.c index 58ab9f914602..0e509985a44a 100644 --- a/kernel/resource_kunit.c +++ b/kernel/resource_kunit.c @@ -149,4 +149,5 @@ static struct kunit_suite resource_test_suite = { }; kunit_test_suite(resource_test_suite); +MODULE_DESCRIPTION("I/O Port & M...
9d938f40b228a18a9521936337f2da7f393d5120
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: rename pool_index to pool_index_plus_1
Problem Details: We encounter the following issue after commit a6c1d9cb9a68 ("stackdepot: rename pool_index to pool_index_plus_1"). (gdb) lx-dump-page-owner --pfn 262144 ... Python Exception <class 'gdb.error'>: There is no member named pool_index. Error occurred in Python: There is no member named pool_index. We ren...
```diff diff --git a/scripts/gdb/linux/stackdepot.py b/scripts/gdb/linux/stackdepot.py index 0281d9de4b7c..bb3a0f843931 100644 --- a/scripts/gdb/linux/stackdepot.py +++ b/scripts/gdb/linux/stackdepot.py @@ -27,14 +27,18 @@ def stack_depot_fetch(handle): offset = parts['offset'] << DEPOT_STACK_ALIGN pools_num ...
7d8742bf853cc1d4faf08840cc64414ad5f34061
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: change VA_BITS_MIN when we use 16K page
Problem Details: Change VA_BITS_MIN when we use 16K page. Link: https://lkml.kernel.org/r/20240619074911.100434-6-kuan-ying.lee@canonical.com Fixes: 9684ec186f8f ("arm64: Enable LPA2 at boot if supported by the system") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> ...
```diff diff --git a/scripts/gdb/linux/mm.py b/scripts/gdb/linux/mm.py index 200def0e4b9a..7571aebbe650 100644 --- a/scripts/gdb/linux/mm.py +++ b/scripts/gdb/linux/mm.py @@ -47,7 +47,10 @@ class aarch64_page_ops(): self.VA_BITS = constants.LX_CONFIG_ARM64_VA_BITS if self.VA_BITS > 48: - ...
04a40baec04fa0634d71ebfa0c91469160a9976e
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: set vabits_actual based on TCR_EL1
Problem Details: We encounter the following issue after commit 9cce9c6c2c3b ("arm64: mm: Handle LVA support as a CPU feature"). (gdb) lx-slabinfo Python Exception <class 'gdb.error'>: No symbol "vabits_actual" in current context. Error occurred in Python: No symbol "vabits_actual" in current context. We set vabits_ac...
```diff diff --git a/scripts/gdb/linux/mm.py b/scripts/gdb/linux/mm.py index f8b9be3f43e8..200def0e4b9a 100644 --- a/scripts/gdb/linux/mm.py +++ b/scripts/gdb/linux/mm.py @@ -48,7 +48,9 @@ class aarch64_page_ops(): self.VA_BITS = constants.LX_CONFIG_ARM64_VA_BITS if self.VA_BITS > 48: sel...
3c0e9a200434e8bb4a2bffbaaeb381bdff5a5938
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: change the layout of vmemmap
Problem Details: We need to change the layout of vmemmap in gdb scripts after commit 32697ff38287 ("arm64: vmemmap: Avoid base2 order of struct page size to dimension region") changed it. Link: https://lkml.kernel.org/r/20240619074911.100434-4-kuan-ying.lee@canonical.com Fixes: 32697ff38287 ("arm64: vmemmap: Avoid bas...
```diff diff --git a/scripts/gdb/linux/mm.py b/scripts/gdb/linux/mm.py index e0461248abe2..f8b9be3f43e8 100644 --- a/scripts/gdb/linux/mm.py +++ b/scripts/gdb/linux/mm.py @@ -89,10 +89,10 @@ class aarch64_page_ops(): self.MODULES_VADDR = self._PAGE_END(self.VA_BITS_MIN) self.MODULES_END = self.MODULES...
f2eaed1565acc2bdeb5c433f5f6c7bd7a0d62db1
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: rework module VA range
Problem Details: After we enlarge the module VA range, we also change the module VA range in gdb scripts. Link: https://lkml.kernel.org/r/20240619074911.100434-3-kuan-ying.lee@canonical.com Fixes: 3e35d303ab7d ("arm64: module: rework module VA range selection") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com...
```diff diff --git a/scripts/gdb/linux/mm.py b/scripts/gdb/linux/mm.py index 30738f174fe2..e0461248abe2 100644 --- a/scripts/gdb/linux/mm.py +++ b/scripts/gdb/linux/mm.py @@ -33,7 +33,7 @@ class aarch64_page_ops(): def __init__(self): self.SUBSECTION_SHIFT = 21 self.SEBSECTION_SIZE = 1 << self.SU...
63ce5947ef45071d825d4712d6c5ece13f1ce2f6
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: redefine MAX_ORDER sanely
Problem Details: Patch series "Fix GDB command error". This patchset fixes some GDB command errors. 1. Since memory layout of AARCH64 has been changed, we need to modify the layout in GDB scripts as well. 2. Fix pool_index naming of stackdepot. This patch (of 6): Change the definition of MAX_ORDER to be inclus...
```diff diff --git a/scripts/gdb/linux/mm.py b/scripts/gdb/linux/mm.py index 515730fd4c9d..30738f174fe2 100644 --- a/scripts/gdb/linux/mm.py +++ b/scripts/gdb/linux/mm.py @@ -59,9 +59,9 @@ class aarch64_page_ops(): if str(constants.LX_CONFIG_ARCH_FORCE_MAX_ORDER).isdigit(): self.MAX_ORDER = consta...
b8c7dd15ceb87e5f37ec1ed7b56c279d98f3eb53
Analyze and fix the following issue in the Linux kernel code: kernel-wide: fix spelling mistakes like "assocative" -> "associative"
Problem Details: There were several instances of the string "assocat" in the kernel, which should have been spelled "associat", with the various endings of -ive, -ed, -ion, and sometimes beginnging with dis-. Add to the spelling dictionary the corrections so that future instances will be caught by checkpatch, and fix ...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index 090724fa766c..d54162ce0f99 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -340,7 +340,7 @@ static int eb_create(struct i915_exec...
2d87af0666d0b5838e3e3e6430c6498df8bf6ad5
Analyze and fix the following issue in the Linux kernel code: selftests: proc: remove unreached code and fix build warning
Problem Details: fix the following warning: proc-empty-vm.c:385:17: warning: ignoring return value of `write' declared with attribute `warn_unused_result' [-Wunused-result] 385 | write(1, buf, rv); | ^~~~~~~~~~~~~~~~~ Link: https://lkml.kernel.org/r/20240603124220.33778-1-amer....
```diff diff --git a/tools/testing/selftests/proc/proc-empty-vm.c b/tools/testing/selftests/proc/proc-empty-vm.c index 56198d4ca2bf..b3f898aab4ab 100644 --- a/tools/testing/selftests/proc/proc-empty-vm.c +++ b/tools/testing/selftests/proc/proc-empty-vm.c @@ -381,9 +381,6 @@ static int test_proc_pid_statm(pid_t pid) ...
6f3283df275b19bdea8158a2e2d8ad181995022b
Analyze and fix the following issue in the Linux kernel code: tools/testing/radix-tree/idr-test: add missing MODULE_DESCRIPTION define
Problem Details: Userspace builds of the radix-tree testing suite fails because of patch KUnit: add missing MODULE_DESCRIPTION() macros for lib/test_*.ko. Add the proper defines to tools/testing/radix-tree/idr-test.c so MODULE_DESCRIPTION has a definition. This allows the build to succeed. Link: https://lkml.kernel....
```diff diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree/idr-test.c index ca24f6839d50..84b8c3c92c79 100644 --- a/tools/testing/radix-tree/idr-test.c +++ b/tools/testing/radix-tree/idr-test.c @@ -424,6 +424,7 @@ void idr_checks(void) #define module_init(x) #define module_exit(x) #define MO...
134061163ee5ca4759de5c24ca3bd71608891ba7
Analyze and fix the following issue in the Linux kernel code: bnx2x: Fix multiple UBSAN array-index-out-of-bounds
Problem Details: Fix UBSAN warnings that occur when using a system with 32 physical cpu cores or more, or when the user defines a number of Ethernet queues greater than or equal to FP_SB_MAX_E1x using the num_queues module parameter. Currently there is a read/write out of bounds that occurs on the array "struct stats_...
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index e2a4e1088b7f..9580ab83d387 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h @@ -1262,7 +1262,7 @@ enum { struct bnx2x_fw_stats_req { struct ...
67c564111f0e705dc272035197606c37bae94610
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix loop restart in bch2_btree_transactions_read()
Problem Details: Accidental infinite loop; also fix btree_deadlock_to_text() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c index f0d4727c4dc2..ebabab171fe5 100644 --- a/fs/bcachefs/debug.c +++ b/fs/bcachefs/debug.c @@ -610,7 +610,7 @@ restart: list_sort(&c->btree_trans_list, list_ptr_order_cmp); list_for_each_entry(trans, &c->btree_trans_list, list) { - if ((ulong) trans...
1539bdf516601cf05ab11cbc6ddbfc31d37d74f7
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix bch2_read_retry_nodecode()
Problem Details: BCH_READ_NODECODE mode - used by the move paths - really wants to use only the original rbio, but the retry path really wants to clone - oof. Make sure to copy the crc of the pointer we read from back to the original rbio, or we'll see spurious checksum errors later. Signed-off-by: Kent Overstreet <k...
```diff diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c index 2a5c4371f6f8..ebf39ef72fb2 100644 --- a/fs/bcachefs/io_read.c +++ b/fs/bcachefs/io_read.c @@ -1003,6 +1003,9 @@ get_bio: rbio->promote = promote; INIT_WORK(&rbio->work, NULL); + if (flags & BCH_READ_NODECODE) + orig->pick = pick; + rbio-...
44ec5990357b9ebb8e5e88bb4f98a2746b938fab
Analyze and fix the following issue in the Linux kernel code: bcachefs: Don't use the new_fs() bucket alloc path on an initialized fs
Problem Details: On a new filesystem or device we have to allocate the journal with a bump allocator, because allocation info isn't ready yet - but when hot-adding a device that doesn't have a journal, we don't want to use that path. Reported-by: syzbot+24a867cb90d8315cccff@syzkaller.appspotmail.com Signed-off-by: Ken...
```diff diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 51c2fa09d951..0f4ad9e64ad1 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -1095,7 +1095,7 @@ unlock: return ret; } -int bch2_dev_journal_alloc(struct bch_dev *ca) +int bch2_dev_journal_alloc(struct bch_dev *ca, bool new_fs)...
a0bd30e4ea9da9499c5527dc84a0e2d291f273d2
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix shift greater than integer size
Problem Details: Reported-by: syzbot+e5292b50f1957164a4b6@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/bkey.c b/fs/bcachefs/bkey.c index 94a1d1982fa8..587d7318a2e8 100644 --- a/fs/bcachefs/bkey.c +++ b/fs/bcachefs/bkey.c @@ -660,8 +660,9 @@ int bch2_bkey_format_invalid(struct bch_fs *c, bch2_bkey_format_field_overflows(f, i)) { unsigned unpacked_bits = bch2_bkey_format_current...
dc1d234cdd4ac5bf1aa903d9ef0d34470b3faa14
Analyze and fix the following issue in the Linux kernel code: KVM: Documentation: Fix typo `BFD`
Problem Details: BDF is the acronym for Bus, Device, Function. Signed-off-by: Changyuan Lyu <changyuanl@google.com> Link: https://lore.kernel.org/r/20240623164542.2999626-1-changyuanl@google.com Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
```diff diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index a71d91978d9e..e623f072e9ac 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -1921,7 +1921,7 @@ flags: If KVM_MSI_VALID_DEVID is set, devid contains a unique device identifier for the device ...
3a0a88fcbaf9e027ecca3fe8775be9700b4d6460
Analyze and fix the following issue in the Linux kernel code: can: mcp251xfd: tef: update workaround for erratum DS80000789E 6 of mcp2518fd
Problem Details: This patch updates the workaround for a problem similar to erratum DS80000789E 6 of the mcp2518fd, the other variants of the chip family (mcp2517fd and mcp251863) are probably also affected. Erratum DS80000789E 6 says "reading of the FIFOCI bits in the FIFOSTA register for an RX FIFO may be corrupted"...
```diff diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c index 3d9c348ad868..f732556d233a 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c @@ -60,56 +60,39 @@ static int mcp251xfd_check_tef_tail(const...
24436be590c6fbb05f6161b0dfba7d9da60214aa
Analyze and fix the following issue in the Linux kernel code: can: mcp251xfd: rx: add workaround for erratum DS80000789E 6 of mcp2518fd
Problem Details: This patch tries to works around erratum DS80000789E 6 of the mcp2518fd, the other variants of the chip family (mcp2517fd and mcp251863) are probably also affected. In the bad case, the driver reads a too large head index. In the original code, the driver always trusted the read value, which caused ol...
```diff diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c index b308a375e26e..8464fc4f37d0 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c @@ -206,6 +206,7 @@ mcp251xfd_ring_init_rx(struct mcp251x...
e793c724b48ca8cae9693bc3be528e85284c126a
Analyze and fix the following issue in the Linux kernel code: can: mcp251xfd: clarify the meaning of timestamp
Problem Details: The mcp251xfd chip is configured to provide a timestamp with each received and transmitted CAN frame. The timestamp is derived from the internal free-running timer, which can also be read from the TBC register via SPI. The timer is 32 bits wide and is clocked by the external oscillator (typically 20 or...
```diff diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c index e8e11c32cfda..3e7526274e34 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c @@ -2,7 +2,7 @@ // // mcp251xfd - Microchip MCP251xFD F...
51b2a721612236335ddec4f3fb5f59e72a204f3a
Analyze and fix the following issue in the Linux kernel code: can: mcp251xfd: properly indent labels
Problem Details: To fix the coding style, remove the whitespace in front of labels. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
```diff diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c index c116d3255207..61e749f97650 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c @@ -791,7 +791,7 @@ static int mcp251xfd_chip_start(struc...
093d9603b60093a9aaae942db56107f6432a5dca
Analyze and fix the following issue in the Linux kernel code: x86: stop playing stack games in profile_pc()
Problem Details: The 'profile_pc()' function is used for timer-based profiling, which isn't really all that relevant any more to begin with, but it also ends up making assumptions based on the stack layout that aren't necessarily valid. Basically, the code tries to account the time spent in spinlocks to the caller rat...
```diff diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c index e42faa792c07..52e1f3f0b361 100644 --- a/arch/x86/kernel/time.c +++ b/arch/x86/kernel/time.c @@ -27,25 +27,7 @@ unsigned long profile_pc(struct pt_regs *regs) { - unsigned long pc = instruction_pointer(regs); - - if (!user_mode(regs) && in_lo...
4f82ac6102788112e599a6074d2c1f2afce923df
Analyze and fix the following issue in the Linux kernel code: drm/xe/mcr: Avoid clobbering DSS steering
Problem Details: A couple copy/paste mistakes in the code that selects steering targets for OADDRM and INSTANCE0 unintentionally clobbered the steering target for DSS ranges in some cases. The OADDRM/INSTANCE0 values were also not assigned as intended, although that mistake wound up being harmless since the desired va...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c index 386ac3269909..6d948a469126 100644 --- a/drivers/gpu/drm/xe/xe_gt_mcr.c +++ b/drivers/gpu/drm/xe/xe_gt_mcr.c @@ -342,7 +342,7 @@ static void init_steering_oaddrm(struct xe_gt *gt) else gt->steering[OADDRM].group_target = 1; ...
25b1f6cbd8c55216e02bd1c116a5f62f10f4d535
Analyze and fix the following issue in the Linux kernel code: drm/xe/mocs: Update MOCS assertions and remove redundant checks
Problem Details: Rely more heavily on assertions to describe the MOCS programming invariants. CI checks these assertions and will ensure no violations sneak in due to programmer error, so we can remove some of the redundant WARN and silent return checks from non-debug builds. Also tweak/augment some of the existing a...
```diff diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c index de3f2d3f1b04..110ef89cd640 100644 --- a/drivers/gpu/drm/xe/xe_mocs.c +++ b/drivers/gpu/drm/xe/xe_mocs.c @@ -642,12 +642,8 @@ static unsigned int get_mocs_settings(struct xe_device *xe, */ xe_assert(xe, info->unused_entries_index...
1beabab88ecee0698ecee7b54afa9cce7046ef96
Analyze and fix the following issue in the Linux kernel code: blk-throttle: fix lower control under super low iops limit
Problem Details: User will configure allowed iops limit in 1s, and calculate_io_allowed() will calculate allowed iops in the slice by: limit * HZ / throtl_slice However, if limit is quite low, the result can be 0, then allowed IO in the slice is 0, this will cause missing dispatch and control will be lower than limit...
```diff diff --git a/block/blk-throttle.c b/block/blk-throttle.c index c1bf73f8c75d..dc6140fa3de0 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -704,6 +704,9 @@ static unsigned long tg_within_iops_limit(struct throtl_grp *tg, struct bio *bio /* Calc approx time to dispatch */ jiffy_wait = jiffy_...
5b026e34120766408e76ba19a0e33a9dc996f9f0
Analyze and fix the following issue in the Linux kernel code: rust: block: fix generated bindings after refactoring of features
Problem Details: Block device features and flags were refactored from `enum` to `#define`. This broke Rust binding generation. This patch fixes the binding generation. Fixes: fcf865e357f8 ("block: convert features and flags to __bitwise types") Signed-off-by: Andreas Hindborg <a.hindborg@samsung.com> Acked-by: Miguel ...
```diff diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index 84f601d7068e..6deee85a29c8 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -9,6 +9,7 @@ #include <kunit/test.h> #include <linux/blk_types.h> #include <linux/blk-mq.h> +#include <linux/bl...
a7cacaa0880e427642cb305010ea2a62c7b0e1ac
Analyze and fix the following issue in the Linux kernel code: perf sched replay: Fix -r/--repeat command line option for infinity
Problem Details: Currently, the -r/--repeat option accepts values from 0 and complains for -1. The help section specifies: -r, --repeat <n> repeat the workload replay N times (-1: infinite) The -r -1 option raises an error because replay_repeat is defined as an unsigned int. In the current implementation, the wo...
```diff diff --git a/tools/perf/Documentation/perf-sched.txt b/tools/perf/Documentation/perf-sched.txt index 74c812f7a4a4..f0e5617f6652 100644 --- a/tools/perf/Documentation/perf-sched.txt +++ b/tools/perf/Documentation/perf-sched.txt @@ -202,6 +202,13 @@ OPTIONS for 'perf sched timehist' --state:: Show task state w...
5484fd2767e4b31ca3320fe1375c37922c132c52
Analyze and fix the following issue in the Linux kernel code: perf: pmus: Remove unneeded semicolon
Problem Details: ./tools/perf/util/pmu.c:1776:49-50: Unneeded semicolon Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9443 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com> Link: https://lore.kernel.or...
```diff diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 28af48ea803f..986166bc7c78 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -1790,7 +1790,7 @@ size_t perf_pmu__num_events(struct perf_pmu *pmu) size_t nr; pmu_aliases_parse(pmu); - nr = pmu->sysfs_aliases + pmu->sys_json_al...
9641972917d69790ef55ef4d434b564955432d1f
Analyze and fix the following issue in the Linux kernel code: iio: adc: ltc2309: Fix endian type passed to be16_to_cpu()
Problem Details: Picked up by sparse. Cc: Liam Beguin <liambeguin@gmail.com> Reviewed-by: Liam Beguin <liambeguin@gmail.com> Link: https://patch.msgid.link/20240624193210.347434-1-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
```diff diff --git a/drivers/iio/adc/ltc2309.c b/drivers/iio/adc/ltc2309.c index 888a71454070..5f0d947d0615 100644 --- a/drivers/iio/adc/ltc2309.c +++ b/drivers/iio/adc/ltc2309.c @@ -103,7 +103,7 @@ static int ltc2309_read_raw_channel(struct ltc2309 *ltc2309, unsigned long address, int *val) { int ret; - u1...
449914398083148f93d070a8aace04f9ec296ce3
Analyze and fix the following issue in the Linux kernel code: cpuidle: teo: Remove recent intercepts metric
Problem Details: The logic for recent intercepts didn't work, there is an underflow of the 'recent' value that can be observed during boot already, which teo usually doesn't recover from, making the entire logic pointless. Furthermore the recent intercepts also were never reset, thus not actually being very 'recent'. ...
```diff diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c index 29743d78bc43..33610fb6a318 100644 --- a/drivers/cpuidle/governors/teo.c +++ b/drivers/cpuidle/governors/teo.c @@ -54,16 +54,12 @@ * shallower than the one whose bin is fallen into by the sleep length (these * situations are...
0a2998fa48f0b00c20628b02b80bd7fa3582626d
Analyze and fix the following issue in the Linux kernel code: Revert: "cpuidle: teo: Introduce util-awareness"
Problem Details: This reverts commit 9ce0f7c4bc64d820b02a1c53f7e8dba9539f942b. Util-awareness was reported to be too aggressive in selecting shallower states. Additionally a single threshold was found to not be suitable for reasoning about sleep length as, for all practical purposes, almost arbitrary sleep lengths are...
```diff diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c index 95831d2a56a3..29743d78bc43 100644 --- a/drivers/cpuidle/governors/teo.c +++ b/drivers/cpuidle/governors/teo.c @@ -2,13 +2,8 @@ /* * Timer events oriented CPU idle governor * - * TEO governor: * Copyright (C) 2018 - 2021 ...
92436305b663039485ced5c38a9c12c4ed2e0851
Analyze and fix the following issue in the Linux kernel code: dt-bindings: iio: stm32: dfsdm: fix dtbs warnings on dfsdm audio port
Problem Details: Fix warnings on DFSDM dtbs check Unevaluated properties are not allowed ('dfsdm-dai' was unexpected) 'port' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: 11183ac07a74 ("dt-bindings: stm32: convert dfsdm to json-schema") Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Acked-by: ...
```diff diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml index c1b1324fa132..2722edab1d9a 100644 --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/st,st...
0f54a19262154cb3965ba910c8b081417d97c6c8
Analyze and fix the following issue in the Linux kernel code: drm/xe: Get hwe domain specific FW to read RING_TIMESTAMP
Problem Details: Per client engine utilization uses RING_TIMESTAMP to return drm-total-cycles to the user. Current code uses XE_FW_GT to read this register on the first available engine in a GT. When testing on DG2, it is observed that this value is 0 when running test on some engines. To resolve that, get the hwe doma...
```diff diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c index 4bdb909eabfc..6a26923fa10e 100644 --- a/drivers/gpu/drm/xe/xe_drm_client.c +++ b/drivers/gpu/drm/xe/xe_drm_client.c @@ -260,17 +260,20 @@ static void show_run_ticks(struct drm_printer *p, struct drm_file *file) /* Get...
c116deafd1a5cc1e9739099eb32114e90623209c
Analyze and fix the following issue in the Linux kernel code: i2c: testunit: discard write requests while old command is running
Problem Details: When clearing registers on new write requests was added, the protection for currently running commands was missed leading to concurrent access to the testunit registers. Check the flag beforehand. Fixes: b39ab96aa894 ("i2c: testunit: add support for block process calls") Signed-off-by: Wolfram Sang <w...
```diff diff --git a/drivers/i2c/i2c-slave-testunit.c b/drivers/i2c/i2c-slave-testunit.c index a5dcbc3c2c14..ca43e98cae1b 100644 --- a/drivers/i2c/i2c-slave-testunit.c +++ b/drivers/i2c/i2c-slave-testunit.c @@ -121,6 +121,9 @@ static int i2c_slave_testunit_slave_cb(struct i2c_client *client, break; case I2C_SLAV...
c422b6a630240f706063e0ecbb894aa8491b1fa1
Analyze and fix the following issue in the Linux kernel code: i2c: testunit: don't erase registers after STOP
Problem Details: STOP fallsthrough to WRITE_REQUESTED but this became problematic when clearing the testunit registers was added to the latter. Actually, there is no reason to clear the testunit state after STOP. Doing it when a new WRITE_REQUESTED arrives is enough. So, no need to fallthrough, at all. Fixes: b39ab96a...
```diff diff --git a/drivers/i2c/i2c-slave-testunit.c b/drivers/i2c/i2c-slave-testunit.c index a49642bbae4b..a5dcbc3c2c14 100644 --- a/drivers/i2c/i2c-slave-testunit.c +++ b/drivers/i2c/i2c-slave-testunit.c @@ -118,7 +118,7 @@ static int i2c_slave_testunit_slave_cb(struct i2c_client *client, queue_delayed_work(syst...
f1a8f402f13f94263cf349216c257b2985100927
Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: Fix deadlock
Problem Details: This fixes the following deadlock introduced by 39a92a55be13 ("bluetooth/l2cap: sync sock recv cb and release") ============================================ WARNING: possible recursive locking detected 6.10.0-rc3-g4029dba6b6f1 #6823 Not tainted -------------------------------------------- kworker/u5:0...
```diff diff --git a/include/net/bluetooth/hci_sync.h b/include/net/bluetooth/hci_sync.h index 6a9d063e9f47..534c3386e714 100644 --- a/include/net/bluetooth/hci_sync.h +++ b/include/net/bluetooth/hci_sync.h @@ -38,6 +38,8 @@ int __hci_cmd_sync_status(struct hci_dev *hdev, u16 opcode, u32 plen, int __hci_cmd_sync_statu...
1cc18c2ab2e8c54c355ea7c0423a636e415a0c23
Analyze and fix the following issue in the Linux kernel code: bluetooth/hci: disallow setting handle bigger than HCI_CONN_HANDLE_MAX
Problem Details: Syzbot hit warning in hci_conn_del() caused by freeing handle that was not allocated using ida allocator. This is caused by handle bigger than HCI_CONN_HANDLE_MAX passed by hci_le_big_sync_established_evt(), which makes code think it's unset connection. Add same check for handle upper bound as in hci...
```diff diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 0c76dcde5361..080053a85b4d 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -899,8 +899,8 @@ static int hci_conn_hash_alloc_unset(struct hci_dev *hdev) U16_MAX, GFP_ATOMIC); } -struct hci_conn *hci_conn_a...
596b6f081336e77764ca35cfeab66d0fcdbe544e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: ISO: Check socket flag instead of hcon
Problem Details: This fixes the following Smatch static checker warning: net/bluetooth/iso.c:1364 iso_sock_recvmsg() error: we previously assumed 'pi->conn->hcon' could be null (line 1359) net/bluetooth/iso.c 1347 static int iso_sock_recvmsg(struct socket *sock, struct msghdr *msg, 1348 si...
```diff diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c index cc055b952ce6..398fb81f7a13 100644 --- a/net/bluetooth/iso.c +++ b/net/bluetooth/iso.c @@ -1356,8 +1356,7 @@ static int iso_sock_recvmsg(struct socket *sock, struct msghdr *msg, lock_sock(sk); switch (sk->sk_state) { case BT_CONNECT2: - if (...
89e856e124f9ae548572c56b1b70c2255705f8fe
Analyze and fix the following issue in the Linux kernel code: bluetooth/l2cap: sync sock recv cb and release
Problem Details: The problem occurs between the system call to close the sock and hci_rx_work, where the former releases the sock and the latter accesses it without lock protection. CPU0 CPU1 ---- ---- sock_close hci_rx_work ...
```diff diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index 6db60946c627..962aa11ce3de 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c @@ -1239,6 +1239,10 @@ static void l2cap_sock_kill(struct sock *sk) BT_DBG("sk %p state %s", sk, state_to_string(sk->sk_state)); + ...
015d79c96d62cd8a4a359fcf5be40d58088c936b
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Ignore too large handle values in BIG
Problem Details: hci_le_big_sync_established_evt is necessary to filter out cases where the handle value is belonging to ida id range, otherwise ida will be erroneously released in hci_conn_cleanup. Fixes: 181a42edddf5 ("Bluetooth: Make handle of hci_conn be unique") Reported-by: syzbot+b2545b087a01a7319474@syzkaller....
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 5d23bcf18716..93f7ac905cec 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -6916,6 +6916,10 @@ static void hci_le_big_sync_established_evt(struct hci_dev *hdev, void *data, bis = hci_conn_hash_lookup_handle(h...
0d151a103775dd9645c78c97f77d6e2a5298d913
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
Problem Details: syzbot is reporting that calling hci_release_dev() from hci_error_reset() due to hci_dev_put() from hci_error_reset() can cause deadlock at destroy_workqueue(), for hci_error_reset() is called from hdev->req_workqueue which destroy_workqueue() needs to flush. We need to make sure that hdev->{rx_work,c...
```diff diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index dd3b0f501018..dbbe5e2da210 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2751,7 +2751,11 @@ void hci_unregister_dev(struct hci_dev *hdev) list_del(&hdev->list); write_unlock(&hci_dev_list_lock); + cancel_work...
88e72239ead9814b886db54fc4ee39ef3c2b8f26
Analyze and fix the following issue in the Linux kernel code: Bluetooth: qca: Fix BT enable failure again for QCA6390 after warm reboot
Problem Details: Commit 272970be3dab ("Bluetooth: hci_qca: Fix driver shutdown on closed serdev") will cause below regression issue: BT can't be enabled after below steps: cold boot -> enable BT -> disable BT -> warm reboot -> BT enable failure if property enable-gpios is not configured within DT|ACPI for QCA6390. Th...
```diff diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 0c9c9ee56592..9a0bc86f9aac 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -2450,15 +2450,27 @@ static void qca_serdev_shutdown(struct device *dev) struct qca_serdev *qcadev = serdev_device_get_drvdata(s...
ac65ecccae802417ce42e857defacad60e4b8329
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_event: Fix setting of unicast qos interval
Problem Details: qos->ucast interval reffers to the SDU interval, and should not be set to the interval value reported by the LE CIS Established event since the latter reffers to the ISO interval. These two interval are not the same thing: BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 6, Part G Isochronous interval:...
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index da10738a052d..5d23bcf18716 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -6667,6 +6667,7 @@ static void hci_le_cis_estabilished_evt(struct hci_dev *hdev, void *data, struct bt_iso_qos *qos; bool pending = fa...
3f35d9b3e9a0e3c4684252ab91e648b96a179482
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity
Problem Details: check pdata return of skb_pull_data, instead of data. Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Vijay Satija <vijay.satija@intel.com> Signed-off-by: Kiran K <kiran.k@intel.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c index 5b6805d87fcf..dd3c0626c72d 100644 --- a/drivers/bluetooth/btintel_pcie.c +++ b/drivers/bluetooth/btintel_pcie.c @@ -382,7 +382,7 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data, /* The first 4 bytes i...
897e6120566f1c108b85fefe78d1c1bddfbd5988
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_bcm4377: Fix msgid release
Problem Details: We are releasing a single msgid, so the order argument to bitmap_release_region must be zero. Fixes: 8a06127602de ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards") Cc: stable@vger.kernel.org Signed-off-by: Hector Martin <marcan@marcan.st> Reviewed-by: Sven Peter <sven@svenpeter.dev> R...
```diff diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c index 94e736595443..d90858ea2fe5 100644 --- a/drivers/bluetooth/hci_bcm4377.c +++ b/drivers/bluetooth/hci_bcm4377.c @@ -721,7 +721,7 @@ static void bcm4377_handle_ack(struct bcm4377_data *bcm4377, ring->events[msgid] = NULL; } ...
ed2a2ef16a6b9197a0e452308bf6acee6e01f709
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add quirk to ignore reserved PHY bits in LE Extended Adv Report
Problem Details: Some Broadcom controllers found on Apple Silicon machines abuse the reserved bits inside the PHY fields of LE Extended Advertising Report events for additional flags. Add a quirk to drop these and correctly extract the Primary/Secondary_PHY field. The following excerpt from a btmon trace shows a repor...
```diff diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c index 0c2f15235b4c..94e736595443 100644 --- a/drivers/bluetooth/hci_bcm4377.c +++ b/drivers/bluetooth/hci_bcm4377.c @@ -495,6 +495,10 @@ struct bcm4377_data; * extended scanning * broken_mws_transport_config: Set...
80bec6825b19d95ccdfd3393cf8ec15ff2a749b4
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
Problem Details: In nouveau_connector_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: 6ee738610f41 ("drm/nouveau: Add DRM driver for NVIDIA G...
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 856b3ef5edb8..0c71d761d378 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -1001,6 +1001,9 @@ nouveau_connector_get_modes(struct drm_connecto...
67ca3f98070ffdf308b91e08a477fcb1e9684ae8
Analyze and fix the following issue in the Linux kernel code: remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing
Problem Details: The current code doesn't check whether platform_get_resource_byname() succeeded to get the l1tcm memory, which is optional, before attempting to map it. This results in the following error message when it is missing: mtk-scp 10500000.scp: error -EINVAL: invalid resource (null) Add a check so that t...
```diff diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index b885a9a041e4..b17757900cd7 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -1344,14 +1344,12 @@ static int scp_probe(struct platform_device *pdev) /* l1tcm is an optional memory region */ res = p...
caa463bb79a82ac5fce05a0dcf7893d94c84fc5e
Analyze and fix the following issue in the Linux kernel code: perf stat: Fix a segfault with --per-cluster --metric-only
Problem Details: The new --per-cluster option was added recently but it forgot to update the aggr_header fields which are used for --metric-only option. And it resulted in a segfault due to NULL string in fputs(). Fixes: cbc917a1b03b ("perf stat: Support per-cluster aggregation") Reviewed-by: Yicong Yang <yangyicong@...
```diff diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index 91d2f7f65df7..186305fd2d0e 100644 --- a/tools/perf/util/stat-display.c +++ b/tools/perf/util/stat-display.c @@ -38,6 +38,7 @@ static int aggr_header_lens[] = { [AGGR_CORE] = 18, [AGGR_CACHE] = 22, + [AGGR_CLUSTER] = 20, [...
eba4675008a6e4cbff27b579a837bd29be2642de
Analyze and fix the following issue in the Linux kernel code: arm64: arch_register_cpu() variant to check if an ACPI handle is now available.
Problem Details: The ARM64 architecture does not support physical CPU HP today. To avoid any possibility of a bug against such an architecture if defined in future, check for the physical CPU HP case (not present) and return an error on any such attempt. On ARM64 virtual CPU Hotplug relies on the status value that can...
```diff diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index a755b9f902fa..1c84375f978e 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -511,6 +511,59 @@ static int __init smp_cpu_setup(int cpu) static bool bootcpu_valid __initdata; static unsigned int cpu_count = 1; +int arch_...
2488444274c70038eb6b686cba5f1ce48ebb9cdd
Analyze and fix the following issue in the Linux kernel code: arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry
Problem Details: In a review discussion of the changes to support vCPU hotplug where a check was added on the GICC being enabled if was online, it was noted that there is need to map back to the cpu and use that to index into a cpumask. As such, a valid ID is needed. If an MPIDR check fails in acpi_map_gic_cpu_interfa...
```diff diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index bc9a6656fc0c..a407f9cd549e 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -124,7 +124,8 @@ static inline int get_cpu_for_acpi_id(u32 uid) int cpu; for (cpu = 0; cpu < nr_cpu_ids; cpu++) - i...
47ec9b417ed9b6b8ec2a941cd84d9de62adc358a
Analyze and fix the following issue in the Linux kernel code: ACPI: processor: Fix memory leaks in error paths of processor_add()
Problem Details: If acpi_processor_get_info() returned an error, pr and the associated pr->throttling.shared_cpu_map were leaked. The unwind code was in the wrong order wrt to setup, relying on some unwind actions having no affect (clearing variables that were never set etc). That makes it harder to reason about so r...
```diff diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 5f062806ca40..16e36e55a560 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -393,7 +393,7 @@ static int acpi_processor_add(struct acpi_device *device, result = acpi_processor_get_info(device); ...
84db60001619b08e336a9e0d2344e71cec9011d1
Analyze and fix the following issue in the Linux kernel code: bcachefs: Delete old faulty bch2_trans_unlock() call
Problem Details: the unlock is now in read_extent, this fixes an assertion pop in read_from_stale_dirty_pointer() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c index c97fa7002b06..2a5c4371f6f8 100644 --- a/fs/bcachefs/io_read.c +++ b/fs/bcachefs/io_read.c @@ -389,7 +389,6 @@ retry: bch2_bkey_buf_reassemble(&sk, c, k); k = bkey_i_to_s_c(sk.k); - bch2_trans_unlock(trans); if (!bch2_bkey_matches_ptr(c, ...
1be59c97c83ccd67a519d8a49486b3a8a73ca28a
Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Prevent UAF in proc_cpuset_show()
Problem Details: An UAF can happen when /proc/cpuset is read as reported in [1]. This can be reproduced by the following methods: 1.add an mdelay(1000) before acquiring the cgroup_lock In the cgroup_path_ns function. 2.$cat /proc/<pid>/cpuset repeatly. 3.$mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset/ $umo...
```diff diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index c12b9fdb22a4..bcb4da8f54c8 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -21,6 +21,7 @@ * License. See the file COPYING in the main directory of the Linux * distribution for more details. */ +#include "cgroup-inter...
bfafe5efa9754ebc991750da0bcca2a6694f3ed3
Analyze and fix the following issue in the Linux kernel code: seccomp: release task filters when the task exits
Problem Details: Previously, seccomp filters were released in release_task(), which required the process to exit and its zombie to be collected. However, exited threads/processes can't trigger any seccomp events, making it more logical to release filters upon task exits. This adjustment simplifies scenarios where a pa...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index f95a2c1338a8..b945ab81eb92 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -277,7 +277,6 @@ repeat: } write_unlock_irq(&tasklist_lock); - seccomp_filter_release(p); proc_flush_pid(thread_pid); put_pid(thread_pid); release_thread(p); @@ -832,6 +831,8...
f1e46758e8b2b04c725ac706b5f455c0de0486a4
Analyze and fix the following issue in the Linux kernel code: bcache: work around a __bitwise to bool conversion sparse warning
Problem Details: Sparse is a bit dumb about bitwise operation on __bitwise types used in boolean contexts. Add a !! to explicitly propagate to boolean without a warning. Fixes: fcf865e357f8 ("block: convert features and flags to __bitwise types") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Christoph...
```diff diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 283b2511c6d2..b5d6ef430b86 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1416,8 +1416,8 @@ static int cached_dev_init(struct cached_dev *dc, unsigned int block_size) } if (bdev_io_opt(dc->bdev)) - dc->pa...
53e6b65693b68519dcfd384280bfc3d34c7398e2
Analyze and fix the following issue in the Linux kernel code: iommufd/iova_bitmap: Remove iterator logic
Problem Details: The newly introduced dynamic pinning/windowing greatly simplifies the code and there's no obvious performance advantage that has been identified that justifies maintinaing both schemes. Remove the iterator logic and have iova_bitmap_for_each() just invoke the callback with the total iova/length. Fixe...
```diff diff --git a/drivers/iommu/iommufd/iova_bitmap.c b/drivers/iommu/iommufd/iova_bitmap.c index b047e1e180be..b9e964b1ad5c 100644 --- a/drivers/iommu/iommufd/iova_bitmap.c +++ b/drivers/iommu/iommufd/iova_bitmap.c @@ -116,12 +116,6 @@ struct iova_bitmap { /* length of the IOVA range for the whole bitmap */ s...
7a7bba16244a5c55861d8fefea72cdbb8b05323e
Analyze and fix the following issue in the Linux kernel code: iommufd/iova_bitmap: Dynamic pinning on iova_bitmap_set()
Problem Details: Today zerocopy iova bitmaps use a static iteration scheme where it walks the bitmap data in a max iteration size of 2M of bitmap of data at a time. That translates to a fixed window of IOVA space that can span up to 64G (e.g. base pages, x86). Here 'window' refers to the IOVA space represented by the ...
```diff diff --git a/drivers/iommu/iommufd/iova_bitmap.c b/drivers/iommu/iommufd/iova_bitmap.c index be97bb464f6b..b047e1e180be 100644 --- a/drivers/iommu/iommufd/iova_bitmap.c +++ b/drivers/iommu/iommufd/iova_bitmap.c @@ -119,6 +119,9 @@ struct iova_bitmap { /* length of the IOVA range set ahead the pinned pages *...
792583656f554e35383d6b2325371c8fe056a56b
Analyze and fix the following issue in the Linux kernel code: iommufd/iova_bitmap: Check iova_bitmap_done() after set ahead
Problem Details: After iova_bitmap_set_ahead() returns it may be at the end of the range. Move iova_bitmap_set_ahead() earlier to avoid unnecessary attempt in trying to pin the next pages by reusing iova_bitmap_done() check. Fixes: 2780025e01e2 ("iommufd/iova_bitmap: Handle recording beyond the mapped pages") Link: ht...
```diff diff --git a/drivers/iommu/iommufd/iova_bitmap.c b/drivers/iommu/iommufd/iova_bitmap.c index db8c46bee155..e33ddfc239b5 100644 --- a/drivers/iommu/iommufd/iova_bitmap.c +++ b/drivers/iommu/iommufd/iova_bitmap.c @@ -384,8 +384,6 @@ static int iova_bitmap_advance(struct iova_bitmap *bitmap) bitmap->mapped_base_...
ffa3c799ce157493615f9f3c2b3c9ba602d320b9
Analyze and fix the following issue in the Linux kernel code: iommufd/selftest: Fix tests to use MOCK_PAGE_SIZE based buffer sizes
Problem Details: commit a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") added tests covering edge cases in the boundaries of iova bitmap. Although it used buffer sizes thinking in PAGE_SIZE (4K) as opposed to the MOCK_PAGE_SIZE (2K) that is used in iommufd mock selftests. This meant that isn't corre...
```diff diff --git a/tools/testing/selftests/iommu/iommufd.c b/tools/testing/selftests/iommu/iommufd.c index 61189215e1ab..5f7d5a5ba89b 100644 --- a/tools/testing/selftests/iommu/iommufd.c +++ b/tools/testing/selftests/iommu/iommufd.c @@ -1797,47 +1797,47 @@ FIXTURE_VARIANT_ADD(iommufd_dirty_tracking, domain_dirty16k) ...
9560393b830b415b2151b3dd8e065257cccbffa7
Analyze and fix the following issue in the Linux kernel code: iommufd/selftest: Fix iommufd_test_dirty() to handle <u8 bitmaps
Problem Details: The calculation returns 0 if it sets less than the number of bits per byte. For calculating memory allocation from bits, lets round it up to one byte. Link: https://lore.kernel.org/r/20240627110105.62325-3-joao.m.martins@oracle.com Reported-by: Matt Ochs <mochs@nvidia.com> Fixes: a9af47e382a4 ("iommuf...
```diff diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c index 7a2199470f31..654ed3339095 100644 --- a/drivers/iommu/iommufd/selftest.c +++ b/drivers/iommu/iommufd/selftest.c @@ -1334,7 +1334,7 @@ static int iommufd_test_dirty(struct iommufd_ucmd *ucmd, unsigned int mockpt_id, } ma...
ec61f820a2ff07d1717583bd57d6ee45d2763a6e
Analyze and fix the following issue in the Linux kernel code: iommufd/selftest: Fix dirty bitmap tests with u8 bitmaps
Problem Details: With 64k base pages, the first 128k iova length test requires less than a byte for a bitmap, exposing a bug in the tests that assume that bitmaps are at least a byte. Rather than dealing with bytes, have _test_mock_dirty_bitmaps() pass the number of bits. The caller functions are adjusted to also use ...
```diff diff --git a/tools/testing/selftests/iommu/iommufd.c b/tools/testing/selftests/iommu/iommufd.c index edf1c99c9936..0b04d782a19f 100644 --- a/tools/testing/selftests/iommu/iommufd.c +++ b/tools/testing/selftests/iommu/iommufd.c @@ -1722,6 +1722,7 @@ FIXTURE_VARIANT(iommufd_dirty_tracking) FIXTURE_SETUP(iommuf...
321ef62b0c5f6f57bb8500a2ca5986052675abbf
Analyze and fix the following issue in the Linux kernel code: KVM: nVMX: Fold requested virtual interrupt check into has_nested_events()
Problem Details: Check for a Requested Virtual Interrupt, i.e. a virtual interrupt that is pending delivery, in vmx_has_nested_events() and drop the one-off kvm_x86_ops.guest_apic_has_interrupt() hook. In addition to dropping a superfluous hook, this fixes a bug where KVM would incorrectly treat virtual interrupts _fo...
```diff diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h index 566d19b02483..f91d413d7de1 100644 --- a/arch/x86/include/asm/kvm-x86-ops.h +++ b/arch/x86/include/asm/kvm-x86-ops.h @@ -85,7 +85,6 @@ KVM_X86_OP_OPTIONAL(update_cr8_intercept) KVM_X86_OP(refresh_apicv_exec_ctrl) KVM_X86...
27c4fa42b11af780d49ce704f7fa67b3c2544df4
Analyze and fix the following issue in the Linux kernel code: KVM: nVMX: Check for pending posted interrupts when looking for nested events
Problem Details: Check for pending (and notified!) posted interrupts when checking if L2 has a pending wake event, as fully posted/notified virtual interrupt is a valid wake event for HLT. Note that KVM must check vmx->nested.pi_pending to avoid prematurely waking L2, e.g. even if KVM sees a non-zero PID.PIR and PID.0...
```diff diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index 411fe7aa0793..732340ff3300 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -4034,8 +4034,40 @@ static bool nested_vmx_preemption_timer_pending(struct kvm_vcpu *vcpu) static bool vmx_has_nested_events(struct kvm...
92c1e3cbf0d02916ae0c6fc3b78864dcb77624ad
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Switch __vmx_exit() and kvm_x86_vendor_exit() in vmx_exit()
Problem Details: In the vmx_init() error handling path, the __vmx_exit() is done before kvm_x86_vendor_exit(). They should follow the same order in vmx_exit(). But currently __vmx_exit() is done after kvm_x86_vendor_exit() in vmx_exit(). Switch the order of them to fix. Fixes: e32b120071ea ("KVM: VMX: Do _all_ init...
```diff diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 525765aaaf3a..6643c2d5b3a0 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -8626,9 +8626,9 @@ static void __vmx_exit(void) static void vmx_exit(void) { kvm_exit(); + __vmx_exit(); kvm_x86_vendor_exit(); - __vmx_exit()...
f4ebd03496f6b67940b0af92ce885c1d0dc9e121
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_recent: Lift restrictions on max hitcount value
Problem Details: Support tracking of up to 65535 packets per table entry instead of just 255 to better facilitate longer term tracking or higher throughput scenarios. Note how this aligns sizes of struct recent_entry's 'nstamps' and 'index' fields when 'nstamps' was larger before. This is unnecessary as the value of '...
```diff diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index ef93e0d3bee0..588a5e6ad899 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c @@ -59,9 +59,9 @@ MODULE_PARM_DESC(ip_list_gid, "default owning group of /proc/net/xt_recent/* fil /* retained for backwards compatibility *...
23b2c5088d01dc7dfdb68aab76a7757704f09c6e
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Remove unnecessary INVEPT[GLOBAL] from hardware enable path
Problem Details: Remove the completely pointess global INVEPT, i.e. EPT TLB flush, from KVM's VMX enablement path. KVM always does a targeted TLB flush when using a "new" EPT root, in quotes because "new" simply means a root that isn't currently being used by the vCPU. KVM also _deliberately_ runs with stale TLB entr...
```diff diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index b3c83c06f826..525765aaaf3a 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -2834,9 +2834,6 @@ int vmx_hardware_enable(void) return r; } - if (enable_ept) - ept_sync_global(); - return 0; } ```
1c07c9be87dd3dd0634033bf08728b32465f08fb
Analyze and fix the following issue in the Linux kernel code: tty: mxser: Remove __counted_by from mxser_board.ports[]
Problem Details: Work for __counted_by on generic pointers in structures (not just flexible array members) has started landing in Clang 19 (current tip of tree). During the development of this feature, a restriction was added to __counted_by to prevent the flexible array member's element type from including a flexible ...
```diff diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 458bb1280ebf..5b97e420a95f 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c @@ -288,7 +288,7 @@ struct mxser_board { enum mxser_must_hwid must_hwid; speed_t max_baud; - struct mxser_port ports[] __counted_by(nports); + struct mxser_por...
6db1208bf95b4c091897b597c415e11edeab2e2d
Analyze and fix the following issue in the Linux kernel code: randomize_kstack: Remove non-functional per-arch entropy filtering
Problem Details: An unintended consequence of commit 9c573cd31343 ("randomize_kstack: Improve entropy diffusion") was that the per-architecture entropy size filtering reduced how many bits were being added to the mix, rather than how many bits were being used during the offsetting. All architectures fell back to the ex...
```diff diff --git a/arch/arm64/kernel/syscall.c b/arch/arm64/kernel/syscall.c index ad198262b981..7230f6e20ab8 100644 --- a/arch/arm64/kernel/syscall.c +++ b/arch/arm64/kernel/syscall.c @@ -53,17 +53,15 @@ static void invoke_syscall(struct pt_regs *regs, unsigned int scno, syscall_set_return_value(current, regs, 0, ...
34830b3c02aec1fe6eaac7b178a05c25620a25b0
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Force sev_es_host_save_area() to be inlined (for noinstr usage)
Problem Details: Force sev_es_host_save_area() to be always inlined, as it's used in the low level VM-Enter/VM-Exit path, which is non-instrumentable. vmlinux.o: warning: objtool: svm_vcpu_enter_exit+0xb0: call to sev_es_host_save_area() leaves .noinstr.text section vmlinux.o: warning: objtool: svm_vcpu_enter_...
```diff diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index da5cddec97a6..33728ce4d44b 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -1495,7 +1495,7 @@ static void svm_vcpu_free(struct kvm_vcpu *vcpu) __free_pages(virt_to_page(svm->msrpm), get_order(MSRPM_SIZE)); } -static stru...
25bc6af60f6121071ab4aa924a24cf6011125614
Analyze and fix the following issue in the Linux kernel code: KVM: Add missing MODULE_DESCRIPTION()
Problem Details: Add a module description for kvm.ko to fix a 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/kvm/kvm.o Opportunistically update kvm_main.c's comically stale file comment to match the module description. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: ht...
```diff diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 5a2643c5a8ec..c8a877368f8a 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1,9 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Kernel-based Virtual Machine driver for Linux - * - * This module enables machines with Intel VT-x ...
8815d77cbc99ef817a58b02af206706890ae2b80
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Add missing MODULE_DESCRIPTION() macros
Problem Details: Add module descriptions for the vendor modules to fix allmodconfig 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/kvm/kvm-intel.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/kvm/kvm-amd.o Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link:...
```diff diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index d9741ae322c4..bf1da1d5abed 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -53,6 +53,7 @@ #include "svm_onhyperv.h" MODULE_AUTHOR("Qumranet"); +MODULE_DESCRIPTION("KVM support for SVM (AMD-V) extensions"); MODULE_LICENSE...
5bb9af07d37c95ac83725ed0f92c2a4315ade0ae
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Rework macros in PMU counters test to prep for multi-insn loop
Problem Details: Tweak the macros in the PMU counters test to prepare for moving the CLFLUSH+MFENCE instructions into the loop body, to fix an issue where a single CLFUSH doesn't guarantee an LLC miss. Link: https://lore.kernel.org/r/20240628005558.3835480-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc...
```diff diff --git a/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c b/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c index 96446134c00b..bb40d7c0f83e 100644 --- a/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c +++ b/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c @@ -7,15 +7,25 @@ #inclu...
ebbdf37ce9abb597015fa85df6630ebfa7d0a97f
Analyze and fix the following issue in the Linux kernel code: KVM: Validate hva in kvm_gpc_activate_hva() to fix __kvm_gpc_refresh() WARN
Problem Details: Check that the virtual address is "ok" when activating a gfn_to_pfn_cache with a host VA to ensure that KVM never attempts to use a bad address. This fixes a bug where KVM fails to check the incoming address when handling KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA in kvm_xen_vcpu_set_attr(). Reported-by: s...
```diff diff --git a/arch/x86/kvm/xen.c b/arch/x86/kvm/xen.c index f65b35a05d91..67bb4e89c399 100644 --- a/arch/x86/kvm/xen.c +++ b/arch/x86/kvm/xen.c @@ -741,7 +741,7 @@ int kvm_xen_hvm_set_attr(struct kvm *kvm, struct kvm_xen_hvm_attr *data) } else { void __user * hva = u64_to_user_ptr(data->u.shared_info.hva)...
b1a4e71d4fc463934b6b00cc3460f93b4816816d
Analyze and fix the following issue in the Linux kernel code: arm: dts: arm: Drop redundant fixed-factor clocks
Problem Details: There's not much reason to have multiple fixed-factor-clock instances which are all the same factor and clock input. Drop the nodes, but keep the labels to minimize the changes and keep some distinction of the different clocks. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Linus Wall...
```diff diff --git a/arch/arm/boot/dts/arm/arm-realview-eb.dtsi b/arch/arm/boot/dts/arm/arm-realview-eb.dtsi index fbb2258b451f..ed3ed5a4f0f7 100644 --- a/arch/arm/boot/dts/arm/arm-realview-eb.dtsi +++ b/arch/arm/boot/dts/arm/arm-realview-eb.dtsi @@ -53,7 +53,7 @@ regulator-boot-on; }; - xtal24mhz: xtal24...
1066fe825987da007669d7c25306b4dbb50bd7dd
Analyze and fix the following issue in the Linux kernel code: ata: libata-core: Add ATA_HORKAGE_NOLPM for all Crucial BX SSD1 models
Problem Details: We got another report that CT1000BX500SSD1 does not work with LPM. If you look in libata-core.c, we have six different Crucial devices that are marked with ATA_HORKAGE_NOLPM. This model would have been the seventh. (This quirk is used on Crucial models starting with both CT* and Crucial_CT*) It is ob...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index e1bf8a19b3c8..efb5195da60c 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4137,8 +4137,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "PIONEER BD-RW BDR-205", NULL, ATA_HORKAGE_NO...
130e42806773013e9cf32d211922c935ae2df86c
Analyze and fix the following issue in the Linux kernel code: selftests/harness: Fix tests timeout and race condition
Problem Details: We cannot use CLONE_VFORK because we also need to wait for the timeout signal. Restore tests timeout by using the original fork() call in __run_test() but also in __TEST_F_IMPL(). Also fix a race condition when waiting for the test child process. Because test metadata are shared between test process...
```diff diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index b634969cbb6f..40723a6a083f 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -66,8 +66,6 @@ #include <sys/wait.h> #include <unistd.h> #inclu...
9142be9e6443fd641ca37f820efe00d9cd890eb1
Analyze and fix the following issue in the Linux kernel code: x86/syscall: Mark exit[_group] syscall handlers __noreturn
Problem Details: The direct-call syscall dispatch function doesn't know that the exit() and exit_group() syscall handlers don't return, so the call sites aren't optimized accordingly. Fix that by marking the exit syscall declarations __noreturn. Fixes the following warnings: vmlinux.o: warning: objtool: x64_sys_ca...
```diff diff --git a/arch/x86/entry/syscall_32.c b/arch/x86/entry/syscall_32.c index c2235bae17ef..8cc9950d7104 100644 --- a/arch/x86/entry/syscall_32.c +++ b/arch/x86/entry/syscall_32.c @@ -14,9 +14,12 @@ #endif #define __SYSCALL(nr, sym) extern long __ia32_##sym(const struct pt_regs *); - +#define __SYSCALL_NORET...
8ad49a92cff4bab13eb2f2725243f5f31eff3f3b
Analyze and fix the following issue in the Linux kernel code: drm/mediatek/dp: Fix spurious kfree()
Problem Details: drm_edid_to_sad() might return an error or just zero. If that is the case, we must not free the SADs because there was no allocation in the first place. Fixes: dab12fa8d2bd ("drm/mediatek/dp: fix memory leak on ->get_edid callback audio detection") Signed-off-by: Michael Walle <mwalle@kernel.org> Revi...
```diff diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c index ed335d888b2f..d8796a904eca 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -2073,9 +2073,15 @@ static const struct drm_edid *mtk_dp_edid_read(struct drm_bridge *bridge, */ co...
1a70579723fde3624a72dfea6e79e55be6e36659
Analyze and fix the following issue in the Linux kernel code: ASoC: max98088: Check for clk_prepare_enable() error
Problem Details: clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Fixes: 62a7fc32a628 ("ASoC: max98088: Add master clock handling") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20240628080534.843815-1-nichen@iscas.ac.cn Signe...
```diff diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index 8b56ee550c09..8b0645c63462 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -1318,6 +1318,7 @@ static int max98088_set_bias_level(struct snd_soc_component *component, enum...
061505a1a61169bd25dd908f95ba22f33dffdd69
Analyze and fix the following issue in the Linux kernel code: ASoC: Remove unneeded semicolon
Problem Details: ./sound/soc/codecs/ak4619.c:757:2-3: Unneeded semicolon Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9442 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://patch.msgid.link/20240628052406.36644-1-yang.lee@linux.alibaba.com Si...
```diff diff --git a/sound/soc/codecs/ak4619.c b/sound/soc/codecs/ak4619.c index cbe27abe1f50..8f2442482f72 100644 --- a/sound/soc/codecs/ak4619.c +++ b/sound/soc/codecs/ak4619.c @@ -754,7 +754,7 @@ static void ak4619_hw_constraints(struct ak4619_priv *ak4619, default: break; } - }; + } constraint->list =...
e2f718e25537d3567ababbe4276306efd3f23f47
Analyze and fix the following issue in the Linux kernel code: sefltests: extend the statmount test for mount options
Problem Details: Now that we support exporting mount options, via statmount(), add a test to validate that it works. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Link: https://lore.kernel.org/r/cabe09f0933d9c522da6e7b6cc160254f4f6c3b9.1719257716.git.josef@toxicpanda.com Reviewed-by: Jeff Layton <jlayton@kernel.or...
```diff diff --git a/tools/testing/selftests/filesystems/statmount/statmount_test.c b/tools/testing/selftests/filesystems/statmount/statmount_test.c index 4f7023c2de77..ece005864863 100644 --- a/tools/testing/selftests/filesystems/statmount/statmount_test.c +++ b/tools/testing/selftests/filesystems/statmount/statmount_...
7bdd1c6c87de758750d419eedab7285b95b66417
Analyze and fix the following issue in the Linux kernel code: powerpc/prom: Add CPU info to hardware description string later
Problem Details: cur_cpu_spec->cpu_name is appended to ppc_hw_desc before cur_cpu_spec has taken on its final value. This is illustrated on pseries by comparing the CPU name as reported at boot ("POWER8E (raw)") to the contents of /proc/cpuinfo ("POWER8 (architected)"): $ dmesg | grep Hardware Hardware name: IBM,8...
```diff diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 60819751e55e..0be07ed407c7 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -331,6 +331,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node, void *data) { const char *type = of_get_flat...
9ff6df49e6cbcc9834865870d7c4f3059b0891d3
Analyze and fix the following issue in the Linux kernel code: drm/mediatek: dpi/dsi: Fix possible_crtcs calculation
Problem Details: mtk_find_possible_crtcs() assumes that the main path will always have the CRTC with id 0, the ext id 1 and the third id 2. This is only true if the paths are all available. But paths are optional (see also comment in mtk_drm_kms_init()), e.g. the main path might not be enabled or available at all. Then...
```diff diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c index a66e46d0b45e..be66d94be361 100644 --- a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c +++ b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c @@ -514,29 +514,42 @@ static bool mtk_ddp_comp_find(struct device *dev, return fals...
21a741eb75f80397e5f7d3739e24d7d75e619011
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries: Fix scv instruction crash with kexec
Problem Details: kexec on pseries disables AIL (reloc_on_exc), required for scv instruction support, before other CPUs have been shut down. This means they can execute scv instructions after AIL is disabled, which causes an interrupt at an unexpected entry location that crashes the kernel. Change the kexec sequence to...
```diff diff --git a/arch/powerpc/kexec/core_64.c b/arch/powerpc/kexec/core_64.c index 85050be08a23..72b12bc10f90 100644 --- a/arch/powerpc/kexec/core_64.c +++ b/arch/powerpc/kexec/core_64.c @@ -27,6 +27,7 @@ #include <asm/paca.h> #include <asm/mmu.h> #include <asm/sections.h> /* _end */ +#include <asm/setup.h> #in...
ec03073888ad23223ebb986e62583c20a9ed3c07
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix mic-in-differential usage on rk3568-evb1-v10
Problem Details: The 'mic-in-differential' DT property supported by the RK809/RK817 audio codec driver is actually valid if prefixed with 'rockchip,': DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dtb rk3568-evb1-v10.dtb: pmic@20: codec: 'mic-in-differential' does not match any of the regexes: 'pinctrl-[0-...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts index 19f8fc369b13..8c3ab07d3807 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts @@ -475,7 +475,7 @@ }; codec { - mic-in...
e643e4eb4bef6a2f95bf0c61a20c991bccecb212
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix mic-in-differential usage on rk3566-roc-pc
Problem Details: The 'mic-in-differential' DT property supported by the RK809/RK817 audio codec driver is actually valid if prefixed with 'rockchip,': DTC_CHK arch/arm64/boot/dts/rockchip/rk3566-roc-pc.dtb rk3566-roc-pc.dtb: pmic@20: codec: 'mic-in-differential' does not match any of the regexes: 'pinctrl-[0-9]+' ...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3566-roc-pc.dts b/arch/arm64/boot/dts/rockchip/rk3566-roc-pc.dts index 63eea27293fe..67e7801bd489 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-roc-pc.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-roc-pc.dts @@ -269,7 +269,7 @@ vcc9-supply = <&vcc3v3_sys>; ...
406a554b382200abfabd1df423a425f6efee53e0
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Drop invalid mic-in-differential on rk3568-rock-3a
Problem Details: The 'mic-in-differential' DT property supported by the RK809/RK817 audio codec driver is actually valid if prefixed with 'rockchip,': DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dtb rk3568-rock-3a.dtb: pmic@20: codec: 'mic-in-differential' does not match any of the regexes: 'pinctrl-[0-9]+...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts index ebdedea15ad1..59f1403b4fa5 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts @@ -531,10 +531,6 @@ }; }; }; - - codec ...
e562f2d46d27576dd4108c1c4a67d501a5936e31
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Approximate IPsec per-SA payload data bytes count
Problem Details: ConnectX devices lack ability to count payload data byte size which is needed for SA to return to libreswan for rekeying. As a solution let's approximate that by decreasing headers size from total size counted by flow steering. The calculation doesn't take into account any other headers which can be i...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c index 2a10428d820a..3d274599015b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c @@ -994,6 +994,7 ...
2d9dac5559f8cc4318e6b0d3c5b71984f462620b
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Present succeeded IPsec SA bytes and packet
Problem Details: IPsec SA statistics presents successfully decrypted and encrypted packet and bytes, and not total handled by this SA. So update the calculation logic to take into account failures. Fixes: 6fb7f9408779 ("net/mlx5e: Connect mlx5 IPsec statistics with XFRM core") Signed-off-by: Leon Romanovsky <leonro@nv...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c index c54fd01ea635..2a10428d820a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c @@ -989,6 +989,10...
1da839eab6dbc26b95bfcd1ed1a4d1aaa5c144a3
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Add mqprio_rl cleanup and free in mlx5e_priv_cleanup()
Problem Details: In the cited commit, mqprio_rl cleanup and free are mistakenly removed in mlx5e_priv_cleanup(), and it causes the leakage of host memory and firmware SCHEDULING_ELEMENT objects while changing eswitch mode. So, add them back. Fixes: 0bb7228f7096 ("net/mlx5e: Fix mqprio_rl handling on devlink reload") S...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index a605eae56685..eedbcba22689 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -5868,6 +5868,11 @@ void mlx5e_priv_cleanu...