id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
e98337d11bbdfa3e3f0fb99aa93e40f97549e0cd | Analyze and fix the following issue in the Linux kernel code: mm/contig_alloc: support __GFP_COMP | Problem Details:
Patch series "mm/hugetlb: alloc/free gigantic folios", v2.
Use __GFP_COMP for gigantic folios can greatly reduce not only the amount
of code but also the allocation and free time.
Approximate LOC to mm/hugetlb.c: +60, -240
Allocate and free 500 1GB hugeTLB memory without HVO by:
time echo 500 >/sy... | ```diff
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index f53f76e0b17e..03ba9563c6db 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -446,4 +446,27 @@ extern struct page *alloc_contig_pages_noprof(unsigned long nr_pages, gfp_t gfp_
#endif
void free_contig_range(unsigned long pfn, unsigned lon... |
78788c3ede90727ffb7b17287468a08b4e78ee3d | Analyze and fix the following issue in the Linux kernel code: kasan: simplify and clarify Makefile | Problem Details:
When KASAN support was being added to the Linux kernel, GCC did not yet
support all of the KASAN-related compiler options. Thus, the KASAN
Makefile had to probe the compiler for supported options.
Nowadays, the Linux kernel GCC version requirement is 5.1+, and thus we
don't need the probing of the -f... | ```diff
diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
index 390658a2d5b7..aab4154af00a 100644
--- a/scripts/Makefile.kasan
+++ b/scripts/Makefile.kasan
@@ -22,30 +22,31 @@ endif
ifdef CONFIG_KASAN_GENERIC
ifdef CONFIG_KASAN_INLINE
+ # When the number of memory accesses in a function is less than this... |
12885cbe88ddf6c5fc3306193a6449ac310f2331 | Analyze and fix the following issue in the Linux kernel code: mm: shmem: split large entry if the swapin folio is not large | Problem Details:
Now the swap device can only swap-in order 0 folio, even though a large
folio is swapped out. This requires us to split the large entry
previously saved in the shmem pagecache to support the swap in of small
folios.
[hughd@google.com: fix warnings from kmalloc_fix_flags()]
Link: https://lkml.kernel... | ```diff
diff --git a/mm/shmem.c b/mm/shmem.c
index 598d003b7a89..4af6f3ea9c4f 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1999,6 +1999,84 @@ static void shmem_set_folio_swapin_error(struct inode *inode, pgoff_t index,
swap_free_nr(swap, nr_pages);
}
+static int shmem_split_large_entry(struct inode *inode, pgoff_t... |
736f0e03564729a5ba609c2c4fcb37ff1e92ede4 | Analyze and fix the following issue in the Linux kernel code: mm: shmem: support large folio allocation for shmem_replace_folio() | Problem Details:
To support large folio swapin for shmem in the following patches, add
large folio allocation for the new replacement folio in
shmem_replace_folio(). Moreover large folios occupy N consecutive entries
in the swap cache instead of using multi-index entries like the page
cache, therefore we should replac... | ```diff
diff --git a/mm/shmem.c b/mm/shmem.c
index f6bab42180ea..e63393ced001 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -155,7 +155,7 @@ static unsigned long shmem_default_max_inodes(void)
static int shmem_swapin_folio(struct inode *inode, pgoff_t index,
struct folio **foliop, enum sgp_type sgp, gfp_t gfp,
- ... |
1b5695b02444660297cc54cab44f123ff28de2cc | Analyze and fix the following issue in the Linux kernel code: mm: make range-to-target_node lookup facility a part of numa_memblks | Problem Details:
The x86 implementation of range-to-target_node lookup (i.e.
phys_to_target_node() and memory_add_physaddr_to_nid()) relies on
numa_memblks.
Since numa_memblks are now part of the generic code, move these functions
from x86 to mm/numa_memblks.c and select CONFIG_NUMA_KEEP_MEMINFO when
CONFIG_NUMA_MEMB... | ```diff
diff --git a/arch/x86/include/asm/sparsemem.h b/arch/x86/include/asm/sparsemem.h
index 64df897c0ee3..3918c7a434f5 100644
--- a/arch/x86/include/asm/sparsemem.h
+++ b/arch/x86/include/asm/sparsemem.h
@@ -31,13 +31,4 @@
#endif /* CONFIG_SPARSEMEM */
-#ifndef __ASSEMBLY__
-#ifdef CONFIG_NUMA_KEEP_MEMINFO
-ext... |
767507654c22578ea0b51d181211b2e7714ea7cd | Analyze and fix the following issue in the Linux kernel code: arch_numa: switch over to numa_memblks | Problem Details:
Until now arch_numa was directly translating firmware NUMA information
to memblock.
Using numa_memblks as an intermediate step has a few advantages:
* alignment with more battle tested x86 implementation
* availability of NUMA emulation
* maintaining node information for not yet populated memory
Adju... | ```diff
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 2b8fd6bb7da0..064eb52ff7e2 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -226,6 +226,7 @@ config GENERIC_ARCH_TOPOLOGY
config GENERIC_ARCH_NUMA
bool
+ select NUMA_MEMBLKS
help
Enable support for generic NUMA implementati... |
3ac9999c5d6f73f17e55ea360934def7f59b2890 | Analyze and fix the following issue in the Linux kernel code: MIPS: loongson64: drop HAVE_ARCH_NODEDATA_EXTENSION | Problem Details:
Commit f8f9f21c7848 ("MIPS: Fix build error for loongson64 and sgi-ip27")
added HAVE_ARCH_NODEDATA_EXTENSION to loongson64 to silence a compilation
error that happened because loongson64 didn't define array of pg_data_t as
node_data like most other architectures did.
After rename of __node_data to nod... | ```diff
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index ea5f3c3c31f6..43da6d596e2b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -502,7 +502,6 @@ config MACH_LOONGSON64
select USE_OF
select BUILTIN_DTB
select PCI_HOST_GENERIC
- select HAVE_ARCH_NODEDATA_EXTENSION if NUMA
help
This enabl... |
6c701269ab7fe72dc8948dc92ba48fcdb93df8c9 | Analyze and fix the following issue in the Linux kernel code: MIPS: sgi-ip27: drop HAVE_ARCH_NODEDATA_EXTENSION | Problem Details:
Commit f8f9f21c7848 ("MIPS: Fix build error for loongson64 and sgi-ip27")
added HAVE_ARCH_NODEDATA_EXTENSION to sgi-ip27 to silence a compilation
error that happened because sgi-ip27 didn't define array of pg_data_t as
node_data like most other architectures did.
After addition of node_data array that... | ```diff
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 60077e576935..ea5f3c3c31f6 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -735,7 +735,6 @@ config SGI_IP27
select WAR_R10000_LLSC
select MIPS_L1_CACHE_SHIFT_7
select NUMA
- select HAVE_ARCH_NODEDATA_EXTENSION
help
This are the SGI O... |
2cacbdfdee65b18f9952620e762eab043d71b564 | Analyze and fix the following issue in the Linux kernel code: mm: swap: add a adaptive full cluster cache reclaim | Problem Details:
Link all full cluster with one full list, and reclaim from it when the
allocation have ran out of all usable clusters.
There are many reason a folio can end up being in the swap cache while
having no swap count reference. So the best way to search for such slots
is still by iterating the swap cluster... | ```diff
diff --git a/include/linux/swap.h b/include/linux/swap.h
index e372122e4f45..1c8f844a9f0f 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -260,6 +260,7 @@ struct swap_cluster_info {
#define CLUSTER_FLAG_FREE 1 /* This cluster is free */
#define CLUSTER_FLAG_NONFULL 2 /* This cluster is on nonf... |
5f843a9a3a1e865fbf349419bde39977c2e7d3d1 | Analyze and fix the following issue in the Linux kernel code: mm: swap: separate SSD allocation from scan_swap_map_slots() | Problem Details:
Previously the SSD and HDD share the same swap_map scan loop in
scan_swap_map_slots(). This function is complex and hard to flow the
execution flow.
scan_swap_map_try_ssd_cluster() can already do most of the heavy lifting
to locate the candidate swap range in the cluster. However it needs to go
back... | ```diff
diff --git a/mm/swapfile.c b/mm/swapfile.c
index b98df62c6c43..f37029997dbf 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -53,6 +53,8 @@
static bool swap_count_continued(struct swap_info_struct *, pgoff_t,
unsigned char);
static void free_swap_count_continuations(struct swap_info_struct *);
+static ... |
73ed0baae66df50359c876f65f41179d6ebd2716 | Analyze and fix the following issue in the Linux kernel code: mm: swap: swap cluster switch to double link list | Problem Details:
Patch series "mm: swap: mTHP swap allocator base on swap cluster order",
v5.
This is the short term solutions "swap cluster order" listed in my "Swap
Abstraction" discussion slice 8 in the recent LSF/MM conference.
When commit 845982eb264bc "mm: swap: allow storage of all mTHP orders" is
introduced, ... | ```diff
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 5b920fa2315b..ead568f04f81 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -243,22 +243,20 @@ enum {
* free clusters are organized into a list. We fetch an entry from the list to
* get a free cluster.
*
- * The data field store... |
ff2beee206d23f49d022650122f81285849033e4 | Analyze and fix the following issue in the Linux kernel code: ext4: convert EXT4_B2C(sbi->s_stripe) users to EXT4_NUM_B2C | Problem Details:
Although we have checks to make sure s_stripe is a multiple of cluster
size, in case we accidentally end up with a scenario where this is not
the case, use EXT4_NUM_B2C() so that we don't end up with unexpected
cases where EXT4_B2C(stripe) becomes 0.
Also make the is_stripe_aligned check in regular_al... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index bf9ba7effbd5..d73e38323879 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2356,7 +2356,7 @@ int ext4_mb_find_by_goal(struct ext4_allocation_context *ac,
ex.fe_logical = 0xDEADFA11; /* debug value */
if (max >= ac->ac_g_ex.fe_len &&
- ... |
ee85e0938aa8f9846d21e4d302c3cf6a2a75110d | Analyze and fix the following issue in the Linux kernel code: ext4: check stripe size compatibility on remount as well | Problem Details:
We disable stripe size in __ext4_fill_super if it is not a multiple of
the cluster ratio however this check is missed when trying to remount.
This can leave us with cases where stripe < cluster_ratio after
remount:set making EXT4_B2C(sbi->s_stripe) become 0 that can cause some
unforeseen bugs like divi... | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index adc5046fe9dd..16a4ce704460 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5178,6 +5178,18 @@ static int ext4_block_group_meta_init(struct super_block *sb, int silent)
return 0;
}
+/*
+ * It's hard to get stripe aligned blocks if stripe is not ali... |
cc749e61c011c255d81b192a822db650c68b313f | Analyze and fix the following issue in the Linux kernel code: ext4: fix i_data_sem unlock order in ext4_ind_migrate() | Problem Details:
Fuzzing reports a possible deadlock in jbd2_log_wait_commit.
This issue is triggered when an EXT4_IOC_MIGRATE ioctl is set to require
synchronous updates because the file descriptor is opened with O_SYNC.
This can lead to the jbd2_journal_stop() function calling
jbd2_might_wait_for_commit(), potential... | ```diff
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index 0f68b8a14560..1b0dfd963d3f 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -664,8 +664,8 @@ int ext4_ind_migrate(struct inode *inode)
if (unlikely(ret2 && !ret))
ret = ret2;
errout:
- ext4_journal_stop(handle);
up_write(&EXT4_I(inode)->i... |
183aa1d3baea18b199505455a0247b13de826e2f | Analyze and fix the following issue in the Linux kernel code: ext4: remove the special buffer dirty handling in do_journal_get_write_access | Problem Details:
This kinda revert the commit 56d35a4cd13e("ext4: Fix dirtying of
journalled buffers in data=journal mode") made by Jan 14 years ago,
since the do_get_write_access() itself can deal with the extra
unexpected buf dirting things in a proper way now.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sh... | ```diff
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index a11e2626b5f6..7475deef9793 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1005,27 +1005,11 @@ static int ext4_dirty_journalled_data(handle_t *handle, struct buffer_head *bh)
int do_journal_get_write_access(handle_t *handle, struct inode *inode,
... |
cb3de5fc876ee9ef2b830c9e6cdafac5c90903ef | Analyze and fix the following issue in the Linux kernel code: ext4: fix a potential assertion failure due to improperly dirtied buffer | Problem Details:
On an old kernel version(4.19, ext3, data=journal, pagesize=64k),
an assertion failure will occasionally be triggered by the line below:
-----------
jbd2_journal_commit_transaction
{
...
J_ASSERT_BH(bh, !buffer_dirty(bh));
/*
* The buffer on BJ_Forget list and not jbddirty means
...
}
-----------
The ... | ```diff
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 8bd08637fe14..8cc15d00e5c8 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -3853,7 +3853,8 @@ static inline int ext4_buffer_uptodate(struct buffer_head *bh)
return buffer_uptodate(bh);
}
-extern int ext4_block_write_begin(struct folio *folio, loff_t po... |
59efe53e380ee305ec11378233adb6aaebe1856c | Analyze and fix the following issue in the Linux kernel code: ext4: dax: keep orphan list before truncate overflow allocated blocks | Problem Details:
Any extending write for ext4 requires the inode to be placed on the
orphan list before the actual write. In addition, the inode can be
actually removed from the orphan list only after all writes are
completed. Otherwise we'd leave allocated blocks beyond i_disksize if we
could not copy all the data int... | ```diff
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index be061bb64067..f14aed14b9cf 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -306,7 +306,7 @@ out:
}
static ssize_t ext4_handle_inode_extension(struct inode *inode, loff_t offset,
- ssize_t count)
+ ssize_t written, ssize_t count)
{
handl... |
a2187431c395cdfbf144e3536f25468c64fc7cfa | Analyze and fix the following issue in the Linux kernel code: ext4: fix error message when rejecting the default hash | Problem Details:
Commit 985b67cd8639 ("ext4: filesystems without casefold feature cannot
be mounted with siphash") properly rejects volumes where
s_def_hash_version is set to DX_HASH_SIPHASH, but the check and the
error message should not look into casefold setup - a filesystem should
never have DX_HASH_SIPHASH as the ... | ```diff
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 481ece3660eb..7ac668d4ce83 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2462,6 +2462,7 @@ static inline __le16 ext4_rec_len_to_disk(unsigned len, unsigned blocksize)
#define DX_HASH_HALF_MD4_UNSIGNED 4
#define DX_HASH_TEA_UNSIGNED 5
#define DX_HASH_... |
369c944ed1d7c3fb7b35f24e4735761153afe7b3 | Analyze and fix the following issue in the Linux kernel code: ext4: propagate errors from ext4_find_extent() in ext4_insert_range() | Problem Details:
Even though ext4_find_extent() returns an error, ext4_insert_range() still
returns 0. This may confuse the user as to why fallocate returns success,
but the contents of the file are not as expected. So propagate the error
returned by ext4_find_extent() to avoid inconsistencies.
Fixes: 331573febb6a ("e... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 94068f1a0d85..e2f89ca3e138 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -5541,6 +5541,7 @@ static int ext4_insert_range(struct file *file, loff_t offset, loff_t len)
path = ext4_find_extent(inode, offset_lblk, NULL, 0);
if (IS_ERR(path)) ... |
dcaa6c31134c0f515600111c38ed7750003e1b9c | Analyze and fix the following issue in the Linux kernel code: ext4: fix double brelse() the buffer of the extents path | Problem Details:
In ext4_ext_try_to_merge_up(), set path[1].p_bh to NULL after it has been
released, otherwise it may be released twice. An example of what triggers
this is as follows:
split2 map split1
|--------|-------|--------|
ext4_ext_map_blocks
ext4_ext_handle_unwritten_extents
ext4_split_convert_ext... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index b8dd2fdd90d9..7536ab837c3f 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1890,6 +1890,7 @@ static void ext4_ext_try_to_merge_up(handle_t *handle,
path[0].p_hdr->eh_max = cpu_to_le16(max_root);
brelse(path[1].p_bh);
+ path[1].p_bh = NULL... |
5c0f4cc84d3a601c99bc5e6e6eb1cbda542cce95 | Analyze and fix the following issue in the Linux kernel code: ext4: drop ppath from ext4_ext_replay_update_ex() to avoid double-free | Problem Details:
When calling ext4_force_split_extent_at() in ext4_ext_replay_update_ex(),
the 'ppath' is updated but it is the 'path' that is freed, thus potentially
triggering a double-free in the following process:
ext4_ext_replay_update_ex
ppath = path
ext4_force_split_extent_at(&ppath)
ext4_split_extent_a... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index b431fcfb6ef8..b8dd2fdd90d9 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -5885,7 +5885,7 @@ out:
int ext4_ext_replay_update_ex(struct inode *inode, ext4_lblk_t start,
int len, int unwritten, ext4_fsblk_t pblk)
{
- struct ext4_ext_p... |
a164f3a432aae62ca23d03e6d926b122ee5b860d | Analyze and fix the following issue in the Linux kernel code: ext4: aovid use-after-free in ext4_ext_insert_extent() | Problem Details:
As Ojaswin mentioned in Link, in ext4_ext_insert_extent(), if the path is
reallocated in ext4_ext_create_new_leaf(), we'll use the stale path and
cause UAF. Below is a sample trace with dummy values:
ext4_ext_insert_extent
path = *ppath = 2000
ext4_ext_create_new_leaf(ppath)
ext4_find_extent(p... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index c8e7676f6af9..b431fcfb6ef8 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2116,6 +2116,7 @@ prepend:
ppath, newext);
if (err)
goto cleanup;
+ path = *ppath;
depth = ext_depth(inode);
eh = path[depth].p_hdr;
``` |
5b4b2dcace35f618fe361a87bae6f0d13af31bc1 | Analyze and fix the following issue in the Linux kernel code: ext4: update orig_path in ext4_find_extent() | Problem Details:
In ext4_find_extent(), if the path is not big enough, we free it and set
*orig_path to NULL. But after reallocating and successfully initializing
the path, we don't update *orig_path, in which case the caller gets a
valid path but a NULL ppath, and this may cause a NULL pointer dereference
or a path me... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index caef91356557..c8e7676f6af9 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -957,6 +957,8 @@ ext4_find_extent(struct inode *inode, ext4_lblk_t block,
ext4_ext_show_path(inode, path);
+ if (orig_path)
+ *orig_path = path;
return path;
... |
4e2524ba2ca5f54bdbb9e5153bea00421ef653f5 | Analyze and fix the following issue in the Linux kernel code: ext4: avoid use-after-free in ext4_ext_show_leaf() | Problem Details:
In ext4_find_extent(), path may be freed by error or be reallocated, so
using a previously saved *ppath may have been freed and thus may trigger
use-after-free, as follows:
ext4_split_extent
path = *ppath;
ext4_split_extent_at(ppath)
path = ext4_find_extent(ppath)
ext4_split_extent_at(ppath)
... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index fe6bca63f9d6..caef91356557 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3327,7 +3327,7 @@ out:
}
/*
- * ext4_split_extents() splits an extent and mark extent which is covered
+ * ext4_split_extent() splits an extent and mark extent which... |
c26ab35702f8cd0cdc78f96aa5856bfb77be798f | Analyze and fix the following issue in the Linux kernel code: ext4: fix slab-use-after-free in ext4_split_extent_at() | Problem Details:
We hit the following use-after-free:
==================================================================
BUG: KASAN: slab-use-after-free in ext4_split_extent_at+0xba8/0xcc0
Read of size 2 at addr ffff88810548ed08 by task kworker/u20:0/40
CPU: 0 PID: 40 Comm: kworker/u20:0 Not tainted 6.9.0-dirty #724
C... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 4395e2b668ec..fe6bca63f9d6 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3251,6 +3251,25 @@ static int ext4_split_extent_at(handle_t *handle,
if (err != -ENOSPC && err != -EDQUOT && err != -ENOMEM)
goto out;
+ /*
+ * Update path is re... |
c6b72f5d82b1017bad80f9ebf502832fc321d796 | Analyze and fix the following issue in the Linux kernel code: ext4: avoid OOB when system.data xattr changes underneath the filesystem | Problem Details:
When looking up for an entry in an inlined directory, if e_value_offs is
changed underneath the filesystem by some change in the block device, it
will lead to an out-of-bounds access that KASAN detects as an UAF.
EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without jour... | ```diff
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 7b98b1bf1dc9..44a5f6df59ec 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1664,25 +1664,36 @@ struct buffer_head *ext4_find_inline_entry(struct inode *dir,
struct ext4_dir_entry_2 **res_dir,
int *has_inline_data)
{
+ struct ext4_xattr... |
bb0a12c3439b10d88412fd3102df5b9a6e3cd6dc | Analyze and fix the following issue in the Linux kernel code: ext4: avoid negative min_clusters in find_group_orlov() | Problem Details:
min_clusters is signed integer and will be converted to unsigned
integer when compared with unsigned number stats.free_clusters.
If min_clusters is negative, it will be converted to a huge unsigned
value in which case all groups may not meet the actual desired free
clusters.
Set negative min_clusters t... | ```diff
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 9e2c08a8665f..81641be38c0e 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -514,6 +514,8 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent,
if (min_inodes < 1)
min_inodes = 1;
min_clusters = avefreec - EXT4_CLUSTERS_... |
227d31b9214d1b9513383cf6c7180628d4b3b61f | Analyze and fix the following issue in the Linux kernel code: ext4: avoid potential buffer_head leak in __ext4_new_inode() | Problem Details:
If a group is marked EXT4_GROUP_INFO_IBITMAP_CORRUPT after it's inode
bitmap buffer_head was successfully verified, then __ext4_new_inode()
will get a valid inode_bitmap_bh of a corrupted group from
ext4_read_inode_bitmap() in which case inode_bitmap_bh misses a release.
Hnadle "IS_ERR(inode_bitmap_bh)... | ```diff
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index ad7f13976dc6..9e2c08a8665f 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -1054,12 +1054,13 @@ got_group:
brelse(inode_bitmap_bh);
inode_bitmap_bh = ext4_read_inode_bitmap(sb, group);
/* Skip groups with suspicious inode tables */
- if ((... |
5e5b2a56c57def1b41efd49596621504d7bcc61c | Analyze and fix the following issue in the Linux kernel code: ext4: avoid buffer_head leak in ext4_mark_inode_used() | Problem Details:
Release inode_bitmap_bh from ext4_read_inode_bitmap() in
ext4_mark_inode_used() to avoid buffer_head leak.
By the way, remove unneeded goto for invalid ino when inode_bitmap_bh
is NULL.
Fixes: 8016e29f4362 ("ext4: fast commit recovery path")
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Link: ... | ```diff
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 9dfd768ed9f8..ad7f13976dc6 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -755,10 +755,10 @@ int ext4_mark_inode_used(struct super_block *sb, int ino)
struct ext4_group_desc *gdp;
ext4_group_t group;
int bit;
- int err = -EFSCORRUPTED;
+ int ... |
d19a9e25a722d629041ac8fd320a86c016e349d1 | Analyze and fix the following issue in the Linux kernel code: selinux: fix style problems in security/selinux/include/audit.h | Problem Details:
Remove the needless indent in the function comment header blocks.
Signed-off-by: Paul Moore <paul@paul-moore.com> | ```diff
diff --git a/security/selinux/include/audit.h b/security/selinux/include/audit.h
index 29c7d4c86f6d..168d17be7df3 100644
--- a/security/selinux/include/audit.h
+++ b/security/selinux/include/audit.h
@@ -16,45 +16,45 @@
#include <linux/types.h>
/**
- * selinux_audit_rule_init - alloc/init an selinux audit ru... |
9748229c90dc4974f56874a2a19e040cc86de67e | Analyze and fix the following issue in the Linux kernel code: net: alacritech: Partially revert "net: alacritech: Switch to use dev_err_probe()" | Problem Details:
This reverts commit bf4d87f884fe8a4b6b61fe4d0e05f293d08df61c because it
introduced dev_err_probe() in non-probe path, which is not desired.
In general, calling dev_err_probe() after successful probe in case of
handling -EPROBE_DEFER error, will set deferred status on the device
already probed. This i... | ```diff
diff --git a/drivers/net/ethernet/alacritech/slicoss.c b/drivers/net/ethernet/alacritech/slicoss.c
index 7f0c07c20be3..f62851708d4f 100644
--- a/drivers/net/ethernet/alacritech/slicoss.c
+++ b/drivers/net/ethernet/alacritech/slicoss.c
@@ -1051,9 +1051,11 @@ static int slic_load_rcvseq_firmware(struct slic_devic... |
1bd1788b6cabfe86fe1ced5a6324831f6a3081a1 | Analyze and fix the following issue in the Linux kernel code: mptcp: MIB counters for sent MP_JOIN | Problem Details:
Recently, a few issues have been discovered around the creation of
additional subflows. Without these counters, it was difficult to point
out the reason why some subflows were not created as expected.
These counters should have been added earlier, because there is no other
simple ways to extract such ... | ```diff
diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c
index 7884217f33eb..ec0d461cb921 100644
--- a/net/mptcp/mib.c
+++ b/net/mptcp/mib.c
@@ -25,6 +25,10 @@ static const struct snmp_mib mptcp_snmp_list[] = {
SNMP_MIB_ITEM("MPJoinSynAckHMacFailure", MPTCP_MIB_JOINSYNACKMAC),
SNMP_MIB_ITEM("MPJoinAckRx", MPTCP_MIB_J... |
8f62819aaace77dd85037ae766eb767f8c4417ce | Analyze and fix the following issue in the Linux kernel code: PCI/pwrctl: Rescan bus on a separate thread | Problem Details:
If we trigger the bus rescan from sysfs, we'll try to lock the PCI rescan
mutex recursively and deadlock - the platform device will be populated and
probed on the same thread that handles the sysfs write.
Add a workqueue to the pwrctl code on which we schedule the rescan for
controlled PCI devices. Wh... | ```diff
diff --git a/drivers/pci/pwrctl/core.c b/drivers/pci/pwrctl/core.c
index feca26ad2f6a..01d913b60316 100644
--- a/drivers/pci/pwrctl/core.c
+++ b/drivers/pci/pwrctl/core.c
@@ -48,6 +48,28 @@ static int pci_pwrctl_notify(struct notifier_block *nb, unsigned long action,
return NOTIFY_DONE;
}
+static void resc... |
f1536585588ba630c533b6ffbca8ad8424aa5c39 | Analyze and fix the following issue in the Linux kernel code: PCI: Don't rely on of_platform_depopulate() for reused OF-nodes | Problem Details:
of_platform_depopulate() doesn't play nicely with reused OF nodes - it
ignores the ones that are not marked explicitly as populated and it may
happen that the PCI device goes away before the platform device in which
case the PCI core clears the OF_POPULATED bit.
Unconditionally unregister the platform... | ```diff
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index 910387e5bdbf..4770cb87e3f0 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -1,7 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/pci.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/of_platform.h>
+... |
43247abd092e634a4ca5bcd25eeae3b42f703b58 | Analyze and fix the following issue in the Linux kernel code: EDAC/sb_edac: Fix the compile warning of large frame size | Problem Details:
Compiling sb_edac driver with GCC 11.4.0 and the W=1 option reported
the following warning:
drivers/edac/sb_edac.c: In function ‘sbridge_mce_output_error’:
drivers/edac/sb_edac.c:3249:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
As there is no concurre... | ```diff
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index e5c05a876947..d5f12219598a 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -29,6 +29,8 @@
/* Static vars */
static LIST_HEAD(sbridge_edac_list);
+static char sb_msg[256];
+static char sb_msg_full[512];
/*
* Alter thi... |
a790df272a20dcc88ffebe20eca34c54f528fcaa | Analyze and fix the following issue in the Linux kernel code: Input: synaptics-rmi4 - fix crash when DPM query is not supported | Problem Details:
Stop clobbering "item" variable when checking if the device supports
querying DPM values because its original value is still needed in
case when we need to fall back to the old way of figuring sensor size.
Reported-by: Richard Acayan <mailingradian@gmail.com>
Tested-by: Richard Acayan <mailingradian@g... | ```diff
diff --git a/drivers/input/rmi4/rmi_f12.c b/drivers/input/rmi4/rmi_f12.c
index fc2cc8e2b0ba..8246fe77114b 100644
--- a/drivers/input/rmi4/rmi_f12.c
+++ b/drivers/input/rmi4/rmi_f12.c
@@ -129,9 +129,8 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
* Use the Query DPM feature when the resolutio... |
75098176d17fab88c06120b453b4b0d1641e2a41 | Analyze and fix the following issue in the Linux kernel code: power: supply: axp20x_usb_power: Add support for AXP717 | Problem Details:
Add support for the AXP717 PMIC. The AXP717 PMIC allows for detection
of USB type like the AXP813, but has little in common otherwise with
the other AXP PMICs. The USB charger is able to provide between
100000uA and 3250000uA of power, and can measure the VBUS input in mV
with up to 14 bits of precisio... | ```diff
diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c
index 9f6fb448e353..2766352ab737 100644
--- a/drivers/power/supply/axp20x_usb_power.c
+++ b/drivers/power/supply/axp20x_usb_power.c
@@ -30,8 +30,13 @@
#define AXP20X_PWR_STATUS_VBUS_PRESENT BIT(5)
#define AXP20X_PWR... |
57dfd4455bd270d1efebf950c2f722977b09c57a | Analyze and fix the following issue in the Linux kernel code: power: supply: axp20x_usb_power: Fix spelling mistake "reqested" -> "requested" | Problem Details:
There is a spelling mistake in a dev_warn message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20240828093447.271503-1-colin.i.king@gmail.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> | ```diff
diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c
index 7b1bf6766ff7..9f6fb448e353 100644
--- a/drivers/power/supply/axp20x_usb_power.c
+++ b/drivers/power/supply/axp20x_usb_power.c
@@ -326,7 +326,7 @@ static int axp20x_usb_power_set_input_current_limit(struct axp20x... |
7cb9b5fa218caa899f4288865c4598357bcce4e9 | Analyze and fix the following issue in the Linux kernel code: PCI: endpoint: Fix enum pci_epc_bar_type kerneldoc | Problem Details:
e01c9797c0eb ("PCI: endpoint: Clean up hardware description for BARs")
added enum pci_epc_bar_type with incomplete kerneldoc. Add the missing
piece.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> | ```diff
diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h
index 85bdf2adb760..697cc190747d 100644
--- a/include/linux/pci-epc.h
+++ b/include/linux/pci-epc.h
@@ -149,6 +149,7 @@ struct pci_epc {
};
/**
+ * enum pci_epc_bar_type - configurability of endpoint BAR
* @BAR_PROGRAMMABLE: The BAR mask can b... |
97688a9c5b1fd2b826c682cdfa36d411a5c99828 | Analyze and fix the following issue in the Linux kernel code: ASoC: loongson: fix error release | Problem Details:
In function loongson_card_parse_of(), when get device_node
'codec' failed, the function of_node_put(codec) should not
be invoked, thus fix error release.
Fixes: d24028606e76 ("ASoC: loongson: Add Loongson ASoC Sound Card Support")
Signed-off-by: tangbin <tangbin@cmss.chinamobile.com>
Link: https://pat... | ```diff
diff --git a/sound/soc/loongson/loongson_card.c b/sound/soc/loongson/loongson_card.c
index fae5e9312bf0..2c8dbdba27c5 100644
--- a/sound/soc/loongson/loongson_card.c
+++ b/sound/soc/loongson/loongson_card.c
@@ -127,8 +127,8 @@ static int loongson_card_parse_of(struct loongson_card_data *data)
codec = of_get_c... |
fcca6d05ef49d5650514ea1dcfd12e4ae3ff2be6 | Analyze and fix the following issue in the Linux kernel code: ASoC: rt5682: Return devm_of_clk_add_hw_provider to transfer the error | Problem Details:
Return devm_of_clk_add_hw_provider() in order to transfer the error, if it
fails due to resource allocation failure or device tree clock provider
registration failure.
Cc: stable@vger.kernel.org
Fixes: ebbfabc16d23 ("ASoC: rt5682: Add CCF usage for providing I2S clks")
Signed-off-by: Ma Ke <make24@isc... | ```diff
diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index e3aca9c785a0..aa163ec40862 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -2903,8 +2903,10 @@ int rt5682_register_dai_clks(struct rt5682_priv *rt5682)
}
if (dev->of_node) {
- devm_of_clk_add_hw_provider... |
71c03a8cb213d267853e0d9f520c972480960544 | Analyze and fix the following issue in the Linux kernel code: clk: qcom: gcc-sc8280xp: don't use parking clk_ops for QUPs | Problem Details:
A recent change started parking the RCG at an always on parent during
registration, something which specifically breaks handover from an early
serial console.
Quoting Stephen Boyd who fixed this issue for SM8550 [1]:
The QUPs aren't shared in a way that requires parking the RCG at
an always on pare... | ```diff
diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c
index 5f11760cf73f..f27d0003f427 100644
--- a/drivers/clk/qcom/gcc-sc8280xp.c
+++ b/drivers/clk/qcom/gcc-sc8280xp.c
@@ -1500,7 +1500,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s0_clk_src_init = {
.parent_data = gcc_parent_dat... |
beef8fb2af95ae8aa77f05a2663710d260741ddd | Analyze and fix the following issue in the Linux kernel code: perf pmu: Merge boolean sysfs event option parsing | Problem Details:
Merge perf_pmu__parse_per_pkg() and perf_pmu__parse_snapshot() that do the
same parsing except for the file suffix used.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ananth Narayan <ananth.nar... | ```diff
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 0b38c51bd6eb..ef8ab918eaeb 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -367,8 +367,8 @@ error:
return -1;
}
-static int
-perf_pmu__parse_per_pkg(struct perf_pmu *pmu, struct perf_pmu_alias *alias)
+static bool perf_pmu__... |
8b935823530d6fd0bea0e90a747f3ebd8cfefb0d | Analyze and fix the following issue in the Linux kernel code: EDAC/{skx_common,skx,i10nm}: Move the common debug code to skx_common | Problem Details:
Commit
afdb82fd763c ("EDAC, i10nm: make skx_common.o a separate module")
made skx_common.o a separate module. With skx_common.o now a separate
module, move the common debug code setup_{skx,i10nm}_debug() and
teardown_{skx,i10nm}_debug() in {skx,i10nm}_base.c to skx_common.c to
reduce code duplicati... | ```diff
diff --git a/drivers/edac/i10nm_base.c b/drivers/edac/i10nm_base.c
index 24dd896d9a9d..c5b99d575cc7 100644
--- a/drivers/edac/i10nm_base.c
+++ b/drivers/edac/i10nm_base.c
@@ -1013,54 +1013,6 @@ static struct notifier_block i10nm_mce_dec = {
.priority = MCE_PRIO_EDAC,
};
-#ifdef CONFIG_EDAC_DEBUG
-/*
- * De... |
0ad875f442e95d69a1145a38aabac2fd29984fe3 | Analyze and fix the following issue in the Linux kernel code: EDAC/igen6: Fix conversion of system address to physical memory address | Problem Details:
The conversion of system address to physical memory address (as viewed by
the memory controller) by igen6_edac is incorrect when the system address
is above the TOM (Total amount Of populated physical Memory) for Elkhart
Lake and Ice Lake (Neural Network Processor). Fix this conversion.
Fixes: 10590a9... | ```diff
diff --git a/drivers/edac/igen6_edac.c b/drivers/edac/igen6_edac.c
index 0fe75eed8973..189a2fc29e74 100644
--- a/drivers/edac/igen6_edac.c
+++ b/drivers/edac/igen6_edac.c
@@ -316,7 +316,7 @@ static u64 ehl_err_addr_to_imc_addr(u64 eaddr, int mc)
if (igen6_tom <= _4GB)
return eaddr + igen6_tolud - _4GB;
-... |
33f339a1ba54e56bba57ee9a77c71e385ab4825c | Analyze and fix the following issue in the Linux kernel code: bpf, net: Fix a potential race in do_sock_getsockopt() | Problem Details:
There's a potential race when `cgroup_bpf_enabled(CGROUP_GETSOCKOPT)` is
false during the execution of `BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN`, but
becomes true when `BPF_CGROUP_RUN_PROG_GETSOCKOPT` is called.
This inconsistency can lead to `BPF_CGROUP_RUN_PROG_GETSOCKOPT` receiving
an "-EFAULT" from `__cgr... | ```diff
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
index fb3c3e7181e6..ce91d9b2acb9 100644
--- a/include/linux/bpf-cgroup.h
+++ b/include/linux/bpf-cgroup.h
@@ -390,14 +390,6 @@ static inline bool cgroup_bpf_sock_enabled(struct sock *sk,
__ret; \
})
-#define BPF_CGROUP_GETSO... |
77461c10819103eaee7b33c744174b32a8c78b40 | Analyze and fix the following issue in the Linux kernel code: net: dqs: Do not use extern for unused dql_group | Problem Details:
When CONFIG_DQL is not enabled, dql_group should be treated as a dead
declaration. However, its current extern declaration assumes the linker
will ignore it, which is generally true across most compiler and
architecture combinations.
But in certain cases, the linker still attempts to resolve the exter... | ```diff
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 444f23e74f8e..291fdf4a328b 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1524,7 +1524,7 @@ static const struct attribute_group dql_group = {
};
#else
/* Fake declaration, all the code using it should be dead */
-extern const st... |
3b3a2a9c6349e25a025d2330f479bc33a6ccb54a | Analyze and fix the following issue in the Linux kernel code: sch/netem: fix use after free in netem_dequeue | Problem Details:
If netem_dequeue() enqueues packet to inner qdisc and that qdisc
returns __NET_XMIT_STOLEN. The packet is dropped but
qdisc_tree_reduce_backlog() is not called to update the parent's
q.qlen, leading to the similar use-after-free as Commit
e04991a48dbaf382 ("netem: fix return value if duplicate enqueue
... | ```diff
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 0f8d581438c3..39382ee1e331 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -742,11 +742,10 @@ deliver:
err = qdisc_enqueue(skb, q->qdisc, &to_free);
kfree_skb_list(to_free);
- if (err != NET_XMIT_SUCCESS &&
- ... |
b93fb9cf45a99042f4472678fc67afd1de47c32e | Analyze and fix the following issue in the Linux kernel code: perf sched timehist: Remove redundant BUG_ON in timehist_sched_change_event() | Problem Details:
The BUG_ON(thread__tid(thread) != 0) in timehist_sched_change_event() is
redundant, remove it.
No functional change.
Fixes: 07235f84ece6b66f ("perf sched timehist: Add -I/--idle-hist option")
Reviewed-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Yang Jihong <yangjihong@bytedance.c... | ```diff
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 72f0e7f97f56..dcae3f1f5f3c 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -2703,8 +2703,6 @@ static int timehist_sched_change_event(const struct perf_tool *tool,
struct idle_thread_runtime *itr = (void *)... |
575eec218059f90bf07a4e26b531fd6d54fe1769 | Analyze and fix the following issue in the Linux kernel code: perf sched timehist: Skip print non-idle task samples when only show idle events | Problem Details:
when only show idle events, runtime stats of non-idle tasks is not updated,
and the value is 0, there is no need to print non-idle samples.
Before:
# perf sched timehist -I
Samples of sched_switch event do not have callchains.
time cpu task name wait time s... | ```diff
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 1c386ebe4b98..72f0e7f97f56 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -2730,10 +2730,10 @@ static int timehist_sched_change_event(const struct perf_tool *tool,
itr->last_thread = NULL;
}
- }
- ... |
bab8eb0dd4cb995caa4a0529d5655531c2ec5e8e | Analyze and fix the following issue in the Linux kernel code: usbnet: modern method to get random MAC | Problem Details:
The driver generates a random MAC once on load
and uses it over and over, including on two devices
needing a random MAC at the same time.
Jakub suggested revamping the driver to the modern
API for setting a random MAC rather than fixing
the old stuff.
The bug is as old as the driver.
Signed-off-by: ... | ```diff
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 9fd516e8bb10..18eb5ba436df 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -61,9 +61,6 @@
/*-------------------------------------------------------------------------*/
-// randomly generated ethernet address
-sta... |
0c896eceb5f348b5e314f5cd5faad966f09a56ff | Analyze and fix the following issue in the Linux kernel code: wifi: wilc1000: Re-enable RTC clock on resume | Problem Details:
The wilc_sdio_suspend() does clk_disable_unprepare() on rtc_clk clock,
make sure wilc_sdio_resume() does matching clk_prepare_enable(), else
any suspend/resume cycle leads to clock disable/enable imbalance. Fix
the imbalance.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Alexis Lothoré <alex... | ```diff
diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
index 7999aeb76901..683a35c682a8 100644
--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
+++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
@@ -1006,6 +1006,9 @@ static int wilc_sdio_resume(struct ... |
b0dc7018477e8fbb7e40c908c29cf663d06b17a7 | Analyze and fix the following issue in the Linux kernel code: wifi: wilc1000: Do not operate uninitialized hardware during suspend/resume | Problem Details:
In case the hardware is not initialized, do not operate it during
suspend/resume cycle, the hardware is already off so there is no
reason to access it.
In fact, wilc_sdio_enable_interrupt() in the resume callback does
interfere with the same call when initializing the hardware after
resume and makes s... | ```diff
diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
index 0043f7a0fdf9..7999aeb76901 100644
--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
+++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
@@ -977,6 +977,9 @@ static int wilc_sdio_suspend(struct d... |
cd9253c23aedd61eb5ff11f37a36247cd46faf86 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix race between direct IO write and fsync when using same fd | Problem Details:
If we have 2 threads that are using the same file descriptor and one of
them is doing direct IO writes while the other is doing fsync, we have a
race where we can end up either:
1) Attempt a fsync without holding the inode's lock, triggering an
assertion failures when assertions are enabled;
2) Do... | ```diff
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 75fa563e4cac..c8568b1a61c4 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -459,7 +459,6 @@ struct btrfs_file_private {
void *filldir_buf;
u64 last_index;
struct extent_state *llseek_cached_state;
- bool fsync_skip_inode_lock;
};
static in... |
25f855413885bbce8a0dd5d7dea670a0da1cdbe5 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: wireless: convert marvel-8xxx.txt to yaml format | Problem Details:
Convert binding doc marvel-8xxx.txt to yaml format.
Additional change:
- Remove marvell,caldata_00_txpwrlimit_2g_cfg_set in example.
- Remove mmc related property in example.
- Add wakeup-source property.
- Remove vmmc-supply and mmc-pwrseq.
Fix below warning:
arch/arm64/boot/dts/freescale/imx8mp-beac... | ```diff
diff --git a/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml b/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml
new file mode 100644
index 000000000000..1715b22e0dcf
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml
@@ -0,0 +1,93 @@
+# SP... |
e066e9aa4d9c869c92d1d03647472e4ce96c0919 | Analyze and fix the following issue in the Linux kernel code: MAINATINERS: update drm maintainer contacts | Problem Details:
Also fix a few places in gpu docs that are still relevant, and add a
bunch of .mailmap entries.
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Simona Vetter <simona.vetter@ffwll.ch> | ```diff
diff --git a/.mailmap b/.mailmap
index 8ee01d9d7046..340261f53672 100644
--- a/.mailmap
+++ b/.mailmap
@@ -608,6 +608,10 @@ Shuah Khan <shuah@kernel.org> <shuah.kh@samsung.com>
Sibi Sankar <quic_sibis@quicinc.com> <sibis@codeaurora.org>
Sid Manning <quic_sidneym@quicinc.com> <sidneym@codeaurora.org>
Simon Ar... |
2f1dddc922a4d77162f839ee8faa50209bbe5168 | Analyze and fix the following issue in the Linux kernel code: iio: adc: mcp320x: Drop vendorless compatible strings | Problem Details:
The vendorless compatible strings are deprecated and weren't retained
when the binding was converted to schema. As a result, they are listed
as undocumented when running "make dt_compatible_check". Rather than add
them back to the schema, let's just drop them as they are unnecessary.
Furthermore, they ... | ```diff
diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c
index da1421bd7b62..57cff3772ebe 100644
--- a/drivers/iio/adc/mcp320x.c
+++ b/drivers/iio/adc/mcp320x.c
@@ -459,16 +459,6 @@ static int mcp320x_probe(struct spi_device *spi)
}
static const struct of_device_id mcp320x_dt_ids[] = {
- /* NOTE: ... |
129464e86c7445a858b790ac2d28d35f58256bbe | Analyze and fix the following issue in the Linux kernel code: iio: magnetometer: ak8975: Fix reading for ak099xx sensors | Problem Details:
Move ST2 reading with overflow handling after measurement data
reading.
ST2 register read have to be read after read measurment data,
because it means end of the reading and realease the lock on the data.
Remove ST2 read skip on interrupt based waiting because ST2 required to
be read out at and of the ... | ```diff
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
index 67d5d1f2402f..1d5f79b7005b 100644
--- a/drivers/iio/magnetometer/ak8975.c
+++ b/drivers/iio/magnetometer/ak8975.c
@@ -696,22 +696,8 @@ static int ak8975_start_read_axis(struct ak8975_data *data,
if (ret < 0)
return ret... |
b4bcdff7e839237d89a2aa15b6042b96b0240ac4 | Analyze and fix the following issue in the Linux kernel code: selftests: filesystems: fix warn_unused_result build warnings | Problem Details:
Add return value checks for read & write calls in test_listmount_ns
function. This patch resolves below compilation warnings:
```
statmount_test_ns.c: In function ‘test_listmount_ns’:
statmount_test_ns.c:322:17: warning: ignoring return value of ‘write’
declared with attribute ‘warn_unused_result’ [-... | ```diff
diff --git a/tools/testing/selftests/filesystems/statmount/statmount_test_ns.c b/tools/testing/selftests/filesystems/statmount/statmount_test_ns.c
index e044f5fc57fd..70cb0c8b21cf 100644
--- a/tools/testing/selftests/filesystems/statmount/statmount_test_ns.c
+++ b/tools/testing/selftests/filesystems/statmount/s... |
87eb3cb4ec619299cd5572e1d5eb68aef4074ac2 | Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: Fix cable registration | Problem Details:
The Cable PD Revision field in GET_CABLE_PROPERTY was
introduced in UCSI v2.1, so adding check for that.
The cable properties are also not used anywhere after the
cable is registered, so removing the cable_prop member
from struct ucsi_connector while at it.
Fixes: 38ca416597b0 ("usb: typec: ucsi: Reg... | ```diff
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 9a799637754c..17155ed17fdf 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -965,10 +965,20 @@ static void ucsi_unregister_plug(struct ucsi_connector *con)
static int ucsi_register_cable(struct u... |
899d2e5a4e3d36689e8938e152f4b69a4bcc6b4d | Analyze and fix the following issue in the Linux kernel code: nvmet: Identify-Active Namespace ID List command should reject invalid nsid | Problem Details:
nsid values of 0xFFFFFFFE and 0XFFFFFFFF should be rejected with
a status code of "Invalid Namespace or Format".
See NVMe Base Specification, Active Namespace ID list (CNS 02h).
Fixes: a07b4970f464 ("nvmet: add a generic NVMe target")
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by:... | ```diff
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index f7e1156ac7ec..85006b2df8ae 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -587,6 +587,16 @@ static void nvmet_execute_identify_nslist(struct nvmet_req *req)
u16 status = 0;
int i = 0;
... |
28982ad73d6a9605708631dc49a0c763cc398aa2 | Analyze and fix the following issue in the Linux kernel code: nvme: set BLK_FEAT_ZONED for ZNS multipath disks | Problem Details:
The new stricter limits validation doesn't like a max_append_sectors value
to be set without BLK_FEAT_ZONED. Set it before allocation the disk to
fix this instead of just inheriting it later.
Fixes: d690cb8ae14b ("block: add an API to atomically update queue limits")
Signed-off-by: Christoph Hellwig ... | ```diff
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 91d9eb3c22ef..518e22dd4f9b 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -616,7 +616,9 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
blk_set_stacking_limits(&l... |
8da19441d0a02b53e362df81843bb20db3a8006a | Analyze and fix the following issue in the Linux kernel code: drm/xe/display: Avoid encoder_suspend at runtime suspend | Problem Details:
Fix circular locking dependency on runtime suspend.
<4> [74.952215] ======================================================
<4> [74.952217] WARNING: possible circular locking dependency detected
<4> [74.952219] 6.10.0-rc7-xe #1 Not tainted
<4> [74.952221] -----------------------------------------------... | ```diff
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index ae92012253f8..75736faf2a80 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -345,10 +345,10 @@ void xe_display_pm_suspend(struct xe_device *xe, bool runtime)
... |
bc947d9a8c3ebd207e52c0e35cfc88f3e1abe54f | Analyze and fix the following issue in the Linux kernel code: drm/xe: Add missing runtime reference to wedged upon gt_reset | Problem Details:
Fixes this missed case:
xe 0000:00:02.0: [drm] Missing outer runtime PM protection
WARNING: CPU: 99 PID: 1455 at drivers/gpu/drm/xe/xe_pm.c:564 xe_pm_runtime_get_noresume+0x48/0x60 [xe]
Call Trace:
<TASK>
? show_regs+0x67/0x70
? __warn+0x94/0x1b0
? xe_pm_runtime_get_noresume+0x48/0x60 [xe]
? report_bu... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index ffacddb587b2..f0dc2bf24c7b 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -752,12 +752,13 @@ static int gt_reset(struct xe_gt *gt)
xe_gt_info(gt, "reset started\n");
+ xe_pm_runtime_get(gt_to_xe(gt));
+... |
156bb2c569cd869583c593d27a5bd69e7b2a4264 | Analyze and fix the following issue in the Linux kernel code: unicode: Fix utf8_load() error path | Problem Details:
utf8_load() requests the symbol "utf8_data_table" and then checks if the
requested UTF-8 version is supported. If it's unsupported, it tries to
put the data table using symbol_put(). If an unsupported version is
requested, symbol_put() fails like this:
kernel BUG at kernel/module/main.c:786!
RIP: 00... | ```diff
diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c
index 8395066341a4..0400824ef493 100644
--- a/fs/unicode/utf8-core.c
+++ b/fs/unicode/utf8-core.c
@@ -198,7 +198,7 @@ struct unicode_map *utf8_load(unsigned int version)
return um;
out_symbol_put:
- symbol_put(um->tables);
+ symbol_put(utf8_data_... |
c5ad8ed61fa8410b272c077ec167c593602b4542 | Analyze and fix the following issue in the Linux kernel code: netfilter: nft_dynset: annotate data-races around set timeout | Problem Details:
set timeout can be read locklessly while being updated from control
plane, add annotation.
Fixes: 123b99619cca ("netfilter: nf_tables: honor set timeout and garbage collection updates")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ```diff
diff --git a/net/netfilter/nft_dynset.c b/net/netfilter/nft_dynset.c
index 6920df754265..5812fd880b79 100644
--- a/net/netfilter/nft_dynset.c
+++ b/net/netfilter/nft_dynset.c
@@ -56,7 +56,7 @@ static struct nft_elem_priv *nft_dynset_new(struct nft_set *set,
if (!atomic_add_unless(&set->nelems, 1, set->size))
... |
15d8605c0cf4fc9cf4386cae658c68a0fd4bdb92 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: remove annotation to access set timeout while holding lock | Problem Details:
Mutex is held when adding an element, no need for READ_ONCE, remove it.
Fixes: 123b99619cca ("netfilter: nf_tables: honor set timeout and garbage collection updates")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ```diff
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 6c0c6f8a08a8..571aa30918e9 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -6916,7 +6916,7 @@ static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set,
return err;
} else if (set-... |
c0f38a8c60174368aed1d0f9965d733195f15033 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: reject expiration higher than timeout | Problem Details:
Report ERANGE to userspace if user specifies an expiration larger than
the timeout.
Fixes: 8e1102d5a159 ("netfilter: nf_tables: support timeouts larger than 23 days")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ```diff
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index da75bc1de466..6c0c6f8a08a8 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -6930,6 +6930,9 @@ static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set,
&expiration);
if (er... |
d2dc429ecb4e79ad164028d965c00f689e6f6d06 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: reject element expiration with no timeout | Problem Details:
If element timeout is unset and set provides no default timeout, the
element expiration is silently ignored, reject this instead to let user
know this is unsupported.
Also prepare for supporting timeout that never expire, where zero
timeout and expiration must be also rejected.
Fixes: 8e1102d5a159 ("... | ```diff
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index b49fcd7148d3..da75bc1de466 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -6923,6 +6923,9 @@ static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set,
if (nla[NFTA_SET_ELEM_EXPIRATIO... |
e0c47281723f301894c14e6f5cd5884fdfb813f9 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: elements with timeout below CONFIG_HZ never expire | Problem Details:
Element timeout that is below CONFIG_HZ never expires because the
timeout extension is not allocated given that nf_msecs_to_jiffies64()
returns 0. Set timeout to the minimum value to honor timeout.
Fixes: 8e1102d5a159 ("netfilter: nf_tables: support timeouts larger than 23 days")
Signed-off-by: Pablo ... | ```diff
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index b6547fe22bd8..b49fcd7148d3 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -4593,7 +4593,7 @@ int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result)
return -ERANGE;
ms *= NSEC_PER_... |
04c7e14e5b0b6227e7b00d7a96ca2f2426ab9171 | Analyze and fix the following issue in the Linux kernel code: ice: do not bring the VSI up, if it was down before the XDP setup | Problem Details:
After XDP configuration is completed, we bring the interface up
unconditionally, regardless of its state before the call to .ndo_bpf().
Preserve the information whether the interface had to be brought down and
later bring it up only in such case.
Fixes: efc2214b6047 ("ice: Add support for XDP")
Revie... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 22b8ef5faf8d..c7db88b517da 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3005,8 +3005,8 @@ ice_xdp_setup_prog(struct ice_vsi *vsi, struct bpf_prog... |
7e3b407ccbea3259b8583ccc34807622025e390f | Analyze and fix the following issue in the Linux kernel code: ice: remove ICE_CFG_BUSY locking from AF_XDP code | Problem Details:
Locking used in ice_qp_ena() and ice_qp_dis() does pretty much nothing,
because ICE_CFG_BUSY is a state flag that is supposed to be set in a PF
state, not VSI one. Therefore it does not protect the queue pair from
e.g. reset.
Remove ICE_CFG_BUSY locking from ice_qp_dis() and ice_qp_ena().
Fixes: 2d42... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c
index 8693509efbe7..5dee829bfc47 100644
--- a/drivers/net/ethernet/intel/ice/ice_xsk.c
+++ b/drivers/net/ethernet/intel/ice/ice_xsk.c
@@ -165,7 +165,6 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
struc... |
d8c40b9d3a6cef61eb5a0c58c34a3090ea938d89 | Analyze and fix the following issue in the Linux kernel code: ice: check ICE_VSI_DOWN under rtnl_lock when preparing for reset | Problem Details:
Consider the following scenario:
.ndo_bpf() | ice_prepare_for_reset() |
________________________|_______________________________________|
rtnl_lock() | |
ice_down() | |
| test_bit(ICE_VSI_DOWN) - true |
| ice_dis_vsi() returns |
ice_up() | |
| proceeds to rebuild a running... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 3dccfaba024c..737c00b02dd0 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2672,8 +2672,7 @@ int ice_ena_vsi(struct ice_vsi *vsi, bool locked)
*/
voi... |
2504b8405768a57a71e660dbfd5abd59f679a03f | Analyze and fix the following issue in the Linux kernel code: ice: protect XDP configuration with a mutex | Problem Details:
The main threat to data consistency in ice_xdp() is a possible asynchronous
PF reset. It can be triggered by a user or by TX timeout handler.
XDP setup and PF reset code access the same resources in the following
sections:
* ice_vsi_close() in ice_prepare_for_reset() - already rtnl-locked
* ice_vsi_re... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index caaa10157909..ce8b5505b16d 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -318,6 +318,7 @@ enum ice_vsi_state {
ICE_VSI_UMAC_FLTR_CHANGED,
ICE_VSI_MMAC_FLTR_CHANGED... |
42c306ed723321af4003b2a41bb73728cab54f85 | Analyze and fix the following issue in the Linux kernel code: block, bfq: don't break merge chain in bfq_split_bfqq() | Problem Details:
Consider the following scenario:
Process 1 Process 2 Process 3 Process 4
(BIC1) (BIC2) (BIC3) (BIC4)
Λ | | |
\-------------\ \-------------\ \--------------\|
V ... | ```diff
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index ffaa0d56328a..ca766b7d5560 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -6727,7 +6727,7 @@ bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq)
{
bfq_log_bfqq(bfqq->bfqd, bfqq, "splitting queue");
- if (bfqq_process_refs... |
0e456dba86c7f9a19792204a044835f1ca2c8dbb | Analyze and fix the following issue in the Linux kernel code: block, bfq: choose the last bfqq from merge chain in bfq_setup_cooperator() | Problem Details:
Consider the following merge chain:
Process 1 Process 2 Process 3 Process 4
(BIC1) (BIC2) (BIC3) (BIC4)
Λ | | |
\--------------\ \-------------\ \-------------\|
V V V
bfqq1---------... | ```diff
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 83adac3e71db..ffaa0d56328a 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -2911,8 +2911,12 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
struct bfq_iocq_bfqq_data *bfqq_data = &bic->bfqq_data[a_idx];
/* if... |
18ad4df091dd5d067d2faa8fce1180b79f7041a7 | Analyze and fix the following issue in the Linux kernel code: block, bfq: fix possible UAF for bfqq->bic with merge chain | Problem Details:
1) initial state, three tasks:
Process 1 Process 2 Process 3
(BIC1) (BIC2) (BIC3)
| Λ | Λ | Λ
| | | | | |
V | V | V |
bfqq1 bfqq2 bfqq3
process ref: 1 1 1
2) bfqq1 merged to bfqq2:
Pr... | ```diff
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 36a4998c4b37..83adac3e71db 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -6934,7 +6934,8 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
* addition, if the queue has also just been split, we have to
* resume its state... |
2a5dc090b92cfa5270e20056074241c6db5c9cdd | Analyze and fix the following issue in the Linux kernel code: ice: move netif_queue_set_napi to rtnl-protected sections | Problem Details:
Currently, netif_queue_set_napi() is called from ice_vsi_rebuild() that is
not rtnl-locked when called from the reset. This creates the need to take
the rtnl_lock just for a single function and complicates the
synchronization with .ndo_bpf. At the same time, there no actual need to
fill napi-to-queue i... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c
index f448d3a84564..c158749a80e0 100644
--- a/drivers/net/ethernet/intel/ice/ice_base.c
+++ b/drivers/net/ethernet/intel/ice/ice_base.c
@@ -190,16 +190,11 @@ static void ice_free_q_vector(struct ice_vsi *vsi, int ... |
2749749afa071f8a0e405605de9da615e771a7ce | Analyze and fix the following issue in the Linux kernel code: smackfs: Use rcu_assign_pointer() to ensure safe assignment in smk_set_cipso | Problem Details:
In the `smk_set_cipso` function, the `skp->smk_netlabel.attr.mls.cat`
field is directly assigned to a new value without using the appropriate
RCU pointer assignment functions. According to RCU usage rules, this is
illegal and can lead to unpredictable behavior, including data
inconsistencies and imposs... | ```diff
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index e22aad7604e8..5dd1e164f9b1 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -932,7 +932,7 @@ static ssize_t smk_set_cipso(struct file *file, const char __user *buf,
}
if (rc >= 0) {
old_cat = skp->smk_netlabel.a... |
bf0db8c759ba137cebfeda9eecc1f728cb14dab7 | Analyze and fix the following issue in the Linux kernel code: perf script: Minimize "not reaching sample" for '-F +brstackinsn' | Problem Details:
In some situations 'perf script -F +brstackinsn' sees a lot of "not
reaching sample" messages.
This happens when the last LBR block before the sample contains a branch
that is not in the LBR, and the instruction dumping stops.
$ perf record -b emacs -Q --batch '()'
[ perf record: Woken up 1 time... | ```diff
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 206b08426555..dbe792b52c5c 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1428,7 +1428,7 @@ static int perf_sample__fprintf_brstackinsn(struct perf_sample *sample,
* Due to pipeline delays the LBRs mi... |
ab85218910729b95f9b0acfebab55c2cab5f8ee7 | Analyze and fix the following issue in the Linux kernel code: netfs, cifs: Improve some debugging bits | Problem Details:
Improve some debugging bits:
(1) The netfslib _debug() macro doesn't need a newline in its format
string.
(2) Display the request debug ID and subrequest index in messages emitted
in smb2_adjust_credits() to make it easier to reference in traces.
Signed-off-by: David Howells <dhowells@re... | ```diff
diff --git a/fs/netfs/io.c b/fs/netfs/io.c
index 943128507af5..d6ada4eba744 100644
--- a/fs/netfs/io.c
+++ b/fs/netfs/io.c
@@ -270,7 +270,7 @@ static void netfs_reset_subreq_iter(struct netfs_io_request *rreq,
if (count == remaining)
return;
- _debug("R=%08x[%u] ITER RESUB-MISMATCH %zx != %zx-%zx-%llx %x... |
a68c74865f517e26728735aba0ae05055eaff76c | Analyze and fix the following issue in the Linux kernel code: cifs: Fix SMB1 readv/writev callback in the same way as SMB2/3 | Problem Details:
Port a number of SMB2/3 async readv/writev fixes to the SMB1 transport:
commit a88d60903696c01de577558080ec4fc738a70475
cifs: Don't advance the I/O iterator before terminating subrequest
commit ce5291e56081730ec7d87bc9aa41f3de73ff3256
cifs: Defer read completion
commit 1da29f2c39... | ```diff
diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
index 6dce70f17208..cfae2e918209 100644
--- a/fs/smb/client/cifssmb.c
+++ b/fs/smb/client/cifssmb.c
@@ -1261,16 +1261,32 @@ openRetry:
return rc;
}
+static void cifs_readv_worker(struct work_struct *work)
+{
+ struct cifs_io_subrequest *rdata =... |
517b58c1f9242a6b4ac9443d95569dee58bf6b8b | Analyze and fix the following issue in the Linux kernel code: cifs: Fix zero_point init on inode initialisation | Problem Details:
Fix cifs_fattr_to_inode() such that the ->zero_point tracking variable
is initialised when the inode is initialised.
Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
cc: Jeff Layton <jl... | ```diff
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c
index dd0afa23734c..73e2e6c230b7 100644
--- a/fs/smb/client/inode.c
+++ b/fs/smb/client/inode.c
@@ -172,6 +172,8 @@ cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr,
CIFS_I(inode)->time = 0; /* force reval */
return -ESTALE;
}
+... |
f9c169b51b6ce20394594ef674d6b10efba31220 | Analyze and fix the following issue in the Linux kernel code: smb: client: fix double put of @cfile in smb2_set_path_size() | Problem Details:
If smb2_compound_op() is called with a valid @cfile and returned
-EINVAL, we need to call cifs_get_writable_path() before retrying it
as the reference of @cfile was already dropped by previous call.
This fixes the following KASAN splat when running fstests generic/013
against Windows Server 2022:
C... | ```diff
diff --git a/fs/smb/client/smb2inode.c b/fs/smb/client/smb2inode.c
index e3117f3fb5b2..11a1c53c64e0 100644
--- a/fs/smb/client/smb2inode.c
+++ b/fs/smb/client/smb2inode.c
@@ -1151,6 +1151,7 @@ smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon,
cfile, NULL, NULL, dentry);
if (rc == -E... |
1ff95eb2bebda50c4c5406caaf201e0fcb24cc8f | Analyze and fix the following issue in the Linux kernel code: riscv: Fix RISCV_ALTERNATIVE_EARLY | Problem Details:
RISCV_ALTERNATIVE_EARLY will issue sbi_ecall() very early in the boot
process, before the first memory mapping is setup so we can't have any
instrumentation happening here.
In addition, when the kernel is relocatable, we must also not issue any
relocation this early since they would have been patched ... | ```diff
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h
index 7cffd4ffecd0..7bd3746028c9 100644
--- a/arch/riscv/include/asm/sbi.h
+++ b/arch/riscv/include/asm/sbi.h
@@ -9,6 +9,7 @@
#include <linux/types.h>
#include <linux/cpumask.h>
+#include <linux/jump_label.h>
#ifdef CONFIG_RISCV_SBI... |
5f771088a2b5edd6f2c5c9f34484ca18dc389f3e | Analyze and fix the following issue in the Linux kernel code: riscv: Do not restrict memory size because of linear mapping on nommu | Problem Details:
It makes no sense to restrict physical memory size because of linear
mapping size constraints when there is no linear mapping, so only do
that when mmu is enabled.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/linux-riscv/CAMuHMdW0bnJt5GMRtOZGkTiM7GK4UaLJCDMF_O... | ```diff
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index eb0649a61b4c..1785782c2e55 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -252,7 +252,7 @@ static void __init setup_bootmem(void)
* The size of the linear page mapping may restrict the amount of
* usable RAM.
*/
- if (IS_EN... |
5ba7a75a53dffbf727e842b5847859bb482ac4aa | Analyze and fix the following issue in the Linux kernel code: riscv: Fix toolchain vector detection | Problem Details:
A recent change to gcc flags rv64iv as no longer valid:
cc1: sorry, unimplemented: Currently the 'V' implementation
requires the 'M' extension
and as a result vector support is disabled. Fix this by adding m
to our toolchain vector detection code.
Signed-off-by: Anton Blanchard <antonb@tenstor... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 0f3cd7c3a436..939ea7f6a228 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -552,8 +552,8 @@ config RISCV_ISA_SVPBMT
config TOOLCHAIN_HAS_V
bool
default y
- depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64iv)
- depends on !32BIT |... |
e240b0fde52f33670d1336697c22d90a4fe33c84 | Analyze and fix the following issue in the Linux kernel code: uprobes: Use kzalloc to allocate xol area | Problem Details:
To prevent unitialized members, use kzalloc to allocate
the xol area.
Fixes: b059a453b1cf1 ("x86/vdso: Add mremap hook to vm_special_mapping")
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Link:... | ```diff
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 73cc47708679..50d7949be2b1 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1489,7 +1489,7 @@ static struct xol_area *__create_xol_area(unsigned long vaddr)
struct xol_area *area;
void *insns;
- area = kmalloc(sizeo... |
3523a3df03c6f04f7ea9c2e7050102657e331a4f | Analyze and fix the following issue in the Linux kernel code: smb: client: fix double put of @cfile in smb2_rename_path() | Problem Details:
If smb2_set_path_attr() is called with a valid @cfile and returned
-EINVAL, we need to call cifs_get_writable_path() again as the
reference of @cfile was already dropped by previous smb2_compound_op()
call.
Fixes: 71f15c90e785 ("smb: client: retry compound request without reusing lease")
Signed-off-by... | ```diff
diff --git a/fs/smb/client/smb2inode.c b/fs/smb/client/smb2inode.c
index 9f5bc41433c1..e3117f3fb5b2 100644
--- a/fs/smb/client/smb2inode.c
+++ b/fs/smb/client/smb2inode.c
@@ -1106,6 +1106,8 @@ int smb2_rename_path(const unsigned int xid,
co, DELETE, SMB2_OP_RENAME, cfile, source_dentry);
if (rc == -EIN... |
8e514bad271723473d31fcc496f7143ba49c43c5 | Analyze and fix the following issue in the Linux kernel code: drm/tegra: fix potential uninitialized variable use | Problem Details:
It's likely either output->drm_edid or output->ddc is non-NULL, but
avoid the uninitialized variable usage anyway.
Reported-by: kernel test robot <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/ZtXLyXxew7z6H2bD@stanley.mountain
Fixes: 98365ca74cbf ("drm/tegra: convert to struct drm_edid")... | ```diff
diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index e6b5863fec71..49e4f63a5550 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -21,7 +21,7 @@
int tegra_output_connector_get_modes(struct drm_connector *connector)
{
struct tegra_output *output... |
fe13fd68337512da4b7aee6326c397e817a943c7 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pcode: Treat pcode as per-tile rather than per-GT | Problem Details:
There's only one instance of the pcode per tile, and for GT-related
accesses both the primary and media GT share the same register
interface. Since Xe was using per-GT locking, the pcode mutex wasn't
actually protecting everything that it should since concurrent accesses
related to a tile's primary GT... | ```diff
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/intel_pcode.h b/drivers/gpu/drm/xe/compat-i915-headers/intel_pcode.h
index 0c47661bdc6a..a473aa6697d0 100644
--- a/drivers/gpu/drm/xe/compat-i915-headers/intel_pcode.h
+++ b/drivers/gpu/drm/xe/compat-i915-headers/intel_pcode.h
@@ -13,7 +13,7 @@ static inline i... |
529bf8d1118bbaa1aa835563a22b0b5c64ca9d68 | Analyze and fix the following issue in the Linux kernel code: drm/xe/gsc: Do not attempt to load the GSC multiple times | Problem Details:
The GSC HW is only reset by driver FLR or D3cold entry. We don't support
the former at runtime, while the latter is only supported on DGFX, for
which we don't support GSC. Therefore, if GSC failed to load previously
there is no need to try again because the HW is stuck in the error state.
An assert ha... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c
index 2a612652bb13..29f96f409391 100644
--- a/drivers/gpu/drm/xe/xe_gsc.c
+++ b/drivers/gpu/drm/xe/xe_gsc.c
@@ -519,10 +519,22 @@ out_bo:
void xe_gsc_load_start(struct xe_gsc *gsc)
{
struct xe_gt *gt = gsc_to_gt(gsc);
+ struct xe_device ... |
49e9cc315604972cc14868cb67831e3e8c3f1470 | Analyze and fix the following issue in the Linux kernel code: ACPI: resource: Skip IRQ override on Asus Vivobook Go E1404GAB | Problem Details:
Like other Asus Vivobooks, the Asus Vivobook Go E1404GAB has a DSDT
that describes IRQ 1 as ActiveLow, while the kernel overrides to Edge_High.
This override prevents the internal keyboard from working.
Fix the problem by adding this laptop to the table that prevents the kernel
from overriding the IR... | ```diff
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index aa9990507f34..dd410e67d036 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -503,6 +503,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
DMI_MATCH(DMI_BOARD_NAME, "B2502FBA"),
},
},
+ {
+... |
38e2648a81204c9fc5b4c87a8ffce93a6ed91b65 | Analyze and fix the following issue in the Linux kernel code: perf time-utils: Fix 32-bit nsec parsing | Problem Details:
The "time utils" test fails in 32-bit builds:
...
parse_nsec_time("18446744073.709551615")
Failed. ptime 4294967295709551615 expected 18446744073709551615
...
Switch strtoul to strtoull as an unsigned long in 32-bit build isn't
64-bits.
Fixes: c284d669a20d408b ("perf tools: Move parse_nsec_ti... | ```diff
diff --git a/tools/perf/util/time-utils.c b/tools/perf/util/time-utils.c
index 302443921681..1b91ccd4d523 100644
--- a/tools/perf/util/time-utils.c
+++ b/tools/perf/util/time-utils.c
@@ -20,7 +20,7 @@ int parse_nsec_time(const char *str, u64 *ptime)
u64 time_sec, time_nsec;
char *end;
- time_sec = strtoul... |
6c99903e084c68887f7bc52a6819117f26820667 | Analyze and fix the following issue in the Linux kernel code: perf pmus: Fix name comparisons on 32-bit systems | Problem Details:
The hex PMU suffix maybe 64-bit but the comparisons were "unsigned
long" or 32-bit on 32-bit systems. This was causing the "PMU name
comparison" test to fail in a 32-bit build.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.... | ```diff
diff --git a/tools/perf/util/pmus.c b/tools/perf/util/pmus.c
index 3fcabfd8fca1..769b920d9250 100644
--- a/tools/perf/util/pmus.c
+++ b/tools/perf/util/pmus.c
@@ -69,7 +69,7 @@ size_t pmu_name_len_no_suffix(const char *str)
int pmu_name_cmp(const char *lhs_pmu_name, const char *rhs_pmu_name)
{
- unsigned lo... |
c4a8ba334262e9a5c158d618a4820e1b9c12495c | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Add rough attr alloc_size check | Problem Details:
Reported-by: syzbot+c6d94bedd910a8216d25@syzkaller.appspotmail.com
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | ```diff
diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c
index 2a375247b3c0..427c71be0f08 100644
--- a/fs/ntfs3/record.c
+++ b/fs/ntfs3/record.c
@@ -331,6 +331,9 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
if (attr->nres.c_unit)
return NULL;
+
+ if (alloc_size > mi->sbi->volume... |
56c16d5459d5c050a97a138a00a82b105a8e0a66 | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Refactor enum_rstbl to suppress static checker | Problem Details:
Comments and brief description of function enum_rstbl added.
Fixes: b46acd6a6a62 ("fs/ntfs3: Add NTFS journal")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | ```diff
diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c
index c64dd114ac65..d0d530f4e2b9 100644
--- a/fs/ntfs3/fslog.c
+++ b/fs/ntfs3/fslog.c
@@ -609,14 +609,29 @@ static inline void add_client(struct CLIENT_REC *ca, u16 index, __le16 *head)
*head = cpu_to_le16(index);
}
+/*
+ * Enumerate restart table.
+ *
+ * @... |
62fea783f96ce825f0ac9e40ce9530ddc1ea2a29 | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Fix sparse warning in ni_fiemap | Problem Details:
The interface of fiemap_fill_next_extent_k() was modified
to eliminate the sparse warning.
Fixes: d57431c6f511 ("fs/ntfs3: Do copy_to_user out of run_lock")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406271920.hndE8N6D-lkp@intel.com/
Signed-off-by: ... | ```diff
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index a469c608a394..60c975ac38e6 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -1900,13 +1900,13 @@ enum REPARSE_SIGN ni_parse_reparse(struct ntfs_inode *ni, struct ATTRIB *attr,
/*
* fiemap_fill_next_extent_k - a copy of fiemap_fill_next_e... |
5b2db723455a89dc96743d34d8bdaa23a402db2f | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Fix warning possible deadlock in ntfs_set_state | Problem Details:
Use non-zero subkey to skip analyzer warnings.
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Reported-by: syzbot+c2ada45c23d98d646118@syzkaller.appspotmail.com | ```diff
diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h
index e5255a251929..79047cd54611 100644
--- a/fs/ntfs3/ntfs_fs.h
+++ b/fs/ntfs3/ntfs_fs.h
@@ -334,7 +334,7 @@ struct mft_inode {
/* Nested class for ntfs_inode::ni_lock. */
enum ntfs_inode_mutex_lock_class {
- NTFS_INODE_MUTEX_DIRTY,
+ NTFS_INODE_MUTEX_DI... |
ffe718c9924eb7e4ce062dd383cf5fea7f02f180 | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Fix sparse warning for bigendian | Problem Details:
Fixes: 220cf0498bbf ("fs/ntfs3: Simplify initialization of $AttrDef and $UpCase")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404181111.Wz8a1qX6-lkp@intel.com/
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | ```diff
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index a8758b85803f..28fed4072f67 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -1491,11 +1491,10 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
#ifdef __BIG_ENDIAN
{
- const __le16 *src = sbi->upcase;
u16 *dst = sb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.