id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
cff47b9e39a6abf03dde5f4f156f841b0c54bba0 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: fix NULL pointer deference when splitting folio | Problem Details:
Commit c010d47f107f ("mm: thp: split huge page to any lower order pages")
introduced an early check on the folio's order via mapping->flags before
proceeding with the split work.
This check introduced a bug: for shmem folios in the swap cache and
truncated folios, the mapping pointer can be NULL. Acc... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 2f2a521e5d68..6cba1cb14b23 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -3619,6 +3619,16 @@ static int __folio_split(struct folio *folio, unsigned int new_order,
if (folio != page_folio(split_at) || folio != page_folio(lock_at))
return -EINV... |
6c96c6bd2c71fc7ee08580388a3a4a459019c320 | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: add test_kho to KHO's entry | Problem Details:
Commit b753522bed0b7 ("kho: add test for kexec handover") introduced the
KHO test but missed adding it to KHO's MAINTAINERS entry. Add it so the
KHO maintainers can get patches for its test.
Link: https://lkml.kernel.org/r/20251118182416.70660-1-pratyush@kernel.org
Fixes: b753522bed0b7 ("kho: add tes... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index c39701eec3fe..47b968812d1d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13798,6 +13798,7 @@ F: Documentation/admin-guide/mm/kho.rst
F: Documentation/core-api/kho/*
F: include/linux/kexec_handover.h
F: kernel/kexec_handover.c
+F: lib/test_kho.c
F: tools/testing/... |
f0bb6dba3df32ecb4a7038ca549b21e9812aec5e | Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix division-by-zero in uffd-unit-tests | Problem Details:
Commit 4dfd4bba8578 ("selftests/mm/uffd: refactor non-composite global
vars into struct") moved some of the operations previously implemented in
uffd_setup_environment() earlier in the main test loop.
The calculation of nr_pages, which involves a division by page_size, now
occurs before checking that ... | ```diff
diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c
index 9e3be2ee7f1b..f917b4c4c943 100644
--- a/tools/testing/selftests/mm/uffd-unit-tests.c
+++ b/tools/testing/selftests/mm/uffd-unit-tests.c
@@ -1758,10 +1758,15 @@ int main(int argc, char *argv[])
uffd... |
270065f514c5da7b3deb4f6a96cf93e96551cf35 | Analyze and fix the following issue in the Linux kernel code: mm/mmap_lock: reset maple state on lock_vma_under_rcu() retry | Problem Details:
The retry in lock_vma_under_rcu() drops the rcu read lock before
reacquiring the lock and trying again. This may cause a use-after-free if
the maple node the maple state was using was freed.
The maple state is protected by the rcu read lock. When the lock is
dropped, the state cannot be reused as it... | ```diff
diff --git a/mm/mmap_lock.c b/mm/mmap_lock.c
index 0a0db5849b8e..42e3dde73e74 100644
--- a/mm/mmap_lock.c
+++ b/mm/mmap_lock.c
@@ -241,6 +241,7 @@ retry:
if (PTR_ERR(vma) == -EAGAIN) {
count_vm_vma_lock_event(VMA_LOCK_MISS);
/* The area was replaced with another one */
+ mas_set(&mas, address);
... |
de8798965fd0d9a6c47fc2ac57767ec32de12b49 | Analyze and fix the following issue in the Linux kernel code: mm/memfd: fix information leak in hugetlb folios | Problem Details:
When allocating hugetlb folios for memfd, three initialization steps are
missing:
1. Folios are not zeroed, leading to kernel memory disclosure to userspace
2. Folios are not marked uptodate before adding to page cache
3. hugetlb_fault_mutex is not taken before hugetlb_add_to_page_cache()
The memfd a... | ```diff
diff --git a/mm/memfd.c b/mm/memfd.c
index 1d109c1acf21..a405eaa451ee 100644
--- a/mm/memfd.c
+++ b/mm/memfd.c
@@ -96,9 +96,36 @@ struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx)
NULL,
gfp_mask);
if (folio) {
+ u32 hash;
+
+ /*
+ * Zero the folio to prevent inform... |
f5e31a196edcd1f1bb44f26b6f9299b9a5b9b3c4 | Analyze and fix the following issue in the Linux kernel code: mm: swap: remove duplicate nr_swap_pages decrement in get_swap_page_of_type() | Problem Details:
After commit 4f78252da887, nr_swap_pages is decremented in
swap_range_alloc(). Since cluster_alloc_swap_entry() calls
swap_range_alloc() internally, the decrement in get_swap_page_of_type()
causes double-decrementing.
As a representative userspace-visible runtime example of the impact,
/proc/meminfo r... | ```diff
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 10760240a3a2..a1b4b9d80e3b 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -2005,10 +2005,8 @@ swp_entry_t get_swap_page_of_type(int type)
local_lock(&percpu_swap_cluster.lock);
offset = cluster_alloc_swap_entry(si, 0, 1);
local_unlock(&percpu_swap_... |
54df8b80cc63aa0f22c4590cad11542731ed43ff | Analyze and fix the following issue in the Linux kernel code: btrfs: scrub: always update btrfs_scrub_progress::last_physical | Problem Details:
[BUG]
When a scrub failed immediately without any byte scrubbed, the returned
btrfs_scrub_progress::last_physical will always be 0, even if there is a
non-zero @start passed into btrfs_scrub_dev() for resume cases.
This will reset the progress and make later scrub resume start from the
beginning.
[CA... | ```diff
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index f6c2196322c6..a40ee41f42c6 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3104,6 +3104,10 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
unsigned int nofs_flag;
bool need_commit = false;
+ /* Set the basic fallba... |
d7fe41044b3ac8f9b5965de499a13ac9ae947e79 | Analyze and fix the following issue in the Linux kernel code: btrfs: use bool type for btrfs_path members used as booleans | Problem Details:
Many fields of struct btrfs_path are used as booleans but their type is
an unsigned int (of one 1 bit width to save space). Change the type to
bool keeping the :1 suffix so that they combine with the previous u8
fields in order to save space. This makes the code more clear by using
explicit true/false ... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index eff2d388a706..78da47a3d00e 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1408,12 +1408,12 @@ static int find_parent_nodes(struct btrfs_backref_walk_ctx *ctx,
if (!path)
return -ENOMEM;
if (!ctx->trans) {
- path->search_commit_root... |
5d8222a50ad37c98455da08b33ce49fe6b726c72 | Analyze and fix the following issue in the Linux kernel code: btrfs: abort transaction on item count overflow in __push_leaf_left() | Problem Details:
If we try to push an item count from the right leaf that is greater than
the number of items in the leaf, we just emit a warning. This should
never happen but if it does we get an underflow in the new number of
items in the right leaf and chaos follows from it. So replace the warning
with proper error ... | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 57b7d09d85cc..8b54daf3d0e7 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -3393,9 +3393,13 @@ static noinline int __push_leaf_left(struct btrfs_trans_handle *trans,
btrfs_set_header_nritems(left, old_left_nritems + push_items);
/* fixup right... |
fad159f69edabac046c725cdecf22275199b2dd0 | Analyze and fix the following issue in the Linux kernel code: btrfs: add unlikely to critical error in btrfs_extend_item() | Problem Details:
It's not expected to get a data size less than the leaf's free space,
which would lead to a leaf dump and BUG(), so tag the if statement's
expression as unlikely, hinting the compiler to potentially generate
better code.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse... | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index e683f961742a..b5cf1b6f5adc 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -4106,7 +4106,7 @@ void btrfs_extend_item(struct btrfs_trans_handle *trans,
nritems = btrfs_header_nritems(leaf);
data_end = leaf_data_end(leaf);
- if (btrfs_leaf_free_... |
e7dd1182fcedee7c6097c9f49eba8de94a4364e3 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix leaf leak in an error path in btrfs_del_items() | Problem Details:
If the call to btrfs_del_leaf() fails we return without decrementing the
extra ref we took on the leaf, therefore leaking it. Fix this by ensuring
we drop the ref count before returning the error.
Fixes: 751a27615dda ("btrfs: do not BUG_ON() on tree mod log failures at btrfs_del_ptr()")
Reviewed-by: Q... | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index f6a9b6bbf78b..614aa4b56571 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -4562,9 +4562,9 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
if (btrfs_header_nritems(leaf) == 0) {
path->slots[1] = slot;
... |
280dd7c106fd4c47756d19f6ae89862bb7bf7225 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix incomplete parameter rename in btrfs_decompress() | Problem Details:
Commit 2c25716dcc25 ("btrfs: zlib: fix and simplify the inline extent
decompression") renamed the 'start_byte' parameter to 'dest_pgoff' in
the btrfs_decompress(). The remaining 'start_byte' references are
inconsistent with the actual implementation and may cause confusion for
developers.
Ensure consi... | ```diff
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 1d4c3d2e2d6c..7dda6cc68379 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -1084,7 +1084,8 @@ static int btrfs_decompress_bio(struct compressed_bio *cb)
/*
* a less complex decompression routine. Our compressed data fits ... |
4decf577fb7a5a252f6f67383d06111b3525505f | Analyze and fix the following issue in the Linux kernel code: btrfs: move and rename CSUM_FMT definition | Problem Details:
Move the CSUM_FMT* definitions to fs.h where is be the BTRFS_KEY_FMT
and add the prefix for consistency.
Signed-off-by: David Sterba <dsterba@suse.com> | ```diff
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index a66ca5531b5c..af38d47fc131 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -543,10 +543,6 @@ static inline void btrfs_set_inode_mapping_order(struct btrfs_inode *inode)
#endif
}
-/* Array of bytes with variable length, he... |
d435c513652e6a90a13c881986a2cc6420c99cab | Analyze and fix the following issue in the Linux kernel code: btrfs: make sure extent and csum paths are always released in scrub_raid56_parity_stripe() | Problem Details:
Unlike queue_scrub_stripe() which uses the global sctx->extent_path and
sctx->csum_path which are always released at the end of scrub_stripe(),
scrub_raid56_parity_stripe() uses local extent_path and csum_path, as
that function is going to handle the full stripe, whose bytenr may be
smaller than the by... | ```diff
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 3dbb02dbfffb..ad7084c323d0 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -2288,9 +2288,9 @@ static int scrub_raid56_parity_stripe(struct scrub_ctx *sctx,
bio_put(bio);
btrfs_bio_counter_dec(fs_info);
+out:
btrfs_release_path(&extent_path);... |
cfc7fe2b0f18c54b571b4137156f944ff76057c8 | Analyze and fix the following issue in the Linux kernel code: btrfs: use kvcalloc for btrfs_bio::csum allocation | Problem Details:
[BUG]
There is a report that memory allocation failed for btrfs_bio::csum
during a large read:
b2sum: page allocation failure: order:4, mode:0x40c40(GFP_NOFS|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0
CPU: 0 UID: 0 PID: 416120 Comm: b2sum Tainted: G W 6.17.0 #1 NONE
Ta... | ```diff
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
index 1286c1ac1940..a73652b8724a 100644
--- a/fs/btrfs/bio.c
+++ b/fs/btrfs/bio.c
@@ -293,7 +293,7 @@ static void btrfs_check_read_bio(struct btrfs_bio *bbio, struct btrfs_device *de
offset += sectorsize;
}
if (bbio->csum != bbio->csum_inline)
- kfree(bbio->c... |
dd57c78aec398717a2fa6488d87b1a6cd43c7d0d | Analyze and fix the following issue in the Linux kernel code: btrfs: introduce btrfs_bio::async_csum | Problem Details:
[ENHANCEMENT]
Btrfs currently calculates data checksums then submits the bio.
But after commit 968f19c5b1b7 ("btrfs: always fallback to buffered write
if the inode requires checksum"), any writes with data checksum will
fallback to buffered IO, meaning the content will not change during
writeback.
Th... | ```diff
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
index 52b8893f26f1..1286c1ac1940 100644
--- a/fs/btrfs/bio.c
+++ b/fs/btrfs/bio.c
@@ -105,6 +105,9 @@ void btrfs_bio_end_io(struct btrfs_bio *bbio, blk_status_t status)
/* Make sure we're already in task context. */
ASSERT(in_task());
+ if (bbio->async_csum)
+ ... |
c5667f9c8eb90293dfa4e52c65eb89fe39f5652d | Analyze and fix the following issue in the Linux kernel code: btrfs: headers cleanup to remove unnecessary local includes | Problem Details:
[BUG]
When I tried to remove btrfs_bio::fs_info and use btrfs_bio::inode to
grab the fs_info, the header "btrfs_inode.h" is needed to access the
full btrfs_inode structure.
Then btrfs will fail to compile.
[CAUSE]
There is a recursive including chain:
"bio.h" -> "btrfs_inode.h" -> "extent_map.h" -... | ```diff
diff --git a/fs/btrfs/accessors.h b/fs/btrfs/accessors.h
index 99b3ced12805..78721412951c 100644
--- a/fs/btrfs/accessors.h
+++ b/fs/btrfs/accessors.h
@@ -12,6 +12,7 @@
#include <linux/string.h>
#include <linux/mm.h>
#include <uapi/linux/btrfs_tree.h>
+#include "fs.h"
#include "extent_io.h"
struct extent... |
4c9c7be47310c1dbd7b6d37d45986123f5b133b4 | Analyze and fix the following issue in the Linux kernel code: PCI: pwrctrl: Add power control driver for TC9563 | Problem Details:
TC9563 is a PCIe switch that has one upstream and three downstream ports.
One of the downstream ports is connected to an integrated ethernet MAC
endpoint. The other two downstream ports are available to connect to
external devices. One Host can connect to TC9563 by upstream port. The
TC9563 switch need... | ```diff
diff --git a/drivers/pci/pwrctrl/Kconfig b/drivers/pci/pwrctrl/Kconfig
index 6956c1854811..e0f999f299bb 100644
--- a/drivers/pci/pwrctrl/Kconfig
+++ b/drivers/pci/pwrctrl/Kconfig
@@ -22,6 +22,21 @@ config PCI_PWRCTRL_SLOT
PCI slots. The voltage regulators powering the rails of the PCI slots
are expected... |
c7b478504b2e5a8e428eac4c16925d52c8deb6bd | Analyze and fix the following issue in the Linux kernel code: btrfs: scrub: cancel the run if the process or fs is being frozen | Problem Details:
It's a known bug that btrfs scrub/dev-replace can prevent the system
from suspending.
There are at least two factors involved:
- Holding super_block::s_writers for the whole scrub/dev-replace duration
We hold that percpu rw semaphore through mnt_want_write_file() for the
whole scrub/dev-replace d... | ```diff
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 00e42a7f52af..9738caa355c4 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -2069,6 +2069,44 @@ static int queue_scrub_stripe(struct scrub_ctx *sctx, struct btrfs_block_group *
return 0;
}
+/*
+ * Return 0 if we should not cancel the scrub.
+ * ... |
1a96f3a22fd88b8ea217233d359e0334981b0384 | Analyze and fix the following issue in the Linux kernel code: iommu/dma: add missing support for DMA_ATTR_MMIO for dma_iova_unlink() | Problem Details:
Commit c288d657dd51 added support for DMA_ATTR_MMIO attribute in the
dma_iova_link() code path, but missed that the CPU cache is being also
touched in the dma_iova_unlink() path. Fix this.
Fixes: c288d657dd51 ("iommu/dma: implement DMA_ATTR_MMIO for dma_iova_link().")
Signed-off-by: Marek Szyprowski <... | ```diff
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 7944a3af4545..f1fb27681b0b 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -2008,7 +2008,7 @@ static void iommu_dma_iova_unlink_range_slow(struct device *dev,
end - addr, iovad->granule - iova_start_pad);
... |
b70c32f10a049a6e7c7c718d6ce69554af1e9b3c | Analyze and fix the following issue in the Linux kernel code: btrfs: remove double underscore prefix from __reserve_bytes() | Problem Details:
The use of a double underscore prefix is discouraged and we have no
justification at all for it all since there's no reserved_bytes() counter
part. So remove the prefix.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Ste... | ```diff
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
index 957477e5f01f..edeb46f1aa33 100644
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -67,7 +67,7 @@
* Assume we are unable to simply make the reservation because we do not have
* enough space
*
- * -> __reserve_bytes
+ * -> r... |
6f4779faa0c19c3a6ed0d52cb0f068ae891d7bb9 | Analyze and fix the following issue in the Linux kernel code: btrfs: inline btrfs_space_info_used() | Problem Details:
The function is simple enough to be inlined and in fact doing it even
reduces the object code. In x86_64 with gcc 14.2.0-19 from Debian the
results were the following:
Before this change
$ size fs/btrfs/btrfs.ko
text data bss dec hex filename
1919410 161703 15592 209... | ```diff
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
index 6c2769044b55..53677ecb8c15 100644
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -172,16 +172,6 @@
* thing with or without extra unallocated space.
*/
-u64 __pure btrfs_space_info_used(const struct btrfs_space_info *s_info,
- ... |
09d0f285310ab46457a31ab942e9a1157dd70c38 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix parameter documentation for btrfs_reserve_data_bytes() | Problem Details:
We don't have a fs_info argument anymore since commit 5d39fda880be
("btrfs: pass btrfs_space_info to btrfs_reserve_data_bytes()"), it
was replaced by a space_info argument. So update the documentation.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
R... | ```diff
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
index bf542f154603..f01d083a444c 100644
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -1882,7 +1882,7 @@ int btrfs_reserve_metadata_bytes(struct btrfs_fs_info *fs_info,
/*
* Try to reserve data bytes for an allocation.
*
- * @fs_info: ... |
18de34daa7c62c830be533aace6b7c271e8e95cf | Analyze and fix the following issue in the Linux kernel code: btrfs: truncate ordered extent when skipping writeback past i_size | Problem Details:
While running test case btrfs/192 from fstests with support for large
folios (needs CONFIG_BTRFS_EXPERIMENTAL=y) I ended up getting very sporadic
btrfs check failures reporting that csum items were missing. Looking into
the issue it turned out that btrfs check searches for csum items of a file
extent i... | ```diff
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 3804029978ea..3a57aeb3c622 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1691,13 +1691,13 @@ static noinline_for_stack int extent_writepage_io(struct btrfs_inode *inode,
bool submitted_io = false;
int found_error = 0;
const ... |
7454048db27d685a155aaf4ea03bb9ad0d086bb9 | Analyze and fix the following issue in the Linux kernel code: kbuild: Enable GCC diagnostic context for value-tracking warnings | Problem Details:
Enable GCC 16's coming "-fdiagnostics-show-context=N" option[1] to
provide enhanced diagnostic information for value-tracking warnings,
which displays the control flow chain leading to the diagnostic. This
covers our existing use of -Wrestrict and -Wstringop-overread, and
gets us closer to enabling -Wa... | ```diff
diff --git a/Makefile b/Makefile
index d14824792227..d97452441cd0 100644
--- a/Makefile
+++ b/Makefile
@@ -940,6 +940,9 @@ KBUILD_CFLAGS += $(call cc-option,-fzero-init-padding-bits=all)
# for the randomize_kstack_offset feature. Disable it for all compilers.
KBUILD_CFLAGS += $(call cc-option, -fno-stack-clas... |
38e818718c5e04961eea0fa8feff3f100ce40408 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix racy bitfield write in btrfs_clear_space_info_full() | Problem Details:
From the memory-barriers.txt document regarding memory barrier ordering
guarantees:
(*) These guarantees do not apply to bitfields, because compilers often
generate code to modify these using non-atomic read-modify-write
sequences. Do not attempt to use bitfields to synchronize parallel
... | ```diff
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 5322ef2ae015..8bf501fbcc0b 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -4215,7 +4215,7 @@ int btrfs_chunk_alloc(struct btrfs_trans_handle *trans,
mutex_unlock(&fs_info->chunk_mutex);
} else {
/* Proceed with al... |
745483ea988b4abba63a881931675268d57b0f36 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix comment in alloc_bitmap() and drop stale TODO | Problem Details:
All callers of alloc_bitmap() hold a transaction handle, so GFP_NOFS is
needed to avoid deadlocks on recursion. Update the comment and drop the
stale TODO.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Rajeev Tapadia <rtapadia730@gmail.com>
Signed-off-by: Filipe Manana <fdmanana@suse.c... | ```diff
diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c
index 9ed36bbe9d35..26eae347739f 100644
--- a/fs/btrfs/free-space-tree.c
+++ b/fs/btrfs/free-space-tree.c
@@ -165,11 +165,9 @@ static unsigned long *alloc_bitmap(u32 bitmap_size)
/*
* GFP_NOFS doesn't work with kvmalloc(), but we really... |
725e46298876a2cc1f1c3fb22ba69d29102c3ddf | Analyze and fix the following issue in the Linux kernel code: btrfs: fix double free of qgroup record after failure to add delayed ref head | Problem Details:
In the previous code it was possible to incur into a double kfree()
scenario when calling add_delayed_ref_head(). This could happen if the
record was reported to already exist in the
btrfs_qgroup_trace_extent_nolock() call, but then there was an error
later on add_delayed_ref_head(). In this case, sinc... | ```diff
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index 481802efaa14..f8fc26272f76 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -798,9 +798,13 @@ static void init_delayed_ref_head(struct btrfs_delayed_ref_head *head_ref,
}
/*
- * helper function to actually insert a head no... |
aebe2bb0b861795cd832473b7257c6cc1cd086d0 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix trivial -Wshadow warnings | Problem Details:
When compiling with -Wshadow (also in 'make W=2' build) there are
several reports of shadowed variables that seem to be harmless:
- btrfs_do_encoded_write() - we can reuse 'ordered', there's no previous
value that would need to be preserved
- scrub_write_endio() - we need a standalone 'i' for... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 6282911e536f..6131589aba7c 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -9826,8 +9826,6 @@ ssize_t btrfs_do_encoded_write(struct kiocb *iocb, struct iov_iter *from,
}
for (;;) {
- struct btrfs_ordered_extent *ordered;
-
ret = btrfs_wait... |
9594783e4b4901cbc28ff940eff7e2554a4f7801 | Analyze and fix the following issue in the Linux kernel code: btrfs: print-tree: use string format for key names | Problem Details:
There's a warning when -Wformat=2 is used:
fs/btrfs/print-tree.c: In function ‘key_type_string’:
fs/btrfs/print-tree.c:424:17: warning: format not a string literal and no format arguments [-Wformat-nonliteral]
424 | scnprintf(buf, buf_size, key_to_str[key->type]);
We're printing fix... | ```diff
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index 62b993fae54f..d16f2960d55d 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -421,7 +421,7 @@ static void key_type_string(const struct btrfs_key *key, char *buf, int buf_size
if (key->type == 0 && key->objectid == BTRFS_FREE_SPAC... |
4e700ac62ac12ffe8579680e6987b27066339d71 | Analyze and fix the following issue in the Linux kernel code: btrfs: remove unnecessary NULL fs_info check from find_lock_delalloc_range() | Problem Details:
[STATIC CHECK REPORT]
Smatch is reporting that find_lock_delalloc_range() used to do a null
pointer check before accessing fs_info, but now we're accessing it for
sectorsize unconditionally.
[FALSE ALERT]
This is a false alert, the existing null pointer check is introduced in
commit f7b12a62f008 ("btr... | ```diff
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 23273d0e6f22..3804029978ea 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -374,8 +374,7 @@ noinline_for_stack bool find_lock_delalloc_range(struct inode *inode,
struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
const u64 o... |
e2378e61153afd2afb671ec66a47f34280c20dad | Analyze and fix the following issue in the Linux kernel code: PCI: Use max() instead of max_t() to ease static analysis | Problem Details:
In this code:
used_buses = max_t(unsigned int, available_buses,
pci_hotplug_bus_size - 1);
max_t() casts the 'unsigned long' pci_hotplug_bus_size (either 32 or 64
bits) to 'unsigned int' (32 bits) result type, so there's a potential of
discarding significant bits.
Instead, use... | ```diff
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index c83e75a0ec12..155d4a7d3b28 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -3170,8 +3170,7 @@ static unsigned int pci_scan_child_bus_extend(struct pci_bus *bus,
* bus number if there is room.
*/
if (bus->self && bus->self->is_hot... |
8974573ba45493af6120093cdf88ce5511aff935 | Analyze and fix the following issue in the Linux kernel code: ACPI: tools: pfrut: fix memory leak and resource leak in pfrut.c | Problem Details:
Static analysis found an issue in pfrut.c
cppcheck output before this patch:
tools/power/acpi/tools/pfrut/pfrut.c:225:3: error: Resource leak: fd_update [resourceLeak]
tools/power/acpi/tools/pfrut/pfrut.c:269:3: error: Resource leak: fd_update [resourceLeak]
tools/power/acpi/tools/pfrut/pfrut.c:269:3:... | ```diff
diff --git a/tools/power/acpi/tools/pfrut/pfrut.c b/tools/power/acpi/tools/pfrut/pfrut.c
index 44a9ecbd91e8..4d9b0177c312 100644
--- a/tools/power/acpi/tools/pfrut/pfrut.c
+++ b/tools/power/acpi/tools/pfrut/pfrut.c
@@ -222,6 +222,7 @@ int main(int argc, char *argv[])
fd_update_log = open("/dev/acpi_pfr_teleme... |
fe598ab37e472514e769d3eeb0456cddb3b8ba9f | Analyze and fix the following issue in the Linux kernel code: hwmon: (vt8231) Convert macros to functions to avoid TOCTOU | Problem Details:
The macro FAN_FROM_REG evaluates its arguments multiple times. When used
with shared driver data, this leads to Time-of-Check to Time-of-Use
(TOCTOU) race conditions, potentially causing divide-by-zero errors.
Convert the macro to a static function to ensure arguments are evaluated
only once.
Additio... | ```diff
diff --git a/drivers/hwmon/vt8231.c b/drivers/hwmon/vt8231.c
index 3bf27c21845b..5757a0979f3f 100644
--- a/drivers/hwmon/vt8231.c
+++ b/drivers/hwmon/vt8231.c
@@ -138,7 +138,12 @@ static inline u8 FAN_TO_REG(long rpm, int div)
return clamp_val(1310720 / (rpm * div), 1, 255);
}
-#define FAN_FROM_REG(val, di... |
4faaa77d6b32347ea6af74d5fd2f34c3922aeee6 | Analyze and fix the following issue in the Linux kernel code: hwmon: (emc2103) Add locking to avoid TOCTOU | Problem Details:
The functions fan1_input_show and fan1_target_show check shared data for
zero before using it as a divisor. These accesses are currently
lockless. If the data changes to zero between the check and the
division, it causes a divide-by-zero error.
Explicitly acquire the update lock around these checks an... | ```diff
diff --git a/drivers/hwmon/emc2103.c b/drivers/hwmon/emc2103.c
index 60eddc7b0270..9b8e925af030 100644
--- a/drivers/hwmon/emc2103.c
+++ b/drivers/hwmon/emc2103.c
@@ -277,8 +277,10 @@ fan1_input_show(struct device *dev, struct device_attribute *da, char *buf)
{
struct emc2103_data *data = emc2103_update_devi... |
860238af7a3348225de228dc0f33a7d631638333 | Analyze and fix the following issue in the Linux kernel code: x86_64/bug: Inline the UD1 | Problem Details:
(Ab)use the static_call infrastructure to convert all:
call __WARN_trap
instances into the desired:
ud1 (%edx), %rdi
eliminating the CALL/RET, but more importantly, fixing the
fact that all WARNs will have:
RIP: 0010:__WARN_trap+0
Basically, by making it a static_call trampoline call, objto... | ```diff
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
index 87199e6633f9..d0a96ff5c02c 100644
--- a/arch/x86/include/asm/bug.h
+++ b/arch/x86/include/asm/bug.h
@@ -140,6 +140,9 @@ do { \
#ifdef HAVE_ARCH_BUG_FORMAT_ARGS
#ifndef __ASSEMBLY__
+#include <linux/static_call_types.h>
+DECLA... |
11bb4944f014d756f35261f5afcb346901ef1efa | Analyze and fix the following issue in the Linux kernel code: x86/bug: Implement WARN_ONCE() | Problem Details:
Implement WARN_ONCE like WARN using BUGFLAG_ONCE.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251110115758.339309119@infradead.org | ```diff
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
index b5474603460b..87199e6633f9 100644
--- a/arch/x86/include/asm/bug.h
+++ b/arch/x86/include/asm/bug.h
@@ -178,6 +178,15 @@ do { \
#define __WARN_printf(taint, fmt, arg...) \
__WARN_print_arg(BUGFLAG_TAINT(taint), fmt, ## arg)
... |
5b472b6e5bd951b208fbbe373892891398eb5ad1 | Analyze and fix the following issue in the Linux kernel code: x86_64/bug: Implement __WARN_printf() | Problem Details:
The basic idea is to have __WARN_printf() be a vararg function such
that the compiler can do the optimal calling convention for us. This
function body will be a #UD and then set up a va_list in the exception
from pt_regs.
But because the trap will be in a called function, the bug_entry must
be passed ... | ```diff
diff --git a/arch/x86/entry/entry.S b/arch/x86/entry/entry.S
index 8e9a0cc20a4a..772c64ed4523 100644
--- a/arch/x86/entry/entry.S
+++ b/arch/x86/entry/entry.S
@@ -32,6 +32,14 @@ SYM_FUNC_END(write_ibpb)
/* For KVM */
EXPORT_SYMBOL_GPL(write_ibpb);
+SYM_FUNC_START(__WARN_trap)
+ ANNOTATE_NOENDBR
+ ANNOTATE_R... |
4f1b701f24bea0900e349aa1c860db24ba0150aa | Analyze and fix the following issue in the Linux kernel code: x86/bug: Use BUG_FORMAT for DEBUG_BUGVERBOSE_DETAILED | Problem Details:
Since we have an explicit format string, use it for the condition string
instead of frobbing it in the file string.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251110115758.097401406@infradead.org | ```diff
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
index 5e63f9952a0c..50b802169a4b 100644
--- a/arch/x86/include/asm/bug.h
+++ b/arch/x86/include/asm/bug.h
@@ -74,13 +74,19 @@
".popsection\n" \
extra
+#ifdef CONFIG_DEBUG_BUGVERBOSE_DETAILED
+#define WARN_CONDITION_STR(cond_str) co... |
0a52d339d35df80d65706263dc55542dd795a115 | Analyze and fix the following issue in the Linux kernel code: x86/bug: Add BUG_FORMAT basics | Problem Details:
Opt-in to BUG_FORMAT for x86_64, adjust the BUGTABLE helper and for
now, just store NULL pointers.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251110115757.980264454@infradead.org | ```diff
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
index 27e3861cf984..5e63f9952a0c 100644
--- a/arch/x86/include/asm/bug.h
+++ b/arch/x86/include/asm/bug.h
@@ -50,33 +50,44 @@
#define __BUG_ENTRY_VERBOSE(file, line)
#endif
-#define __BUG_ENTRY(file, line, flags) \
+#if defined(CONFIG_... |
f4c8298cf5f5c2458f700546456601f3ca9b282b | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Cleanup GuC log buffer macros and helpers | Problem Details:
Cleanup GuC log buffer macros and helpers, add Xe style macro prefix.
Update buffer type values to align with the GuC specification
Update buffer offset calculation.
Remove helper functions, replaced with macros.
Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
Reviewed-by: Michal Wajdeczko <micha... | ```diff
diff --git a/drivers/gpu/drm/xe/abi/guc_log_abi.h b/drivers/gpu/drm/xe/abi/guc_log_abi.h
index 554630b7ccd9..fbf212d59a40 100644
--- a/drivers/gpu/drm/xe/abi/guc_log_abi.h
+++ b/drivers/gpu/drm/xe/abi/guc_log_abi.h
@@ -8,11 +8,45 @@
#include <linux/types.h>
+/**
+ * DOC: GuC Log buffer Layout
+ *
+ * The i... |
ad93ba02678eda5fc8e259cf4b52997e6fa570cf | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Allow selftests to build with older xxd | Problem Details:
Currently selftests require xxd with the "-n <name>" option
which allows the user to specify a name not derived from
the input object path. Instead of relying on this newer
feature, older xxd can be used if we link our desired name
("test_progs_verification_cert") to the input object.
Many distros sh... | ```diff
diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
index be1ee7ba7ce0..ca557e5668fd 100644
--- a/tools/testing/selftests/bpf/.gitignore
+++ b/tools/testing/selftests/bpf/.gitignore
@@ -23,6 +23,7 @@ test_tcpnotify_user
test_libbpf
xdping
test_cpp
+test_progs_verifica... |
90ae54b4c7eca42d5ce006dd0a8cb0b5bfbf80d0 | Analyze and fix the following issue in the Linux kernel code: bpftool: Allow bpftool to build with openssl < 3 | Problem Details:
ERR_get_error_all()[1] is a openssl v3 API, so to make code
compatible with openssl v1 utilize ERR_get_err_line_data
instead. Since openssl is already a build requirement for
the kernel (minimum requirement openssl 1.0.0), this will
allow bpftool to compile where opensslv3 is not available.
Signing-re... | ```diff
diff --git a/tools/bpf/bpftool/sign.c b/tools/bpf/bpftool/sign.c
index b34f74d210e9..f9b742f4bb10 100644
--- a/tools/bpf/bpftool/sign.c
+++ b/tools/bpf/bpftool/sign.c
@@ -28,6 +28,12 @@
#define OPEN_SSL_ERR_BUF_LEN 256
+/* Use deprecated in 3.0 ERR_get_error_line_data for openssl < 3 */
+#if !defined(OPENS... |
f6041803a831266a2a5a5b5af66f7de0845bcbf3 | Analyze and fix the following issue in the Linux kernel code: io_uring/net: ensure vectored buffer node import is tied to notification | Problem Details:
When support for vectored registered buffers was added, the import
itself is using 'req' rather than the notification io_kiocb, sr->notif.
For non-vectored imports, sr->notif is correctly used. This is important
as the lifetime of the two may be different. Use the correct io_kiocb
for the vectored buff... | ```diff
diff --git a/io_uring/net.c b/io_uring/net.c
index a95cc9ca2a4d..43d77f95db51 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -1532,8 +1532,10 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
unsigned uvec_segs = kmsg->msg.msg_iter.nr_segs;
int ret;
- ret = io_import_reg_vec(ITE... |
5a062505aa0ed5f9124c22f07da6ba58950475b2 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Fix .bulk_profile/sched_priority description | Problem Details:
The .bulk_profile/sched_priority file is always write-only, unlike
the profile/sched_priority files which can be either read-write or
read-only (in case of PF or VFs respectively).
Fixes: 6b514ed2d9a7 ("drm/xe/pf: Add documentation for sriov_admin attributes")
Signed-off-by: Michal Wajdeczko <michal.w... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-driver-intel-xe-sriov b/Documentation/ABI/testing/sysfs-driver-intel-xe-sriov
index 2fd7e9b7bacc..7f5ef9eada53 100644
--- a/Documentation/ABI/testing/sysfs-driver-intel-xe-sriov
+++ b/Documentation/ABI/testing/sysfs-driver-intel-xe-sriov
@@ -119,7 +119,7 @@ Descripti... |
0f4435a1f46efc3177eb082cd3f73e29da5ab86a | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Use div_u64 when calculating GGTT profile | Problem Details:
This will fix the following error seen on some 32-bit config:
"ERROR: modpost: "__udivdi3" [drivers/gpu/drm/xe/xe.ko] undefined!"
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511150929.3vUi6PEJ-lkp@intel.com/
Fixes: e448372e8a8e ("drm/xe/pf: Use migr... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
index 62f6cc45a764..59c5c6b4d994 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
@@ -711,7 +711,7 @@ static u64 pf_profile_fair_ggtt(struct xe_gt *gt, uns... |
47c9214dcbea9043ac20441a285c7bb5486b8b2d | Analyze and fix the following issue in the Linux kernel code: bpf: fix the usage of BPF_TRAMP_F_SKIP_FRAME | Problem Details:
Some places calculate the origin_call by checking if
BPF_TRAMP_F_SKIP_FRAME is set. However, it should use
BPF_TRAMP_F_ORIG_STACK for this propose. Just fix them.
Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/r/202511... | ```diff
diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
index 45cbc7c6fe49..21c70ae3296b 100644
--- a/arch/riscv/net/bpf_jit_comp64.c
+++ b/arch/riscv/net/bpf_jit_comp64.c
@@ -1131,7 +1131,7 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im,
store_args(nr_arg_slots,... |
fad804002ef3cae8ca0509849d0d9539be069095 | Analyze and fix the following issue in the Linux kernel code: bpf: cleanup aux->used_maps after jit | Problem Details:
In commit b4ce5923e780 ("bpf, x86: add new map type: instructions array")
env->used_map was copied to func[i]->aux->used_maps before jitting.
Clear these fields out after jitting such that pointer to freed memory
(env->used_maps is freed later) are not kept in a live data structure.
The reason why the... | ```diff
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 2e170be647bd..766695491bc5 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -22266,6 +22266,15 @@ static int jit_subprogs(struct bpf_verifier_env *env)
cond_resched();
}
+ /*
+ * Cleanup func[i]->aux fields which aren't re... |
66a50fa49db53cf2b1894d4cd7c1b5b522276706 | Analyze and fix the following issue in the Linux kernel code: Revert "drm/amd: fix gfx hang on renoir in IGT reload test" | Problem Details:
The original patch introduced additional latency during boot time
because it triggers a driver reload to avoid a CP hang when the driver
is reloaded multiple times. This has been addressed with a more generic
solution that triggers the GPU reset only during the unload phase,
avoiding extra latency duri... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index 9785fada4fa7..42f5d9c0e3af 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -853,10 +853,6 @@ static bool soc15_need_reset_on_init(struct amdgpu_device *adev)
{
u32 sol_reg;
... |
34355e61835e772abddb49ad819f88bf185f8d42 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix GFX hang on SteamDeck when amdgpu is reloaded | Problem Details:
When trying to unload amdgpu in the SteamDeck (TTY mode), the following
set of errors happens and the system gets unstable:
[..]
[drm] Initialized amdgpu 3.64.0 for 0000:04:00.0 on minor 0
amdgpu 0000:04:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on gfx_0.0.0 (-110).
amdgpu 00... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ca4e47ce2417..a7594ae44b20 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3681,6 +3681,20 @@ static int amdgpu_device_ip_fini_early(struct amdg... |
e12603bf2c3d571476a21debfeab80bb70d8c0cc | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix amdgpu_irq enabled counter unbalanced on smu v11.0 | Problem Details:
v1:
- fix amdgpu_irq enabled counter unbalanced issue on smu_v11_0_disable_thermal_alert.
v2:
- re-enable smu thermal alert to make amdgpu irq counter balance for smu v11.0 if in runpm state
[75582.361561] ------------[ cut here ]------------
[75582.361565] WARNING: CPU: 42 PID: 533 at drivers/gpu/dr... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 4a2c3ad0c38a..4b5706be34e4 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -1669,9 +1669,12 @@ static int smu_smc_hw_setup(struct smu_context *smu)
... |
03bc4831ef064e114328dea906101cff7c6fb8b3 | Analyze and fix the following issue in the Linux kernel code: nvmem: layouts: fix nvmem_layout_bus_uevent | Problem Details:
correctly check the ENODEV return value.
Fixes: 810b790033cc ("nvmem: layouts: fix automatic module loading")
CC: stable@vger.kernel.org
Co-developed-by: WangYuli <wangyl5933@chinaunicom.cn>
Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signe... | ```diff
diff --git a/drivers/nvmem/layouts.c b/drivers/nvmem/layouts.c
index f381ce1e84bd..7ebe53249035 100644
--- a/drivers/nvmem/layouts.c
+++ b/drivers/nvmem/layouts.c
@@ -51,7 +51,7 @@ static int nvmem_layout_bus_uevent(const struct device *dev,
int ret;
ret = of_device_uevent_modalias(dev, env);
- if (ret !=... |
74851fbb6d647304f8a7dc491434d3a335ef4b8d | Analyze and fix the following issue in the Linux kernel code: usb: gadget: renesas_usbf: Handle devm_pm_runtime_enable() errors | Problem Details:
devm_pm_runtime_enable() can fail due to memory allocation.
The current code ignores its return value, potentially causing
pm_runtime_resume_and_get() to operate on uninitialized runtime
PM state.
Check the return value of devm_pm_runtime_enable() and return on failure.
Fixes: 3e6e14ffdea4 ("usb: gad... | ```diff
diff --git a/drivers/usb/gadget/udc/renesas_usbf.c b/drivers/usb/gadget/udc/renesas_usbf.c
index 14f4b2cf05a4..4c201574a0af 100644
--- a/drivers/usb/gadget/udc/renesas_usbf.c
+++ b/drivers/usb/gadget/udc/renesas_usbf.c
@@ -3262,7 +3262,9 @@ static int usbf_probe(struct platform_device *pdev)
if (IS_ERR(udc->r... |
5941f0e0c1e0be03ebc15b461f64208f5250d3d9 | Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu-v3: Fix error check in arm_smmu_alloc_cd_tables | Problem Details:
In arm_smmu_alloc_cd_tables(), the error check following the
dma_alloc_coherent() for cd_table->l2.l1tab incorrectly tests
cd_table->l2.l2ptrs.
This means an allocation failure for l1tab goes undetected, causing
the function to return 0 (success) erroneously.
Correct the check to test cd_table->l2.l1... | ```diff
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 2a8b46b948f0..9780f40ba3e6 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -1464,7 +1464,7 @@ static int arm_smmu_alloc_cd_tables(struct arm_... |
fe6262910cd3fefe8a23d5f59a701085f7adad6b | Analyze and fix the following issue in the Linux kernel code: dt-bindings: iommu: qcom_iommu: Allow 'tbu' clock | Problem Details:
Some IOMMUs on some platforms (there doesn't seem to be a good denominator
for this) require the presence of a third clock, specifically relating
to the instance's Translation Buffer Unit (TBU).
Stephan Gerhold noted [1] that according to Qualcomm Snapdragon 410E
Processor (APQ8016E) Technical Referen... | ```diff
diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.yaml b/Documentation/devicetree/bindings/iommu/qcom,iommu.yaml
index 3e5623edd207..93a489025317 100644
--- a/Documentation/devicetree/bindings/iommu/qcom,iommu.yaml
+++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.yaml
@@ -32,14 +32,18 @@ p... |
ee4f232dd1ff8e11a18c6dab6f7a3a89eee62436 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add ASL Xiamen Technology | Problem Details:
ASL Xiamen Technology Co. Ltd. is a Chinese high-speed interface and
display system chip design company. Adding it to the vendor prefixes.
Link: https://www.asl-tek.com/
Signed-off-by: Ettore Chimenti <ettore.chimenti@linaro.org>
Signed-off-by: Georg Gottleuber <ggo@tuxedocomputers.com>
Acked-by: Krz... | ```diff
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 65f713bb671f..e73442920f8b 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -176,6 +176,8 @@ patte... |
47d3949a9b04cbcb0e10abae30c2b53e98706e11 | Analyze and fix the following issue in the Linux kernel code: staging: fbtft: core: fix potential memory leak in fbtft_probe_common() | Problem Details:
fbtft_probe_common() allocates a memory chunk for "info" with
fbtft_framebuffer_alloc(). When "display->buswidth == 0" is true, the
function returns without releasing the "info", which will lead to a
memory leak.
Fix it by calling fbtft_framebuffer_release() when "display->buswidth
== 0" is true.
Fix... | ```diff
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 9e7b84071174..8a5ccc8ae0a1 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -1171,8 +1171,8 @@ int fbtft_probe_common(struct fbtft_display *display,
par->pdev = pdev;
if (d... |
a64ff10ca69bd3d6f056fdf5fcf80922fa9a4492 | Analyze and fix the following issue in the Linux kernel code: staging: gpib: Fix SPDX license for gpib headers | Problem Details:
As part destaging the gpib drivers we need to add the
WITH Linux-syscall-note to the SPDX license in the gpib
common includes as these will be part of the kernel headers.
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Link: https://patch.msgid.link/20251117144021.23569-4-dpenkler@gmail.com
Signed-of... | ```diff
diff --git a/drivers/staging/gpib/uapi/gpib.h b/drivers/staging/gpib/uapi/gpib.h
index ddf82a4d989f..2a7f5eeb9777 100644
--- a/drivers/staging/gpib/uapi/gpib.h
+++ b/drivers/staging/gpib/uapi/gpib.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-n... |
377441d53a2df61b105e823b335010cd4f1a6e56 | Analyze and fix the following issue in the Linux kernel code: firmware: stratix10-svc: fix make htmldocs warning for stratix10_svc | Problem Details:
Fix this warning that was generated from "make htmldocs":
WARNING: drivers/firmware/stratix10-svc.c:58 struct member 'intel_svc_fcs'
not described in 'stratix10_svc'
Fixes: e6281c26674e ("firmware: stratix10-svc: Add support for FCS")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https... | ```diff
diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index 08ed1b40bcfc..e909ec6f8d45 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -105,6 +105,7 @@ struct stratix10_svc_chan;
/**
* struct stratix10_svc - svc private data
* @stratix10_sv... |
935419b9fb74ab2643583fce750cb774c9b5faa6 | Analyze and fix the following issue in the Linux kernel code: firmware: stratix10-svc: fix make htmldocs warning | Problem Details:
Stephen Rothwell reports htmldocs warnings when merging char-misc tree:
WARNING: include/linux/firmware/intel/stratix10-svc-client.h:22 This comment
starts with '/**', but isn't a kernel-doc comment.
WARNING: include/linux/firmware/intel/stratix10-svc-client.h:184 Enum value
'COMMAND_HWMON_READTEMP' ... | ```diff
diff --git a/include/linux/firmware/intel/stratix10-svc-client.h b/include/linux/firmware/intel/stratix10-svc-client.h
index 1bcc56d14080..d290060f4c73 100644
--- a/include/linux/firmware/intel/stratix10-svc-client.h
+++ b/include/linux/firmware/intel/stratix10-svc-client.h
@@ -19,7 +19,7 @@
#define SVC_CLIENT... |
36b1cb4f33e77eae456e33c72534b9c7917c4a07 | Analyze and fix the following issue in the Linux kernel code: firmware: stratix-svc: fix make htmldocs warning | Problem Details:
Stephen Rothwell reports htmldocs warnings when merging char-misc tree:
WARNING: drivers/firmware/stratix10-svc.c:58 This comment starts with '/**',
but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Total number of transaction IDs, which is a combination of
WARNING: driv... | ```diff
diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index 3acfa067c5dd..08ed1b40bcfc 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -55,7 +55,7 @@
#define MAX_SDM_JOB_IDS 16
/* Number of bits used for asynchronous transaction hashing. */... |
f3f9f42232dee596d15491ca3f611d02174db49c | Analyze and fix the following issue in the Linux kernel code: kallsyms: Fix wrong "big" kernel symbol type read from procfs | Problem Details:
Currently when the length of a symbol is longer than 0x7f characters,
its type shown in /proc/kallsyms can be incorrect.
I found this issue when reading the code, but it can be reproduced by
following steps:
1. Define a function which symbol length is 130 characters:
#define X13(x) x##x##x##x#... | ```diff
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 1e7635864124..049e296f586c 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -103,8 +103,11 @@ static char kallsyms_get_symbol_type(unsigned int off)
{
/*
* Get just the first code, look it up in the token table,
- * and return the first ch... |
841f31d298693e82aaa9e7ac09f5fa9c8dcfdbc3 | Analyze and fix the following issue in the Linux kernel code: rust: num: bounded: rename `try_into_bitint` to `try_into_bounded` | Problem Details:
This is a remnant from when `Bounded` was called `BitInt` which I didn't
rename. Fix this.
Fixes: 01e345e82ec3 ("rust: num: add Bounded integer wrapping type")
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20251124-bounded_fix-v1-1-d8e34e1c727f@nvidia.com
Signed... | ```diff
diff --git a/rust/kernel/num/bounded.rs b/rust/kernel/num/bounded.rs
index 92c41b2eb760..f870080af8ac 100644
--- a/rust/kernel/num/bounded.rs
+++ b/rust/kernel/num/bounded.rs
@@ -218,11 +218,11 @@ fn fits_within<T: Integer>(value: T, num_bits: u32) -> bool {
/// use kernel::num::{Bounded, TryIntoBounded};
///... |
cb99656b7c4185953c9d272bbdab63c8aa651e6e | Analyze and fix the following issue in the Linux kernel code: spi: Fix potential uninitialized variable in probe() | Problem Details:
If the device tree is messed up, then potentially the "protocol" string
could potentially be uninitialized. The property is supposed to default
to "motorola" so if the of_property_read_string() function returns
-EINVAL then default to "motorola".
Fixes: 059f545832be ("spi: add support for microchip "... | ```diff
diff --git a/drivers/spi/spi-microchip-core-spi.c b/drivers/spi/spi-microchip-core-spi.c
index b8738190cdcb..16e0885474a0 100644
--- a/drivers/spi/spi-microchip-core-spi.c
+++ b/drivers/spi/spi-microchip-core-spi.c
@@ -295,10 +295,10 @@ static int mchp_corespi_transfer_one(struct spi_controller *host,
static... |
66e7c1e0ee08cfb6db64f8f3f6e5a3cc930145c8 | Analyze and fix the following issue in the Linux kernel code: printk: Avoid irq_work for printk_deferred() on suspend | Problem Details:
With commit ("printk: Avoid scheduling irq_work on suspend") the
implementation of printk_get_console_flush_type() was modified to
avoid offloading when irq_work should be blocked during suspend.
Since printk uses the returned flush type to determine what
flushing methods are used, this was thought to ... | ```diff
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index b1c0d35cf3ca..c27fc7fc64eb 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2393,7 +2393,7 @@ asmlinkage int vprintk_emit(int facility, int level,
/* If called from the scheduler, we can not call up(). */
if (level == LOG... |
53d1548612670aa8b5d89745116cc33d9d172863 | Analyze and fix the following issue in the Linux kernel code: mt76: mt7615: Fix memory leak in mt7615_mcu_wtbl_sta_add() | Problem Details:
In mt7615_mcu_wtbl_sta_add(), an skb sskb is allocated. If the
subsequent call to mt76_connac_mcu_alloc_wtbl_req() fails, the function
returns an error without freeing sskb, leading to a memory leak.
Fix this by calling dev_kfree_skb() on sskb in the error handling path
to ensure it is properly releas... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 52bbedda672b..fc0054f8bd60 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -874,8 +874,10 @@ mt7615_mcu_wtbl_sta_add(struct m... |
066f417be5fd8c7fe581c5550206364735dad7a3 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt792x: fix wifi init fail by setting MCU_RUNNING after CLC load | Problem Details:
Set the MT76_STATE_MCU_RUNNING bit only after mt7921_load_clc()
has successfully completed. Previously, the MCU_RUNNING state
was set before loading CLC, which could cause conflict between
chip mcu_init retry and mac_reset flow, result in chip init fail
and chip abnormal status. By moving the state set... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
index 8c5e6bdc0fc9..833d0ab64230 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
@@ -646,10 +646,10 @@ int mt7921_run_firmware(struct ... |
7545551631fa63101f97974f49ac0b564814f703 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: Add missing locking in mt7996_mac_sta_rc_work() | Problem Details:
Grab the mt76 mutex running mt7996_mac_sta_rc_work() since it is
required by mt7996_mcu_add_rate_ctrl routine.
Fixes: 28d519d0d493a ("wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl_fixed()")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20251118-mt7996-r... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 8ddb6d69f0da..2560e2f46e89 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -2890,6 +2890,8 @@ void mt7996_mac_sta_rc_work(str... |
2a432a6d0066d4ce05a2d0eec1da9e061eb70c49 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: skip ieee80211_iter_keys() on scanning link remove | Problem Details:
mt7996_vif_link_remove routine is executed by mt76_scan_complete()
without holding the wiphy mutex triggering the following lockdep warning.
WARNING: CPU: 0 PID: 72 at net/mac80211/key.c:1029 ieee80211_iter_keys+0xe4/0x1a0 [mac80211]
CPU: 0 UID: 0 PID: 72 Comm: kworker/u32:2 Tainted: G S ... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index 2a45db398fd5..beed795edb24 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -392,7 +392,8 @@ void mt7996_vif_link_remove(s... |
4fe823b9ee0317b04ddc6d9e00fea892498aa0f2 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: skip deflink accounting for offchannel links | Problem Details:
Do not take into account offchannel links for deflink accounting.
Fixes: a3316d2fc669f ("wifi: mt76: mt7996: set vif default link_id adding/removing vif links")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Tested-by: Ben Greear <greearb@candelatech.com>
Link: https://patch.msgid.link/20251114-... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index 79e5731d8f0d..2a45db398fd5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -370,7 +370,8 @@ int mt7996_vif_link_add(struc... |
6aaaaeacf18b2dc2b0f78f241800e0ea680938c7 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: Move mt76_abort_scan out of mt76_reset_device() | Problem Details:
Move mt76_abort_scan routine out of mt76_reset_device() in order to
avoid a possible deadlock since mt76_reset_device routine is running
with mt76 mutex help and mt76_abort_scan_complete() can grab mt76 mutex
in some cases.
Fixes: b36d55610215a ("wifi: mt76: abort scan/roc on hw restart")
Signed-off-b... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 72ed3c825fa6..75772979f438 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -850,8 +850,6 @@ void mt76_reset_device(struct mt76_dev *d... |
a84b172cca90a3a6b97afac9113daf3bf1b172b3 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: move mt7996_update_beacons under mt76 mutex | Problem Details:
Move mt7996_update_beacons routine inside mt76 mutex critical section
in mt7996_mac_reset_work() in order to run mt7996_vif_conf_link() in
mt7996_mcu_add_beacon routine.
Fixes: f30906c55a400 ("wifi: mt76: mt7996: disable beacons when going offchannel")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.o... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 2c869f710193..a3420f683d27 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -2632,11 +2632,11 @@ void mt7996_mac_reset_work(st... |
5a4bcba26e9fbea87507a81ad891e70bb525014f | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: grab mt76 mutex in mt7996_mac_sta_event() | Problem Details:
Grab mt76 mutex in mt7996_mac_sta_event routine in order to rely on
mt76_dereference() utility macro.
Fixes: ecd72f9695e7e ("wifi: mt76: mt7996: Support MLO in mt7996_mac_sta_event()")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Tested-by: Ben Greear <greearb@candelatech.com>
Link: https://pa... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index 68ce6f96348b..79e5731d8f0d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -1159,12 +1159,15 @@ mt7996_mac_sta_event(stru... |
a4031fec9d0d230224a7edcefa3368c06c317148 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix EMI rings for RRO | Problem Details:
The RRO EMI rings only need to be allocated when WED is not active.
This patch fixes command timeout issue for the setting of WED off and
RRO on.
Fixes: 3a29164425e9 ("wifi: mt76: mt7996: Add SW path for HW-RRO v3.1")
Co-developed-by: Rex Lu <rex.lu@mediatek.com>
Signed-off-by: Rex Lu <rex.lu@mediatek... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c
index 7ac4defca29d..274b273df1ee 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c
@@ -515,12 +515,15 @@ int mt7996_dma_rro_init(struct ... |
f1e9f369ae42ee433836b24467e645192d046a51 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix using wrong phy to start in mt7996_mac_restart() | Problem Details:
Pass the correct mt7996_phy to mt7996_run().
Fixes: 0a5df0ec47f7 ("wifi: mt76: mt7996: remove redundant per-phy mac80211 calls during restart")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20251106064203.1000505-11... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index c1f2938d1f21..2c869f710193 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -2368,7 +2368,7 @@ mt7996_mac_restart(struct mt799... |
e11be918d91e7d33ac4bad41dbe666a9abf1cfaa | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix MLO set key and group key issues | Problem Details:
This patch fixes the following key issues:
- Pass correct link BSS to mt7996_mcu_add_key(), and use HW beacon
protection mode for mt7990 chipset
- Do not do group key deletion for GTK and IGTK due to FW design, the
delete key command will delete all group keys of a link BSS
- For deleting BIGTK, FW... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 579084cbb30f..c1f2938d1f21 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -795,6 +795,7 @@ mt7996_mac_write_txwi_80211(struc... |
4fb3b4e7d1ca5453c6167816230370afc15f26bf | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix MLD group index assignment | Problem Details:
Fix extender mode and MBSS issues caused by incorrect assignment of the
MLD group and remap indices.
Fixes: ed01c310eca9 ("wifi: mt76: mt7996: Fix mt7996_mcu_bss_mld_tlv routine")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index ef605e81cba9..66e22f5576f8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -90,9 +90,11 @@ static void mt7996_stop(struct... |
7eaea3a8ba1e9bb58f87e3030f6ce18537e57e1f | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: set link_valid field when initializing wcid | Problem Details:
This ensures the upper layer uses the correct link ID during packet
processing.
Fixes: dd82a9e02c05 ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index 685be98b9f27..c26f8f49ce44 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -343,6 +343,7 @@ int mt7996_vif_link_add(struc... |
e077071e7ac48d5453072f615d51629891c5b90d | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix teardown command for an MLD peer | Problem Details:
For an MLD peer, we only need to call the teardown command when removing
the last link, and there's no need to call mt7996_mcu_add_sta() for the
earlier links.
Fixes: c1d6dd5d03eb ("wifi: mt76: mt7996: Add mt7996_mcu_teardown_mld_sta rouine")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Acked... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index 5e0b57657e7e..685be98b9f27 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -1206,13 +1206,13 @@ mt7996_mac_sta_event(stru... |
bb705a606734e1ce0ff17a4f368a896757ba686d | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix several fields in mt7996_mcu_bss_basic_tlv() | Problem Details:
Fix several fields in mt7996_mcu_bss_basic_tlv() that were not obtained
from the correct link. Without this patch, the MLD station interface
does not function properly.
Fixes: 34a41bfbcb71 ("wifi: mt76: mt7996: prepare mt7996_mcu_add_dev/bss_info for MLO support")
Signed-off-by: Shayne Chen <shayne.ch... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
index 82dd34a8780f..f1892aaf6a91 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -1037,7 +1037,6 @@ mt7996_mcu_bss_basic_tlv(struct... |
5d86765828b47444908a8689f2625872e8dac48f | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix implicit beamforming support for mt7992 | Problem Details:
Fix the ibf_timeout field for mt7996, mt7992 and mt7990 chipsets. For
the mt7992, this value shall be set as 0xff, while the others shall be
set as 0x18.
Fixes: ad4c9a8a9803 ("wifi: mt76: mt7996: add implicit beamforming support for mt7992")
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signe... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
index e97984693290..82dd34a8780f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -1825,8 +1825,8 @@ mt7996_mcu_sta_bfer_tlv(struct ... |
361b59b6be7c33c43b619d5cada394efc0f3b398 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix max nss value when getting rx chainmask | Problem Details:
Since wiphy->available_antennas_tx now accumulates the chainmask of all
the radios of a wiphy, use phy->orig_antenna_mask to get the original
max nss for comparison.
Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.co... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h b/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
index 87730d26669d..891b187566b3 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
@@ -786,7 +786,7 @@ void mt7996_memcpy_fr... |
f72c8ab57927653199da6e35405eadffb40d7e54 | Analyze and fix the following issue in the Linux kernel code: platform/x86: asus-armoury: fix only DC tunables being available | Problem Details:
Module asus-armoury must use AC tunables to check availability
of power-related firmware attributes: fix missing attributes
by using AC attributes instead of DC.
Signed-off-by: Denis Benato <denis.benato@linux.dev>
Link: https://patch.msgid.link/20251123150535.267339-1-denis.benato@linux.dev
Reviewed-... | ```diff
diff --git a/drivers/platform/x86/asus-armoury.c b/drivers/platform/x86/asus-armoury.c
index 5106e8a41e25..9c1a9ad42bc4 100644
--- a/drivers/platform/x86/asus-armoury.c
+++ b/drivers/platform/x86/asus-armoury.c
@@ -869,7 +869,8 @@ static bool has_valid_limit(const char *name, const struct power_limits *limits)
... |
cdb2941a516cf06929293604e2e0f4c1d6f3541e | Analyze and fix the following issue in the Linux kernel code: Revert "wifi: mt76: mt792x: improve monitor interface handling" | Problem Details:
This reverts commit 55e95ce469d0c61041bae48b2ebb7fcbf6d1ba7f.
mt792x drivers don't seem to support multi-radio devices yet. At least
they don't mess with `struct wiphy_radio` at the moment.
Packet capturing on monitor interface doesn't work after the blamed patch:
tcpdump -i wls6mon -n -vvv
Reve... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_core.c b/drivers/net/wireless/mediatek/mt76/mt792x_core.c
index 5b50bf94996e..f2ed16feb6c1 100644
--- a/drivers/net/wireless/mediatek/mt76/mt792x_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt792x_core.c
@@ -688,7 +688,6 @@ int mt792x_init_wiphy(struct ... |
2df00805f7dbaa46b60c682aad0d76270b7ba266 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mmio_*_copy fix byte order and alignment | Problem Details:
Update functions which copy to and from MMIO to load bytes as Little
Endian, and also support unaligned buffers.
PCI devices almost universally use Little Endian ordering for MMIO
registers, mt76 is no exception. PCI hardware that is designed to work
with Big Endian CPUs often (but not always) "helps"... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mmio.c b/drivers/net/wireless/mediatek/mt76/mmio.c
index 0ea97295f5c4..05d74cd7248e 100644
--- a/drivers/net/wireless/mediatek/mt76/mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mmio.c
@@ -33,13 +33,21 @@ static u32 mt76_mmio_rmw(struct mt76_dev *dev, u32 offset... |
9ba77f1a634a89893022640c7d241c0781d48663 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix typos in comments | Problem Details:
Fix two minor comment typos in the mt7996 driver:
- "Tx/Tx" -> "Rx/Tx"
- "tnterrupt" -> "interrupt"
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Link: https://patch.msgid.link/20251021064812.1778297-1-alok.a.tiwari@oracle.com
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 6ec17d364e83..7d5f9d9b3b62 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -2553,7 +2553,7 @@ void mt7996_mac_reset_work(stru... |
2157e49892c5eae210b8fa6ee8672bd9d0ffa4b5 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: Remove useless check in mt7996_msdu_page_get_from_cache() | Problem Details:
Get rid of useless null-pointer check in mt7996_msdu_page_get_from_cache
since we have already verfied the list is not empty.
Fixes: b1e58e137b616 ("wifi: mt76: mt7996: Introduce RRO MSDU callbacks")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202510100155.MS0IXhzm... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index fd3fabc60026..ace23fd67c8d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -1681,8 +1681,7 @@ mt7996_msdu_page_get_from_cache... |
909675fd4344f73aad5f75f123bd271ada2ab9fb | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: fix license/copyright of util.h | Problem Details:
The extra copyright line for Ivo van Doorn and GPL license was only there
because of code that I had already removed before the initial upstream
submission of mt76.
Remove it and make this header file use ISC license like the rest of the
source files.
Link: https://patch.msgid.link/20251008104250.4629... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/util.h b/drivers/net/wireless/mediatek/mt76/util.h
index 260965dde94c..037d39a55f71 100644
--- a/drivers/net/wireless/mediatek/mt76/util.h
+++ b/drivers/net/wireless/mediatek/mt76/util.h
@@ -1,7 +1,6 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
+/* SPDX-License... |
a9730354ca26e16f80ddda3c88fd08075afe7078 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: use GFP_DMA32 for page_pool buffer allocation | Problem Details:
Set GFP_DMA32 flag for page_pool buffers allocation since the hw relies
on 32-bit DMA addresses for WED offloading.
Tested-by: Daniel Pawlik <pawlik.dan@gmail.com>
Tested-by: Matteo Croce <teknoraver@meta.com>
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Co-developed-by: Lorenzo Bianconi <lo... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index e0a036b03b03..37e1d9e24932 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -1877,7 +1877,8 @@ mt76_get_page_pool_buf(struct mt76_queue *q, u32 *offse... |
385aab8fccd7a8746b9f1a17f3c1e38498a14bc7 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: wed: use proper wed reference in mt76 wed driver callabacks | Problem Details:
MT7996 driver can use both wed and wed_hif2 devices to offload traffic
from/to the wireless NIC. In the current codebase we assume to always
use the primary wed device in wed callbacks resulting in the following
crash if the hw runs wed_hif2 (e.g. 6GHz link).
[ 297.455876] Unable to handle kernel rea... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 86b812f68c97..e0a036b03b03 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -1260,6 +1260,15 @@ static inline int mt76_wed_dma_setup(struct mt76_dev *... |
b05ab4be9fd779115635144ebb0691a0c3dd3943 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: add bf backoff limit table support | Problem Details:
The commit 22b980badc0f ("mt76: add functions for parsing rate power limits
from DT") introduced generic support for rates limits in the devicetree.
But the mt7915 supports beamforming and has another table for configuring
the backoff limits. These can be configured in the DT with the paths-*
propertie... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/debugfs.c b/drivers/net/wireless/mediatek/mt76/debugfs.c
index b6a2746c187d..bee1177594d3 100644
--- a/drivers/net/wireless/mediatek/mt76/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/debugfs.c
@@ -93,9 +93,9 @@ void mt76_seq_puts_array(struct seq_file *file,... |
38b845e1f9e810869b0a0b69f202b877b7b7fb12 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: Fix DTS power-limits on little endian systems | Problem Details:
The power-limits for ru and mcs and stored in the devicetree as bytewise
array (often with sizes which are not a multiple of 4). These arrays have a
prefix which defines for how many modes a line is applied. This prefix is
also only a byte - but the code still tried to fix the endianness of this
byte w... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
index a987c5e4eff6..6ce8e4af18fe 100644
--- a/drivers/net/wireless/mediatek/mt76/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/eeprom.c
@@ -253,6 +253,19 @@ mt76_get_of_array(struct device_node *np, char *... |
084922069ceac4d594c06b76a80352139fd15f4d | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: Remove unnecessary link_id checks in mt7996_tx | Problem Details:
Remove unnecessary link_id checks in mt7996_tx routine since if the link
identifier provided by mac80211 is unspecified the value will be
overwritten at the beginning on the function.
Fixes: f940c9b7aef6 ("wifi: mt76: mt7996: Set proper link destination address in mt7996_tx()")
Signed-off-by: Lorenzo ... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index b53ca702591c..2b52d057287a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -1339,12 +1339,10 @@ static void mt7996_tx(str... |
79277f8ad15ec5f255ed0e1427c7a8a3e94e7f52 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix null pointer deref in mt7996_conf_tx() | Problem Details:
If a link does not have an assigned channel yet, mt7996_vif_link returns
NULL. We still need to store the updated queue settings in that case, and
apply them later.
Move the location of the queue params to within struct mt7996_vif_link.
Fixes: c0df2f0caa8d ("wifi: mt76: mt7996: prepare mt7996_mcu_set_... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index 581314368c5b..b53ca702591c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -665,8 +665,8 @@ mt7996_conf_tx(struct ieee802... |
165eb13e485c5c25c7cb276ac85f788a2bd200cb | Analyze and fix the following issue in the Linux kernel code: arm64: proton-pack: Fix hard lockup when !MITIGATE_SPECTRE_BRANCH_HISTORY | Problem Details:
The "drop print" commit removed the whole branch and not just the print.
For some ARM64 cpus, this leads to hard lockup when
CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not enabled.
Fixes: 62e72463ca71 ("arm64: proton-pack: Drop print when !CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY")
Signed-off-by: Jonatha... | ```diff
diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c
index c7d70d04c164..80a580e019c5 100644
--- a/arch/arm64/kernel/proton-pack.c
+++ b/arch/arm64/kernel/proton-pack.c
@@ -1032,6 +1032,8 @@ void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *entry)
if (arm64_ge... |
7c16c02e86081355a54c50c045b0caa172e72028 | Analyze and fix the following issue in the Linux kernel code: ACPI: GTDT: Correctly number platform devices for MMIO timers | Problem Details:
Use the actual timer counter instead of the watchdog counter.
Fixes: 5669d92f3efa ("ACPI: GTDT: Generate platform devices for MMIO timers")
Reported-by: Pavan Kondeti <pavan.kondeti@oss.qualcomm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Hanjun Guo <guohanjun@huawei.com>
Cc: Sudeep Holla <s... | ```diff
diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c
index fd995a1d3d24..8cc8af8fd408 100644
--- a/drivers/acpi/arm64/gtdt.c
+++ b/drivers/acpi/arm64/gtdt.c
@@ -430,10 +430,10 @@ static int __init gtdt_platform_timer_init(void)
continue;
pdev = platform_device_register_data(NULL, "gtdt-... |
9b9c0adbc3f8a524d291baccc9d0c04097fb4869 | Analyze and fix the following issue in the Linux kernel code: platform/x86: intel: punit_ipc: fix memory corruption | Problem Details:
This passes the address of the pointer "&punit_ipcdev" when the intent
was to pass the pointer itself "punit_ipcdev" (without the ampersand).
This means that the:
complete(&ipcdev->cmd_complete);
in intel_punit_ioc() will write to a wrong memory address corrupting it.
Fixes: fdca4f16f57d ("platform... | ```diff
diff --git a/drivers/platform/x86/intel/punit_ipc.c b/drivers/platform/x86/intel/punit_ipc.c
index bafac8aa2baf..14513010daad 100644
--- a/drivers/platform/x86/intel/punit_ipc.c
+++ b/drivers/platform/x86/intel/punit_ipc.c
@@ -250,7 +250,7 @@ static int intel_punit_ipc_probe(struct platform_device *pdev)
} el... |
620a8f131154250f6a64a07d049a4f235d6451a5 | Analyze and fix the following issue in the Linux kernel code: drm: sti: fix device leaks at component probe | Problem Details:
Make sure to drop the references taken to the vtg devices by
of_find_device_by_node() when looking up their driver data during
component probe.
Note that holding a reference to a platform device does not prevent its
driver data from going away so there is no point in keeping the
reference after the lo... | ```diff
diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
index ee81691b3203..ce6bc7e7b135 100644
--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -143,12 +143,17 @@ struct sti_vtg {
struct sti_vtg *of_vtg_find(struct device_node *np)
{
struct platform_device *pdev... |
de3c5142349c6cd67fbd20afc5b3ae320df436b7 | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix channel switching code | Problem Details:
My prior commit here introduced a bug due to copy/paste,
it was iterating the links assigned to 'ctx->replace_ctx'
and I replaced it by iterating links assigned to 'ctx' by
accident, then modified it for the iteration later.
Fix it to iterate the users of the correct chanctx, i.e.
'ctx->replace_ctx'.
... | ```diff
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 6aa305839f53..c8aba4183c9a 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -1715,7 +1715,7 @@ static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local)
n_reserved = 0;
n_ready = 0;
- for_each_chanctx_user_assig... |
a90903c2a3c38bce475f46ea3f93dbf6a9971553 | Analyze and fix the following issue in the Linux kernel code: spi: amlogic-spifc-a1: Handle devm_pm_runtime_enable() errors | Problem Details:
devm_pm_runtime_enable() can fail due to memory allocation. The current
code ignores its return value, potentially causing runtime PM operations
to fail silently after autosuspend configuration.
Check the return value of devm_pm_runtime_enable() and return on failure.
Fixes: 909fac05b926 ("spi: add s... | ```diff
diff --git a/drivers/spi/spi-amlogic-spifc-a1.c b/drivers/spi/spi-amlogic-spifc-a1.c
index 18c9aa2cbc29..eb503790017b 100644
--- a/drivers/spi/spi-amlogic-spifc-a1.c
+++ b/drivers/spi/spi-amlogic-spifc-a1.c
@@ -353,7 +353,9 @@ static int amlogic_spifc_a1_probe(struct platform_device *pdev)
pm_runtime_set_au... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.