id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
3ebc98c1ae7efda949a015990280a097f4a5453a | Analyze and fix the following issue in the Linux kernel code: ftrace: Add missing ftrace_lock to update_ftrace_direct_add/del | Problem Details:
Ihor and Kumar reported splat from ftrace_get_addr_curr [1], which happened
because of the missing ftrace_lock in update_ftrace_direct_add/del functions
allowing concurrent access to ftrace internals.
The ftrace_update_ops function must be guarded by ftrace_lock, adding that.
Fixes: 05dc5e9c1fe1 ("ft... | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 827fb9a0bf0d..8baf61c9be6d 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -6404,6 +6404,7 @@ int update_ftrace_direct_add(struct ftrace_ops *ops, struct ftrace_hash *hash)
new_filter_hash = old_filter_hash;
}
} else {
+... |
6270ee26e1edd862ea17e3eba148ca8fb2c99dc9 | Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Fix NULL pointer dereference of mgmt_chann | Problem Details:
mgmt_chann may be set to NULL if the firmware returns an unexpected
error in aie2_send_mgmt_msg_wait(). This can later lead to a NULL
pointer dereference in aie2_hw_stop().
Fix this by introducing a dedicated helper to destroy mgmt_chann
and by adding proper NULL checks before accessing it.
Fixes: b8... | ```diff
diff --git a/drivers/accel/amdxdna/aie2_message.c b/drivers/accel/amdxdna/aie2_message.c
index 277a27bce850..22e1a85a7ae0 100644
--- a/drivers/accel/amdxdna/aie2_message.c
+++ b/drivers/accel/amdxdna/aie2_message.c
@@ -40,11 +40,8 @@ static int aie2_send_mgmt_msg_wait(struct amdxdna_dev_hdl *ndev,
return -EN... |
4c788c6f921b22f9b6c3f316c4a071c05683e7de | Analyze and fix the following issue in the Linux kernel code: dm mirror: fix integer overflow in create_dirty_log() | Problem Details:
The argument count calculation in create_dirty_log() performs
`*args_used = 2 + param_count` before validating against argc. When a
user provides a param_count close to UINT_MAX via the device mapper
table string, this unsigned addition wraps around to a small value,
causing the subsequent `argc < *arg... | ```diff
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 80a5c4127707..de5c00704e69 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -993,13 +993,13 @@ static struct dm_dirty_log *create_dirty_log(struct dm_target *ti,
return NULL;
}
- *args_used = 2 + param_count;
-
- if (argc <... |
af4e9ef3d78420feb8fe58cd9a1ab80c501b3c08 | Analyze and fix the following issue in the Linux kernel code: uaccess: Fix scoped_user_read_access() for 'pointer to const' | Problem Details:
If a 'const struct foo __user *ptr' is used for the address passed to
scoped_user_read_access() then you get a warning/error
uaccess.h:691:1: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
for the
void __user *_tmpptr = __scoped_user_acce... | ```diff
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index 1f3804245c06..809e4f7dfdbd 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -647,36 +647,22 @@ static inline void user_access_restore(unsigned long flags) { }
/* Define RW variant so the below _mode macro expansion works ... |
9adfcef334bf9c6ef68eaecfca5f45d18614efe0 | Analyze and fix the following issue in the Linux kernel code: sched_ext: Use READ_ONCE() for the read side of dsq->nr update | Problem Details:
scx_bpf_dsq_nr_queued() reads dsq->nr via READ_ONCE() without holding
any lock, making dsq->nr a lock-free concurrently accessed variable.
However, dsq_mod_nr(), the sole writer of dsq->nr, only uses
WRITE_ONCE() on the write side without the matching READ_ONCE() on the
read side:
WRITE_ONCE(dsq->... | ```diff
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 9280381f8923..4c2cf0d7d495 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -976,8 +976,12 @@ static bool scx_dsq_priq_less(struct rb_node *node_a,
static void dsq_mod_nr(struct scx_dispatch_q *dsq, s32 delta)
{
- /* scx_bpf_dsq_nr_queued... |
2f7ae8ab6aa73daaf080d5332110357c29df9c36 | Analyze and fix the following issue in the Linux kernel code: clk: microchip: mpfs-ccc: fix out of bounds access during output registration | Problem Details:
UBSAN reported an out of bounds access during registration of the last
two outputs. This out of bounds access occurs because space is only
allocated in the hws array for two PLLs and the four output dividers
that each has, but the defined IDs contain two DLLS and their two
outputs each, which are not s... | ```diff
diff --git a/drivers/clk/microchip/clk-mpfs-ccc.c b/drivers/clk/microchip/clk-mpfs-ccc.c
index 3a3ea2d142f8..0a76a1aaa50f 100644
--- a/drivers/clk/microchip/clk-mpfs-ccc.c
+++ b/drivers/clk/microchip/clk-mpfs-ccc.c
@@ -178,7 +178,7 @@ static int mpfs_ccc_register_outputs(struct device *dev, struct mpfs_ccc_out_... |
40804c4974b8df2adab72f6475d343eaff72b7f6 | Analyze and fix the following issue in the Linux kernel code: kunit: tool: copy caller args in run_kernel to prevent mutation | Problem Details:
run_kernel() appended KUnit flags directly to the caller-provided args
list. When exec_tests() calls run_kernel() repeatedly (e.g. with
--run_isolated), each call mutated the same list, causing later runs
to inherit stale filter_glob values and duplicate kunit.enable flags.
Fix this by copying args at... | ```diff
diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
index 260d8d9aa1db..2998e1bc088b 100644
--- a/tools/testing/kunit/kunit_kernel.py
+++ b/tools/testing/kunit/kunit_kernel.py
@@ -346,8 +346,10 @@ class LinuxSourceTree:
return self.validate_config(build_dir)
def run_ker... |
7dd34dfc8dfa92a7244242098110388367996ac3 | Analyze and fix the following issue in the Linux kernel code: rust: kunit: fix warning when !CONFIG_PRINTK | Problem Details:
If `CONFIG_PRINTK` is not set, then the following warnings are issued
during build:
warning: unused variable: `args`
--> ../rust/kernel/kunit.rs:16:12
|
16 | pub fn err(args: fmt::Arguments<'_>) {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_args`
... | ```diff
diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs
index f93f24a60bdd..a1edf7491579 100644
--- a/rust/kernel/kunit.rs
+++ b/rust/kernel/kunit.rs
@@ -14,6 +14,10 @@ use crate::prelude::*;
/// Public but hidden since it should only be used from KUnit generated code.
#[doc(hidden)]
pub fn err(args: fmt::A... |
b570f37a2ce480be26c665345c5514686a8a0274 | Analyze and fix the following issue in the Linux kernel code: mm: Fix a hmm_range_fault() livelock / starvation problem | Problem Details:
If hmm_range_fault() fails a folio_trylock() in do_swap_page,
trying to acquire the lock of a device-private folio for migration,
to ram, the function will spin until it succeeds grabbing the lock.
However, if the process holding the lock is depending on a work
item to be completed, which is scheduled... | ```diff
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 26ca00c325d9..d5af2b7f577b 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -65,7 +65,7 @@ bool isolate_folio_to_list(struct folio *folio, struct list_head *list);
int migrate_huge_page_move_mapping(struct address_space... |
539d1b47e935e8384977dd7e5cec370c08b7a644 | Analyze and fix the following issue in the Linux kernel code: block: break pcpu_alloc_mutex dependency on freeze_lock | Problem Details:
While nr_hw_update allocates tagset tags it acquires ->pcpu_alloc_mutex
after ->freeze_lock is acquired or queue is frozen. This potentially
creates a circular dependency involving ->fs_reclaim if reclaim is
triggered simultaneously in a code path which first acquires ->pcpu_
alloc_mutex. As the queue ... | ```diff
diff --git a/block/blk-mq.c b/block/blk-mq.c
index d5602ff62c7c..0b182013016a 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -4793,38 +4793,45 @@ static void blk_mq_update_queue_map(struct blk_mq_tag_set *set)
}
}
-static int blk_mq_realloc_tag_set_tags(struct blk_mq_tag_set *set,
- int new_... |
c36e28becd0586ac98318fd335e5e91d19cd2623 | Analyze and fix the following issue in the Linux kernel code: io_uring/net: reject SEND_VECTORIZED when unsupported | Problem Details:
IORING_SEND_VECTORIZED with registered buffers is not implemented but
could be. Don't silently ignore the flag in this case but reject it with
an error. It only affects sendzc as normal sends don't support
registered buffers.
Fixes: 6f02527729bd3 ("io_uring/net: Allow to do vectorized send")
Cc: stabl... | ```diff
diff --git a/io_uring/net.c b/io_uring/net.c
index 8576c6cb2236..d27adbe3f20b 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -375,6 +375,8 @@ static int io_send_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)
kmsg->msg.msg_namelen = addr_len;
}
if (sr->flags & IORING_RECVSEND_FIXED_BUF) ... |
d1e7eab6033f9885a02c4b4e8f09e34d8e9d21ab | Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8mp-evk: Enable pull select bit for PCIe regulator GPIO (M.2 W_DISABLE1) | Problem Details:
The current pin configuration for MX8MP_IOMUXC_SD1_DATA4__GPIO2_IO06
sets the weak pull-up but does not enable the pull select field.
Bit 8 in the IOMUX register must be set in order for the weak pull-up
to actually take effect.
Update the pinctrl setting from 0x40 to 0x140 to enable both the pull
sel... | ```diff
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
index 33e7094d0e10..70897289680c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
@@ -1068,7 +1068,7 @@
pinctrl_pcie0_reg: pcie0reggrp {
fsl... |
da46b5dfef48658d03347cda21532bcdbb521e67 | Analyze and fix the following issue in the Linux kernel code: blktrace: fix __this_cpu_read/write in preemptible context | Problem Details:
tracing_record_cmdline() internally uses __this_cpu_read() and
__this_cpu_write() on the per-CPU variable trace_cmdline_save, and
trace_save_cmdline() explicitly asserts preemption is disabled via
lockdep_assert_preemption_disabled(). These operations are only safe
when preemption is off, as they were ... | ```diff
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index e6988929ead2..18a9b84cc768 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -383,8 +383,6 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
cpu = raw_smp_processor_id();
if (blk_tracer)... |
99f9b5343cae80eb0dfe050baf6c86d722b3ba2e | Analyze and fix the following issue in the Linux kernel code: drm/xe/queue: Call fini on exec queue creation fail | Problem Details:
Every call to queue init should have a corresponding fini call.
Skipping this would mean skipping removal of the queue from GuC list
(which is part of guc_id allocation). A damaged queue stored in
exec_queue_lookup list would lead to invalid memory reference,
sooner or later.
Call fini to free guc_id.... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 0ddae7fcfc97..8ecdf949f9e4 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -266,6 +266,16 @@ static struct xe_exec_queue *__xe_exec_queue_alloc(struct xe_device *xe,
return q;... |
e377182f0266f46f02d01838e6bde67b9dac0d66 | Analyze and fix the following issue in the Linux kernel code: drm/xe/configfs: Free ctx_restore_mid_bb in release | Problem Details:
ctx_restore_mid_bb memory is allocated in wa_bb_store(), but
xe_config_device_release() only frees ctx_restore_post_bb.
Free ctx_restore_mid_bb[0].cs as well to avoid leaking the allocation
when the configfs device is removed.
Fixes: b30d5de3d40c ("drm/xe/configfs: Add mid context restore bb")
Signed... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index c59b1414df22..7fd07d1280bb 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -830,6 +830,7 @@ static void xe_config_device_release(struct config_item *item)
mutex_destroy(&dev->lock);... |
cdc8a1e11f4d5b480ec750e28010c357185b95a6 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Do not preempt fence signaling CS instructions | Problem Details:
If a batch buffer is complete, it makes little sense to preempt the
fence signaling instructions in the ring, as the largest portion of the
work (the batch buffer) is already done and fence signaling consists of
only a few instructions. If these instructions are preempted, the GuC
would need to perform... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c
index 248620b0901d..53d420d72164 100644
--- a/drivers/gpu/drm/xe/xe_ring_ops.c
+++ b/drivers/gpu/drm/xe/xe_ring_ops.c
@@ -280,6 +280,9 @@ static void __emit_job_gen12_simple(struct xe_sched_job *job, struct xe_lrc *lrc
i = emit... |
6af58aa3b028e364c0a8f8b6be48fca17e571de3 | Analyze and fix the following issue in the Linux kernel code: dm vdo: update vdo_allocate_extended to take a field name, no types | Problem Details:
All of VDO's "extended" allocations use a flexible array field at the
end of the allocated structure. We can infer the struct type from the
supplied pointer. Replacing the array field type with the field name
lets us use struct_size from overflow.h to compute the size instead of
the local __vdo_do_allo... | ```diff
diff --git a/drivers/md/dm-vdo/block-map.c b/drivers/md/dm-vdo/block-map.c
index a7db5b41155e..25eda82a9635 100644
--- a/drivers/md/dm-vdo/block-map.c
+++ b/drivers/md/dm-vdo/block-map.c
@@ -2478,9 +2478,7 @@ static int make_forest(struct block_map *map, block_count_t entries)
return VDO_SUCCESS;
}
- res... |
51d81e14fe6788dc6463064c7517480f2acd2724 | Analyze and fix the following issue in the Linux kernel code: dm-mpath: don't stop probing paths at presuspend | Problem Details:
Commit 5c977f102315 ("dm-mpath: Don't grab work_mutex while probing
paths"), added code to make multipath quit probing paths early, if it
was trying to suspend. This isn't necessary. It was just an optimization
to try to keep path probing from delaying a suspend. However it causes
problems with the int... | ```diff
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 8f4ae2f51545..7cb7bb6233b6 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -102,7 +102,6 @@ struct multipath {
struct bio_list queued_bios;
struct timer_list nopath_timer; /* Timeout for queue_if_no_path */
- bool is_suspen... |
2e3649e237237258a08d75afef96648dd2b379f7 | Analyze and fix the following issue in the Linux kernel code: drm/syncobj: Fix handle <-> fd ioctls with dirty stack | Problem Details:
Consider the following application:
#include <fcntl.h>
#include <string.h>
#include <drm/drm.h>
#include <sys/ioctl.h>
int main(void) {
int fd = open("/dev/dri/renderD128", O_RDWR);
struct drm_syncobj_create arg1;
ioctl(fd, DRM_IOCTL_SYNCOBJ_CREATE, &arg1);... | ```diff
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 250734dee928..49eccb43ce63 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -875,7 +875,7 @@ drm_syncobj_handle_to_fd_ioctl(struct drm_device *dev, void *data,
return drm_syncobj_export_sync_file... |
a373b3d5289e50ab26d4cf776bf5891436ff3658 | Analyze and fix the following issue in the Linux kernel code: dm cache: prevent entering passthrough mode after unclean shutdown | Problem Details:
dm-cache assumes all cache blocks are dirty when it recovers from an
unclean shutdown. Given that the passthrough mode doesn't handle dirty
blocks, we should not load a cache in passthrough mode if it was not
cleanly shut down; or we'll risk data loss while updating an actually
dirty block.
Also bump ... | ```diff
diff --git a/drivers/md/dm-cache-metadata.c b/drivers/md/dm-cache-metadata.c
index 1b86e80c89cc..25b8aebdca53 100644
--- a/drivers/md/dm-cache-metadata.c
+++ b/drivers/md/dm-cache-metadata.c
@@ -1813,3 +1813,12 @@ out:
return r;
}
+
+int dm_cache_metadata_clean_when_opened(struct dm_cache_metadata *cmd, bo... |
322586745bd1a0e5f3559fd1635fdeb4dbd1d6b8 | Analyze and fix the following issue in the Linux kernel code: dm cache: fix dirty mapping checking in passthrough mode switching | Problem Details:
As mentioned in commit 9b1cc9f251af ("dm cache: share cache-metadata
object across inactive and active DM tables"), dm-cache assumed table
reload occurs after suspension, while LVM's table preload breaks this
assumption. The dirty mapping check for passthrough mode was designed
around this assumption a... | ```diff
diff --git a/drivers/md/dm-cache-metadata.c b/drivers/md/dm-cache-metadata.c
index 57158c02d096..1b86e80c89cc 100644
--- a/drivers/md/dm-cache-metadata.c
+++ b/drivers/md/dm-cache-metadata.c
@@ -1714,17 +1714,6 @@ int dm_cache_write_hints(struct dm_cache_metadata *cmd, struct dm_cache_policy *
return r;
}
... |
e4f66341779d0cf4c83c74793753a84094286d9e | Analyze and fix the following issue in the Linux kernel code: dm cache: fix concurrent write failure in passthrough mode | Problem Details:
When bio prison cell lock acquisition fails due to concurrent writes to
the same block in passthrough mode, dm-cache incorrectly returns an I/O
error instead of properly handling the concurrency. This can occur in
both process and workqueue contexts when invalidate_lock() is called for
exclusive access... | ```diff
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index d3ef88b859ab..32d22c7b9a07 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -1561,6 +1561,15 @@ static int invalidate_lock(struct dm_cache_migration *mg)
READ_WRITE_LOCK_LEVEL, prealloc, &mg->ce... |
2d1f7b65f5deedd2e6b09fdc6ea27f8375f24b45 | Analyze and fix the following issue in the Linux kernel code: dm cache policy smq: fix missing locks in invalidating cache blocks | Problem Details:
In passthrough mode, the policy invalidate_mapping operation is called
simultaneously from multiple workers, thus it should be protected by a
lock. Otherwise, we might end up with data races on the allocated blocks
counter, or even use-after-free issues with internal data structures
when doing concurre... | ```diff
diff --git a/drivers/md/dm-cache-policy-smq.c b/drivers/md/dm-cache-policy-smq.c
index b328d9601046..dd77a93fd68d 100644
--- a/drivers/md/dm-cache-policy-smq.c
+++ b/drivers/md/dm-cache-policy-smq.c
@@ -1589,14 +1589,18 @@ static int smq_invalidate_mapping(struct dm_cache_policy *p, dm_cblock_t cblock)
{
str... |
4ca8b8bd952df7c3ccdc68af9bd3419d0839a04b | Analyze and fix the following issue in the Linux kernel code: dm cache: fix write hang in passthrough mode | Problem Details:
The invalidate_remove() function has incomplete logic for handling write
hit bios after cache invalidation. It sets up the remapping for the
overwrite_bio but then drops it immediately without submission, causing
write operations to hang.
Fix by adding a new invalidate_committed() continuation that su... | ```diff
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index b608e88acd51..d3ef88b859ab 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -1467,8 +1467,14 @@ static void invalidate_complete(struct dm_cache_migration *mg, bool success)
free_prison_cell(cache, m... |
0c5eef0aad508231d8e43ff8392692925e131b68 | Analyze and fix the following issue in the Linux kernel code: dm cache: fix write path cache coherency in passthrough mode | Problem Details:
In passthrough mode, dm-cache defers write bio submission until cache
invalidation completes to maintain existing coherency, requiring the
target map function to return DM_MAPIO_SUBMITTED. The current map_bio()
returns DM_MAPIO_REMAPPED, violating the required ordering constraint.
Reproduce steps:
1.... | ```diff
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index ae1edffd14ea..b608e88acd51 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -1703,6 +1703,7 @@ static int map_bio(struct cache *cache, struct bio *bio, dm_oblock_t block,
bio_drop_shared_lock(cache... |
7d1f98d668ee34c1d15bdc0420fdd062f24a27c0 | Analyze and fix the following issue in the Linux kernel code: dm cache: fix null-deref with concurrent writes in passthrough mode | Problem Details:
In passthrough mode, when dm-cache starts to invalidate a cache
entry and bio prison cell lock fails due to concurrent write to
the same cached block, mg->cell remains NULL. The error path in
invalidate_complete() attempts to unlock and free the cell
unconditionally, causing a NULL pointer dereference:... | ```diff
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 935ab79b1d0c..ae1edffd14ea 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -1462,8 +1462,10 @@ static void invalidate_complete(struct dm_cache_migration *mg, bool success)
struct cache *cache = mg->c... |
38f09c97340cd23f976242e6cb1e7aa4c8ed28d0 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: marvell: uDPU: add ethernet aliases | Problem Details:
On eDPU plus, which is an updated revision of eDPU which uses an external
MV88E6361 switch we are relying on U-Boot to detect the board, and then
enable and disable the required nodes for that revision.
However, it seems that I missed adding the required aliases for ethernet
controllers, and this work... | ```diff
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
index 242820845707..cd856c0aba71 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
@@ -15,6 +15,11 @@
#include "armada-372x.dts... |
2d85ecd6fb0eb2fee0ffa040ec1ddea57b09bc38 | Analyze and fix the following issue in the Linux kernel code: regulator: pf9453: Respect IRQ trigger settings from firmware | Problem Details:
The datasheet specifies, that the IRQ_B pin is pulled low when any
unmasked interrupt bit status is changed, and it is released high once
the application processor reads the INT1 register. As it specifies a
level-low behavior, it should not force a falling-edge interrupt.
Remove the IRQF_TRIGGER_FALLI... | ```diff
diff --git a/drivers/regulator/pf9453-regulator.c b/drivers/regulator/pf9453-regulator.c
index 779a6fdb0574..eed3055d1c1c 100644
--- a/drivers/regulator/pf9453-regulator.c
+++ b/drivers/regulator/pf9453-regulator.c
@@ -809,7 +809,7 @@ static int pf9453_i2c_probe(struct i2c_client *i2c)
}
ret = devm_reques... |
387a926ee166814611acecb960207fe2f3c4fd3e | Analyze and fix the following issue in the Linux kernel code: tee: optee: prevent use-after-free when the client exits before the supplicant | Problem Details:
Commit 70b0d6b0a199 ("tee: optee: Fix supplicant wait loop") made the
client wait as killable so it can be interrupted during shutdown or
after a supplicant crash. This changes the original lifetime expectations:
the client task can now terminate while the supplicant is still processing
its request.
I... | ```diff
diff --git a/drivers/tee/optee/supp.c b/drivers/tee/optee/supp.c
index a3d11b1f90fa..06747e90c230 100644
--- a/drivers/tee/optee/supp.c
+++ b/drivers/tee/optee/supp.c
@@ -10,7 +10,11 @@
struct optee_supp_req {
struct list_head link;
+ int id;
+
bool in_queue;
+ bool processed;
+
u32 func;
u32 ret;
... |
f45d4356feeba1c8dac3414b688f59292ddfc9f9 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Make Jaguar PCIe-refclk pin use pull-up config | Problem Details:
The hardware PU/PD config of the pin after reset is to pull-up and on
Jaguar this will also keep the device in reset until the driver actually
enables the pin. So restore this boot pull-up config of the pin on Jaguar
instead of setting it to pull-none.
Suggested-by: Quentin Schulz <quentin.schulz@cher... | ```diff
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
index e21ad7575cb6..5f5d89a33a4a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
@@ -579,7 +579,7 @@
pcie30x4 {
pcie30x4_clkreqn_m0... |
ec1fb4e55df47ed043ab2ccc6787e39b9d67e49b | Analyze and fix the following issue in the Linux kernel code: riscv: dts: spacemit: adapt regulator node name to preferred form | Problem Details:
The preferred node name for fixed-regulators has changed to pattern [1]:
'^regulator(-[0-9]+v[0-9]+|-[0-9a-z-]+)?$'
Adjust all SpacemiT DT regulator node names to fix this.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20240426215147.3138211-1-robh@kernel... | ```diff
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index ed88507b84e9..404b69c47b91 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -33,7 +33,7 @@
};
};
- pcie_vcc_3v3: pcie-v... |
7d939032bd7e203e1c907a8c35e3672eeee08246 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix sdmmc pwren pinctrl for rk3576-evb2 | Problem Details:
In rk3576.dtsi, sdmmc0_pwren is configured as part of the sdmmc pinctrl.
However, on the rk3576 evb2 board, sdmmc0_pwren is used as the regulator
for vmmc-supply. Therefore, we need to reassign the sdmmc pinctrl and
remove sdmmc0_pwren to avoid conflicts.
Cc: Shawn Lin <shawn.lin@rock-chips.com>
Fixes... | ```diff
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-evb2-v10.dts b/arch/arm64/boot/dts/rockchip/rk3576-evb2-v10.dts
index 028fb0a830b2..c997c9636253 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-evb2-v10.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-evb2-v10.dts
@@ -920,6 +920,8 @@
disable-wp;
no-sdio;
no... |
1b9a5bc8513d081c1bfe2c096b6dc502a4660f47 | Analyze and fix the following issue in the Linux kernel code: driver core: platform: fix various formatting issues | Problem Details:
Make checkpatch happy. This helps when checkpatch is set up as an
automatic linter.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260214025246.2095239-4-dmitry.torokhov@gmail.com
Signe... | ```diff
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index ec467ccd05b3..4617d1e88772 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -75,7 +75,7 @@ struct resource *platform_get_mem_or_io(struct platform_device *dev,
for (i = 0; i < dev->num_resources; i++) {
struct resourc... |
d973b1039ccde6b241b438d53297edce4de45b5c | Analyze and fix the following issue in the Linux kernel code: wifi: rsi: Don't default to -EOPNOTSUPP in rsi_mac80211_config | Problem Details:
This triggers a WARN_ON in ieee80211_hw_conf_init and isn't the expected
behavior from the driver - other drivers default to 0 too.
Fixes: 0a44dfc07074 ("wifi: mac80211: simplify non-chanctx drivers")
Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Link: https://patch.msgid.link... | ```diff
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 8c8e074a3a70..c7ae8031436a 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -668,7 +668,7 @@ static int rsi_mac80211_config(struct ieee80211_h... |
e4e6f0c5a4dc238684acef079e792c81d37e3226 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt7988a-bpi-r4pro: fix model string | Problem Details:
Fix incorrect model string in Devicetree for BPI-R4-Pro.
Fixes: f397471a6a8c ("arm64: dts: mediatek: mt7988: Add devicetree for BananaPi R4 Pro")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-4e.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-4e.dts
index c7ea6e88c4f4..621d01e3cd89 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-4e.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-... |
fb797a70108f3fda83fde6dea30bee4be7d5df8b | Analyze and fix the following issue in the Linux kernel code: drm: renesas: rz-du: mipi_dsi: Set DSI divider | Problem Details:
Before the MIPI DSI clock source can be configured, the target divide
ratio needs to be set.
Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Fixes: 5a4326f2e3b1 ("clk: renesas: rzg2l: Remove DSI ... | ```diff
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
index f74a0aa85ba8..29f2b7d24fe5 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -1122,6 +1122,7 @@ static int rzg2l_mipi_dsi_host_atta... |
cc2f5e2aeb6c69556837e45756b3ddded98b3898 | Analyze and fix the following issue in the Linux kernel code: pinctrl: pinconf-generic: fix an enum name description | Problem Details:
Correct an enum name in a kernel-doc comment to avoid kernel-doc
warnings:
Warning: include/linux/pinctrl/pinconf-generic.h:161 Enum value
'PIN_CONFIG_SKEW_DELAY_OUTPUT_PS' not described in enum 'pin_config_param'
Warning: include/linux/pinctrl/pinconf-generic.h:161 Excess enum value
'@PIN_CONFIG_SK... | ```diff
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index 89277808ea61..531dc3e9b3f7 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -115,7 +115,7 @@ struct pinctrl_map;
* @PIN_CONFIG_SKEW_DELAY_INPUT_PS: if the p... |
7e1e6d6845329adb2da75110a061557e9c26d9b7 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: can: nxp,sja1000: add reference to mc-peripheral-props.yaml | Problem Details:
Add a reference to mc-peripheral-props.yaml to allow vendor-specific
properties for memory access timings.
Fix below CHECK_DTBS warings:
arch/arm/boot/dts/nxp/imx/imx27-phytec-phycore-rdk.dtb: can@4,0 (nxp,sja1000): Unevaluated properties are not allowed ('fsl,weim-cs-timing' was unexpected)
f... | ```diff
diff --git a/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml b/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml
index ec0c2168e4b9..6bcfff970117 100644
--- a/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml
+++ b/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml
@@ -87,6 ... |
fe5560688f3ba98364c7de7b4f8dc240ffd1ff75 | Analyze and fix the following issue in the Linux kernel code: pinctrl: pinctrl-pic32: Fix resource leak | Problem Details:
Fix three possible resource leaks by using the devres version of
clk_prepare_enable(). Also, update error message accordingly.
Detected by Smatch:
drivers/pinctrl/pinctrl-pic32.c:2211 pic32_pinctrl_probe() warn:
'pctl->clk' from clk_prepare_enable() not released on lines: 2208.
drivers/pinctrl/pinctr... | ```diff
diff --git a/drivers/pinctrl/pinctrl-pic32.c b/drivers/pinctrl/pinctrl-pic32.c
index eb438c9d9667..d185fe48dc0d 100644
--- a/drivers/pinctrl/pinctrl-pic32.c
+++ b/drivers/pinctrl/pinctrl-pic32.c
@@ -2174,16 +2174,10 @@ static int pic32_pinctrl_probe(struct platform_device *pdev)
if (IS_ERR(pctl->reg_base))
... |
a92b75100826b1ea27e6b8a678e53970ad4736d7 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: pinctrl: marvell,armada3710-xb-pinctrl: add missing items keyword | Problem Details:
Even though the type of the 'groups' property of a pinmux node is
specified as string-array in pinmux-node.yaml, but trying to use
multiple strings causes dtbs_check warnings.
For example, checking the following dts ...
$ cat arch/arm64/boot/dts/marvell/armada-3720-test.dts
/dts-v1/;
#include ... | ```diff
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada3710-xb-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/marvell,armada3710-xb-pinctrl.yaml
index 4f9013d36874..727da7fb490c 100644
--- a/Documentation/devicetree/bindings/pinctrl/marvell,armada3710-xb-pinctrl.yaml
+++ b/Documentation/... |
2df6162785f31f1bbb598cfc3b08e4efc88f80b6 | Analyze and fix the following issue in the Linux kernel code: can: gs_usb: gs_can_open(): always configure bitrates before starting device | Problem Details:
So far the driver populated the struct can_priv::do_set_bittiming() and
struct can_priv::fd::do_set_data_bittiming() callbacks.
Before bringing up the interface, user space has to configure the bitrates.
With these callbacks the configuration is directly forwarded into the CAN
hardware. Then the inter... | ```diff
diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index 9d27d6f0c0b5..ec9a7cbbbc69 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -772,9 +772,8 @@ device_detach:
}
}
-static int gs_usb_set_bittiming(struct net_device *netdev)
+static int gs_usb_set_bi... |
9073428bb204d921ae15326bb7d4558d9d269aab | Analyze and fix the following issue in the Linux kernel code: x86/sev: Allow IBPB-on-Entry feature for SNP guests | Problem Details:
The SEV-SNP IBPB-on-Entry feature does not require a guest-side
implementation. It was added in Zen5 h/w, after the first SNP Zen
implementation, and thus was not accounted for when the initial set of SNP
features were added to the kernel.
In its abundant precaution, commit
8c29f0165405 ("x86/sev: ... | ```diff
diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c
index 46b54720d91d..e468476e9e4a 100644
--- a/arch/x86/boot/compressed/sev.c
+++ b/arch/x86/boot/compressed/sev.c
@@ -188,6 +188,7 @@ bool sev_es_check_ghcb_fault(unsigned long address)
MSR_AMD64_SNP_RESERVED_BIT13 | \
MSR... |
4ca191cec17a997d0e3b2cd312f3a884288acc27 | Analyze and fix the following issue in the Linux kernel code: x86/boot/sev: Move SEV decompressor variables into the .data section | Problem Details:
As part of the work to remove the dependency on calling into the decompressor
code (startup_64()) for a UEFI boot, a call to rmpadjust() was removed from
sev_enable() in favor of checking the value of the snp_vmpl variable.
When booting through a non-UEFI path and calling startup_64(), the call to
sev... | ```diff
diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c
index c8c1464b3a56..46b54720d91d 100644
--- a/arch/x86/boot/compressed/sev.c
+++ b/arch/x86/boot/compressed/sev.c
@@ -28,17 +28,17 @@
#include "sev.h"
static struct ghcb boot_ghcb_page __aligned(PAGE_SIZE);
-struct ghcb *boot_ghcb;... |
952caa5da10bed22be09612433964f6877ba0dde | Analyze and fix the following issue in the Linux kernel code: can: usb: f81604: correctly anchor the urb in the read bulk callback | Problem Details:
When submitting an urb, that is using the anchor pattern, it needs to be
anchored before submitting it otherwise it could be leaked if
usb_kill_anchored_urbs() is called. This logic is correctly done
elsewhere in the driver, except in the read bulk callback so do that
here also.
Cc: Ji-Ze Hong (Peter... | ```diff
diff --git a/drivers/net/can/usb/f81604.c b/drivers/net/can/usb/f81604.c
index 1cc927d79b6a..f12318268e46 100644
--- a/drivers/net/can/usb/f81604.c
+++ b/drivers/net/can/usb/f81604.c
@@ -413,6 +413,7 @@ static void f81604_read_bulk_callback(struct urb *urb)
{
struct f81604_can_frame *frame = urb->transfer_bu... |
51f94780720fa90c424f67e3e9784cb8ef8190e5 | Analyze and fix the following issue in the Linux kernel code: can: usb: f81604: handle bulk write errors properly | Problem Details:
If a write urb fails then more needs to be done other than just logging
the message, otherwise the transmission could be stalled. Properly
increment the error counters and wake up the queues so that data will
continue to flow.
Cc: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
Cc: Marc Kleine-Bud... | ```diff
diff --git a/drivers/net/can/usb/f81604.c b/drivers/net/can/usb/f81604.c
index c61bd30d1765..1cc927d79b6a 100644
--- a/drivers/net/can/usb/f81604.c
+++ b/drivers/net/can/usb/f81604.c
@@ -880,9 +880,27 @@ static void f81604_write_bulk_callback(struct urb *urb)
if (!netif_device_present(netdev))
return;
- ... |
7299b1b39a255f6092ce4ec0b65f66e9d6a357af | Analyze and fix the following issue in the Linux kernel code: can: usb: f81604: handle short interrupt urb messages properly | Problem Details:
If an interrupt urb is received that is not the correct length, properly
detect it and don't attempt to treat the data as valid.
Cc: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Vincent Mailhol <mailhol@kernel.org>
Cc: stable@kernel.org
Assisted-by:... | ```diff
diff --git a/drivers/net/can/usb/f81604.c b/drivers/net/can/usb/f81604.c
index 76578063ac82..c61bd30d1765 100644
--- a/drivers/net/can/usb/f81604.c
+++ b/drivers/net/can/usb/f81604.c
@@ -620,6 +620,12 @@ static void f81604_read_int_callback(struct urb *urb)
netdev_info(netdev, "%s: Int URB aborted: %pe\n", _... |
5eaad4f768266f1f17e01232ffe2ef009f8129b7 | Analyze and fix the following issue in the Linux kernel code: can: usb: etas_es58x: correctly anchor the urb in the read bulk callback | Problem Details:
When submitting an urb, that is using the anchor pattern, it needs to be
anchored before submitting it otherwise it could be leaked if
usb_kill_anchored_urbs() is called. This logic is correctly done
elsewhere in the driver, except in the read bulk callback so do that
here also.
Cc: Vincent Mailhol <... | ```diff
diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.c b/drivers/net/can/usb/etas_es58x/es58x_core.c
index 2d248deb69dc..b259f6109808 100644
--- a/drivers/net/can/usb/etas_es58x/es58x_core.c
+++ b/drivers/net/can/usb/etas_es58x/es58x_core.c
@@ -1461,12 +1461,18 @@ static void es58x_read_bulk_callback(struct u... |
1e446fd0582ad8be9f6dafb115fc2e7245f9bea7 | Analyze and fix the following issue in the Linux kernel code: can: ucan: Fix infinite loop from zero-length messages | Problem Details:
If a broken ucan device gets a message with the message length field set
to 0, then the driver will loop for forever in
ucan_read_bulk_callback(), hanging the system. If the length is 0, just
skip the message and go on to the next one.
This has been fixed in the kvaser_usb driver in the past in commi... | ```diff
diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
index c79508b1c43e..0ea0ac75e42f 100644
--- a/drivers/net/can/usb/ucan.c
+++ b/drivers/net/can/usb/ucan.c
@@ -748,7 +748,7 @@ static void ucan_read_bulk_callback(struct urb *urb)
len = le16_to_cpu(m->len);
/* check sanity (length of co... |
38a01c9700b0dcafe97dfa9dc7531bf4a245deff | Analyze and fix the following issue in the Linux kernel code: can: ems_usb: ems_usb_read_bulk_callback(): check the proper length of a message | Problem Details:
When looking at the data in a USB urb, the actual_length is the size of
the buffer passed to the driver, not the transfer_buffer_length which is
set by the driver as the max size of the buffer.
When parsing the messages in ems_usb_read_bulk_callback() properly check
the size both at the beginning of p... | ```diff
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
index 4c219a5b139b..9b25dda7c183 100644
--- a/drivers/net/can/usb/ems_usb.c
+++ b/drivers/net/can/usb/ems_usb.c
@@ -445,6 +445,11 @@ static void ems_usb_read_bulk_callback(struct urb *urb)
start = CPC_HEADER_SIZE;
while (msg_coun... |
968b098220e393a10488b6a5dddb302b2eaedf66 | Analyze and fix the following issue in the Linux kernel code: can: esd_usb: add endpoint type validation | Problem Details:
esd_usb_probe() constructs bulk pipes for two endpoints without
verifying their transfer types:
- usb_rcvbulkpipe(dev->udev, 1) for RX (version reply, async RX data)
- usb_sndbulkpipe(dev->udev, 2) for TX (version query, CAN frames)
A malformed USB device can present these endpoints with transfer... | ```diff
diff --git a/drivers/net/can/usb/esd_usb.c b/drivers/net/can/usb/esd_usb.c
index 2892a68f510a..d257440fa01f 100644
--- a/drivers/net/can/usb/esd_usb.c
+++ b/drivers/net/can/usb/esd_usb.c
@@ -272,6 +272,9 @@ struct esd_usb {
struct usb_anchor rx_submitted;
+ unsigned int rx_pipe;
+ unsigned int tx_pipe;
+
... |
b8a57b979a7c2069081ed0bf88a727b17d85ac96 | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: update outdated comment | Problem Details:
The function ieee80211_start_scan() was refactored and replaced by
__ieee80211_start_scan() in commit f3b85252f081 ("mac80211: fix scan
races and rework scanning"). Update the comment in
ieee80211_tx_h_check_assoc() accordingly.
Additionally, remove the broken gmane.org link in the comment.
Suggested... | ```diff
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index dd691ff549c3..3844c7fbb8a8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -287,10 +287,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
* active scan) are allowed, all other frames should not be
* sent and we should not get... |
ab3f894de216f4a62adc3b57e9191888cbf26885 | Analyze and fix the following issue in the Linux kernel code: can: mcp251x: fix deadlock in error path of mcp251x_open | Problem Details:
The mcp251x_open() function call free_irq() in its error path with the
mpc_lock mutex held. But if an interrupt already occurred the
interrupt handler will be waiting for the mpc_lock and free_irq() will
deadlock waiting for the handler to finish.
This issue is similar to the one fixed in commit 7dd9c... | ```diff
diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c
index fa97adf25b73..bb7782582f40 100644
--- a/drivers/net/can/spi/mcp251x.c
+++ b/drivers/net/can/spi/mcp251x.c
@@ -1214,6 +1214,7 @@ static int mcp251x_open(struct net_device *net)
{
struct mcp251x_priv *priv = netdev_priv(net);
st... |
c77bfbdd6aac31b152ee81522cd90ad1de18738f | Analyze and fix the following issue in the Linux kernel code: can: dummy_can: dummy_can_init(): fix packet statistics | Problem Details:
The former implementation was only counting the tx_packets value but not
the tx_bytes as the skb was dropped on driver layer.
Enable CAN echo support (IFF_ECHO) in dummy_can_init(), which activates the
code for setting and retrieving the echo SKB and counts the tx_bytes
correctly.
Fixes: 816cf430e84b... | ```diff
diff --git a/drivers/net/can/dummy_can.c b/drivers/net/can/dummy_can.c
index 41953655e3d3..cd23de488edc 100644
--- a/drivers/net/can/dummy_can.c
+++ b/drivers/net/can/dummy_can.c
@@ -241,6 +241,7 @@ static int __init dummy_can_init(void)
dev->netdev_ops = &dummy_can_netdev_ops;
dev->ethtool_ops = &dummy_c... |
c35636e91e392e1540949bbc67932167cb48bc3a | Analyze and fix the following issue in the Linux kernel code: can: bcm: fix locking for bcm_op runtime updates | Problem Details:
Commit c2aba69d0c36 ("can: bcm: add locking for bcm_op runtime updates")
added a locking for some variables that can be modified at runtime when
updating the sending bcm_op with a new TX_SETUP command in bcm_tx_setup().
Usually the RX_SETUP only handles and filters incoming traffic with one
exception:... | ```diff
diff --git a/net/can/bcm.c b/net/can/bcm.c
index b7324e9c955b..fd9fa072881e 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -1176,6 +1176,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
if (!op)
return -ENOMEM;
+ spin_lock_init(&op->bcm_tx_lock);
op->can_id = msg_h... |
27a2ef20c0ae458d3dd6a19070dad662d0769001 | Analyze and fix the following issue in the Linux kernel code: pinctrl: eyeq5: Use match data | Problem Details:
Instead of using the pin descriptions, pin functions and register offsets
of the EyeQ5 directly, access those via a pointer to a newly introduced
struct eq5p_match_data.
This structure contains, in addition to the pin descriptions and pin
functions, an array of pin banks. Each bank holds the number of... | ```diff
diff --git a/drivers/pinctrl/pinctrl-eyeq5.c b/drivers/pinctrl/pinctrl-eyeq5.c
index 5f6af934a516..c780af09cde9 100644
--- a/drivers/pinctrl/pinctrl-eyeq5.c
+++ b/drivers/pinctrl/pinctrl-eyeq5.c
@@ -26,6 +26,7 @@
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/mod_devicetable.h>
+#include <lin... |
fdfe3e72a228b74da21939c47ebd6f5ad4969d5f | Analyze and fix the following issue in the Linux kernel code: gpio: Fix lockdep warnings in gpiolib_{cdev,sysfs}_register() | Problem Details:
A lockdep warning is reported in gpiolib-cdev driver:
WARNING: drivers/gpio/gpiolib-cdev.c:2735 at
gpiolib_cdev_register+0x114/0x140, CPU#1: swapper/0/1
Modules linked in:
CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted
7.0.0-rc1-next-20260227-00065-g6af4b9cfeded #12259 PREEMPT
Hardware n... | ```diff
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 7ebdb4993a74..f36b7c06996d 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -2732,8 +2732,6 @@ int gpiolib_cdev_register(struct gpio_chip *gc, dev_t devt)
struct gpio_device *gdev = gc->gpiodev;
int ret... |
48647d3f9a644d1e81af6558102d43cdb260597b | Analyze and fix the following issue in the Linux kernel code: slab: distinguish lock and trylock for sheaf_flush_main() | Problem Details:
sheaf_flush_main() can be called from __pcs_replace_full_main() where
it's fine if the trylock fails, and pcs_flush_all() where it's not
expected to and for some flush callers (when destroying the cache or
memory hotremove) it would be actually a problem if it failed and left
the main sheaf not flushed... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index 0c906fefc31b..b1e9f16ba435 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2858,19 +2858,19 @@ static void __kmem_cache_free_bulk(struct kmem_cache *s, size_t size, void **p);
* object pointers are moved to a on-stack array under the lock. To bound the
* stack usage, limi... |
a536be923191e2662369ee87e5d7beb50946c71c | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO | Problem Details:
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation f... | ```diff
diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
index d2a43eec4641..d8bb34809965 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
@@ -1992,6 +1992,25 @@ mac80211_hwsim_select_tx_link(struct m... |
abf37167e78f87c131a1de22ba1bd1cdc81a131f | Analyze and fix the following issue in the Linux kernel code: wifi: iwlegacy: Avoid multiple -Wflex-array-member-not-at-end warnings | Problem Details:
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Move the conflicting declarations (which in a couple of cases happen
to be in a union, so the entire unions are moved) to the end of the
corresponding structures, struct il_frame, and struct il394... | ```diff
diff --git a/drivers/net/wireless/intel/iwlegacy/3945.h b/drivers/net/wireless/intel/iwlegacy/3945.h
index fb1e33c89d0e..ed63b31fee9a 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945.h
+++ b/drivers/net/wireless/intel/iwlegacy/3945.h
@@ -123,13 +123,15 @@ enum il3945_antenna {
#define IEEE80211_FRAME_LEN ... |
ae5e95d4157481693be2317e3ffcd84e36010cbb | Analyze and fix the following issue in the Linux kernel code: wifi: mwifiex: fix use-after-free in mwifiex_adapter_cleanup() | Problem Details:
The mwifiex_adapter_cleanup() function uses timer_delete()
(non-synchronous) for the wakeup_timer before the adapter structure is
freed. This is incorrect because timer_delete() does not wait for any
running timer callback to complete.
If the wakeup_timer callback (wakeup_timer_fn) is executing when
m... | ```diff
diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c
index 5c9a46e64d23..0c8925013724 100644
--- a/drivers/net/wireless/marvell/mwifiex/init.c
+++ b/drivers/net/wireless/marvell/mwifiex/init.c
@@ -391,7 +391,7 @@ static void mwifiex_invalidate_lists(struct mwifi... |
668b233b7a3e50815ff79798236780bedf8b2aae | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211_hwsim: background CAC support | Problem Details:
Report background CAC support and add allow
to cancel background CAC and simulate radar.
echo cancel > /sys/kernel/debug/ieee80211/phy2/hwsim/dfs_background_cac
echo radar > /sys/kernel/debug/ieee80211/phy2/hwsim/dfs_background_cac
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Link: http... | ```diff
diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
index e89173f91637..d2a43eec4641 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
@@ -715,6 +715,7 @@ struct mac80211_hwsim_data {
} ps;
bo... |
92fecd2744552702285fe4e31ab9cb31a59e7391 | Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: fix background CAC | Problem Details:
Fix:
- Send CAC_ABORT event when background CAC is canceled
- Cancel CAC done workqueue when radar is detected
- Release background wdev ownership when CAC is aborted or passed
- Clean lower layer background radar state when CAC is aborted or passed
- Prevent sending abort event when radar event is sen... | ```diff
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 3fc175f9f868..212178d04efa 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -1115,8 +1115,10 @@ void __cfg80211_radar_event(struct wiphy *wiphy,
*/
cfg80211_set_dfs_state(wiphy, chandef, NL80211_DFS_UNAVAILABLE);
- if (offchan)
+ i... |
0d10393d5eac33cbd92f7a41fddca12c41d3cb7e | Analyze and fix the following issue in the Linux kernel code: xfrm: iptfs: validate inner IPv4 header length in IPTFS payload | Problem Details:
Add validation of the inner IPv4 packet tot_len and ihl fields parsed
from decrypted IPTFS payloads in __input_process_payload(). A crafted
ESP packet containing an inner IPv4 header with tot_len=0 causes an
infinite loop: iplen=0 leads to capturelen=min(0, remaining)=0, so the
data offset never advanc... | ```diff
diff --git a/net/xfrm/xfrm_iptfs.c b/net/xfrm/xfrm_iptfs.c
index 3b6d7284fc70..0747d1cfa333 100644
--- a/net/xfrm/xfrm_iptfs.c
+++ b/net/xfrm/xfrm_iptfs.c
@@ -991,6 +991,11 @@ static bool __input_process_payload(struct xfrm_state *x, u32 data,
iplen = be16_to_cpu(iph->tot_len);
iphlen = iph->ihl << 2;... |
990a73dec3fdc145fef6c827c29205437d533ece | Analyze and fix the following issue in the Linux kernel code: wifi: mwifiex: Fix memory leak in mwifiex_11n_aggregate_pkt() | Problem Details:
In mwifiex_11n_aggregate_pkt(), skb_aggr is allocated via
mwifiex_alloc_dma_align_buf(). If mwifiex_is_ralist_valid() returns false,
the function currently returns -1 immediately without freeing the
previously allocated skb_aggr, causing a memory leak.
Since skb_aggr has not yet been queued via skb_qu... | ```diff
diff --git a/drivers/net/wireless/marvell/mwifiex/11n_aggr.c b/drivers/net/wireless/marvell/mwifiex/11n_aggr.c
index 34b4b34276d6..042b1fe5f0d6 100644
--- a/drivers/net/wireless/marvell/mwifiex/11n_aggr.c
+++ b/drivers/net/wireless/marvell/mwifiex/11n_aggr.c
@@ -203,6 +203,7 @@ mwifiex_11n_aggregate_pkt(struct ... |
36bfc3642b19a98f1302aed4437c331df9b481f0 | Analyze and fix the following issue in the Linux kernel code: PCI: epf-mhi: Return 0, not remaining timeout, when eDMA ops complete | Problem Details:
pci_epf_mhi_edma_read() and pci_epf_mhi_edma_write() start DMA
operations and wait for completion with a timeout.
On successful completion, they previously returned the remaining
timeout, which callers may treat as an error. In particular,
mhi_ep_ring_add_element(), which calls pci_epf_mhi_edma_write... | ```diff
diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
index f9cf18aa5b34..7f5326925ed5 100644
--- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
+++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
@@ -367,6 +367,8 @@ static int pci_epf_mhi_edma_read(struct mhi_e... |
1696fad8b259a2d46e51cd6e17e4bcdbe02279fa | Analyze and fix the following issue in the Linux kernel code: ASoC: sti: use managed regmap_field allocations | Problem Details:
The regmap_field objects allocated at player init are never freed and
may leak resources if the driver is removed.
Switch to devm_regmap_field_alloc() to automatically limit the lifetime
of the allocations the lifetime of the device.
Fixes: 76c2145ded6b ("ASoC: sti: Add CPU DAI driver for playback")
... | ```diff
diff --git a/sound/soc/sti/uniperif_player.c b/sound/soc/sti/uniperif_player.c
index f1b7e76f97b5..45d35b887e4e 100644
--- a/sound/soc/sti/uniperif_player.c
+++ b/sound/soc/sti/uniperif_player.c
@@ -1028,11 +1028,11 @@ static int uni_player_parse_dt_audio_glue(struct platform_device *pdev,
return PTR_ERR(reg... |
272aabef50bc3fe58edd26de000f4cdd41bdbe60 | Analyze and fix the following issue in the Linux kernel code: ASoC: sti: Return errors from regmap_field_alloc() | Problem Details:
When regmap_field_alloc() fails, it can return an error. Specifically,
it will return PTR_ERR(-ENOMEM) when the allocation returns a NULL
pointer. The code then uses these allocations with a simple NULL check:
if (player->clk_sel) {
// May dereference invalid pointer (-ENOMEM)
err ... | ```diff
diff --git a/sound/soc/sti/uniperif_player.c b/sound/soc/sti/uniperif_player.c
index 6d1ce030963c..f1b7e76f97b5 100644
--- a/sound/soc/sti/uniperif_player.c
+++ b/sound/soc/sti/uniperif_player.c
@@ -1029,7 +1029,12 @@ static int uni_player_parse_dt_audio_glue(struct platform_device *pdev,
}
player->clk_se... |
23942b71f07cc99e39d9216a5b370df494759d8c | Analyze and fix the following issue in the Linux kernel code: regulator: mt6363: Fix incorrect and redundant IRQ disposal in probe | Problem Details:
In mt6363_regulator_probe(), devm_add_action_or_reset() is used to
automatically dispose of the IRQ mapping if the probe fails or the
device is removed.
The manual call to irq_dispose_mapping() in the error path was redundant
as the reset action already triggers mt6363_irq_remove(). Furthermore,
the m... | ```diff
diff --git a/drivers/regulator/mt6363-regulator.c b/drivers/regulator/mt6363-regulator.c
index 03af5fa53600..0aebcbda0a19 100644
--- a/drivers/regulator/mt6363-regulator.c
+++ b/drivers/regulator/mt6363-regulator.c
@@ -899,10 +899,8 @@ static int mt6363_regulator_probe(struct platform_device *pdev)
"... |
ca5056f5a78ce62588878d138e8141f01d70e61b | Analyze and fix the following issue in the Linux kernel code: ASoC: cs35l56: Suppress pointless warning about number of GPIO pulls | Problem Details:
In cs35l56_process_xu_onchip_speaker_id() the warning that the number
of pulls != number of GPIOs should only be printed if pulls are defined.
Pull settings are optional because there would normally be an external
resistor providing the pull. The warning would still be true if pulls
are not defined, b... | ```diff
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 3bf9e8fc34a2..37909a319f88 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -1625,9 +1625,9 @@ static int cs35l56_process_xu_onchip_speaker_id(struct cs35l56_private *cs35l56,
if (num_pulls < 0)
return num... |
986841dcad257615a6e3f89231bb38e1f3506b77 | Analyze and fix the following issue in the Linux kernel code: ASoC: rt1321: fix DMIC ch2/3 mask issue | Problem Details:
This patch fixed the DMIC ch2/3 mask missing problem.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20260225091210.3648905-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org> | ```diff
diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
index 50f65662e143..8bb7e8497c72 100644
--- a/sound/soc/codecs/rt1320-sdw.c
+++ b/sound/soc/codecs/rt1320-sdw.c
@@ -2629,7 +2629,7 @@ static int rt1320_sdw_hw_params(struct snd_pcm_substream *substream,
struct sdw_port_config port_conf... |
31ddc62c1cd92e51b9db61d7954b85ae2ec224da | Analyze and fix the following issue in the Linux kernel code: ASoC: fsl_easrc: Fix event generation in fsl_easrc_iec958_set_reg() | Problem Details:
ALSA controls should return 1 if the value in the control changed but the
control put operation fsl_easrc_set_reg() only returns 0 or a negative
error code, causing ALSA to not generate any change events. Add a suitable
check by using regmap_update_bits_check() with the underlying regmap, this
is more ... | ```diff
diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
index 5b6204923e8a..6c56134c60cc 100644
--- a/sound/soc/fsl/fsl_easrc.c
+++ b/sound/soc/fsl/fsl_easrc.c
@@ -96,14 +96,17 @@ static int fsl_easrc_set_reg(struct snd_kcontrol *kcontrol,
struct snd_soc_component *component = snd_kcontrol_chip(kco... |
54a86cf48eaa6d1ab5130d756b718775e81e1748 | Analyze and fix the following issue in the Linux kernel code: ASoC: fsl_easrc: Fix event generation in fsl_easrc_iec958_put_bits() | Problem Details:
ALSA controls should return 1 if the value in the control changed but the
control put operation fsl_easrc_iec958_put_bits() unconditionally returns
0, causing ALSA to not generate any change events. This is detected by
mixer-test with large numbers of messages in the form:
No event generated for C... | ```diff
diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
index e64a0d97afd0..5b6204923e8a 100644
--- a/sound/soc/fsl/fsl_easrc.c
+++ b/sound/soc/fsl/fsl_easrc.c
@@ -52,10 +52,13 @@ static int fsl_easrc_iec958_put_bits(struct snd_kcontrol *kcontrol,
struct soc_mreg_control *mc =
(struct soc_mreg_c... |
6ca4bcc23ae86a1330e5347ae9eb6c5d0cb690ab | Analyze and fix the following issue in the Linux kernel code: gpu: nova-core: Kconfig: Sort select statements alphabetically | Problem Details:
Reorder the select statements in NOVA_CORE Kconfig to be in
alphabetical order.
Suggested-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Link: https://patch.msgid.link/20260224225323.3312204-3-joelagnelf@nvidia.com
[acourbot@nvidia.com: fix conflict due to... | ```diff
diff --git a/drivers/gpu/nova-core/Kconfig b/drivers/gpu/nova-core/Kconfig
index 527920f9c4d3..a4f2380654e2 100644
--- a/drivers/gpu/nova-core/Kconfig
+++ b/drivers/gpu/nova-core/Kconfig
@@ -3,8 +3,8 @@ config NOVA_CORE
depends on 64BIT
depends on PCI
depends on RUST
- select RUST_FW_LOADER_ABSTRACTIONS
... |
773ef9f95385bae52dcb7fd129fefba3a71a04db | Analyze and fix the following issue in the Linux kernel code: iio: imu: bno055: fix BNO055_SCAN_CH_COUNT off by one | Problem Details:
Fix an off-by-one error in the BNO055_SCAN_CH_COUNT macro. The count
is derived by taking the difference of the last and first register
addresses, dividing by the size of each channel (2 bytes). It needs to
also add 1 to account for the fact that the count is inclusive of both
the first and last channe... | ```diff
diff --git a/drivers/iio/imu/bno055/bno055.c b/drivers/iio/imu/bno055/bno055.c
index 303bc308f80a..c96fec2ebb3e 100644
--- a/drivers/iio/imu/bno055/bno055.c
+++ b/drivers/iio/imu/bno055/bno055.c
@@ -64,7 +64,7 @@
#define BNO055_GRAVITY_DATA_X_LSB_REG 0x2E
#define BNO055_GRAVITY_DATA_Y_LSB_REG 0x30
#define BN... |
cdf89f225331cfa25451e139d16d748738546bb0 | Analyze and fix the following issue in the Linux kernel code: iio: hid-sensor-gyro-3d: fix typo in array name | Problem Details:
The array 'gryo_3d_sensitivity_addresses' has a clear spelling mistake
in its prefix. Rename it to 'gyro_3d_sensitivity_addresses' to correctly
match the naming convention.
Signed-off-by: Bhargav Joshi <rougueprince47@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> | ```diff
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
index c43990c518f7..c340cc899a7c 100644
--- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
+++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
@@ -42,7 +42,7 @@ static const u32 gyro_3d_addresses[GYRO_3D_CHANNEL_MAX] = {
HID_USAGE_SEN... |
81fdc3127d013a552465c3bf9829afbed5184406 | Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7768-1: remove switch to one-shot mode | Problem Details:
wideband low ripple FIR Filter is not available in one-shot mode. In
order to make direct reads work for all filter options, remove the
switch for one-shot mode and guarantee device is always in continuous
conversion mode.
Fixes: fb1d3b24ebf5 ("iio: adc: ad7768-1: add filter type and oversampling rati... | ```diff
diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
index 4cb63ab4768a..a927ae288fbb 100644
--- a/drivers/iio/adc/ad7768-1.c
+++ b/drivers/iio/adc/ad7768-1.c
@@ -463,17 +463,8 @@ static int ad7768_scan_direct(struct iio_dev *indio_dev)
struct ad7768_state *st = iio_priv(indio_dev);
int read... |
8be19e233744961db6069da9c9ab63eb085a0447 | Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7768-1: fix one-shot mode data acquisition | Problem Details:
According to the datasheet, one-shot mode requires a SYNC_IN pulse to
trigger a new sample conversion. In the current implementation, No sync
pulse was sent after switching to one-shot mode and reinit_completion()
was called before mode switching, creating a race condition where spurious
interrupts dur... | ```diff
diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
index fcd8aea7152e..4cb63ab4768a 100644
--- a/drivers/iio/adc/ad7768-1.c
+++ b/drivers/iio/adc/ad7768-1.c
@@ -463,12 +463,17 @@ static int ad7768_scan_direct(struct iio_dev *indio_dev)
struct ad7768_state *st = iio_priv(indio_dev);
int rea... |
1037352197476f5eee4804e13a64c242be297aa2 | Analyze and fix the following issue in the Linux kernel code: iio: adc: fix typos found by codespell | Problem Details:
Fix various spelling mistakes in comments and error messages
across drivers/iio/adc/, found by running codespell.
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.... | ```diff
diff --git a/drivers/iio/adc/ad4030.c b/drivers/iio/adc/ad4030.c
index def3e1d01ceb..eebb6f5835ad 100644
--- a/drivers/iio/adc/ad4030.c
+++ b/drivers/iio/adc/ad4030.c
@@ -629,7 +629,7 @@ static int ad4030_conversion(struct iio_dev *indio_dev)
/* Add one byte if we are using a differential + common byte mode *... |
d6bd0e2745e66106dea47e3781275fa305492f02 | Analyze and fix the following issue in the Linux kernel code: docs: iio: adxl345: update event attributes and scaling math | Problem Details:
Update the documentation to reflect the recent driver additions for
event scaling and the double tap threshold value, alongside correcting
existing technical errors in scale calculations.
Key changes:
- Fix the 62.5 g/LSB typo to 62.5 mg/LSB and add SI unit conversion.
- Correct decimal precision of i... | ```diff
diff --git a/Documentation/iio/adxl345.rst b/Documentation/iio/adxl345.rst
index 0e8977345e9d..978f746a8198 100644
--- a/Documentation/iio/adxl345.rst
+++ b/Documentation/iio/adxl345.rst
@@ -13,7 +13,12 @@ This driver supports Analog Device's ADXL345/375 on SPI/I2C bus.
* `ADXL375 <https://www.analog.com/ADXL3... |
20c2a46da4c65ac9c84f2876e2369a260b50e95b | Analyze and fix the following issue in the Linux kernel code: iio: adc: ad4062: Replace IRQF_ONESHOT with IRQF_NO_THREAD | Problem Details:
In ad4062_request_irq(), when request irq for "gp1", the code uses
IRQF_ONESHOT flag, which is not appropriate for a primary handler
that does not have a secondary threaded handler.
And since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
without a threaded handler"), the IRQ core checks ... | ```diff
diff --git a/drivers/iio/adc/ad4062.c b/drivers/iio/adc/ad4062.c
index dd4ad32aa6f5..8b03736d55fc 100644
--- a/drivers/iio/adc/ad4062.c
+++ b/drivers/iio/adc/ad4062.c
@@ -719,10 +719,8 @@ static int ad4062_request_irq(struct iio_dev *indio_dev)
}
st->gpo_irq[1] = true;
- return devm_request_threaded_irq(d... |
d14116f6529fa085b1a1b1f224dc9604e4d2a29c | Analyze and fix the following issue in the Linux kernel code: iio: gyro: mpu3050: Fix out-of-sequence free_irq() | Problem Details:
The triggered buffer is initialized before the IRQ is requested. The
removal path currently calls iio_triggered_buffer_cleanup() before
free_irq(). This violates the expected LIFO.
Place free_irq() in the correct location relative to
iio_triggered_buffer_cleanup().
Fixes: 3904b28efb2c7 ("iio: gyro: A... | ```diff
diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c
index 2e92daf047bd..d84e04e4b431 100644
--- a/drivers/iio/gyro/mpu3050-core.c
+++ b/drivers/iio/gyro/mpu3050-core.c
@@ -1278,9 +1278,9 @@ void mpu3050_common_remove(struct device *dev)
pm_runtime_get_sync(dev);
pm_runtime_put_noi... |
4c05799449108fb0e0a6bd30e65fffc71e60db4d | Analyze and fix the following issue in the Linux kernel code: iio: gyro: mpu3050: Move iio_device_register() to correct location | Problem Details:
iio_device_register() should be at the end of the probe function to
prevent race conditions.
Place iio_device_register() at the end of the probe function and place
iio_device_unregister() accordingly.
Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Suggested-by: Jonathan Cam... | ```diff
diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c
index d2f0899ac46b..2e92daf047bd 100644
--- a/drivers/iio/gyro/mpu3050-core.c
+++ b/drivers/iio/gyro/mpu3050-core.c
@@ -1226,12 +1226,6 @@ int mpu3050_common_probe(struct device *dev,
goto err_power_down;
}
- ret = iio_device_... |
4216db1043a3be72ef9c2b7b9f393d7fa72496e6 | Analyze and fix the following issue in the Linux kernel code: iio: gyro: mpu3050: Fix irq resource leak | Problem Details:
The interrupt handler is setup but only a few lines down if
iio_trigger_register() fails the function returns without properly
releasing the handler.
Add cleanup goto to resolve resource leak.
Detected by Smatch:
drivers/iio/gyro/mpu3050-core.c:1128 mpu3050_trigger_probe() warn:
'irq' from request_th... | ```diff
diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c
index 8df1f524d342..d2f0899ac46b 100644
--- a/drivers/iio/gyro/mpu3050-core.c
+++ b/drivers/iio/gyro/mpu3050-core.c
@@ -1129,11 +1129,16 @@ static int mpu3050_trigger_probe(struct iio_dev *indio_dev, int irq)
ret = iio_trigger_re... |
edb11a1aef4011a4b7b22cc3c3396c6fe371f4a6 | Analyze and fix the following issue in the Linux kernel code: iio: gyro: mpu3050: Fix incorrect free_irq() variable | Problem Details:
The handler for the IRQ part of this driver is mpu3050->trig but,
in the teardown free_irq() is called with handler mpu3050.
Use correct IRQ handler when calling free_irq().
Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed... | ```diff
diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c
index 317e7b217ec6..8df1f524d342 100644
--- a/drivers/iio/gyro/mpu3050-core.c
+++ b/drivers/iio/gyro/mpu3050-core.c
@@ -1269,7 +1269,7 @@ void mpu3050_common_remove(struct device *dev)
pm_runtime_disable(dev);
iio_triggered_buffe... |
679c04c10d65d32a3f269e696b22912ff0a001b9 | Analyze and fix the following issue in the Linux kernel code: iio: imu: st_lsm6dsx: Set buffer sampling frequency for accelerometer only | Problem Details:
The st_lsm6dsx_hwfifo_odr_store() function, which is called when userspace
writes the buffer sampling frequency sysfs attribute, calls
st_lsm6dsx_check_odr(), which accesses the odr_table array at index
`sensor->id`; since this array is only 2 entries long, an access for any
sensor type other than acce... | ```diff
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
index 1ee2fc5f5f1f..5b28a3ffcc3d 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
@@ -862,12 +862,21 @@ int st_lsm6dsx_fifo_setup(struct st... |
630748afa7030b272b7bee5df857e7bcf132ed51 | Analyze and fix the following issue in the Linux kernel code: iio: imu: st_lsm6dsx: Set FIFO ODR for accelerometer and gyroscope only | Problem Details:
The st_lsm6dsx_set_fifo_odr() function, which is called when enabling and
disabling the hardware FIFO, checks the contents of the hw->settings->batch
array at index sensor->id, and then sets the current ODR value in sensor
registers that depend on whether the register address is set in the above
array ... | ```diff
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
index 55d877745575..1ee2fc5f5f1f 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
@@ -225,6 +225,10 @@ static int st_lsm6dsx_set_fifo_odr(s... |
b403981da8a26f57f07859a9704392b1183e2a6e | Analyze and fix the following issue in the Linux kernel code: iio: dac: mcp47feb02: Fix mutex used before initialization | Problem Details:
The mcp47feb02_parse_fw() function uses data->lock, but the mutex was
initialized after this function in probe path.
Since mcp47feb02_parse_fw() is only called from probe(), remove the lock.
Fixes: bf394cc80369 ("iio: dac: adding support for Microchip MCP47FEB02")
Signed-off-by: Felix Gu <ustc.gu@gma... | ```diff
diff --git a/drivers/iio/dac/mcp47feb02.c b/drivers/iio/dac/mcp47feb02.c
index b218f0c3a0bd..08fb85359697 100644
--- a/drivers/iio/dac/mcp47feb02.c
+++ b/drivers/iio/dac/mcp47feb02.c
@@ -955,8 +955,6 @@ static int mcp47feb02_parse_fw(struct iio_dev *indio_dev,
u32 num_channels;
u8 chan_idx = 0;
- guard(mu... |
57b207e38d414a27fda9fff638a0d3e7ef16b917 | Analyze and fix the following issue in the Linux kernel code: iio: adc: ade9000: fix wrong return type in streaming push | Problem Details:
The else branch of ade9000_iio_push_streaming() incorrectly returns
IRQ_HANDLED on regmap_write failure. This function returns int (0 on
success, negative errno on failure), so IRQ_HANDLED (1) would be
misinterpreted as a non-error by callers.
Return ret instead, consistent with every other error path... | ```diff
diff --git a/drivers/iio/adc/ade9000.c b/drivers/iio/adc/ade9000.c
index 945a159e5de6..1abbfdfcd554 100644
--- a/drivers/iio/adc/ade9000.c
+++ b/drivers/iio/adc/ade9000.c
@@ -787,7 +787,7 @@ static int ade9000_iio_push_streaming(struct iio_dev *indio_dev)
ADE9000_MIDDLE_PAGE_BIT);
if (ret) {
dev_... |
86133fb1ec36b2f5cec29d71fbae84877c3a1358 | Analyze and fix the following issue in the Linux kernel code: iio: adc: ade9000: fix wrong register in CALIBBIAS case for active power | Problem Details:
The switch statement in ade9000_write_raw() attempts to match
chan->address against ADE9000_REG_AWATTOS (0x00F) to dispatch
the calibration offset write for active power channels. However,
chan->address is set via ADE9000_ADDR_ADJUST(ADE9000_REG_AWATT,
num), so after masking the phase bits, tmp holds
A... | ```diff
diff --git a/drivers/iio/adc/ade9000.c b/drivers/iio/adc/ade9000.c
index c62c6480dd0a..945a159e5de6 100644
--- a/drivers/iio/adc/ade9000.c
+++ b/drivers/iio/adc/ade9000.c
@@ -1123,7 +1123,7 @@ static int ade9000_write_raw(struct iio_dev *indio_dev,
tmp &= ~ADE9000_PHASE_C_POS_BIT;
switch (tmp) {
- c... |
bd66aa1c8b8cabf459064a46d3430a5ec5138418 | Analyze and fix the following issue in the Linux kernel code: iio: accel: adxl380: fix FIFO watermark bit 8 always written as 0 | Problem Details:
FIELD_PREP(BIT(0), fifo_samples & BIT(8)) produces either 0 or 256,
and since FIELD_PREP masks to bit 0, 256 & 1 evaluates to 0. Use !!
to convert the result to a proper 0-or-1 value.
Fixes: df36de13677a ("iio: accel: add ADXL380 driver")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc:... | ```diff
diff --git a/drivers/iio/accel/adxl380.c b/drivers/iio/accel/adxl380.c
index 8fab2fdbe147..a51d1d61c412 100644
--- a/drivers/iio/accel/adxl380.c
+++ b/drivers/iio/accel/adxl380.c
@@ -877,7 +877,7 @@ static int adxl380_set_fifo_samples(struct adxl380_state *st)
ret = regmap_update_bits(st->regmap, ADXL380_FIFO... |
0206dd36418c104c0b3dea4ed7047e21eccb30b0 | Analyze and fix the following issue in the Linux kernel code: iio: adc: ade9000: move mutex init before IRQ registration | Problem Details:
Move devm_mutex_init() before ade9000_request_irq() calls so that
st->lock is initialized before any handler that depends on it can run.
Fixes: 81de7b4619fc ("iio: adc: add ade9000 support")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@int... | ```diff
diff --git a/drivers/iio/adc/ade9000.c b/drivers/iio/adc/ade9000.c
index db085dc5e526..c62c6480dd0a 100644
--- a/drivers/iio/adc/ade9000.c
+++ b/drivers/iio/adc/ade9000.c
@@ -1706,19 +1706,19 @@ static int ade9000_probe(struct spi_device *spi)
init_completion(&st->reset_completion);
- ret = ade9000_reques... |
c53bca092486809d266b5921b9e6f9df2688fc26 | Analyze and fix the following issue in the Linux kernel code: iio: pressure: abp2030pa: Remove IRQF_ONESHOT from devm_request_irq() | Problem Details:
Since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
in IRQ request and gives a warning if there is no threaded handler.
Remove IRQF_ONESHOT from devm_request_irq().
Fixes: 47d323ce1e89 ("iio: pressure: add Honeywell ABP... | ```diff
diff --git a/drivers/iio/pressure/abp2030pa.c b/drivers/iio/pressure/abp2030pa.c
index 4ca056a73cef..b44f1bf4c633 100644
--- a/drivers/iio/pressure/abp2030pa.c
+++ b/drivers/iio/pressure/abp2030pa.c
@@ -520,7 +520,7 @@ int abp2_common_probe(struct device *dev, const struct abp2_ops *ops, int irq)
data->p_offs... |
48a5c36577ebe0144f8ede70e59b59ea18b75089 | Analyze and fix the following issue in the Linux kernel code: iio: adc: ti-ads1119: Fix unbalanced pm reference count in ds1119_single_conversion() | Problem Details:
In ads1119_single_conversion(), if pm_runtime_resume_and_get() fails,
the code jumps to the pdown label, which calls
pm_runtime_put_autosuspend().
Since pm_runtime_resume_and_get() automatically decrements the usage
counter on failure, the subsequent call to pm_runtime_put_autosuspend()
causes an unba... | ```diff
diff --git a/drivers/iio/adc/ti-ads1119.c b/drivers/iio/adc/ti-ads1119.c
index c9cedc59cdcd..4454f28b2b58 100644
--- a/drivers/iio/adc/ti-ads1119.c
+++ b/drivers/iio/adc/ti-ads1119.c
@@ -274,7 +274,7 @@ static int ads1119_single_conversion(struct ads1119_state *st,
ret = pm_runtime_resume_and_get(dev);
if... |
a8fde8be9aa8e5f10ef73b59b2ad4fba585ccdc5 | Analyze and fix the following issue in the Linux kernel code: ntfs: fix sysctl table registration and path | Problem Details:
The presence of a sentinel (an empty {}) at the end of the ctl_table array
now causes a "sysctl table check failed" error because the kernel attempts
to validate the null entry as a functional node.
Deleted the empty {} from the ntfs_sysctls array to prevent
the "procname is null" and "No proc_handler"... | ```diff
diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c
index aa4a821a117b..8c5c1b7cd483 100644
--- a/fs/ntfs/sysctl.c
+++ b/fs/ntfs/sysctl.c
@@ -27,7 +27,6 @@ static const struct ctl_table ntfs_sysctls[] = {
.mode = 0644, /* Mode, proc handler. */
.proc_handler = proc_dointvec
},
- {}
};
/* Storage for... |
4478e8eeb87120c11e90041864c2233238b2155a | Analyze and fix the following issue in the Linux kernel code: lib/crypto: tests: Depend on library options rather than selecting them | Problem Details:
The convention for KUnit tests is to have the test kconfig options
visible only when the code they depend on is already enabled. This way
only the tests that are relevant to the particular kernel build can be
enabled, either manually or via KUNIT_ALL_TESTS.
Update lib/crypto/tests/Kconfig to follow t... | ```diff
diff --git a/lib/crypto/tests/Kconfig b/lib/crypto/tests/Kconfig
index 4970463ea0aa..0de289b429a9 100644
--- a/lib/crypto/tests/Kconfig
+++ b/lib/crypto/tests/Kconfig
@@ -2,10 +2,9 @@
config CRYPTO_LIB_BLAKE2B_KUNIT_TEST
tristate "KUnit tests for BLAKE2b" if !KUNIT_ALL_TESTS
- depends on KUNIT
+ depends on... |
3bf5404fc93825ddde89992acad095a297ed9a31 | Analyze and fix the following issue in the Linux kernel code: Input: atkbd - fix various formatting issues | Problem Details:
Over the years we accumulated a number of formatting issues, fix them.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> | ```diff
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 58c20a5bd9e9..4560d3964eee 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -3,10 +3,7 @@
* AT and PS/2 keyboard driver
*
* Copyright (c) 1999-2002 Vojtech Pavlik
- */
-
-
-/*
+ *
* This... |
0c695e6b90674c67e03866123456cabfe1f74d9c | Analyze and fix the following issue in the Linux kernel code: Input: atkbd - validate scancode in firmware keymap entries | Problem Details:
The SCANCODE() macro extracts a 16-bit value (0..65535) from firmware
device property data, but atkbd_get_keymap_from_fwnode() uses it
directly to index atkbd->keycode[], which only has ATKBD_KEYMAP_SIZE
(512) elements. A firmware-supplied scancode >= 512 causes a heap
out-of-bounds write that can corr... | ```diff
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 6c999d89ee4b..7e6fa0e3cbd8 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -1110,6 +1110,12 @@ static int atkbd_get_keymap_from_fwnode(struct atkbd *atkbd)
for (i = 0; i < n; i++) {
scanco... |
14d4ac19d1895397532eec407433c5d74d9da53b | Analyze and fix the following issue in the Linux kernel code: scsi: target: Fix recursive locking in __configfs_open_file() | Problem Details:
In flush_write_buffer, &p->frag_sem is acquired and then the loaded store
function is called, which, here, is target_core_item_dbroot_store(). This
function called filp_open(), following which these functions were called
(in reverse order), according to the call trace:
down_read
__configfs_open_f... | ```diff
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 17608ea39d5a..a1c91d4515bc 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -108,8 +108,8 @@ static ssize_t target_core_item_dbroot_store(struct config_item *item,
... |
d06a310b45e153872033dd0cf19d5a2279121099 | Analyze and fix the following issue in the Linux kernel code: scsi: sg: Resolve soft lockup issue when opening /dev/sgX | Problem Details:
The parameter def_reserved_size defines the default buffer size reserved
for each Sg_fd and should be restricted to a range between 0 and 1,048,576
(see https://tldp.org/HOWTO/SCSI-Generic-HOWTO/proc.html). Although the
function sg_proc_write_dressz enforces this limit, it is possible to bypass
it by ... | ```diff
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 71d34186dec9..f38d36fbeef3 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1623,10 +1623,35 @@ sg_remove_device(struct device *cl_dev)
}
module_param_named(scatter_elem_sz, scatter_elem_sz, int, S_IRUGO | S_IWUSR);
-module_param_named(def_r... |
3033c471aaf675254efaa0da431e95d91a104b41 | Analyze and fix the following issue in the Linux kernel code: scsi: sg: Fix sysctl sg-big-buff register during sg_init() | Problem Details:
Commit 26d1c80fd61e ("scsi/sg: move sg-big-buff sysctl to scsi/sg.c") made
a mistake. sysctl sg-big-buff was not created because the call to
register_sg_sysctls() was placed on the wrong code path.
Fixes: 26d1c80fd61e ("scsi/sg: move sg-big-buff sysctl to scsi/sg.c")
Signed-off-by: Yang Erkun <yangerk... | ```diff
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 37bac49f30f0..71d34186dec9 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1691,13 +1691,13 @@ init_sg(void)
sg_sysfs_valid = 1;
rc = scsi_register_interface(&sg_interface);
if (0 == rc) {
+ register_sg_sysctls();
#ifdef CONFIG_SCSI_PRO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.