id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
efebe42d95fbba91dca6e3e32cb9e0612eb56de5 | Analyze and fix the following issue in the Linux kernel code: xfs: fix mount hang during primary superblock recovery failure | Problem Details:
When mounting an image containing a log with sb modifications that require
log replay, the mount process hang all the time and stack as follows:
[root@localhost ~]# cat /proc/557/stack
[<0>] xfs_buftarg_wait+0x31/0x70
[<0>] xfs_buftarg_drain+0x54/0x350
[<0>] xfs_mountfs+0x66e/0xe80
[<0>] xfs... | ```diff
diff --git a/fs/xfs/xfs_buf_item_recover.c b/fs/xfs/xfs_buf_item_recover.c
index b05d5b81f642..05a2f6927c12 100644
--- a/fs/xfs/xfs_buf_item_recover.c
+++ b/fs/xfs/xfs_buf_item_recover.c
@@ -1087,7 +1087,7 @@ xlog_recover_buf_commit_pass2(
error = xlog_recover_do_primary_sb_buffer(mp, item, bp, buf_f,
c... |
bb4715e967cf3b2eb8550eda73886208f1fc805d | Analyze and fix the following issue in the Linux kernel code: btrfs: print status of experimental mode when loading module | Problem Details:
Commit c9c49e8f157e ("btrfs: split out CONFIG_BTRFS_EXPERIMENTAL from
CONFIG_BTRFS_DEBUG") introduces a way to enable or disable experimental
features, print its status during module load, like:
Btrfs loaded, experimental=on, debug=on, assert=on, zoned=yes, fsverity=yes
Signed-off-by: Anand Jain <a... | ```diff
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index f6eaaf20229d..5157037a0048 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2446,6 +2446,9 @@ static __cold void btrfs_interface_exit(void)
static int __init btrfs_print_mod_info(void)
{
static const char options[] = ""
+#ifdef CONFIG_BTRFS_EXPE... |
a5019b70704a8cbea4c295ae7a61abd87300ff29 | Analyze and fix the following issue in the Linux kernel code: btrfs: initialize fs_devices->fs_info earlier in btrfs_init_devices_late() | Problem Details:
Currently, fs_devices->fs_info is initialized in btrfs_init_devices_late(),
but this occurs too late for find_live_mirror(), which is invoked by
load_super_root() much earlier than btrfs_init_devices_late().
Fix this by moving the initialization to open_ctree(), before load_super_root().
Reviewed-by:... | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 04d68f253940..4928bf2cd07f 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3388,6 +3388,7 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
fs_info->sectors_per_page = (PAGE_SIZE >> fs_info->sectorsize_bi... |
097a7eef61bd0366a822418b2ba074942eb00744 | Analyze and fix the following issue in the Linux kernel code: btrfs: uncollapse transaction aborts during renames | Problem Details:
During renames we are grouping transaction aborts that can be due to a
failure of one of several function calls. While this makes the code less
verbose, it makes it harder to debug as we end up not knowing from which
function call we got an error.
So change this to trigger a transaction abort after ea... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 8a173a24ac05..a7a3d879f2f2 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8021,31 +8021,45 @@ static int btrfs_rename_exchange(struct inode *old_dir,
/* src is a subvolume */
if (old_ino == BTRFS_FIRST_FREE_OBJECTID) {
ret = btrfs_unlink_su... |
882af9f13e830c0a4ef696bb72cd5998a5067a93 | Analyze and fix the following issue in the Linux kernel code: btrfs: handle free space tree rebuild in multiple transactions | Problem Details:
During free space tree rebuild, we're holding a transaction handle for
the whole rebuild process.
This can lead to blocked task warning, e.g. btrfs-transaction kthread
(which is already created before btrfs_start_pre_rw_mount()) can be
waked up to join and commit the current transaction.
But the free... | ```diff
diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c
index 7ba50e133921..2400fa5a5be4 100644
--- a/fs/btrfs/free-space-tree.c
+++ b/fs/btrfs/free-space-tree.c
@@ -1350,6 +1350,12 @@ int btrfs_rebuild_free_space_tree(struct btrfs_fs_info *fs_info)
btrfs_end_transaction(trans);
return ret;... |
a6f0bcf9b190219fa2686247dfc99a44e597aa11 | Analyze and fix the following issue in the Linux kernel code: btrfs: move csum related functions from ctree.c into fs.c | Problem Details:
The ctree module is about the implementation of the btree data structure
and not a place holder for generic filesystem things like the csum
algorithm details. Move the functions related to the csum algorithm
details away from ctree.c and into fs.c, which is a far better place for
them. Also fix missing... | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 99a58ede387e..c93f52a30a16 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -37,19 +37,6 @@ static int push_node_left(struct btrfs_trans_handle *trans,
static int balance_node_right(struct btrfs_trans_handle *trans,
struct extent_buffer *d... |
b815a78e17b9dd90398561ec7d91891d95f25301 | Analyze and fix the following issue in the Linux kernel code: btrfs: move abort_should_print_stack() to transaction.h | Problem Details:
The function abort_should_print_stack() is declared in transaction.h but
its definition is in ctree.c, which doesn't make sense since ctree.c is
the btree implementation and the function is related to the transaction
code. Move its definition into transaction.h as an inline function since
it's a very s... | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 185985a337b3..99a58ede387e 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -225,22 +225,6 @@ noinline void btrfs_release_path(struct btrfs_path *p)
}
}
-/*
- * We want the transaction abort to print stack trace only for errors where the
- * cau... |
c0def46dec9c547679a25fe7552c4bcbec0b0dd2 | Analyze and fix the following issue in the Linux kernel code: btrfs: improve the warning and error message for btrfs_remove_qgroup() | Problem Details:
[WARNING]
There are several warnings about the recently introduced qgroup
auto-removal that it triggers WARN_ON() for the non-zero rfer/excl
numbers, e.g:
------------[ cut here ]------------
WARNING: CPU: 67 PID: 2882 at fs/btrfs/qgroup.c:1854 btrfs_remove_qgroup+0x3df/0x450
CPU: 67 UID: 0 PID: 28... | ```diff
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index f9b214992212..993b5e803699 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1838,9 +1838,19 @@ int btrfs_remove_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid)
* Thus its reserved space should all be zero, no matter if qgroup
* is c... |
551d04a32a9e0b498c44e545ec27ed4553c59305 | Analyze and fix the following issue in the Linux kernel code: btrfs: simplify loop in select_reloc_root() | Problem Details:
We have this setup as a loop, but in reality we will never walk back up
the backref tree, if we do then it's a bug. Get rid of the loop and
handle the case where we have node->new_bytenr set at all. Previous
check was only if node->new_bytenr != root->node->start, but if it did
then we would hit the ... | ```diff
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 5af1907e230b..4cad2540e3ae 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2058,97 +2058,72 @@ struct btrfs_root *select_reloc_root(struct btrfs_trans_handle *trans,
int index = 0;
int ret;
- next = node;
- while (1) {
- ... |
6a4730b325aaa48f7a5d5ba97aff0a955e2d9cec | Analyze and fix the following issue in the Linux kernel code: btrfs: convert BUG_ON in btrfs_reloc_cow_block() to proper error handling | Problem Details:
This BUG_ON is meant to catch backref cache problems, but these can
arise from either bugs in the backref cache or corruption in the extent
tree. Fix it to be a proper error.
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@... | ```diff
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index db8b42f674b7..ab2de2d1b2be 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -4405,8 +4405,18 @@ int btrfs_reloc_cow_block(struct btrfs_trans_handle *trans,
WARN_ON(!first_cow && level == 0);
node = rc->backref_cache.path[l... |
5324c4e10e9c2ce307a037e904c0d9671d7137d9 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix data race when accessing the inode's disk_i_size at btrfs_drop_extents() | Problem Details:
A data race occurs when the function `insert_ordered_extent_file_extent()`
and the function `btrfs_inode_safe_disk_i_size_write()` are executed
concurrently. The function `insert_ordered_extent_file_extent()` is not
locked when reading inode->disk_i_size, causing
`btrfs_inode_safe_disk_i_size_write()` ... | ```diff
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index d314a7e03a38..c61f210259d8 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -225,7 +225,7 @@ int btrfs_drop_extents(struct btrfs_trans_handle *trans,
if (args->drop_cache)
btrfs_drop_extent_map_range(inode, args->start, args->end - 1, false);
- if... |
f73780e772c06901e99b2ad114b7f0f3fbe73ad4 | Analyze and fix the following issue in the Linux kernel code: of: property: Avoiding using uninitialized variable @imaplen in parse_interrupt_map() | Problem Details:
parse_interrupt_map() will use uninitialized variable @imaplen if fails
to get property 'interrupt-map'.
Fix by using the variable after successfully getting the property.
Fixes: e7985f43609c ("of: property: Fix fw_devlink handling of interrupt-map")
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
... | ```diff
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 519bf9229e61..9d8b68c72c36 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1391,9 +1391,9 @@ static struct device_node *parse_interrupt_map(struct device_node *np,
addrcells = of_bus_n_addr_cells(np);
imap = of_get_propert... |
7d9da040575b343085287686fa902a5b2d43c7ca | Analyze and fix the following issue in the Linux kernel code: psi: Fix race when task wakes up before psi_sched_switch() adjusts flags | Problem Details:
When running hackbench in a cgroup with bandwidth throttling enabled,
following PSI splat was observed:
psi: inconsistent task state! task=1831:hackbench cpu=8 psi_flags=14 clear=0 set=4
When investigating the series of events leading up to the splat,
following sequence was observed:
[008] d... | ```diff
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 22dfcd3e92ed..4365b479e345 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6645,7 +6645,6 @@ static void __sched notrace __schedule(int sched_mode)
* as a preemption by schedule_debug() and RCU.
*/
bool preempt = sched_mode > SM... |
e1bc02646527fc1ed74f00eb599b2b74d49671c7 | Analyze and fix the following issue in the Linux kernel code: x86/topology: Use x86_sched_itmt_flags for PKG domain unconditionally | Problem Details:
x86_sched_itmt_flags() returns SD_ASYM_PACKING if ITMT support is
enabled by the system. Without ITMT support being enabled, it returns 0
similar to current x86_die_flags() on non-Hybrid systems
(!X86_HYBRID_CPU and !X86_FEATURE_AMD_HETEROGENEOUS_CORES)
On Intel systems that enable ITMT support, eithe... | ```diff
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 6e300897b7ee..ef63b1c0b491 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -489,15 +489,6 @@ static int x86_cluster_flags(void)
}
#endif
-static int x86_die_flags(void)
-{
- if (cpu_feature_enabled(X86_FEATURE... |
d04013a4b21bd5a4e10c42f71ed1e5e299cacdfe | Analyze and fix the following issue in the Linux kernel code: x86/itmt: Move the "sched_itmt_enabled" sysctl to debugfs | Problem Details:
"sched_itmt_enabled" was only introduced as a debug toggle for any funky
ITMT behavior. Move the sysctl controlled from
"/proc/sys/kernel/sched_itmt_enabled" to debugfs at
"/sys/kernel/debug/x86/sched_itmt_enabled" with a notable change that a
cat on the file will return "Y" or "N" instead of "1" or "0... | ```diff
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index ee43d1bd41d0..9cea1fc36c18 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -19,6 +19,7 @@
#include <linux/sched.h>
#include <linux/cpumask.h>
#include <linux/cpuset.h>
+#include <linux/debugfs.h>
#include <linux/mutex.h>
... |
8061b9f5e111a3012f8b691e5b75dd81eafbb793 | Analyze and fix the following issue in the Linux kernel code: sched/debug: Change need_resched warnings to pr_err | Problem Details:
need_resched warnings, if enabled, are treated as WARNINGs. If
kernel.panic_on_warn is enabled, then this causes a kernel panic.
It's highly unlikely that a panic is desired for these warnings, only a
stack trace is normally required to debug and resolve.
Thus, switch need_resched warnings to simply... | ```diff
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 5e8e84a2bcb1..fd7e85220715 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -1292,8 +1292,10 @@ void resched_latency_warn(int cpu, u64 latency)
{
static DEFINE_RATELIMIT_STATE(latency_check_ratelimit, 60 * 60 * HZ, 1);
- WARN(__r... |
5d808c78d97251af1d3a3e4f253e7d6c39fd871e | Analyze and fix the following issue in the Linux kernel code: sched: Fix race between yield_to() and try_to_wake_up() | Problem Details:
We met a SCHED_WARN in set_next_buddy():
__warn_printk
set_next_buddy
yield_to_task_fair
yield_to
kvm_vcpu_yield_to [kvm]
...
After a short dig, we found the rq_lock held by yield_to() may not
be exactly the rq that the target task belongs to. There is a race
window against try_to_wake_up(... | ```diff
diff --git a/kernel/sched/syscalls.c b/kernel/sched/syscalls.c
index ff0e5ab4e37c..943406c4ee86 100644
--- a/kernel/sched/syscalls.c
+++ b/kernel/sched/syscalls.c
@@ -1433,7 +1433,7 @@ int __sched yield_to(struct task_struct *p, bool preempt)
struct rq *rq, *p_rq;
int yielded = 0;
- scoped_guard (irqsave)... |
83bb3633a2ce16be2043bac2316aa34530d2f271 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: skip short statistics window when updating EMLSR | Problem Details:
The statistics are not synchronized with the time that we enter EMLSR.
This means that we can receive the statistic notification just after
having cleared the counters, causing us to immediately exit EMLSR again.
Fix this by checking that most of the time for the window has passed. If
that is not the ... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
index e4ce3257c663..341a2a7a49ec 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
@@ -210,32 +210,6 @@ static u... |
193aa7eee2975fec7b5e224a53862c36b5500bd8 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: remove warning on unallocated BAID | Problem Details:
Due to the firmware allocating the BAID, we can only install
the data structure after the BAID is valid from the firmware's
point of view. As a result, the firmware can start sending
frame release notifications to the driver immediately. This
isn't supposed to happen by protocol, since the peer STA is
... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index c03cb7cc2f1c..09fd8752046e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -636,15 +636,21 @@ static void iwl_mvm_release_frames_from... |
cbde1f22108d53085d33025ed610571aff154d68 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: Remove mvm prefix from iwl_mvm_compressed_ba_notif | Problem Details:
This is not MVM specific.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20241226174257.9b35dfce796b.Ie61e17a488f6a34bcbe814dd89a138fe1f55585c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.co... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/commands.h b/drivers/net/wireless/intel/iwlwifi/fw/api/commands.h
index 2f40e69db318..34a1f97653c0 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/commands.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/commands.h
@@ -447,7 +447,7 @@ enum iwl_lega... |
52674ee2f30c10e1f8c90ec9df36db926a536a0b | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: send the right link id | Problem Details:
in iwl_mvm_sta_del we call iwl_mvm_sec_key_remove_ap with link id 0,
when it might actually be something else, causing us to skip all
the keys.
Since the call to iwl_mvm_sec_key_remove_ap was mostly skipped (because
for STA mode we are not removing the ap sta immediately, but later when
the vif is set... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index f881fde0a06d..d3fa2c4feb0f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -2070,7 +2070,8 @@ bool iwl_mvm_sta_del(struct iwl_mvm *mvm, s... |
efbb0fed0250be2bd79dfc01b727beee3c0fc42d | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: fix documentation about initial values in station table | Problem Details:
The inverse value is stored in the table, make the documentation match the code.
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/2008554.usQuhbGJ8B@devpool47.emlix.com
Signed-off-by: Johannes Berg <johannes.berg@i... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h
index 4a3799ae7c18..dbc531c63f0f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h
@@ -133,7 +133,7 @@ struct iwl_mvm_vif;
* and no TID data as th... |
66951e4860d3c688bfa550ea4a19635b57e00eca | Analyze and fix the following issue in the Linux kernel code: sched/fair: Fix update_cfs_group() vs DELAY_DEQUEUE | Problem Details:
Normally dequeue_entities() will continue to dequeue an empty group entity;
except DELAY_DEQUEUE changes things -- it retains empty entities such that they
might continue to compete and burn off some lag.
However, doing this results in update_cfs_group() re-computing the cgroup
weight 'slice' for an e... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index eeed8e34be9e..26958431deb7 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3956,7 +3956,11 @@ static void update_cfs_group(struct sched_entity *se)
struct cfs_rq *gcfs_rq = group_cfs_rq(se);
long shares;
- if (!gcfs_rq)
+ /*
+ * ... |
1f463794097dcdf4c64fffd31de2177681525e35 | Analyze and fix the following issue in the Linux kernel code: drm/ttm: Balance ttm_resource_cursor_init() and ttm_resource_cursor_fini() | Problem Details:
Make the interface more symmetric by providing and using a
ttm_resource_cursor_init().
v10:
- Fix a stray newline (Matthew Brost)
- Update kerneldoc (Matthew Brost)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Chr... | ```diff
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 48c5365efca1..06d6a452c4f4 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -450,7 +450,8 @@ int ttm_bo_evict_first(struct ttm_device *bdev, struct ttm_resource_manager *man
int ret = 0;
spin_lock... |
a9bbe341333109465605e8733bab0b573cddcc8c | Analyze and fix the following issue in the Linux kernel code: x86: Disable EXECMEM_ROX support | Problem Details:
The whole module_writable_address() nonsense made a giant mess of
alternative.c, not to mention it still contains bugs -- notable some of the
CFI variants crash and burn.
Mike has been working on patches to clean all this up again, but given the
current state of things, this stuff just isn't ready.
D... | ```diff
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 9d7bd0ae48c4..ef6cfea9df73 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -83,7 +83,6 @@ config X86
select ARCH_HAS_DMA_OPS if GART_IOMMU || XEN
select ARCH_HAS_EARLY_DEBUG if KGDB
select ARCH_HAS_ELF_RANDOMIZE
- select ARCH_HAS_EXECMEM_RO... |
235f238402194a78ac5fb882a46717eac817e5d1 | Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix indirect mkey ODP page count | Problem Details:
Restrict the check for the number of pages handled during an ODP page
fault to direct mkeys.
Perform the check right after handling the page fault and don't
propagate the number of handled pages to callers.
Indirect mkeys and their associated direct mkeys can have different
start addresses. As a resul... | ```diff
diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
index 4eb03fc0d302..f2eb940bddc8 100644
--- a/drivers/infiniband/hw/mlx5/odp.c
+++ b/drivers/infiniband/hw/mlx5/odp.c
@@ -944,8 +944,7 @@ out:
/*
* Handle a single data segment in a page-fault WQE or RDMA region.
*
- * Returns... |
57e233c3bd63f32d2c7e937db2e16b98f723ce2f | Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix a race between the reset and suspend path | Problem Details:
If a reset is scheduled when the suspend happens, we drop the
reset-pending info on the floor assuming the resume will fix things,
but the resume logic might try a fast reset. If we're lucky, the
fast reset fails and we fallback to a slow reset, but if the FW was
corrupted in a way that makes it partia... | ```diff
diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
index 0a37cfeeb181..a9da1d1eeb70 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -128,14 +128,11 @@ static void panthor_device_reset_work(struct work_struct *w... |
d8b4bf4ea04dd96fe43f6010c614149aba4c9b91 | Analyze and fix the following issue in the Linux kernel code: kthread: modify kernel-doc function name to match code | Problem Details:
kthread.c:1073: warning: expecting prototype for kthread_create_worker(). Prototype was for kthread_create_worker_on_node() instead
Fixes: 41f70d8e1634 ("kthread: Unify kthread_create_on_cpu() and kthread_create_worker_on_cpu() automatic format")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc:... | ```diff
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 922f15762ec3..de9dad03885b 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -1058,7 +1058,7 @@ fail_task:
}
/**
- * kthread_create_worker - create a kthread worker
+ * kthread_create_worker_on_node - create a kthread worker
* @flags: flags modi... |
5ed54896b6bd444223092cab361b0785932119ab | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921: fix a potential scan no APs | Problem Details:
In multi-channel scenarios, the granted channel must be aborted before
station remove. Otherwise, the firmware will be put into a wrong state,
resulting in have chance to make subsequence scan no APs.
With this patch, the granted channel will be always aborted before
station remove.
Signed-off-by: Qua... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index a7f5bfbc02ed..2ef8dbfc4a95 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -360,9 +360,9 @@ void mt7921_roc_abort_sync(st... |
512e26db3565b310052dc2b8975ac7c973bf8ab6 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: Fix EHT NSS radiotap reporting. | Problem Details:
Wireshark and iwlwifi use zero-based NSS reporting, adjust
mt76 to do the same.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Link: https://patch.msgid.link/20240909211238.3237111-2-greearb@candelatech.com
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.c b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.c
index 92ad1ecf6c9d..2d300948308d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.c
@@ -231,7 +231,8 @@ void mt76... |
f21b77cb556296116b1cce1d62295d13e35da574 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: Fix mesh scan on MT7916 DBDC | Problem Details:
commit c4f075582304 ("wifi: mt76: mt7915: fix command timeout in AP stop
period") changes the behavior of mt7915_bss_info_changed() in mesh mode
when enable_beacon becomes false: it calls mt7915_mcu_add_bss_info(...,
false) and mt7915_mcu_add_sta(..., false) while the previous code
didn't. These sends... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index c6f498fc81ff..8183708a9b35 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -619,8 +619,9 @@ static void mt7915_bss_info_c... |
08fa656c91fd5fdf47ba393795b9c0d1e97539ed | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix off by one in mt7925_load_clc() | Problem Details:
This comparison should be >= instead of > to prevent an out of bounds
read and write.
Fixes: 9679ca7326e5 ("wifi: mt76: mt7925: fix a potential array-index-out-of-bounds issue for clc")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/84bf5dd2-2fe3-4410-a7af-ae841... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 748ea6adbc6b..0c2a2337c313 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -638,7 +638,7 @@ static int mt7925_load_clc(struct... |
fbce6136da0a40f62ea22361e7d13f6a502c20ad | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921s: fix a potential firmware freeze during startup | Problem Details:
The maximum command quota of the firmware may be exceeded because the
command to retrieve the quota setting has not been taken into account.
This patch considers not only the quota usage of the command retrieving
quota settings but also limits the total quota usage.
Signed-off-by: Leon Yen <leon.yen@... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index ca2dba3ac65d..599123967af6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -636,6 +636,7 @@ struct mt76_sdio {
u8 hw_ver;
wait_queue_head_t wait;... |
0da2e410705e87c75d0f96d73c4a563746cc2709 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: extend flexibility of mt7996_mcu_get_eeprom() | Problem Details:
Support passing customized buffer pointer and length to
mt7996_mcu_get_eeprom().
This is the preparation for adding more variants support which needs to
prefetch FEM module from efuse, and also fixes potential OOB issue when
reading the last efuse block.
Co-developed-by: StanleyYP Wang <StanleyYP.Wan... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c
index 4a8237118287..861aba68a725 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c
@@ -86,8 +86,13 @@ static int mt7996_eepr... |
d08a1049659aa91784306b7244116e71f569e5a0 | Analyze and fix the following issue in the Linux kernel code: HID: intel-thc-hid: intel-quicki2c: fix potential memory corruption | Problem Details:
Use U32 to get value from ACPI and explicitly cast to U16.
Fixes: 5282e45ccbfa ("HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C ACPI interfaces")
Signed-off-by: Even Xu <even.xu@intel.com>
Link: https://patch.msgid.link/20250113085047.2100403-1-even.xu@intel.com
Signed-off-by: Benjamin Tissoires... | ```diff
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c b/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
index b56c72124821..2de93f4a25ca 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
@@ -118,6 +118,7 @@ s... |
0b0d62fa73f22884e1ddd4ed6e288f959ad116ae | Analyze and fix the following issue in the Linux kernel code: HID: intel-thc-hid: intel-thc: Fix error code in thc_i2c_subip_init() | Problem Details:
Return -ENOMEM if the allocation fails. Don't return success.
Fixes: 4228966def88 ("HID: intel-thc-hid: intel-thc: Add THC I2C config interfaces")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/eb4ea363-c3b7-4988-9ff5-5ed74bf47620@stanley.mountain
Signed-off-by... | ```diff
diff --git a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
index 92a1dbe9a928..4fc78b5a04b5 100644
--- a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
+++ b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
@@ -1519,7 +1519,7 @@ int thc_i2c_sub... |
480fb9806e2e073532f7786166287114c696b340 | Analyze and fix the following issue in the Linux kernel code: drm/xe: make change ccs_mode a synchronous action | Problem Details:
If ccs_mode is being modified via
/sys/class/drm/cardX/device/tileY/gtY/ccs_mode
the asynchronous reset is triggered and the write returns immediately.
With that some test receive false information about number of CCS engines
or even fail if they proceed without delay after changing the ccs_mode.
... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
index b6adfb9f2030..50fffc9ebf62 100644
--- a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
+++ b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
@@ -150,7 +150,7 @@ ccs_mode_store(struct device *kdev, struct device_attribute *attr,
xe_gt_info(... |
155c77f45f63dd58a37eeb0896b0b140ab785836 | Analyze and fix the following issue in the Linux kernel code: drm/xe: introduce xe_gt_reset and xe_gt_wait_for_reset | Problem Details:
Add synchronous version gt reset as there are few places where it
is expected.
Also add a wait helper to wait until gt reset is done.
Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Fixes: f3bc5bb4d53d ("drm/xe: Allow userspace to co... | ```diff
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index 405ff904153e..6795d1d916e4 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -264,10 +264,9 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc
* howev... |
2da76e9e12c35f635ca90a223844c279c511a0dd | Analyze and fix the following issue in the Linux kernel code: mm/slab: fix kernel-doc func param names | Problem Details:
Use corrected function parameter names to eliminate kernel-doc
warnings:
slab.h:142: warning: Function parameter or struct member 's' not described in 'slab_folio'
slab.h:142: warning: Excess function parameter 'slab' description in 'slab_folio'
slab.h:168: warning: Function parameter or struct member... | ```diff
diff --git a/mm/slab.h b/mm/slab.h
index 632fedd71fea..e9fd9bf0bfa6 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -128,7 +128,7 @@ static_assert(IS_ALIGNED(offsetof(struct slab, freelist), sizeof(freelist_aba_t)
/**
* slab_folio - The folio allocated for a slab
- * @slab: The slab.
+ * @s: The slab.
*
* Sl... |
1bd1562d3522f7a846dad795359c31b371e6303b | Analyze and fix the following issue in the Linux kernel code: drm/bridge-connector: Sync supported_formats with computed ycbcr_420_allowed | Problem Details:
The case of having an HDMI bridge in the pipeline which advertises
YUV420 capability via its ->supported_formats and a non-HDMI one that
didn't enable ->ycbcr_420_allowed, is incorrectly handled because
supported_formats is passed as is to the helper initializing the HDMI
connector.
Ensure HDMI_COLORS... | ```diff
diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c
index 320c297008aa..3a5a4f92c979 100644
--- a/drivers/gpu/drm/display/drm_bridge_connector.c
+++ b/drivers/gpu/drm/display/drm_bridge_connector.c
@@ -459,7 +459,10 @@ struct drm_connector *drm_bridge_con... |
d102ac39fbe181a6f0c9e98bc26bd94018657808 | Analyze and fix the following issue in the Linux kernel code: drm/bridge: Prioritize supported_formats over ycbcr_420_allowed | Problem Details:
Bridges having DRM_BRIDGE_OP_HDMI set in their ->ops are supposed to
rely on the ->supported_formats bitmask to advertise the permitted
colorspaces, including HDMI_COLORSPACE_YUV420.
However, a new flag ->ycbcr_420_allowed has been recently introduced,
which brings the necessity to require redundant a... | ```diff
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index c6af46dd02bf..241a384ebce3 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -207,6 +207,10 @@ void drm_bridge_add(struct drm_bridge *bridge)
{
mutex_init(&bridge->hpd_mutex);
+ if (bridge->ops & DR... |
76201b5979768500bca362871db66d77cb4c225e | Analyze and fix the following issue in the Linux kernel code: pktgen: Avoid out-of-bounds access in get_imix_entries | Problem Details:
Passing a sufficient amount of imix entries leads to invalid access to the
pkt_dev->imix_entries array because of the incorrect boundary check.
UBSAN: array-index-out-of-bounds in net/core/pktgen.c:874:24
index 20 is out of range for type 'imix_pkt [20]'
CPU: 2 PID: 1210 Comm: bash Not tainted 6.10.0-... | ```diff
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 7e23cacbe66e..4cb547fae91f 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -851,6 +851,9 @@ static ssize_t get_imix_entries(const char __user *buffer,
unsigned long weight;
unsigned long size;
+ if (pkt_dev->n_imix_entries >= MAX_IMIX_E... |
34c8e74cd6667ef5da90d448a1af702c4b873bd3 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Fix volume adjustment issue on Lenovo ThinkBook 16P Gen5 | Problem Details:
This patch fixes the volume adjustment issue on the Lenovo ThinkBook 16P Gen5
by applying the necessary quirk configuration for the Realtek ALC287 codec.
The issue was caused by incorrect configuration in the driver,
which prevented proper volume control on certain systems.
Signed-off-by: Yage Geng <... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c062054d4e1b..ad66378d7321 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10932,8 +10932,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x38e0, "Yoga Y990 Intel... |
061a5e4ac36dac35bb4dfd6a6054c5657b953881 | Analyze and fix the following issue in the Linux kernel code: s390/ebcdic: Fix length decrement in codepage_convert() | Problem Details:
The inline assembly uses the ahi instruction to decrement and test
whether more than 256 bytes are left for conversion. But the nr
variable passed is of type unsigned long. Therefore use aghi.
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reported-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by... | ```diff
diff --git a/arch/s390/include/asm/ebcdic.h b/arch/s390/include/asm/ebcdic.h
index 7fdb6b92985a..7164cb658435 100644
--- a/arch/s390/include/asm/ebcdic.h
+++ b/arch/s390/include/asm/ebcdic.h
@@ -29,7 +29,7 @@ codepage_convert(const __u8 *codepage, volatile char *addr, unsigned long nr)
"0: tr 0(1,%0),0(%2)\n... |
4a0f62a3009be6515f5863970994a350a938ac52 | Analyze and fix the following issue in the Linux kernel code: s390/ebcdic: Fix length check in codepage_convert() | Problem Details:
The current code compares whether the nr argument is less or equal to
zero. As nr is of type unsigned long, this isn't correct. Fix this by just
testing for zero. This is also reported by checkpatch:
unsignedLessThanZero: Checking if unsigned expression 'nr--' is less
than zero.
Reported-by: Jens Rem... | ```diff
diff --git a/arch/s390/include/asm/ebcdic.h b/arch/s390/include/asm/ebcdic.h
index cfa340552328..7fdb6b92985a 100644
--- a/arch/s390/include/asm/ebcdic.h
+++ b/arch/s390/include/asm/ebcdic.h
@@ -22,7 +22,7 @@ extern __u8 _ebc_toupper[256]; /* EBCDIC -> uppercase */
static inline void
codepage_convert(const __... |
9104ee0868ff0a944f9f7f5ac30bfa88eecaa289 | Analyze and fix the following issue in the Linux kernel code: drm/panthor: fix all mmu kernel-doc comments | Problem Details:
Use the correct format for all kernel-doc comments.
Use structname.membername for named structs.
Don't precede function names in kernel-doc with '@' sign.
Use the correct function parameter names in kernel-doc comments.
This fixes around 80 kernel-doc warnings.
Signed-off-by: Randy Dunlap <rdunlap@in... | ```diff
diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c
index c39e3eb1c15d..5ce80e2532d5 100644
--- a/drivers/gpu/drm/panthor/panthor_mmu.c
+++ b/drivers/gpu/drm/panthor/panthor_mmu.c
@@ -53,26 +53,27 @@ struct panthor_mmu {
/** @irq: The MMU irq. */
struct panthor_irq irq... |
6758bd0692e25b7c58ff0b3e47fbefe75be177af | Analyze and fix the following issue in the Linux kernel code: dt-bindings: rtc: mxc: Document fsl,imx31-rtc | Problem Details:
imx31.dtsi uses the following RTC compatible:
compatible = "fsl,imx31-rtc", "fsl,imx21-rtc";
Document 'fsl,imx31-rtc' to fix the following dt-schema warning:
'fsl,imx31-rtc' is not one of ['fsl,imx1-rtc', 'fsl,imx21-rtc']
Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://lore.kernel.org... | ```diff
diff --git a/Documentation/devicetree/bindings/rtc/rtc-mxc.yaml b/Documentation/devicetree/bindings/rtc/rtc-mxc.yaml
index a14b52178c4b..2599b847f406 100644
--- a/Documentation/devicetree/bindings/rtc/rtc-mxc.yaml
+++ b/Documentation/devicetree/bindings/rtc/rtc-mxc.yaml
@@ -14,9 +14,13 @@ maintainers:
proper... |
2d2da5a4c1b4509f6f7e5a8db015cd420144beb4 | Analyze and fix the following issue in the Linux kernel code: PCI: rcar-ep: Fix incorrect variable used when calling devm_request_mem_region() | Problem Details:
The rcar_pcie_parse_outbound_ranges() uses the devm_request_mem_region()
macro to request a needed resource. A string variable that lives on the
stack is then used to store a dynamically computed resource name, which
is then passed on as one of the macro arguments. This can lead to
undefined behavior.
... | ```diff
diff --git a/drivers/pci/controller/pcie-rcar-ep.c b/drivers/pci/controller/pcie-rcar-ep.c
index 047e2cef5afc..c5e0d025bc43 100644
--- a/drivers/pci/controller/pcie-rcar-ep.c
+++ b/drivers/pci/controller/pcie-rcar-ep.c
@@ -107,7 +107,7 @@ static int rcar_pcie_parse_outbound_ranges(struct rcar_pcie_endpoint *ep,... |
491cb9c5084790aafa02e843349492c284373231 | Analyze and fix the following issue in the Linux kernel code: PCI: mediatek-gen3: Avoid PCIe resetting via PERST# for Airoha EN7581 SoC | Problem Details:
Airoha EN7581 has a hw bug asserting/releasing PERST# signal causing
occasional PCIe link down issues. In order to overcome the problem,
PERST# signal is not asserted/released during device probe or
suspend/resume phase and the PCIe block is reset using
en7523_reset_assert() and en7581_pci_enable().
I... | ```diff
diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index aa511965eb91..1edf5d6708c2 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -135,10 +135,18 @@ struct mtk_gen3_pcie;
#define PCIE_CONF_LINK2_... |
c98bee18d0a094e37100c85effe5e161418f8644 | Analyze and fix the following issue in the Linux kernel code: PCI: mediatek-gen3: Rely on msleep() in mtk_pcie_en7581_power_up() | Problem Details:
Since mtk_pcie_en7581_power_up() runs in non-atomic context, rely on
msleep() routine instead of mdelay().
Link: https://lore.kernel.org/r/20250108-pcie-en7581-fixes-v6-5-21ac939a3b9b@kernel.org
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kerne... | ```diff
diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index 01e0b53cc1f2..aa511965eb91 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -923,7 +923,7 @@ static int mtk_pcie_en7581_power_up(struct mtk_ge... |
90d4e466c9ea2010f33880a36317a8486ccbe082 | Analyze and fix the following issue in the Linux kernel code: PCI: mediatek-gen3: Move reset delay in mtk_pcie_en7581_power_up() | Problem Details:
Airoha EN7581 has a hw bug asserting/releasing PCIE_PE_RSTB signal
causing occasional PCIe link down issues. In order to overcome the
problem, PCIe block is reset using REG_PCI_CONTROL (0x88) and
REG_RESET_CONTROL (0x834) registers available in the clock module
running clk_bulk_prepare_enable() in mtk_... | ```diff
diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
index e52c5460e927..513730e5b953 100644
--- a/drivers/clk/clk-en7523.c
+++ b/drivers/clk/clk-en7523.c
@@ -477,7 +477,6 @@ static int en7581_pci_enable(struct clk_hw *hw)
REG_PCI_CONTROL_PERSTOUT;
val = readl(np_base + REG_PCI_CONTROL);
... |
0c9d2d2ef0d916b490a9222ed20ff4616fca876d | Analyze and fix the following issue in the Linux kernel code: PCI: mediatek-gen3: Add comment about initialization order in mtk_pcie_en7581_power_up() | Problem Details:
Add a comment in mtk_pcie_en7581_power_up() to clarify, unlike the other
MediaTek Gen3 controllers, the Airoha EN7581 requires PHY initialization
and power-on before PHY reset deassert.
Link: https://lore.kernel.org/r/20250108-pcie-en7581-fixes-v6-3-21ac939a3b9b@kernel.org
Signed-off-by: Lorenzo Bianc... | ```diff
diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index 4ce2b9d0dcd5..71df8817c163 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -925,6 +925,10 @@ static int mtk_pcie_en7581_power_up(struct mtk_g... |
e4c7dfd953f7618f0ccb70d87c1629634f306fab | Analyze and fix the following issue in the Linux kernel code: PCI: mediatek-gen3: Move reset/assert callbacks in .power_up() | Problem Details:
In order to make the code more readable, the reset_control_bulk_assert()
function for PHY reset lines is moved to make it pair with
reset_control_bulk_deassert() in mtk_pcie_power_up() and
mtk_pcie_en7581_power_up(). The same change is done for
reset_control_assert() used to assert MAC reset line.
Int... | ```diff
diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index 886d458df40d..4ce2b9d0dcd5 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -125,6 +125,8 @@
#define MAX_NUM_PHY_RESETS 3
+#define PCIE_... |
0e7a622da17da0042294860cdb7a2fac091d25b1 | Analyze and fix the following issue in the Linux kernel code: PCI: mediatek-gen3: Rely on clk_bulk_prepare_enable() in mtk_pcie_en7581_power_up() | Problem Details:
Replace clk_bulk_prepare() and clk_bulk_enable() with
clk_bulk_prepare_enable() in mtk_pcie_en7581_power_up() routine.
Link: https://lore.kernel.org/r/20250108-pcie-en7581-fixes-v6-1-21ac939a3b9b@kernel.org
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Krzysztof Wilczyński <kwilc... | ```diff
diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index be52e3a123ab..886d458df40d 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -945,12 +945,6 @@ static int mtk_pcie_en7581_power_up(struct mtk_g... |
2f83e38a095f8bf7c6029883d894668b03b9bd93 | Analyze and fix the following issue in the Linux kernel code: tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN | Problem Details:
With this, processes without CAP_SYS_ADMIN are able to use TIOCLINUX with
subcode TIOCL_SETSEL, in the selection modes TIOCL_SETPOINTER,
TIOCL_SELCLEAR and TIOCL_SELMOUSEREPORT.
TIOCL_SETSEL was previously changed to require CAP_SYS_ADMIN, as this IOCTL
let callers change the selection buffer and coul... | ```diff
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c
index 564341f1a74f..0bd6544e30a6 100644
--- a/drivers/tty/vt/selection.c
+++ b/drivers/tty/vt/selection.c
@@ -192,6 +192,20 @@ int set_selection_user(const struct tiocl_selection __user *sel,
if (copy_from_user(&v, sel, sizeof(*sel)))
ret... |
b06f388994500297bb91be60ffaf6825ecfd2afe | Analyze and fix the following issue in the Linux kernel code: tty: xilinx_uartps: split sysrq handling | Problem Details:
lockdep detects the following circular locking dependency:
CPU 0 CPU 1
========================== ============================
cdns_uart_isr() printk()
uart_port_lock(port) console_lock()
cdns_uart_console_write()
if (!port... | ```diff
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index beb151be4d32..92ec51870d1d 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -287,7 +287,7 @@ static void cdns_uart_handle_rx(void *dev_id, unsigned int isrstatus)
continue;
... |
55eb3c3a6388420afda1374b353717de32ae9573 | Analyze and fix the following issue in the Linux kernel code: staging: gpib: Add missing mutex unlock in agilent usb driver | Problem Details:
When no matching product id was found in the attach function the driver
returned without unlocking the agilent_82357a_hotplug_lock mutex.
Add the unlock call.
This was detected by smatch:
smatch warnings:
drivers/staging/gpib/agilent_82357a/agilent_82357a.c:1381 agilent_82357a_attach() warn: inconsis... | ```diff
diff --git a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
index b21eadabc466..c22c6bb30776 100644
--- a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
+++ b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
@@ -1365,6 +1365,7 @@ static int ... |
9125aa208a17cbbd3fdcc7953bb41d2d2fd35df0 | Analyze and fix the following issue in the Linux kernel code: staging: gpib: Remove commented-out debug code | Problem Details:
Code cleanup. This code has some debug code which is commented out.
Delete it.
Signed-off-by: Sandeep Salwan <salwansandeep5@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20250110233834.64147-1-salwansandeep5@gmail.com
Signed-off-by: Greg Kroah-Hartma... | ```diff
diff --git a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
index 6d13b8eb481e..fc5d29f6488b 100644
--- a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
+++ b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
@@ -30,11 +30,8 @@ int agilent_82... |
a68d3cbfade64392507302f3a920113b60dc811f | Analyze and fix the following issue in the Linux kernel code: memstick: core: fix kernel-doc notation | Problem Details:
Use the correct kernel-doc format for function parameters (':'
instead of '-') to eliminate kernel-doc warnings.
Add some "Returns:" notations to functions.
memstick.c:206: warning: Function parameter or struct member 'host' not described in 'memstick_detect_change'
memstick.c:222: warning: Function p... | ```diff
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index ae4e8b8e6eb7..043b9ec756ff 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -200,7 +200,7 @@ static int memstick_dummy_check(struct memstick_dev *card)
/**
* memstick_detect_change ... |
73656a6ab6d428102eb5aaa9599b5fcba4a2501f | Analyze and fix the following issue in the Linux kernel code: intel_th: core: fix kernel-doc warnings | Problem Details:
Correct the function parameters based on a previous code patch to
eliminate kernel-doc warnings.
drivers/hwtracing/intel_th/core.c:866: warning: Function parameter or struct member 'drvdata' not described in 'intel_th_alloc'
drivers/hwtracing/intel_th/core.c:866: warning: Function parameter or struct ... | ```diff
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index d72993355473..47d9e6c3bac0 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -857,8 +857,9 @@ static irqreturn_t intel_th_irq(int irq, void *data)
/**
* intel_th_alloc() - allocate... |
2eb3da037c2c20fa30bc502bc092479b2a1aaae2 | Analyze and fix the following issue in the Linux kernel code: usb: typec: tcpm: set SRC_SEND_CAPABILITIES timeout to PD_T_SENDER_RESPONSE | Problem Details:
As PD2.0 spec ("8.3.3.2.3 PE_SRC_Send_Capabilities state"), after the
Source receives the GoodCRC Message from the Sink in response to the
Source_Capabilities message, it should start the SenderResponseTimer,
after the timer times out, the state machine transitions to the
HARD_RESET state.
Fixes: f069... | ```diff
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 460dbde9fe22..57fae1118ac9 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -4821,7 +4821,7 @@ static void run_state_machine(struct tcpm_port *port)
port->caps_count = 0;
port->pd_capable = ... |
78346c34d20f571d6495aa50c735653c730b94ad | Analyze and fix the following issue in the Linux kernel code: kasan: fix typo in kasan_poison_new_object documentation | Problem Details:
Fix presumed copy-paste typo of kasan_poison_new_object documentation
referring to kasan_unpoison_new_object.
No functional changes.
Link: https://lkml.kernel.org/r/20241220181205.9663-1-dominik.karol.piatkowski@protonmail.com
Fixes: 1ce9a0523938 ("kasan: rename and document kasan_(un)poison_object_d... | ```diff
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index 6bbfc8aa42e8..56465af31044 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -153,7 +153,7 @@ static __always_inline void kasan_unpoison_new_object(struct kmem_cache *cache,
void __kasan_poison_new_object(struct kmem_cache *cach... |
41c761dede6e865c679e8be42a266a70302630d6 | Analyze and fix the following issue in the Linux kernel code: lib/inflate.c: remove dead code | Problem Details:
This is a follow up from a discussion in Xen:
The if-statement tests that `res` is non-zero; meaning the case zero is
never reached.
Link: https://lore.kernel.org/all/7587b503-b2ca-4476-8dc9-e9683d4ca5f0@suse.com/
Link: https://lkml.kernel.org/r/20241219092615.644642-2-ariel.otilibili-anieli@eurecom.... | ```diff
diff --git a/lib/inflate.c b/lib/inflate.c
index fbaf03c1748d..eab886baa1b4 100644
--- a/lib/inflate.c
+++ b/lib/inflate.c
@@ -1257,8 +1257,6 @@ static int INIT gunzip(void)
/* Decompress */
if ((res = inflate())) {
switch (res) {
- case 0:
- break;
case 1:
error("invalid c... |
052e97d9b7716a690a638da130b8d4522aabfc4f | Analyze and fix the following issue in the Linux kernel code: init: fix removal warning for deprecated initrd loading | Problem Details:
This won't be removed in 2021, no matter how hard we try.
Link: https://lkml.kernel.org/r/20241218123638.34907-1-martink@posteo.de
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Joel Granados <joel.granados@kernel.org>
Signed-off-by: Andrew Morton <akpm@lin... | ```diff
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 22c7f41ff642..f86ef92a6c46 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -89,7 +89,7 @@ static void __init handle_initrd(char *root_device_name)
extern char *envp_init[];
int error;
- pr_warn("using deprecated ini... |
876a5b25d54d2fbc67c3a80abbde097b321f7710 | Analyze and fix the following issue in the Linux kernel code: ocfs2: replace deprecated simple_strtol with kstrtol | Problem Details:
simple_strtol() ignores overflows and has an awkward interface for error
checking. Replace with the recommended kstrtol function leads to clearer
error checking and safer conversions.
Link: https://lkml.kernel.org/r/20241115080018.5372-1-danielyangkang@gmail.com
Signed-off-by: Daniel Yang <danielyang... | ```diff
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index 467127e361be..724350925aff 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -3,6 +3,7 @@
* Copyright (C) 2004, 2005 Oracle. All rights reserved.
*/
+#include "linux/kstrtox.h"
#include <linux/ke... |
a0f8a9a9636e19a11ab80db4a45fb80a230c6c5a | Analyze and fix the following issue in the Linux kernel code: ocfs2: miscellaneous spelling fixes | Problem Details:
Correct spelling here and there as suggested by codespell.
Link: https://lkml.kernel.org/r/20241115151013.1404929-1-dmantipov@yandex.ru
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilpla... | ```diff
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 395e23920632..b3fa953e5637 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -566,7 +566,7 @@ static void ocfs2_adjust_rightmost_records(handle_t *handle,
struct ocfs2_path *path,
struct ocfs2_extent_rec *insert_rec);
/*
- * Reset t... |
08de555ae59a8b062f3d84a5f5684129584dd4c6 | Analyze and fix the following issue in the Linux kernel code: ocfs2: heartbeat: replace simple_strtoul with kstrtoul | Problem Details:
simple_strtoul() is deprecated due to ignoring overflows and also requires
clunkier error checking. Replacing with kstrtoul() leads to safer code
and cleaner error checking.
Link: https://lkml.kernel.org/r/20241117215219.4012-1-danielyangkang@gmail.com
Signed-off-by: Daniel Yang <danielyangkang@gmail... | ```diff
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index 4200a0341343..a67817e0e663 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1535,10 +1535,11 @@ static int o2hb_read_block_input(struct o2hb_region *reg,
{
unsigned long bytes;
char *p = (char *)p... |
f3a6101b00ad6426488c80d4fc472aee8df93aaa | Analyze and fix the following issue in the Linux kernel code: lib/rhashtable: fix the typo for preemptible | Problem Details:
Fix the spelling of the mis-spelled word
Link: https://lkml.kernel.org/r/20241123102929.11660-1-pratyushmittal@gmail.com
Signed-off-by: Pratyush Mittal <pratyushmittal@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 6c902639728b..0682c9a8de82 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -665,7 +665,7 @@ EXPORT_SYMBOL_GPL(rhashtable_insert_slow);
* structure outside the hash table.
*
* This function may be called from any process context, including
- * ... |
93b6bd40688ba17225ba8c5f28e8ccb713359b05 | Analyze and fix the following issue in the Linux kernel code: kernel-wide: add explicity||explicitly to spelling.txt | Problem Details:
Correct the spelling dictionary so that future instances will be caught by
checkpatch, and fix the instances found.
Link: https://lkml.kernel.org/r/20241211154903.47027-1-cvam0000@gmail.com
Signed-off-by: Shivam Chaudhary <cvam0000@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christophe Leroy ... | ```diff
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 25429905ae90..86bff159c51e 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -4957,7 +4957,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,
* states are synchronized from L0 to ... |
3735c5225b97cb57745afd151904d08847b09cc7 | Analyze and fix the following issue in the Linux kernel code: checkpatch: check return of `git_commit_info` | Problem Details:
Avoid string concatenation with an undefined variable when a reference to
a missing commit is contained in a `Fixes` tag.
Given this patch:
: From: Tamir Duberstein <tamird@gmail.com>
: Subject: Test patch
: Date: Fri, 25 Oct 2024 19:30:51 -0400
:
: This is a test patch.
:
: Fixes: deadbeef111
: Sign... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index dbb9c3c6fe30..2bdc3d169af5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3237,12 +3237,12 @@ sub process {
my ($cid, $ctitle) = git_commit_info($orig_commit, $id,
$title);
- if ($ctitle ne $title || $tag_c... |
d5cf6b0d170fe57da66bc0456bfae4c6aa106860 | Analyze and fix the following issue in the Linux kernel code: tools/accounting/procacct: fix minor errors | Problem Details:
The logfile option was documented but not working. Add it and optimized
the while loop.
Link: https://lkml.kernel.org/r/20241203020550.3145-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Reviewed-by: Dr. Thomas Orgis <thomas.orgis@uni-hamburg.de>
Signed-... | ```diff
diff --git a/tools/accounting/procacct.c b/tools/accounting/procacct.c
index 90c4a37f53d9..e8dee05a6264 100644
--- a/tools/accounting/procacct.c
+++ b/tools/accounting/procacct.c
@@ -274,12 +274,11 @@ int main(int argc, char *argv[])
int maskset = 0;
char *logfile = NULL;
int cfd = 0;
- int forking = 0;
... |
658eb5ab916ddc92f294dbce8e3d449470be9f86 | Analyze and fix the following issue in the Linux kernel code: delayacct: add delay max to record delay peak | Problem Details:
Introduce the use cases of delay max, which can help quickly detect
potential abnormal delays in the system and record the types and specific
details of delay spikes.
Problem
========
Delay accounting can track the average delay of processes to show
system workload. However, when a process experiences... | ```diff
diff --git a/Documentation/accounting/delay-accounting.rst b/Documentation/accounting/delay-accounting.rst
index f61c01fc376e..8a0277428ccf 100644
--- a/Documentation/accounting/delay-accounting.rst
+++ b/Documentation/accounting/delay-accounting.rst
@@ -100,29 +100,29 @@ Get delays, since system boot, for pid ... |
1e1857230c4879ae6ec37e1dbcbf6ce6217056b5 | Analyze and fix the following issue in the Linux kernel code: kernel/resource: simplify API __devm_release_region() implementation | Problem Details:
Simplify __devm_release_region() implementation by dedicated API
devres_release() which have below advantages than current
__release_region() + devres_destroy():
It is simpler if __devm_release_region() is undoing what
__devm_request_region() did, otherwise, it can avoid wrong and undesired
__release_... | ```diff
diff --git a/kernel/resource.c b/kernel/resource.c
index b7c0e24d9398..12004452d999 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1683,8 +1683,7 @@ void __devm_release_region(struct device *dev, struct resource *parent,
{
struct region_devres match_data = { parent, start, n };
- __release_regi... |
79ada2ae66153e285b3717ee4d4a56c8e517c1fa | Analyze and fix the following issue in the Linux kernel code: xarray: extract helper from __xa_{insert,cmpxchg} | Problem Details:
Reduce code duplication by extracting a static inline function. This
function is identical to __xa_cmpxchg with the exception that it does not
coerce zero entries to null on the return path.
[tamird@gmail.com: fix __xa_erase()]
Link: https://lkml.kernel.org/r/CAJ-ks9kN_qddZ3Ne5d=cADu5POC1rHd4rQcbVS... | ```diff
diff --git a/lib/xarray.c b/lib/xarray.c
index 1b8305bffbff..5da8d18899a1 100644
--- a/lib/xarray.c
+++ b/lib/xarray.c
@@ -1491,7 +1491,7 @@ static void *xas_result(struct xa_state *xas, void *curr)
{
if (xas_error(xas))
curr = xas->xa_node;
- return xa_zero_to_null(curr);
+ return curr;
}
/**
@@ -150... |
93aa1b5c1722b697ecc4eae490fdb55c0f3cfe22 | Analyze and fix the following issue in the Linux kernel code: lib/test_min_heap: use inline min heap variants to reduce attack vector | Problem Details:
To address concerns about increasing the attack vector, remove the select
MIN_HEAP dependency from TEST_MIN_HEAP in Kconfig.debug.
Additionally, all min heap test function calls in lib/test_min_heap.c are
replaced with their inline variants. By exclusively using inline
variants, we eliminate the need... | ```diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index f3d723705879..e968f083d356 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2269,7 +2269,6 @@ config TEST_LIST_SORT
config TEST_MIN_HEAP
tristate "Min heap test"
depends on DEBUG_KERNEL || m
- select MIN_HEAP
help
Enable this to turn ... |
cbc5dde0a461240046e8a41c43d7c3b76d5db952 | Analyze and fix the following issue in the Linux kernel code: fs/proc: fix softlockup in __read_vmcore (part 2) | Problem Details:
Since commit 5cbcb62dddf5 ("fs/proc: fix softlockup in __read_vmcore") the
number of softlockups in __read_vmcore at kdump time have gone down, but
they still happen sometimes.
In a memory constrained environment like the kdump image, a softlockup is
not just a harmless message, but it can interfere w... | ```diff
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 3d8a82cee63e..658bf199d424 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -404,6 +404,8 @@ static ssize_t __read_vmcore(struct iov_iter *iter, loff_t *fpos)
if (!iov_iter_count(iter))
return acc;
}
+
+ cond_resched();
}
return ac... |
1c47c57818ad73d2d09ddbcb4839708aab5ff2e3 | Analyze and fix the following issue in the Linux kernel code: mm: fix assertion in folio_end_read() | Problem Details:
We only need to assert that the uptodate flag is clear if we're going to
set it. This hasn't been a problem before now because we have only used
folio_end_read() when completing with an error, but it's convenient to use
it in squashfs if we discover the folio is already uptodate.
Link: https://lkml.k... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index 118fa1e0bafe..4f476411a9a2 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1523,7 +1523,7 @@ void folio_end_read(struct folio *folio, bool success)
/* Must be in bottom byte for x86 to work */
BUILD_BUG_ON(PG_uptodate > 7);
VM_BUG_ON_FOLIO(!folio_test_locked... |
bd3d56ffa2c450364acf02663ba88996da37079d | Analyze and fix the following issue in the Linux kernel code: mm: vmscan : pgdemote vmstat is not getting updated when MGLRU is enabled. | Problem Details:
When MGLRU is enabled, the pgdemote_kswapd, pgdemote_direct, and
pgdemote_khugepaged stats in vmstat are not being updated.
Commit f77f0c751478 ("mm,memcg: provide per-cgroup counters for NUMA
balancing operations") moved the pgdemote vmstat update from
demote_folio_list() to shrink_inactive_list(), w... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 9a859b7d18d7..b1ec5ece067e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4642,6 +4642,9 @@ retry:
reset_batch_size(walk);
}
+ __mod_lruvec_state(lruvec, PGDEMOTE_KSWAPD + reclaimer_offset(),
+ stat.nr_demoted);
+
item = PGSTEAL_KSWAPD + reclaimer_offset... |
9fd8fcf171dcc39d2a8ecf221388820fb5fbc00e | Analyze and fix the following issue in the Linux kernel code: vmstat: disable vmstat_work on vmstat_cpu_down_prep() | Problem Details:
The upstream commit adcfb264c3ed ("vmstat: disable vmstat_work on
vmstat_cpu_down_prep()") introduced another warning during the boot phase
so was soon reverted on upstream by commit cd6313beaeae ("Revert "vmstat:
disable vmstat_work on vmstat_cpu_down_prep()""). This commit resolves it
and reattempts... | ```diff
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 4d016314a56c..16bfe1c694dd 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -2122,10 +2122,20 @@ static void __init start_shepherd_timer(void)
{
int cpu;
- for_each_possible_cpu(cpu)
+ for_each_possible_cpu(cpu) {
INIT_DEFERRABLE_WORK(per_cpu_ptr(&vmstat_work, c... |
212fe1c0df4a150fb6298db2cfff267ceaba5402 | Analyze and fix the following issue in the Linux kernel code: zram: fix potential UAF of zram table | Problem Details:
If zram_meta_alloc failed early, it frees allocated zram->table without
setting it NULL. Which will potentially cause zram_meta_free to access
the table if user reset an failed and uninitialized device.
Link: https://lkml.kernel.org/r/20250107065446.86928-1-ryncsn@gmail.com
Fixes: 74363ec674cb ("zram... | ```diff
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 45df5eeabc5e..7903a4da40ac 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1468,6 +1468,7 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize)
zram->mem_pool = zs_create_pool(zram->di... |
a32bf5bb7933fde6f39747499f8ec232b5b5400f | Analyze and fix the following issue in the Linux kernel code: selftests/mm: set allocated memory to non-zero content in cow test | Problem Details:
After commit b1f202060afe ("mm: remap unused subpages to shared zeropage
when splitting isolated thp"), cow test cases involving swapping out THPs
via madvise(MADV_PAGEOUT) started to be skipped due to the subsequent
check via pagemap determining that the memory was not actually swapped
out. Logs simi... | ```diff
diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c
index 32c6ccc2a6be..1238e1c5aae1 100644
--- a/tools/testing/selftests/mm/cow.c
+++ b/tools/testing/selftests/mm/cow.c
@@ -758,7 +758,7 @@ static void do_run_with_base_page(test_fn fn, bool swapout)
}
/* Populate a base page. ... |
0cef0bb836e3cfe00f08f9606c72abd72fe78ca3 | Analyze and fix the following issue in the Linux kernel code: mm: clear uffd-wp PTE/PMD state on mremap() | Problem Details:
When mremap()ing a memory region previously registered with userfaultfd as
write-protected but without UFFD_FEATURE_EVENT_REMAP, an inconsistency in
flag clearing leads to a mismatch between the vma flags (which have
uffd-wp cleared) and the pte/pmd flags (which do not have uffd-wp
cleared). This mism... | ```diff
diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h
index cb40f1a1d081..75342022d144 100644
--- a/include/linux/userfaultfd_k.h
+++ b/include/linux/userfaultfd_k.h
@@ -247,6 +247,13 @@ static inline bool vma_can_userfault(struct vm_area_struct *vma,
vma_is_shmem(vma);
}
+static i... |
4bcf29741145e73440323e3e9af8b1a6f4961183 | Analyze and fix the following issue in the Linux kernel code: module: fix writing of livepatch relocations in ROX text | Problem Details:
A livepatch module can contain a special relocation section
.klp.rela.<objname>.<secname> to apply its relocations at the appropriate
time and to additionally access local and unexported symbols. When
<objname> points to another module, such relocations are processed
separately from the regular module... | ```diff
diff --git a/include/linux/module.h b/include/linux/module.h
index 94acbacdcdf1..b3a643435357 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -773,7 +773,8 @@ void *__module_writable_address(struct module *mod, void *loc);
static inline void *module_writable_address(struct module *mod, vo... |
12dcb0ef540629a281533f9dedc1b6b8e14cfb65 | Analyze and fix the following issue in the Linux kernel code: mm: zswap: properly synchronize freeing resources during CPU hotunplug | Problem Details:
In zswap_compress() and zswap_decompress(), the per-CPU acomp_ctx of the
current CPU at the beginning of the operation is retrieved and used
throughout. However, since neither preemption nor migration are disabled,
it is possible that the operation continues on a different CPU.
If the original CPU is... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index f6316b66fb23..30f5a27a6862 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -251,7 +251,7 @@ static struct zswap_pool *zswap_pool_create(char *type, char *compressor)
struct zswap_pool *pool;
char name[38]; /* 'zswap' + 32 char (max) num + \0 */
gfp_t gfp = __GFP_NORE... |
4dff389c9f1dd787e8058930b3fbd3248a6238c5 | Analyze and fix the following issue in the Linux kernel code: Revert "mm: zswap: fix race between [de]compression and CPU hotunplug" | Problem Details:
This reverts commit eaebeb93922ca6ab0dd92027b73d0112701706ef.
Commit eaebeb93922c ("mm: zswap: fix race between [de]compression and CPU
hotunplug") used the CPU hotplug lock in zswap compress/decompress
operations to protect against a race with CPU hotunplug making some
per-CPU resources go away.
How... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index 5a27af8d86ea..f6316b66fb23 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -880,18 +880,6 @@ static int zswap_cpu_comp_dead(unsigned int cpu, struct hlist_node *node)
return 0;
}
-/* Prevent CPU hotplug from freeing up the per-CPU acomp_ctx resources */
-static struct... |
9ab96b524dce598c041388a599e3a227c7a7926c | Analyze and fix the following issue in the Linux kernel code: hugetlb: fix NULL pointer dereference in trace_hugetlbfs_alloc_inode | Problem Details:
hugetlb_file_setup() will pass a NULL @dir to hugetlbfs_get_inode(), so we
will access a NULL pointer for @dir. Fix it and set __entry->dr to 0 if
@dir is NULL. Because ->i_ino cannot be 0 (see get_next_ino()), there is
no confusing if user sees a 0 inode number.
Link: https://lkml.kernel.org/r/2025... | ```diff
diff --git a/include/trace/events/hugetlbfs.h b/include/trace/events/hugetlbfs.h
index 8331c904a9ba..59605dfaeeb4 100644
--- a/include/trace/events/hugetlbfs.h
+++ b/include/trace/events/hugetlbfs.h
@@ -23,7 +23,7 @@ TRACE_EVENT(hugetlbfs_alloc_inode,
TP_fast_assign(
__entry->dev = inode->i_sb->s_dev;
... |
4ce718f39776b5e162ea6b8010da7a6f02b13dc0 | Analyze and fix the following issue in the Linux kernel code: mm: fix div by zero in bdi_ratio_from_pages | Problem Details:
During testing it has been detected, that it is possible to get div by
zero error in bdi_set_min_bytes. The error is caused by the function
bdi_ratio_from_pages(). bdi_ratio_from_pages() calls global_dirty_limits.
If the dirty threshold is 0, the div by zero is raised. This can happen
if the root us... | ```diff
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index d213ead95675..d9861e42b2bd 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -692,6 +692,8 @@ static unsigned long bdi_ratio_from_pages(unsigned long pages)
unsigned long ratio;
global_dirty_limits(&background_thresh, &dirty_thresh);... |
59f59108475e8fadd5f9fc9a5d79563203df40f1 | Analyze and fix the following issue in the Linux kernel code: x86/execmem: fix ROX cache usage in Xen PV guests | Problem Details:
The recently introduced ROX cache for modules is assuming large page
support in 64-bit mode without testing the related feature bit. This
results in breakage when running as a Xen PV guest, as in this mode large
pages are not supported.
Fix that by testing the X86_FEATURE_PSE capability when deciding... | ```diff
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index c6d29f283001..62aa4d66a032 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -1080,7 +1080,8 @@ struct execmem_info __init *execmem_arch_setup(void)
start = MODULES_VADDR + offset;
- if (IS_ENABLED(CONFIG_ARCH_HAS_EXECMEM_ROX)) {
+ if (I... |
f505e6c91e7a22d10316665a86d79f84d9f0ba76 | Analyze and fix the following issue in the Linux kernel code: filemap: avoid truncating 64-bit offset to 32 bits | Problem Details:
On 32-bit kernels, folio_seek_hole_data() was inadvertently truncating a
64-bit value to 32 bits, leading to a possible infinite loop when writing
to an xfs filesystem.
Link: https://lkml.kernel.org/r/20250102190540.1356838-1-marco.nelissen@gmail.com
Fixes: 54fa39ac2e00 ("iomap: use mapping_seek_hole_... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index 33b60d448fca..118fa1e0bafe 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2996,7 +2996,7 @@ static inline loff_t folio_seek_hole_data(struct xa_state *xas,
if (ops->is_partially_uptodate(folio, offset, bsz) ==
seek_data)
break;
- start = (start + ... |
4bbb6df62c54e6a2c1fcce4908df768f0cfa1e91 | Analyze and fix the following issue in the Linux kernel code: tools: fix atomic_set() definition to set the value correctly | Problem Details:
Currently vma test is failing because of the new vma_assert_attached()
assertion. The check is failing because previous refcount_set() inside
vma_mark_attached() is a NoOp. Fix the definition of atomic_set() to
correctly set the value of the atomic.
Link: https://lkml.kernel.org/r/20241227222220.172... | ```diff
diff --git a/tools/testing/shared/linux/maple_tree.h b/tools/testing/shared/linux/maple_tree.h
index 06c89bdcc515..f67d47d32857 100644
--- a/tools/testing/shared/linux/maple_tree.h
+++ b/tools/testing/shared/linux/maple_tree.h
@@ -2,6 +2,6 @@
#define atomic_t int32_t
#define atomic_inc(x) uatomic_inc(x)
#def... |
264a88cafdbd0f4579af903145ac605d030f3f66 | Analyze and fix the following issue in the Linux kernel code: mm/mempolicy: count MPOL_WEIGHTED_INTERLEAVE to "interleave_hit" | Problem Details:
Commit fa3bea4e1f82 introduced MPOL_WEIGHTED_INTERLEAVE but it missed
adding its counter to "interleave_hit" of numastat, which is located at
/sys/devices/system/node/nodeN/ directory.
It'd be better to add weighted interleving counter info to the existing
"interleave_hit" instead of introducing a new... | ```diff
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 04f35659717a..162407fbf2bc 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2268,7 +2268,8 @@ struct page *alloc_pages_mpol_noprof(gfp_t gfp, unsigned int order,
page = __alloc_pages_noprof(gfp, order, nid, nodemask);
- if (unlikely(pol->mode == MPOL_... |
2bff77c665edd854a09c479effe75b3b0e3fedef | Analyze and fix the following issue in the Linux kernel code: scripts/decode_stacktrace.sh: fix decoding of lines with an additional info | Problem Details:
Since commit bdf8eafbf7f5 ("arm64: stacktrace: report source of unwind
data") a stack trace line can contain an additional info field that was not
present before, in the form of one or more letters in parentheses. E.g.:
[ 504.517915] led_sysfs_enable+0x54/0x80 (P)
... | ```diff
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index 46fa18b80fc1..17abc4e7a985 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -286,6 +286,18 @@ handle_line() {
last=$(( $last - 1 ))
fi
+ # Extract info after the symbol if present. E.g.:
+ # func... |
76d5d4c53e68719c018691b19a961e78524a155c | Analyze and fix the following issue in the Linux kernel code: mm/kmemleak: fix percpu memory leak detection failure | Problem Details:
kmemleak_alloc_percpu gives an incorrect min_count parameter, causing
percpu memory to be considered a gray object.
Link: https://lkml.kernel.org/r/20241227092311.3572500-1-guoweikang.kernel@gmail.com
Fixes: 8c8685928910 ("mm/kmemleak: use IS_ERR_PCPU() for pointer in the percpu address space")
Signed... | ```diff
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 737af23f4f4e..820ba3b5cbfc 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1093,7 +1093,7 @@ void __ref kmemleak_alloc_percpu(const void __percpu *ptr, size_t size,
pr_debug("%s(0x%px, %zu)\n", __func__, ptr, size);
if (kmemleak_enabled && ptr && !IS_ERR... |
352fafe97784e81a10a7c74bd508f71a19b53c2a | Analyze and fix the following issue in the Linux kernel code: firewire: test: Fix potential null dereference in firewire kunit test | Problem Details:
kunit_kzalloc() may return a NULL pointer, dereferencing it without
NULL check may lead to NULL dereference.
Add a NULL check for test_state.
Fixes: 1c8506d62624 ("firewire: test: add test of device attributes for simple AV/C device")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Link: https://l... | ```diff
diff --git a/drivers/firewire/device-attribute-test.c b/drivers/firewire/device-attribute-test.c
index 2f123c6b0a16..97478a96d1c9 100644
--- a/drivers/firewire/device-attribute-test.c
+++ b/drivers/firewire/device-attribute-test.c
@@ -99,6 +99,7 @@ static void device_attr_simple_avc(struct kunit *test)
struct... |
2a388ff22d2cbfc5cbd628ef085bdcd3b7dc64f5 | Analyze and fix the following issue in the Linux kernel code: rtc: zynqmp: Fix optional clock name property | Problem Details:
Clock description in DT binding introduced by commit f69060c14431
("dt-bindings: rtc: zynqmp: Add clock information") is talking about "rtc"
clock name but driver is checking "rtc_clk" name instead.
Because clock is optional property likely in was never handled properly by
the driver.
Fixes: 07dcc6f9c... | ```diff
diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c
index 625f708a7caf..f39102b66eac 100644
--- a/drivers/rtc/rtc-zynqmp.c
+++ b/drivers/rtc/rtc-zynqmp.c
@@ -318,8 +318,8 @@ static int xlnx_rtc_probe(struct platform_device *pdev)
return ret;
}
- /* Getting the rtc_clk info */
- xrtcdev->rtc_... |
09471d8f5b390883eaf21b917c4bf3ced1b8a1df | Analyze and fix the following issue in the Linux kernel code: rtc: loongson: clear TOY_MATCH0_REG in loongson_rtc_isr() | Problem Details:
The TOY_MATCH0_REG should be cleared to 0 in the RTC interrupt handler,
otherwise the interrupt cannot be cleared, which will cause the
loongson_rtc_isr() to be triggered multiple times.
The previous code cleared TOY_MATCH0_REG in the loongson_rtc_handler(),
which is an ACPI interrupt. This did not pr... | ```diff
diff --git a/drivers/rtc/rtc-loongson.c b/drivers/rtc/rtc-loongson.c
index 6f5f4430c2ae..97e5625c064c 100644
--- a/drivers/rtc/rtc-loongson.c
+++ b/drivers/rtc/rtc-loongson.c
@@ -114,6 +114,13 @@ static irqreturn_t loongson_rtc_isr(int irq, void *id)
struct loongson_rtc_priv *priv = (struct loongson_rtc_priv ... |
3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c | Analyze and fix the following issue in the Linux kernel code: rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read | Problem Details:
The nvmem interface supports variable buffer sizes, while the regmap
interface operates with fixed-size storage. If an nvmem client uses a
buffer size less than 4 bytes, regmap_read will write out of bounds
as it expects the buffer to point at an unsigned int.
Fix this by using an intermediary unsigne... | ```diff
diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
index fdbc07f14036..905986c61655 100644
--- a/drivers/rtc/rtc-pcf85063.c
+++ b/drivers/rtc/rtc-pcf85063.c
@@ -322,7 +322,16 @@ static const struct rtc_class_ops pcf85063_rtc_ops = {
static int pcf85063_nvmem_read(void *priv, unsigned int offs... |
09c4a610153286cef54d4f0c85398f4e32fc227e | Analyze and fix the following issue in the Linux kernel code: rtc: tps6594: Fix integer overflow on 32bit systems | Problem Details:
The problem is this multiply in tps6594_rtc_set_offset()
tmp = offset * TICKS_PER_HOUR;
The "tmp" variable is an s64 but "offset" is a long in the
(-277774)-277774 range. On 32bit systems a long can hold numbers up to
approximately two billion. The number of TICKS_PER_HOUR is really large,
(32768 ... | ```diff
diff --git a/drivers/rtc/rtc-tps6594.c b/drivers/rtc/rtc-tps6594.c
index e69667634137..7c6246e3f029 100644
--- a/drivers/rtc/rtc-tps6594.c
+++ b/drivers/rtc/rtc-tps6594.c
@@ -37,7 +37,7 @@
#define MAX_OFFSET (277774)
// Number of ticks per hour
-#define TICKS_PER_HOUR (32768 * 3600)
+#define TICKS_PER_HOUR ... |
b266e0d4dac00eecdfaf50ec3f708fd0c3b39637 | Analyze and fix the following issue in the Linux kernel code: i3c: master: Fix missing 'ret' assignment in set_speed() | Problem Details:
Fix a probe failure in the i3c master driver that occurs when no i3c
devices are connected to the bus.
The issue arises in `i3c_master_bus_init()` where the `ret` value is not
updated after calling `master->ops->set_speed()`. If no devices are
present, `ret` remains set to `I3C_ERROR_M2`, causing the ... | ```diff
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 42310c9a00c2..53ab814b676f 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1919,7 +1919,7 @@ static int i3c_master_bus_init(struct i3c_master_controller *master)
goto err_bus_cleanup;
if (master->ops->set_speed) {
- master->... |
e55905a3f33c5a87166ec5a1b1cb5cb0abc273ee | Analyze and fix the following issue in the Linux kernel code: i3c: mipi-i3c-hci: use parity8 helper instead of open coding it | Problem Details:
The kernel has now a generic helper for getting parity with easier to
understand semantics. Make use of it. Here, it also fixes a bug because
the correct algorithm is using XOR ('^=') instead of ADD ('+=').
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Jarkko Nikula <jarkko... | ```diff
diff --git a/drivers/i3c/master/mipi-i3c-hci/dat_v1.c b/drivers/i3c/master/mipi-i3c-hci/dat_v1.c
index 47b9b4d4ed3f..85c4916972e4 100644
--- a/drivers/i3c/master/mipi-i3c-hci/dat_v1.c
+++ b/drivers/i3c/master/mipi-i3c-hci/dat_v1.c
@@ -40,15 +40,6 @@
#define dat_w0_write(i, v) writel(v, hci->DAT_regs + (i) * 8)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.